X Tutup
%% Generated by Sphinx. \def\sphinxdocclass{report} \documentclass[letterpaper,10pt,english]{sphinxmanual} \ifdefined\pdfpxdimen \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen \fi \sphinxpxdimen=.75bp\relax %% turn off hyperref patch of \index as sphinx.xdy xindy module takes care of %% suitable \hyperpage mark-up, working around hyperref-xindy incompatibility \PassOptionsToPackage{hyperindex=false}{hyperref} \PassOptionsToPackage{warn}{textcomp} \catcode`^^^^00a0\active\protected\def^^^^00a0{\leavevmode\nobreak\ } \usepackage{cmap} \usepackage{fontspec} \usepackage{amsmath,amssymb,amstext} \usepackage{babel} \setmainfont{DejaVu Serif} \usepackage[Bjarne]{fncychap} \usepackage{sphinx} \fvset{fontsize=auto} \usepackage{geometry} % Include hyperref last. \usepackage{hyperref} % Fix anchor placement for figures with captions. \usepackage{hypcap}% it must be loaded after hyperref. % Set up styles of URL: it should be placed after hyperref. \urlstyle{same} \addto\captionsenglish{\renewcommand{\figurename}{Fig.\@ }} \makeatletter \def\fnum@figure{\figurename\thefigure{}} \makeatother \addto\captionsenglish{\renewcommand{\tablename}{Table }} \makeatletter \def\fnum@table{\tablename\thetable{}} \makeatother \addto\captionsenglish{\renewcommand{\literalblockname}{Listing}} \addto\captionsenglish{\renewcommand{\literalblockcontinuedname}{continued from previous page}} \addto\captionsenglish{\renewcommand{\literalblockcontinuesname}{continues on next page}} \addto\captionsenglish{\renewcommand{\sphinxnonalphabeticalgroupname}{Non-alphabetical}} \addto\captionsenglish{\renewcommand{\sphinxsymbolsname}{Symbols}} \addto\captionsenglish{\renewcommand{\sphinxnumbersname}{Numbers}} \addto\extrasenglish{\def\pageautorefname{page}} \setcounter{tocdepth}{0} \title{Matplotlib} \date{May 18, 2019} \release{3.1.0} \author{John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team} \newcommand{\sphinxlogo}{\vbox{}} \renewcommand{\releasename}{Release} \makeindex \begin{document} \pagestyle{empty} \sphinxmaketitle \pagestyle{plain} \sphinxtableofcontents \pagestyle{normal} \phantomsection\label{\detokenize{contents::doc}} \part{User's Guide} \label{\detokenize{users/index:user-s-guide}}\label{\detokenize{users/index:users-guide-index}}\label{\detokenize{users/index::doc}} \chapter{Installing} \label{\detokenize{users/installing:installing}}\label{\detokenize{users/installing::doc}} \begin{sphinxadmonition}{note}{Note:} If you wish to contribute to the project, it's recommended you {\hyperref[\detokenize{users/installing:install-from-source}]{\sphinxcrossref{\DUrole{std,std-ref}{install the latest development version}}}}. \end{sphinxadmonition} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id2}}{\hyperref[\detokenize{users/installing:installing}]{\sphinxcrossref{Installing}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id3}}{\hyperref[\detokenize{users/installing:installing-an-official-release}]{\sphinxcrossref{Installing an official release}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id4}}{\hyperref[\detokenize{users/installing:macos}]{\sphinxcrossref{macOS}}} \item {} \phantomsection\label{\detokenize{users/installing:id5}}{\hyperref[\detokenize{users/installing:test-data}]{\sphinxcrossref{Test data}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id6}}{\hyperref[\detokenize{users/installing:third-party-distributions-of-matplotlib}]{\sphinxcrossref{Third-party distributions of Matplotlib}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id7}}{\hyperref[\detokenize{users/installing:scientific-python-distributions}]{\sphinxcrossref{Scientific Python Distributions}}} \item {} \phantomsection\label{\detokenize{users/installing:id8}}{\hyperref[\detokenize{users/installing:linux-using-your-package-manager}]{\sphinxcrossref{Linux: using your package manager}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id9}}{\hyperref[\detokenize{users/installing:installing-from-source}]{\sphinxcrossref{Installing from source}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id10}}{\hyperref[\detokenize{users/installing:dependencies}]{\sphinxcrossref{Dependencies}}} \item {} \phantomsection\label{\detokenize{users/installing:id11}}{\hyperref[\detokenize{users/installing:building-on-linux}]{\sphinxcrossref{Building on Linux}}} \item {} \phantomsection\label{\detokenize{users/installing:id12}}{\hyperref[\detokenize{users/installing:building-on-macos}]{\sphinxcrossref{Building on macOS}}} \item {} \phantomsection\label{\detokenize{users/installing:id13}}{\hyperref[\detokenize{users/installing:building-on-windows}]{\sphinxcrossref{Building on Windows}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/installing:id14}}{\hyperref[\detokenize{users/installing:wheel-builds-using-conda-packages}]{\sphinxcrossref{Wheel builds using conda packages}}} \item {} \phantomsection\label{\detokenize{users/installing:id15}}{\hyperref[\detokenize{users/installing:conda-packages}]{\sphinxcrossref{Conda packages}}} \end{itemize} \end{itemize} \end{itemize} \end{itemize} \end{sphinxShadowBox} \section{Installing an official release} \label{\detokenize{users/installing:installing-an-official-release}} Matplotlib and its dependencies are available as wheel packages for macOS, Windows and Linux distributions: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{m} \PYG{n}{pip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{U} \PYG{n}{pip} \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{m} \PYG{n}{pip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{U} \PYG{n}{matplotlib} \end{sphinxVerbatim} \begin{sphinxadmonition}{note}{Note:} The following backends work out of the box: Agg, ps, pdf, svg and TkAgg. For support of other GUI frameworks, LaTeX rendering, saving animations and a larger selection of file formats, you may need to install {\hyperref[\detokenize{users/installing:install-requirements}]{\sphinxcrossref{\DUrole{std,std-ref}{additional dependencies}}}}. \end{sphinxadmonition} Although not required, we suggest also installing \sphinxcode{\sphinxupquote{IPython}} for interactive use. To easily install a complete Scientific Python stack, see {\hyperref[\detokenize{users/installing:install-scipy-dists}]{\sphinxcrossref{\DUrole{std,std-ref}{Scientific Python Distributions}}}} below. \subsection{macOS} \label{\detokenize{users/installing:macos}} To use the native OSX backend you will need {\hyperref[\detokenize{faq/osx_framework:osxframework-faq}]{\sphinxcrossref{\DUrole{std,std-ref}{a framework build}}}} build of Python. \subsection{Test data} \label{\detokenize{users/installing:test-data}} The wheels (\sphinxcode{\sphinxupquote{*.whl}}) on the \sphinxhref{https://pypi.org/project/matplotlib/}{PyPI download page} do not contain test data or example code. If you want to try the many demos that come in the Matplotlib source distribution, download the \sphinxcode{\sphinxupquote{*.tar.gz}} file and look in the \sphinxcode{\sphinxupquote{examples}} subdirectory. To run the test suite: \begin{itemize} \item {} extract the \sphinxcode{\sphinxupquote{lib/matplotlib/tests}} or \sphinxcode{\sphinxupquote{lib/mpl\_toolkits/tests}} directories from the source distribution; \item {} install test dependencies: \sphinxhref{https://pypi.org/project/pytest}{pytest}, Pillow, MiKTeX, GhostScript, ffmpeg, avconv, ImageMagick, and \sphinxhref{https://inkscape.org/}{Inkscape}; \item {} run \sphinxcode{\sphinxupquote{python -mpytest}}. \end{itemize} \section{Third-party distributions of Matplotlib} \label{\detokenize{users/installing:third-party-distributions-of-matplotlib}} \subsection{Scientific Python Distributions} \label{\detokenize{users/installing:scientific-python-distributions}}\label{\detokenize{users/installing:install-scipy-dists}} \sphinxhref{https://www.anaconda.com/}{Anaconda} and \sphinxhref{https://www.enthought.com/products/canopy/}{Canopy} and \sphinxhref{https://www.activestate.com/activepython/downloads}{ActiveState} are excellent choices that "just work" out of the box for Windows, macOS and common Linux platforms. \sphinxhref{https://winpython.github.io/}{WinPython} is an option for Windows users. All of these distributions include Matplotlib and \sphinxstyleemphasis{lots} of other useful (data) science tools. \subsection{Linux: using your package manager} \label{\detokenize{users/installing:linux-using-your-package-manager}} If you are on Linux, you might prefer to use your package manager. Matplotlib is packaged for almost every major Linux distribution. \begin{itemize} \item {} Debian / Ubuntu: \sphinxcode{\sphinxupquote{sudo apt-get install python3-matplotlib}} \item {} Fedora: \sphinxcode{\sphinxupquote{sudo dnf install python3-matplotlib}} \item {} Red Hat: \sphinxcode{\sphinxupquote{sudo yum install python3-matplotlib}} \item {} Arch: \sphinxcode{\sphinxupquote{sudo pacman -S python-matplotlib}} \end{itemize} \section{Installing from source} \label{\detokenize{users/installing:installing-from-source}}\label{\detokenize{users/installing:install-from-source}} If you are interested in contributing to Matplotlib development, running the latest source code, or just like to build everything yourself, it is not difficult to build Matplotlib from source. Grab the latest \sphinxstyleemphasis{tar.gz} release file from \sphinxhref{https://pypi.org/project/matplotlib/}{the PyPI files page}, or if you want to develop Matplotlib or just need the latest bugfixed version, grab the latest git version, and see {\hyperref[\detokenize{faq/installing_faq:install-from-git}]{\sphinxcrossref{\DUrole{std,std-ref}{Install from source}}}}. The standard environment variables \sphinxcode{\sphinxupquote{CC}}, \sphinxcode{\sphinxupquote{CXX}}, \sphinxcode{\sphinxupquote{PKG\_CONFIG}} are respected. This means you can set them if your toolchain is prefixed. This may be used for cross compiling. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{export} \PYG{n}{CC}\PYG{o}{=}\PYG{n}{x86\PYGZus{}64}\PYG{o}{\PYGZhy{}}\PYG{n}{pc}\PYG{o}{\PYGZhy{}}\PYG{n}{linux}\PYG{o}{\PYGZhy{}}\PYG{n}{gnu}\PYG{o}{\PYGZhy{}}\PYG{n}{gcc} \PYG{n}{export} \PYG{n}{CXX}\PYG{o}{=}\PYG{n}{x86\PYGZus{}64}\PYG{o}{\PYGZhy{}}\PYG{n}{pc}\PYG{o}{\PYGZhy{}}\PYG{n}{linux}\PYG{o}{\PYGZhy{}}\PYG{n}{gnu}\PYG{o}{\PYGZhy{}}\PYG{n}{g}\PYG{o}{+}\PYG{o}{+} \PYG{n}{export} \PYG{n}{PKG\PYGZus{}CONFIG}\PYG{o}{=}\PYG{n}{x86\PYGZus{}64}\PYG{o}{\PYGZhy{}}\PYG{n}{pc}\PYG{o}{\PYGZhy{}}\PYG{n}{linux}\PYG{o}{\PYGZhy{}}\PYG{n}{gnu}\PYG{o}{\PYGZhy{}}\PYG{n}{pkg}\PYG{o}{\PYGZhy{}}\PYG{n}{config} \end{sphinxVerbatim} Once you have satisfied the requirements detailed below (mainly Python, NumPy, libpng and FreeType), you can build Matplotlib. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cd} \PYG{n}{matplotlib} \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{.} \end{sphinxVerbatim} We provide a \sphinxhref{https://raw.githubusercontent.com/matplotlib/matplotlib/master/setup.cfg.template}{setup.cfg} file which you can use to customize the build process. For example, which default backend to use, whether some of the optional libraries that Matplotlib ships with are installed, and so on. This file will be particularly useful to those packaging Matplotlib. If you have installed prerequisites to nonstandard places and need to inform Matplotlib where they are, edit \sphinxcode{\sphinxupquote{setupext.py}} and add the base dirs to the \sphinxcode{\sphinxupquote{basedir}} dictionary entry for your \sphinxcode{\sphinxupquote{sys.platform}}; e.g., if the header of some required library is in \sphinxcode{\sphinxupquote{/some/path/include/someheader.h}}, put \sphinxcode{\sphinxupquote{/some/path}} in the \sphinxcode{\sphinxupquote{basedir}} list for your platform. \subsection{Dependencies} \label{\detokenize{users/installing:dependencies}}\label{\detokenize{users/installing:install-requirements}} Matplotlib requires the following dependencies: \begin{itemize} \item {} \sphinxhref{https://www.python.org/downloads/}{Python} (\textgreater{}= 3.6) \item {} \sphinxhref{https://www.freetype.org/}{FreeType} (\textgreater{}= 2.3) \item {} \sphinxhref{http://www.libpng.org}{libpng} (\textgreater{}= 1.2) \item {} \sphinxhref{http://www.numpy.org}{NumPy} (\textgreater{}= 1.11) \item {} \sphinxhref{https://setuptools.readthedocs.io/en/latest/}{setuptools} \item {} \sphinxhref{http://matplotlib.org/cycler/}{cycler} (\textgreater{}= 0.10.0) \item {} \sphinxhref{https://pypi.org/project/python-dateutil}{dateutil} (\textgreater{}= 2.1) \item {} \sphinxhref{https://github.com/nucleic/kiwi}{kiwisolver} (\textgreater{}= 1.0.0) \item {} \sphinxhref{https://pyparsing.wikispaces.com/}{pyparsing} \end{itemize} Optionally, you can also install a number of packages to enable better user interface toolkits. See {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}} for more details on the optional Matplotlib backends and the capabilities they provide. \begin{itemize} \item {} {\hyperref[\detokenize{glossary/index:term-tk}]{\sphinxtermref{\DUrole{xref,std,std-term}{tk}}}} (\textgreater{}= 8.3, != 8.6.0 or 8.6.1): for the Tk-based backends; \item {} \sphinxhref{https://pypi.org/project/PyQt4}{PyQt4} (\textgreater{}= 4.6) or \sphinxhref{https://pypi.org/project/PySide}{PySide} (\textgreater{}= 1.0.3): for the Qt4-based backends; \item {} \sphinxhref{https://pypi.org/project/PyQt5}{PyQt5}: for the Qt5-based backends; \item {} \sphinxhref{https://pypi.org/project/PyGObject/}{PyGObject}: for the GTK3-based backends; \item {} {\hyperref[\detokenize{glossary/index:term-wxpython}]{\sphinxtermref{\DUrole{xref,std,std-term}{wxpython}}}} (\textgreater{}= 4): for the WX-based backends; \item {} \sphinxhref{https://cairocffi.readthedocs.io/en/latest/}{cairocffi} (\textgreater{}= 0.8) or \sphinxhref{https://pypi.org/project/pycairo}{pycairo}: for the cairo-based backends; \item {} \sphinxhref{https://pypi.org/project/tornado}{Tornado}: for the WebAgg backend; \end{itemize} For better support of animation output format and image file formats, LaTeX, etc., you can install the following: \begin{itemize} \item {} \sphinxhref{https://www.ffmpeg.org/}{ffmpeg}/\sphinxhref{https://libav.org/avconv.html}{avconv}: for saving movies; \item {} \sphinxhref{https://www.imagemagick.org/script/index.php}{ImageMagick}: for saving animated gifs; \item {} \sphinxhref{https://pillow.readthedocs.io/en/latest/}{Pillow} (\textgreater{}= 3.4): for a larger selection of image file formats: JPEG, BMP, and TIFF image files; \item {} \sphinxhref{https://miktex.org/}{LaTeX} and \sphinxhref{https://ghostscript.com/download/}{GhostScript (\textgreater{}=9.0)} : for rendering text with LaTeX. \end{itemize} \begin{sphinxadmonition}{note}{Note:} Matplotlib depends on non-Python libraries. On Linux and OSX, \sphinxhref{https://www.freedesktop.org/wiki/Software/pkg-config/}{pkg-config} can be used to find required non-Python libraries and thus make the install go more smoothly if the libraries and headers are not in the expected locations. If not using pkg-config (in particular on Windows), you may need to set the include path (to the FreeType, libpng, and zlib headers) and link path (to the FreeType, libpng, and zlib libraries) explicitly, if they are not in standard locations. This can be done using standard environment variables -- on Linux and OSX: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{export} \PYG{n+nv}{CFLAGS}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}\PYGZhy{}I/directory/containing/ft2build.h ...\PYGZsq{}} \PYG{n+nb}{export} \PYG{n+nv}{LDFLAGS}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}\PYGZhy{}L/directory/containing/libfreetype.so ...\PYGZsq{}} \end{sphinxVerbatim} and on Windows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{set} \PYG{n+nv}{CL}\PYG{p}{=}/IC:\PYGZbs{}directory\PYGZbs{}containing\PYGZbs{}ft2build.h ... \PYG{k}{set} \PYG{n+nv}{LINK}\PYG{p}{=}/LIBPATH:C:\PYGZbs{}directory\PYGZbs{}containing\PYGZbs{}freetype.lib ... \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{...}} means "also give, in the same format, the directories containing \sphinxcode{\sphinxupquote{png.h}} and \sphinxcode{\sphinxupquote{zlib.h}} for the include path, and for \sphinxcode{\sphinxupquote{libpng.so}}/\sphinxcode{\sphinxupquote{png.lib}} and \sphinxcode{\sphinxupquote{libz.so}}/\sphinxcode{\sphinxupquote{z.lib}} for the link path." \end{sphinxadmonition} \begin{sphinxadmonition}{note}{Note:} The following libraries are shipped with Matplotlib: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{Agg}}: the Anti-Grain Geometry C++ rendering engine; \item {} \sphinxcode{\sphinxupquote{qhull}}: to compute Delaunay triangulation; \item {} \sphinxcode{\sphinxupquote{ttconv}}: a TrueType font utility. \end{itemize} \end{sphinxadmonition} \subsection{Building on Linux} \label{\detokenize{users/installing:building-on-linux}}\label{\detokenize{users/installing:build-linux}} It is easiest to use your system package manager to install the dependencies. If you are on Debian/Ubuntu, you can get all the dependencies required to build Matplotlib with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sudo} \PYG{n}{apt}\PYG{o}{\PYGZhy{}}\PYG{n}{get} \PYG{n}{build}\PYG{o}{\PYGZhy{}}\PYG{n}{dep} \PYG{n}{python}\PYG{o}{\PYGZhy{}}\PYG{n}{matplotlib} \end{sphinxVerbatim} If you are on Fedora, you can get all the dependencies required to build Matplotlib with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sudo} \PYG{n}{dnf} \PYG{n}{builddep} \PYG{n}{python}\PYG{o}{\PYGZhy{}}\PYG{n}{matplotlib} \end{sphinxVerbatim} If you are on RedHat, you can get all the dependencies required to build Matplotlib by first installing \sphinxcode{\sphinxupquote{yum-builddep}} and then running: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{su} \PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{yum\PYGZhy{}builddep python\PYGZhy{}matplotlib}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} These commands do not build Matplotlib, but instead get and install the build dependencies, which will make building from source easier. \subsection{Building on macOS} \label{\detokenize{users/installing:building-on-macos}}\label{\detokenize{users/installing:build-osx}} The build situation on macOS is complicated by the various places one can get the libpng and FreeType requirements (MacPorts, Fink, /usr/X11R6), the different architectures (e.g., x86, ppc, universal), and the different macOS versions (e.g., 10.4 and 10.5). We recommend that you build the way we do for the macOS release: get the source from the tarball or the git repository and install the required dependencies through a third-party package manager. Two widely used package managers are Homebrew, and MacPorts. The following example illustrates how to install libpng and FreeType using \sphinxcode{\sphinxupquote{brew}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{brew} \PYG{n}{install} \PYG{n}{libpng} \PYG{n}{freetype} \PYG{n}{pkg}\PYG{o}{\PYGZhy{}}\PYG{n}{config} \end{sphinxVerbatim} If you are using MacPorts, execute the following instead: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{port} \PYG{n}{install} \PYG{n}{libpng} \PYG{n}{freetype} \PYG{n}{pkgconfig} \end{sphinxVerbatim} After installing the above requirements, install Matplotlib from source by executing: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{.} \end{sphinxVerbatim} Note that your environment is somewhat important. Some conda users have found that, to run the tests, their PYTHONPATH must include /path/to/anaconda/.../site-packages and their DYLD\_FALLBACK\_LIBRARY\_PATH must include /path/to/anaconda/lib. \subsection{Building on Windows} \label{\detokenize{users/installing:building-on-windows}}\label{\detokenize{users/installing:build-windows}} The Python shipped from \sphinxurl{https://www.python.org} is compiled with Visual Studio 2015 for 3.5+. Python extensions should be compiled with the same compiler, see e.g. \sphinxurl{https://packaging.python.org/guides/packaging-binary-extensions/\#setting-up-a-build-environment-on-windows} for how to set up a build environment. Since there is no canonical Windows package manager, the methods for building FreeType, zlib, and libpng from source code are documented as a build script at \sphinxhref{https://github.com/jbmohler/matplotlib-winbuild}{matplotlib-winbuild}. There are a few possibilities to build Matplotlib on Windows: \begin{itemize} \item {} Wheels via \sphinxhref{https://github.com/jbmohler/matplotlib-winbuild}{matplotlib-winbuild} \item {} Wheels by using conda packages (see below) \item {} Conda packages (see below) \end{itemize} \subsubsection{Wheel builds using conda packages} \label{\detokenize{users/installing:wheel-builds-using-conda-packages}} This is a wheel build, but we use conda packages to get all the requirements. The binary requirements (png, FreeType,...) are statically linked and therefore not needed during the wheel install. Set up the conda environment. Note, if you want a qt backend, add \sphinxcode{\sphinxupquote{pyqt}} to the list of conda packages. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{conda} \PYG{n}{create} \PYG{o}{\PYGZhy{}}\PYG{n}{n} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{matplotlib\PYGZus{}build}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{python}\PYG{o}{=}\PYG{l+m+mf}{3.7} \PYG{n}{numpy} \PYG{n}{python}\PYG{o}{\PYGZhy{}}\PYG{n}{dateutil} \PYG{n}{pyparsing} \PYG{n}{tornado} \PYG{n}{cycler} \PYG{n}{tk} \PYG{n}{libpng} \PYG{n}{zlib} \PYG{n}{freetype} \PYG{n}{msinttypes} \PYG{n}{conda} \PYG{n}{activate} \PYG{n}{matplotlib\PYGZus{}build} \end{sphinxVerbatim} For building, call the script \sphinxcode{\sphinxupquote{build\_alllocal.cmd}} in the root folder of the repository: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{build\PYGZus{}alllocal}\PYG{o}{.}\PYG{n}{cmd} \end{sphinxVerbatim} \subsubsection{Conda packages} \label{\detokenize{users/installing:conda-packages}} The conda packaging scripts for Matplotlib are available at \sphinxurl{https://github.com/conda-forge/matplotlib-feedstock}. \chapter{Tutorials} \label{\detokenize{tutorials/index:tutorials}}\label{\detokenize{tutorials/index:sphx-glr-tutorials}}\label{\detokenize{tutorials/index:id1}}\label{\detokenize{tutorials/index::doc}} This page contains more in-depth guides for using Matplotlib. It is broken up into beginner, intermediate, and advanced sections, as well as sections covering specific topics. For shorter examples, see our \sphinxhref{../gallery/index.html}{examples page}. You can also find \sphinxhref{../resources/index.html}{external resources} and a \sphinxhref{../faq/index.html}{FAQ} in our \sphinxhref{../contents.html}{user guide}. \section{Introductory} \label{\detokenize{tutorials/index:introductory}}\label{\detokenize{tutorials/index:tutorials-introductory}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-introductory}} These tutorials cover the basics of creating visualizations with Matplotlib, as well as some best-practices in using the package effectively. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-download-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Usage Guide} \label{\detokenize{tutorials/introductory/usage:usage-guide}}\label{\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}}\label{\detokenize{tutorials/introductory/usage::doc}} This tutorial covers some basic usage patterns and best-practices to help you get started with Matplotlib. \subsubsection{General Concepts} \label{\detokenize{tutorials/introductory/usage:general-concepts}}\label{\detokenize{tutorials/introductory/usage:id1}} \sphinxcode{\sphinxupquote{matplotlib}} has an extensive codebase that can be daunting to many new users. However, most of matplotlib can be understood with a fairly simple conceptual framework and knowledge of a few important points. Plotting requires action on a range of levels, from the most general (e.g., 'contour this 2-D array') to the most specific (e.g., 'color this screen pixel red'). The purpose of a plotting package is to assist you in visualizing your data as easily as possible, with all the necessary control -- that is, by using relatively high-level commands most of the time, and still have the ability to use the low-level commands when needed. Therefore, everything in matplotlib is organized in a hierarchy. At the top of the hierarchy is the matplotlib "state-machine environment" which is provided by the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} module. At this level, simple functions are used to add plot elements (lines, images, text, etc.) to the current axes in the current figure. \begin{sphinxadmonition}{note}{Note:} Pyplot's state-machine environment behaves similarly to MATLAB and should be most familiar to users with MATLAB experience. \end{sphinxadmonition} The next level down in the hierarchy is the first level of the object-oriented interface, in which pyplot is used only for a few functions such as figure creation, and the user explicitly creates and keeps track of the figure and axes objects. At this level, the user uses pyplot to create figures, and through those figures, one or more axes objects can be created. These axes objects are then used for most plotting actions. For even more control -- which is essential for things like embedding matplotlib plots in GUI applications -- the pyplot level may be dropped completely, leaving a purely object-oriented approach. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} sphinx\PYGZus{}gallery\PYGZus{}thumbnail\PYGZus{}number = 3} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \end{sphinxVerbatim} \subsubsection{Parts of a Figure} \label{\detokenize{tutorials/introductory/usage:parts-of-a-figure}}\label{\detokenize{tutorials/introductory/usage:figure-parts}} \noindent\sphinxincludegraphics{{anatomy}.png} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Figure}}} \label{\detokenize{tutorials/introductory/usage:figure}} The \sphinxstylestrong{whole} figure. The figure keeps track of all the child {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, a smattering of 'special' artists (titles, figure legends, etc), and the \sphinxstylestrong{canvas}. (Don't worry too much about the canvas, it is crucial as it is the object that actually does the drawing to get you your plot, but as the user it is more-or-less invisible to you). A figure can have any number of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, but to be useful should have at least one. The easiest way to create a new figure is with pyplot: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} an empty figure with no axes} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{No axes on this figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Add a title so we know which it is} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax\PYGZus{}lst} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a figure with a 2x2 grid of Axes} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_usage_001}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_usage_002}.png} \end{itemize} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes}}} \label{\detokenize{tutorials/introductory/usage:axes}} This is what you think of as 'a plot', it is the region of the image with the data space. A given figure can contain many Axes, but a given {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object can only be in one {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. The Axes contains two (or three in the case of 3D) {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} objects (be aware of the difference between \sphinxstylestrong{Axes} and \sphinxstylestrong{Axis}) which take care of the data limits (the data limits can also be controlled via set via the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} \sphinxcode{\sphinxupquote{Axes}} methods). Each \sphinxcode{\sphinxupquote{Axes}} has a title (set via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_title()}}}}}), an x-label (set via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlabel()}}}}}), and a y-label set via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylabel()}}}}}). The \sphinxcode{\sphinxupquote{Axes}} class and it's member functions are the primary entry point to working with the OO interface. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axis}}} \label{\detokenize{tutorials/introductory/usage:axis}} These are the number-line-like objects. They take care of setting the graph limits and generating the ticks (the marks on the axis) and ticklabels (strings labeling the ticks). The location of the ticks is determined by a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} object and the ticklabel strings are formatted by a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}}. The combination of the correct \sphinxcode{\sphinxupquote{Locator}} and \sphinxcode{\sphinxupquote{Formatter}} gives very fine control over the tick locations and labels. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Artist}}} \label{\detokenize{tutorials/introductory/usage:artist}} Basically everything you can see on the figure is an artist (even the \sphinxcode{\sphinxupquote{Figure}}, \sphinxcode{\sphinxupquote{Axes}}, and \sphinxcode{\sphinxupquote{Axis}} objects). This includes \sphinxcode{\sphinxupquote{Text}} objects, \sphinxcode{\sphinxupquote{Line2D}} objects, \sphinxcode{\sphinxupquote{collection}} objects, \sphinxcode{\sphinxupquote{Patch}} objects ... (you get the idea). When the figure is rendered, all of the artists are drawn to the \sphinxstylestrong{canvas}. Most Artists are tied to an Axes; such an Artist cannot be shared by multiple Axes, or moved from one to another. \subsubsection{Types of inputs to plotting functions} \label{\detokenize{tutorials/introductory/usage:types-of-inputs-to-plotting-functions}}\label{\detokenize{tutorials/introductory/usage:input-types}} All of plotting functions expect \sphinxcode{\sphinxupquote{np.array}} or \sphinxcode{\sphinxupquote{np.ma.masked\_array}} as input. Classes that are 'array-like' such as \sphinxhref{https://pandas.pydata.org/pandas-docs/stable/index.html\#module-pandas}{\sphinxcode{\sphinxupquote{pandas}}} data objects and \sphinxcode{\sphinxupquote{np.matrix}} may or may not work as intended. It is best to convert these to \sphinxcode{\sphinxupquote{np.array}} objects prior to plotting. For example, to convert a \sphinxhref{https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html\#pandas.DataFrame}{\sphinxcode{\sphinxupquote{pandas.DataFrame}}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{o}{=} \PYG{n}{pandas}\PYG{o}{.}\PYG{n}{DataFrame}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{columns} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{abcde}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \PYG{n}{a\PYGZus{}asarray} \PYG{o}{=} \PYG{n}{a}\PYG{o}{.}\PYG{n}{values} \end{sphinxVerbatim} and to convert a \sphinxcode{\sphinxupquote{np.matrix}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{b} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{matrix}\PYG{p}{(}\PYG{p}{[}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{]}\PYG{p}{]}\PYG{p}{)} \PYG{n}{b\PYGZus{}asarray} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{asarray}\PYG{p}{(}\PYG{n}{b}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Matplotlib, pyplot and pylab: how are they related?} \label{\detokenize{tutorials/introductory/usage:matplotlib-pyplot-and-pylab-how-are-they-related}}\label{\detokenize{tutorials/introductory/usage:pylab}} Matplotlib is the whole package and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} is a module in Matplotlib. For functions in the pyplot module, there is always a "current" figure and axes (which is created automatically on request). For example, in the following example, the first call to \sphinxcode{\sphinxupquote{plt.plot}} creates the axes, then subsequent calls to \sphinxcode{\sphinxupquote{plt.plot}} add additional lines on the same axes, and \sphinxcode{\sphinxupquote{plt.xlabel}}, \sphinxcode{\sphinxupquote{plt.ylabel}}, \sphinxcode{\sphinxupquote{plt.title}} and \sphinxcode{\sphinxupquote{plt.legend}} set the axes labels and title and add a legend. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linear}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{x}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{quadratic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{x}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cubic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Simple Plot}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_usage_003}.png} \sphinxcode{\sphinxupquote{pylab}} is a convenience module that bulk imports {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} (for plotting) and \sphinxhref{https://docs.scipy.org/doc/numpy/reference/index.html\#module-numpy}{\sphinxcode{\sphinxupquote{numpy}}} (for mathematics and working with arrays) in a single namespace. pylab is deprecated and its use is strongly discouraged because of namespace pollution. Use pyplot instead. For non-interactive plotting it is suggested to use pyplot to create the figures and then the OO interface for plotting. \subsubsection{Coding Styles} \label{\detokenize{tutorials/introductory/usage:coding-styles}}\label{\detokenize{tutorials/introductory/usage:id2}} When viewing this documentation and examples, you will find different coding styles and usage patterns. These styles are perfectly valid and have their pros and cons. Just about all of the examples can be converted into another style and achieve the same results. The only caveat is to avoid mixing the coding styles for your own code. \begin{sphinxadmonition}{note}{Note:} Developers for matplotlib have to follow a specific style and guidelines. See {\hyperref[\detokenize{devel/index:developers-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{The Matplotlib Developers' Guide}}}}. \end{sphinxadmonition} Of the different styles, there are two that are officially supported. Therefore, these are the preferred ways to use matplotlib. For the pyplot style, the imports at the top of your scripts will typically be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \end{sphinxVerbatim} Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, plt.plot, plt.show, etc. Use the pyplot interface for creating figures, and then use the object methods for the rest: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_usage_004}.png} So, why all the extra typing instead of the MATLAB-style (which relies on global state and a flat namespace)? For very simple things like this example, the only advantage is academic: the wordier styles are more explicit, more clear as to where things come from and what is going on. For more complicated applications, this explicitness and clarity becomes increasingly valuable, and the richer and more complete object-oriented interface will likely make the program easier to write and maintain. Typically one finds oneself making the same plots over and over again, but with different data sets, which leads to needing to write specialized functions to do the plotting. The recommended function signature is something like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{my\PYGZus{}plotter}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{data1}\PYG{p}{,} \PYG{n}{data2}\PYG{p}{,} \PYG{n}{param\PYGZus{}dict}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ A helper function to make a graph} \PYG{l+s+sd}{ Parameters} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ ax : Axes} \PYG{l+s+sd}{ The axes to draw to} \PYG{l+s+sd}{ data1 : array} \PYG{l+s+sd}{ The x data} \PYG{l+s+sd}{ data2 : array} \PYG{l+s+sd}{ The y data} \PYG{l+s+sd}{ param\PYGZus{}dict : dict} \PYG{l+s+sd}{ Dictionary of kwargs to pass to ax.plot} \PYG{l+s+sd}{ Returns} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ out : list} \PYG{l+s+sd}{ list of artists added} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{out} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{data1}\PYG{p}{,} \PYG{n}{data2}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{param\PYGZus{}dict}\PYG{p}{)} \PYG{k}{return} \PYG{n}{out} \PYG{c+c1}{\PYGZsh{} which you would then use as:} \PYG{n}{data1}\PYG{p}{,} \PYG{n}{data2}\PYG{p}{,} \PYG{n}{data3}\PYG{p}{,} \PYG{n}{data4} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{my\PYGZus{}plotter}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{data1}\PYG{p}{,} \PYG{n}{data2}\PYG{p}{,} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{marker}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_usage_005}.png} or if you wanted to have 2 sub-plots: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{my\PYGZus{}plotter}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{data1}\PYG{p}{,} \PYG{n}{data2}\PYG{p}{,} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{marker}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{my\PYGZus{}plotter}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{,} \PYG{n}{data3}\PYG{p}{,} \PYG{n}{data4}\PYG{p}{,} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{marker}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_usage_006}.png} Again, for these simple examples this style seems like overkill, however once the graphs get slightly more complex it pays off. \subsubsection{Backends} \label{\detokenize{tutorials/introductory/usage:backends}}\label{\detokenize{tutorials/introductory/usage:id3}} \paragraph{What is a backend?} \label{\detokenize{tutorials/introductory/usage:what-is-a-backend}}\label{\detokenize{tutorials/introductory/usage:id4}} A lot of documentation on the website and in the mailing lists refers to the "backend" and many new users are confused by this term. matplotlib targets many different use cases and output formats. Some people use matplotlib interactively from the python shell and have plotting windows pop up when they type commands. Some people run \sphinxhref{https://jupyter.org}{Jupyter} notebooks and draw inline plots for quick data analysis. Others embed matplotlib into graphical user interfaces like wxpython or pygtk to build rich applications. Some people use matplotlib in batch scripts to generate postscript images from numerical simulations, and still others run web application servers to dynamically serve up graphs. To support all of these use cases, matplotlib can target different outputs, and each of these capabilities is called a backend; the "frontend" is the user facing code, i.e., the plotting code, whereas the "backend" does all the hard work behind-the-scenes to make the figure. There are two types of backends: user interface backends (for use in pygtk, wxpython, tkinter, qt4, or macosx; also referred to as "interactive backends") and hardcopy backends to make image files (PNG, SVG, PDF, PS; also referred to as "non-interactive backends"). There are four ways to configure your backend. If they conflict each other, the method mentioned last in the following list will be used, e.g. calling {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} will override the setting in your \sphinxcode{\sphinxupquote{matplotlibrc}}. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} The \sphinxcode{\sphinxupquote{backend}} parameter in your \sphinxcode{\sphinxupquote{matplotlibrc}} file (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{backend} \PYG{p}{:} \PYG{n}{WXAgg} \PYG{c+c1}{\PYGZsh{} use wxpython with antigrain (agg) rendering} \end{sphinxVerbatim} \item {} Setting the \index{MPLBACKEND@\spxentry{MPLBACKEND}}\index{environment variable@\spxentry{environment variable}!MPLBACKEND@\spxentry{MPLBACKEND}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLBACKEND}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLBACKEND}}}}} environment variable, either for your current shell or for a single script. On Unix: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZgt{}} \PYG{n}{export} \PYG{n}{MPLBACKEND}\PYG{o}{=}\PYG{n}{module}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{my\PYGZus{}backend} \PYG{o}{\PYGZgt{}} \PYG{n}{python} \PYG{n}{simple\PYGZus{}plot}\PYG{o}{.}\PYG{n}{py} \PYG{o}{\PYGZgt{}} \PYG{n}{MPLBACKEND}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{module://my\PYGZus{}backend}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{python} \PYG{n}{simple\PYGZus{}plot}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} On Windows, only the former is possible: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZgt{}} \PYG{n+nb}{set} \PYG{n}{MPLBACKEND}\PYG{o}{=}\PYG{n}{module}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{my\PYGZus{}backend} \PYG{o}{\PYGZgt{}} \PYG{n}{python} \PYG{n}{simple\PYGZus{}plot}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} Setting this environment variable will override the \sphinxcode{\sphinxupquote{backend}} parameter in \sphinxstyleemphasis{any} \sphinxcode{\sphinxupquote{matplotlibrc}}, even if there is a \sphinxcode{\sphinxupquote{matplotlibrc}} in your current working directory. Therefore setting \index{MPLBACKEND@\spxentry{MPLBACKEND}}\index{environment variable@\spxentry{environment variable}!MPLBACKEND@\spxentry{MPLBACKEND}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLBACKEND}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLBACKEND}}}}} globally, e.g. in your \sphinxcode{\sphinxupquote{.bashrc}} or \sphinxcode{\sphinxupquote{.profile}}, is discouraged as it might lead to counter-intuitive behavior. \item {} If your script depends on a specific backend you can use the {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} function: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PS}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} generate postscript output by default} \end{sphinxVerbatim} If you use the {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} function, this must be done before importing {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}}. Calling {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} after pyplot has been imported will have no effect. Using {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} will require changes in your code if users want to use a different backend. Therefore, you should avoid explicitly calling {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use()}}}}} unless absolutely necessary. \end{enumerate} \begin{sphinxadmonition}{note}{Note:} Backend name specifications are not case-sensitive; e.g., 'GTK3Agg' and 'gtk3agg' are equivalent. \end{sphinxadmonition} With a typical installation of matplotlib, such as from a binary installer or a linux distribution package, a good default backend will already be set, allowing both interactive work and plotting from scripts, with output to the screen and/or to a file, so at least initially you will not need to use any of the methods given above. If, however, you want to write graphical user interfaces, or a web application server ({\hyperref[\detokenize{faq/howto_faq:howto-webapp}]{\sphinxcrossref{\DUrole{std,std-ref}{Matplotlib in a web application server}}}}), or need a better understanding of what is going on, read on. To make things a little more customizable for graphical user interfaces, matplotlib separates the concept of the renderer (the thing that actually does the drawing) from the canvas (the place where the drawing goes). The canonical renderer for user interfaces is \sphinxcode{\sphinxupquote{Agg}} which uses the \sphinxhref{http://antigrain.com/}{Anti-Grain Geometry} C++ library to make a raster (pixel) image of the figure. All of the user interfaces except \sphinxcode{\sphinxupquote{macosx}} can be used with agg rendering, e.g., \sphinxcode{\sphinxupquote{WXAgg}}, \sphinxcode{\sphinxupquote{GTK3Agg}}, \sphinxcode{\sphinxupquote{QT4Agg}}, \sphinxcode{\sphinxupquote{QT5Agg}}, \sphinxcode{\sphinxupquote{TkAgg}}. In addition, some of the user interfaces support other rendering engines. For example, with GTK+ 3, you can also select Cairo rendering (backend \sphinxcode{\sphinxupquote{GTK3Cairo}}). For the rendering engines, one can also distinguish between \sphinxhref{https://en.wikipedia.org/wiki/Vector\_graphics}{vector} or \sphinxhref{https://en.wikipedia.org/wiki/Raster\_graphics}{raster} renderers. Vector graphics languages issue drawing commands like "draw a line from this point to this point" and hence are scale free, and raster backends generate a pixel representation of the line whose accuracy depends on a DPI setting. Here is a summary of the matplotlib renderers (there is an eponymous backend for each; these are \sphinxstyleemphasis{non-interactive backends}, capable of writing to a file): \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Renderer &\sphinxstyletheadfamily Filetypes &\sphinxstyletheadfamily Description \\ \hline {\hyperref[\detokenize{glossary/index:term-agg}]{\sphinxtermref{\DUrole{xref,std,std-term}{AGG}}}} & {\hyperref[\detokenize{glossary/index:term-png}]{\sphinxtermref{\DUrole{xref,std,std-term}{png}}}} & {\hyperref[\detokenize{glossary/index:term-raster-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{raster graphics}}}} -- high quality images using the \sphinxhref{http://antigrain.com/}{Anti-Grain Geometry} engine \\ \hline PS & {\hyperref[\detokenize{glossary/index:term-ps}]{\sphinxtermref{\DUrole{xref,std,std-term}{ps}}}} {\hyperref[\detokenize{glossary/index:term-eps}]{\sphinxtermref{\DUrole{xref,std,std-term}{eps}}}} & {\hyperref[\detokenize{glossary/index:term-vector-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{vector graphics}}}} -- \sphinxhref{https://en.wikipedia.org/wiki/PostScript}{Postscript} output \\ \hline PDF & {\hyperref[\detokenize{glossary/index:term-pdf}]{\sphinxtermref{\DUrole{xref,std,std-term}{pdf}}}} & {\hyperref[\detokenize{glossary/index:term-vector-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{vector graphics}}}} -- \sphinxhref{https://en.wikipedia.org/wiki/Portable\_Document\_Format}{Portable Document Format} \\ \hline SVG & {\hyperref[\detokenize{glossary/index:term-svg}]{\sphinxtermref{\DUrole{xref,std,std-term}{svg}}}} & {\hyperref[\detokenize{glossary/index:term-vector-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{vector graphics}}}} -- \sphinxhref{https://en.wikipedia.org/wiki/Scalable\_Vector\_Graphics}{Scalable Vector Graphics} \\ \hline {\hyperref[\detokenize{glossary/index:term-cairo}]{\sphinxtermref{\DUrole{xref,std,std-term}{Cairo}}}} & {\hyperref[\detokenize{glossary/index:term-png}]{\sphinxtermref{\DUrole{xref,std,std-term}{png}}}} {\hyperref[\detokenize{glossary/index:term-ps}]{\sphinxtermref{\DUrole{xref,std,std-term}{ps}}}} {\hyperref[\detokenize{glossary/index:term-pdf}]{\sphinxtermref{\DUrole{xref,std,std-term}{pdf}}}} {\hyperref[\detokenize{glossary/index:term-svg}]{\sphinxtermref{\DUrole{xref,std,std-term}{svg}}}} & {\hyperref[\detokenize{glossary/index:term-raster-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{raster graphics}}}} and {\hyperref[\detokenize{glossary/index:term-vector-graphics}]{\sphinxtermref{\DUrole{xref,std,std-term}{vector graphics}}}} -- using the \sphinxhref{https://wwW.cairographics.org}{Cairo graphics} library \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} And here are the user interfaces and renderer combinations supported; these are \sphinxstyleemphasis{interactive backends}, capable of displaying to the screen and of using appropriate renderers from the table above to write to a file: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Backend &\sphinxstyletheadfamily Description \\ \hline Qt5Agg & Agg rendering in a {\hyperref[\detokenize{glossary/index:term-qt5}]{\sphinxtermref{\DUrole{xref,std,std-term}{Qt5}}}} canvas (requires \sphinxhref{https://riverbankcomputing.com/software/pyqt/intro}{PyQt5}). This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib qt5}}. \\ \hline ipympl & Agg rendering embedded in a Jupyter widget. (requires ipympl). This backend can be enabled in a Jupyter notebook with \sphinxcode{\sphinxupquote{\%matplotlib ipympl}}. \\ \hline GTK3Agg & Agg rendering to a {\hyperref[\detokenize{glossary/index:term-gtk}]{\sphinxtermref{\DUrole{xref,std,std-term}{GTK}}}} 3.x canvas (requires \sphinxhref{https://wiki.gnome.org/action/show/Projects/PyGObject}{PyGObject}, and \sphinxhref{https://www.cairographics.org/pycairo/}{pycairo} or \sphinxhref{https://pythonhosted.org/cairocffi/}{cairocffi}). This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib gtk3}}. \\ \hline macosx & Agg rendering into a Cocoa canvas in OSX. This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib osx}}. \\ \hline TkAgg & Agg rendering to a {\hyperref[\detokenize{glossary/index:term-tk}]{\sphinxtermref{\DUrole{xref,std,std-term}{Tk}}}} canvas (requires \sphinxhref{https://wiki.python.org/moin/TkInter}{TkInter}). This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib tk}}. \\ \hline nbAgg & Embed an interactive figure in a Jupyter classic notebook. This backend can be enabled in Jupyter notebooks via \sphinxcode{\sphinxupquote{\%matplotlib notebook}}. \\ \hline WebAgg & On \sphinxcode{\sphinxupquote{show()}} will start a tornado server with an interactive figure. \\ \hline GTK3Cairo & Cairo rendering to a {\hyperref[\detokenize{glossary/index:term-gtk}]{\sphinxtermref{\DUrole{xref,std,std-term}{GTK}}}} 3.x canvas (requires \sphinxhref{https://wiki.gnome.org/action/show/Projects/PyGObject}{PyGObject}, and \sphinxhref{https://www.cairographics.org/pycairo/}{pycairo} or \sphinxhref{https://pythonhosted.org/cairocffi/}{cairocffi}). \\ \hline Qt4Agg & Agg rendering to a {\hyperref[\detokenize{glossary/index:term-qt4}]{\sphinxtermref{\DUrole{xref,std,std-term}{Qt4}}}} canvas (requires \sphinxhref{https://riverbankcomputing.com/software/pyqt/intro}{PyQt4} or \sphinxcode{\sphinxupquote{pyside}}). This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib qt4}}. \\ \hline WXAgg & Agg rendering to a {\hyperref[\detokenize{glossary/index:term-wxwidgets}]{\sphinxtermref{\DUrole{xref,std,std-term}{wxWidgets}}}} canvas (requires \sphinxhref{https://www.wxpython.org/}{wxPython} 4). This backend can be activated in IPython with \sphinxcode{\sphinxupquote{\%matplotlib wx}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{ipympl} \label{\detokenize{tutorials/introductory/usage:ipympl}} The Jupyter widget ecosystem is moving too fast to support directly in Matplotlib. To install ipympl \begin{sphinxVerbatim}[commandchars=\\\{\}] pip install ipympl jupyter nbextension \PYG{n+nb}{enable} \PYGZhy{}\PYGZhy{}py \PYGZhy{}\PYGZhy{}sys\PYGZhy{}prefix ipympl \end{sphinxVerbatim} or \begin{sphinxVerbatim}[commandchars=\\\{\}] conda install ipympl \PYGZhy{}c conda\PYGZhy{}forge \end{sphinxVerbatim} See \sphinxhref{https://github.com/matplotlib/jupyter-matplotlib}{jupyter-matplotlib} for more details. \paragraph{GTK and Cairo} \label{\detokenize{tutorials/introductory/usage:gtk-and-cairo}} \sphinxcode{\sphinxupquote{GTK3}} backends (\sphinxstyleemphasis{both} \sphinxcode{\sphinxupquote{GTK3Agg}} and \sphinxcode{\sphinxupquote{GTK3Cairo}}) depend on Cairo (pycairo\textgreater{}=1.11.0 or cairocffi). \paragraph{How do I select PyQt4 or PySide?} \label{\detokenize{tutorials/introductory/usage:how-do-i-select-pyqt4-or-pyside}} The \sphinxcode{\sphinxupquote{QT\_API}} environment variable can be set to either \sphinxcode{\sphinxupquote{pyqt}} or \sphinxcode{\sphinxupquote{pyside}} to use \sphinxcode{\sphinxupquote{PyQt4}} or \sphinxcode{\sphinxupquote{PySide}}, respectively. Since the default value for the bindings to be used is \sphinxcode{\sphinxupquote{PyQt4}}, \sphinxcode{\sphinxupquote{matplotlib}} first tries to import it, if the import fails, it tries to import \sphinxcode{\sphinxupquote{PySide}}. \subsubsection{What is interactive mode?} \label{\detokenize{tutorials/introductory/usage:what-is-interactive-mode}}\label{\detokenize{tutorials/introductory/usage:interactive-mode}} Use of an interactive backend (see {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}) permits--but does not by itself require or ensure--plotting to the screen. Whether and when plotting to the screen occurs, and whether a script or shell session continues after a plot is drawn on the screen, depends on the functions and methods that are called, and on a state variable that determines whether matplotlib is in "interactive mode". The default Boolean value is set by the \sphinxcode{\sphinxupquote{matplotlibrc}} file, and may be customized like any other configuration parameter (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}). It may also be set via {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.interactive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.interactive()}}}}}, and its value may be queried via {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.is_interactive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.is\_interactive()}}}}}. Turning interactive mode on and off in the middle of a stream of plotting commands, whether in a script or in a shell, is rarely needed and potentially confusing, so in the following we will assume all plotting is done with interactive mode either on or off. \begin{sphinxadmonition}{note}{Note:} Major changes related to interactivity, and in particular the role and behavior of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}}, were made in the transition to matplotlib version 1.0, and bugs were fixed in 1.0.1. Here we describe the version 1.0.1 behavior for the primary interactive backends, with the partial exception of \sphinxstyleemphasis{macosx}. \end{sphinxadmonition} Interactive mode may also be turned on via {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.ion()}}}}}, and turned off via {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib.pyplot.ioff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.ioff()}}}}}. \begin{sphinxadmonition}{note}{Note:} Interactive mode works with suitable backends in ipython and in the ordinary python shell, but it does \sphinxstyleemphasis{not} work in the IDLE IDE. If the default backend does not support interactivity, an interactive backend can be explicitly activated using any of the methods discussed in {\hyperref[\detokenize{tutorials/introductory/usage:id4}]{\sphinxcrossref{What is a backend?}}}. \end{sphinxadmonition} \paragraph{Interactive example} \label{\detokenize{tutorials/introductory/usage:interactive-example}} From an ordinary python prompt, or after invoking ipython with no options, try this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ion}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{1.6}\PYG{p}{,} \PYG{l+m+mf}{2.7}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Assuming you are running version 1.0.1 or higher, and you have an interactive backend installed and selected by default, you should see a plot, and your terminal prompt should also be active; you can type additional commands such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{interactive test}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{index}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} and you will see the plot being updated after each line. Since version 1.5, modifying the plot by other means \sphinxstyleemphasis{should} also automatically update the display on most backends. Get a reference to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance, and call a method of that instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{3.1}\PYG{p}{,} \PYG{l+m+mf}{2.2}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} If you are using certain backends (like \sphinxcode{\sphinxupquote{macosx}}), or an older version of matplotlib, you may not see the new line added to the plot immediately. In this case, you need to explicitly call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}} in order to update the plot: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{Non-interactive example} \label{\detokenize{tutorials/introductory/usage:non-interactive-example}} Start a fresh session as in the previous example, but now turn interactive mode off: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ioff}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{1.6}\PYG{p}{,} \PYG{l+m+mf}{2.7}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Nothing happened--or at least nothing has shown up on the screen (unless you are using \sphinxstyleemphasis{macosx} backend, which is anomalous). To make the plot appear, you need to do this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Now you see the plot, but your terminal command line is unresponsive; the \sphinxcode{\sphinxupquote{show()}} command \sphinxstyleemphasis{blocks} the input of additional commands until you manually kill the plot window. What good is this--being forced to use a blocking function? Suppose you need a script that plots the contents of a file to the screen. You want to look at that plot, and then end the script. Without some blocking command such as show(), the script would flash up the plot and then end immediately, leaving nothing on the screen. In addition, non-interactive mode delays all drawing until show() is called; this is more efficient than redrawing the plot each time a line in the script adds a new feature. Prior to version 1.0, show() generally could not be called more than once in a single script (although sometimes one could get away with it); for version 1.0.1 and above, this restriction is lifted, so one can write a script like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ioff}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} which makes three plots, one at a time. I.e. the second plot will show up, once the first plot is closed. \paragraph{Summary} \label{\detokenize{tutorials/introductory/usage:summary}} In interactive mode, pyplot functions automatically draw to the screen. When plotting interactively, if using object method calls in addition to pyplot functions, then call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}} whenever you want to refresh the plot. Use non-interactive mode in scripts in which you want to generate one or more figures and display them before ending or generating a new set of figures. In that case, use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}} to display the figure(s) and to block execution until you have manually destroyed them. \subsubsection{Performance} \label{\detokenize{tutorials/introductory/usage:performance}}\label{\detokenize{tutorials/introductory/usage:id5}} Whether exploring data in interactive mode or programmatically saving lots of plots, rendering performance can be a painful bottleneck in your pipeline. Matplotlib provides a couple ways to greatly reduce rendering time at the cost of a slight change (to a settable tolerance) in your plot's appearance. The methods available to reduce rendering time depend on the type of plot that is being created. \paragraph{Line segment simplification} \label{\detokenize{tutorials/introductory/usage:line-segment-simplification}} For plots that have line segments (e.g. typical line plots, outlines of polygons, etc.), rendering performance can be controlled by the \sphinxcode{\sphinxupquote{path.simplify}} and \sphinxcode{\sphinxupquote{path.simplify\_threshold}} parameters in your \sphinxcode{\sphinxupquote{matplotlibrc}} file (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}} for more information about the \sphinxcode{\sphinxupquote{matplotlibrc}} file). The \sphinxcode{\sphinxupquote{path.simplify}} parameter is a boolean indicating whether or not line segments are simplified at all. The \sphinxcode{\sphinxupquote{path.simplify\_threshold}} parameter controls how much line segments are simplified; higher thresholds result in quicker rendering. The following script will first display the data without any simplification, and then display the same data with simplification. Try interacting with both of them: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{c+c1}{\PYGZsh{} Setup, and create the data to plot} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{100000}\PYG{p}{)} \PYG{n}{y}\PYG{p}{[}\PYG{l+m+mi}{50000}\PYG{p}{:}\PYG{p}{]} \PYG{o}{*}\PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{y}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{logspace}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{log10}\PYG{p}{(}\PYG{l+m+mi}{50000}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{400}\PYG{p}{)}\PYG{o}{.}\PYG{n}{astype}\PYG{p}{(}\PYG{n+nb}{int}\PYG{p}{)}\PYG{p}{]} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path.simplify}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path.simplify\PYGZus{}threshold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{0.0} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path.simplify\PYGZus{}threshold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Matplotlib currently defaults to a conservative simplification threshold of \sphinxcode{\sphinxupquote{1/9}}. If you want to change your default settings to use a different value, you can change your \sphinxcode{\sphinxupquote{matplotlibrc}} file. Alternatively, you could create a new style for interactive plotting (with maximal simplification) and another style for publication quality plotting (with minimal simplification) and activate them as necessary. See {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}} for instructions on how to perform these actions. The simplification works by iteratively merging line segments into a single vector until the next line segment's perpendicular distance to the vector (measured in display-coordinate space) is greater than the \sphinxcode{\sphinxupquote{path.simplify\_threshold}} parameter. \begin{sphinxadmonition}{note}{Note:} Changes related to how line segments are simplified were made in version 2.1. Rendering time will still be improved by these parameters prior to 2.1, but rendering time for some kinds of data will be vastly improved in versions 2.1 and greater. \end{sphinxadmonition} \paragraph{Marker simplification} \label{\detokenize{tutorials/introductory/usage:marker-simplification}} Markers can also be simplified, albeit less robustly than line segments. Marker simplification is only available to {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects (through the \sphinxcode{\sphinxupquote{markevery}} property). Wherever {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} construction parameter are passed through, such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.plot()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.plot()}}}}}, the \sphinxcode{\sphinxupquote{markevery}} parameter can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{markevery}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} The markevery argument allows for naive subsampling, or an attempt at evenly spaced (along the \sphinxstyleemphasis{x} axis) sampling. See the \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/markevery\_demo} for more information. \paragraph{Splitting lines into smaller chunks} \label{\detokenize{tutorials/introductory/usage:splitting-lines-into-smaller-chunks}} If you are using the Agg backend (see {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}), then you can make use of the \sphinxcode{\sphinxupquote{agg.path.chunksize}} rc parameter. This allows you to specify a chunk size, and any lines with greater than that many vertices will be split into multiple lines, each of which have no more than \sphinxcode{\sphinxupquote{agg.path.chunksize}} many vertices. (Unless \sphinxcode{\sphinxupquote{agg.path.chunksize}} is zero, in which case there is no chunking.) For some kind of data, chunking the line up into reasonable sizes can greatly decrease rendering time. The following script will first display the data without any chunk size restriction, and then display the same data with a chunk size of 10,000. The difference can best be seen when the figures are large, try maximizing the GUI and then interacting with them: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path.simplify\PYGZus{}threshold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} Setup, and create the data to plot} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{100000}\PYG{p}{)} \PYG{n}{y}\PYG{p}{[}\PYG{l+m+mi}{50000}\PYG{p}{:}\PYG{p}{]} \PYG{o}{*}\PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{y}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{logspace}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{n}{np}\PYG{o}{.}\PYG{n}{log10}\PYG{p}{(}\PYG{l+m+mi}{50000}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{400}\PYG{p}{)}\PYG{o}{.}\PYG{n}{astype}\PYG{p}{(}\PYG{n+nb}{int}\PYG{p}{)}\PYG{p}{]} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path.simplify}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{agg.path.chunksize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{0} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{agg.path.chunksize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{10000} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{Legends} \label{\detokenize{tutorials/introductory/usage:legends}} The default legend behavior for axes attempts to find the location that covers the fewest data points (\sphinxcode{\sphinxupquote{loc='best'}}). This can be a very expensive computation if there are lots of data points. In this case, you may want to provide a specific location. \paragraph{Using the \sphinxstyleemphasis{fast} style} \label{\detokenize{tutorials/introductory/usage:using-the-fast-style}} The \sphinxstyleemphasis{fast} style can be used to automatically set simplification and chunking parameters to reasonable settings to speed up plotting large amounts of data. It can be used simply by running: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{style} \PYG{k}{as} \PYG{n+nn}{mplstyle} \PYG{n}{mplstyle}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fast}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} It is very light weight, so it plays nicely with other styles, just make sure the fast style is applied last so that other styles do not overwrite the settings: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mplstyle}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dark\PYGZus{}background}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ggplot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fast}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/introductory/usage:sphx-glr-download-tutorials-introductory-usage-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-download-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Pyplot tutorial} \label{\detokenize{tutorials/introductory/pyplot:pyplot-tutorial}}\label{\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}}\label{\detokenize{tutorials/introductory/pyplot::doc}} An introduction to the pyplot interface. Intro to pyplot =============== {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} is a collection of command style functions that make matplotlib work like MATLAB. Each \sphinxcode{\sphinxupquote{pyplot}} function makes some change to a figure: e.g., creates a figure, creates a plotting area in a figure, plots some lines in a plotting area, decorates the plot with labels, etc. In {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} various states are preserved across function calls, so that it keeps track of things like the current figure and plotting area, and the plotting functions are directed to the current axes (please note that "axes" here and in most places in the documentation refers to the \sphinxstyleemphasis{axes} {\hyperref[\detokenize{tutorials/introductory/usage:figure-parts}]{\sphinxcrossref{\DUrole{std,std-ref}{part of a figure}}}} and not the strict mathematical term for more than one axis). \begin{sphinxadmonition}{note}{Note:} the pyplot API is generally less-flexible than the object-oriented API. Most of the function calls you see here can also be called as methods from an \sphinxcode{\sphinxupquote{Axes}} object. We recommend browsing the tutorials and examples to see how this works. \end{sphinxadmonition} Generating visualizations with pyplot is very quick: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{some numbers}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_001}.png} You may be wondering why the x-axis ranges from 0-3 and the y-axis from 1-4. If you provide a single list or array to the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} command, matplotlib assumes it is a sequence of y values, and automatically generates the x values for you. Since python ranges start with 0, the default x vector has the same length as y but starts with 0. Hence the x data are \sphinxcode{\sphinxupquote{{[}0,1,2,3{]}}}. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} is a versatile command, and will take an arbitrary number of arguments. For example, to plot x versus y, you can issue the command: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{16}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_002}.png} \subsubsection{Formatting the style of your plot} \label{\detokenize{tutorials/introductory/pyplot:formatting-the-style-of-your-plot}} For every x, y pair of arguments, there is an optional third argument which is the format string that indicates the color and line type of the plot. The letters and symbols of the format string are from MATLAB, and you concatenate a color string with a line style string. The default format string is 'b-', which is a solid blue line. For example, to plot the above with red circles, you would issue \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{16}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ro}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_003}.png} See the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} documentation for a complete list of line styles and format strings. The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axis:matplotlib.pyplot.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis()}}}}} command in the example above takes a list of \sphinxcode{\sphinxupquote{{[}xmin, xmax, ymin, ymax{]}}} and specifies the viewport of the axes. If matplotlib were limited to working with lists, it would be fairly useless for numeric processing. Generally, you will use \sphinxhref{http://www.numpy.org}{numpy} arrays. In fact, all sequences are converted to numpy arrays internally. The example below illustrates a plotting several lines with different format styles in one command using arrays. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{c+c1}{\PYGZsh{} evenly sampled time at 200ms intervals} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{5.}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} red dashes, blue squares and green triangles} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{t}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{t}\PYG{p}{,} \PYG{n}{t}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bs}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{t}\PYG{p}{,} \PYG{n}{t}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g\PYGZca{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_004}.png} \paragraph{Plotting with keyword strings} \label{\detokenize{tutorials/introductory/pyplot:plotting-with-keyword-strings}}\label{\detokenize{tutorials/introductory/pyplot:plotting-with-keywords}} There are some instances where you have data in a format that lets you access particular variables with strings. For example, with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.html\#numpy.recarray}{\sphinxcode{\sphinxupquote{numpy.recarray}}} or \sphinxhref{https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html\#pandas.DataFrame}{\sphinxcode{\sphinxupquote{pandas.DataFrame}}}. Matplotlib allows you provide such an object with the \sphinxcode{\sphinxupquote{data}} keyword argument. If provided, then you may generate plots with the strings corresponding to these variables. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{data} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randint}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{\PYGZcb{}} \PYG{n}{data}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{data}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{+} \PYG{l+m+mi}{10} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)} \PYG{n}{data}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{abs}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{o}{*} \PYG{l+m+mi}{100} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{s}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{data}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{entry a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{entry b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_005}.png} \paragraph{Plotting with categorical variables} \label{\detokenize{tutorials/introductory/pyplot:plotting-with-categorical-variables}}\label{\detokenize{tutorials/introductory/pyplot:plotting-with-categorical-vars}} It is also possible to create a plot using categorical variables. Matplotlib allows you to pass categorical variables directly to many plotting functions. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{names} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{group\PYGZus{}a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{group\PYGZus{}b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{group\PYGZus{}c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{n}{values} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{]} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{131}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{bar}\PYG{p}{(}\PYG{n}{names}\PYG{p}{,} \PYG{n}{values}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{132}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{names}\PYG{p}{,} \PYG{n}{values}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{133}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{names}\PYG{p}{,} \PYG{n}{values}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Categorical Plotting}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_006}.png} \paragraph{Controlling line properties} \label{\detokenize{tutorials/introductory/pyplot:controlling-line-properties}}\label{\detokenize{tutorials/introductory/pyplot:id1}} Lines have many attributes that you can set: linewidth, dash style, antialiased, etc; see {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}}. There are several ways to set line properties \begin{itemize} \item {} Use keyword args: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mf}{2.0}\PYG{p}{)} \end{sphinxVerbatim} \item {} Use the setter methods of a \sphinxcode{\sphinxupquote{Line2D}} instance. \sphinxcode{\sphinxupquote{plot}} returns a list of \sphinxcode{\sphinxupquote{Line2D}} objects; e.g., \sphinxcode{\sphinxupquote{line1, line2 = plot(x1, y1, x2, y2)}}. In the code below we will suppose that we have only one line so that the list returned is of length 1. We use tuple unpacking with \sphinxcode{\sphinxupquote{line,}} to get the first element of that list: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}antialiased}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} turn off antialiasing} \end{sphinxVerbatim} \item {} Use the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} command. The example below uses a MATLAB-style command to set multiple properties on a list of lines. \sphinxcode{\sphinxupquote{setp}} works transparently with a list of objects or a single object. You can either use python keyword arguments or MATLAB-style string/value pairs: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lines} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} use keyword args} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mf}{2.0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} or MATLAB style string value pairs} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mf}{2.0}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} Here are the available {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Value Type \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Value Type \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot alpha & float \\ \hline animated & {[}True \textbar{} False{]} \\ \hline antialiased or aa & {[}True \textbar{} False{]} \\ \hline clip\_box & a matplotlib.transform.Bbox instance \\ \hline clip\_on & {[}True \textbar{} False{]} \\ \hline clip\_path & a Path instance and a Transform instance, a Patch \\ \hline color or c & any matplotlib color \\ \hline contains & the hit testing function \\ \hline dash\_capstyle & {[}\sphinxcode{\sphinxupquote{'butt'}} \textbar{} \sphinxcode{\sphinxupquote{'round'}} \textbar{} \sphinxcode{\sphinxupquote{'projecting'}}{]} \\ \hline dash\_joinstyle & {[}\sphinxcode{\sphinxupquote{'miter'}} \textbar{} \sphinxcode{\sphinxupquote{'round'}} \textbar{} \sphinxcode{\sphinxupquote{'bevel'}}{]} \\ \hline dashes & sequence of on/off ink in points \\ \hline data & (np.array xdata, np.array ydata) \\ \hline figure & a matplotlib.figure.Figure instance \\ \hline label & any string \\ \hline linestyle or ls & {[} \sphinxcode{\sphinxupquote{'-'}} \textbar{} \sphinxcode{\sphinxupquote{'-{-}'}} \textbar{} \sphinxcode{\sphinxupquote{'-.'}} \textbar{} \sphinxcode{\sphinxupquote{':'}} \textbar{} \sphinxcode{\sphinxupquote{'steps'}} \textbar{} ...{]} \\ \hline linewidth or lw & float value in points \\ \hline marker & {[} \sphinxcode{\sphinxupquote{'+'}} \textbar{} \sphinxcode{\sphinxupquote{','}} \textbar{} \sphinxcode{\sphinxupquote{'.'}} \textbar{} \sphinxcode{\sphinxupquote{'1'}} \textbar{} \sphinxcode{\sphinxupquote{'2'}} \textbar{} \sphinxcode{\sphinxupquote{'3'}} \textbar{} \sphinxcode{\sphinxupquote{'4'}} {]} \\ \hline markeredgecolor or mec & any matplotlib color \\ \hline markeredgewidth or mew & float value in points \\ \hline markerfacecolor or mfc & any matplotlib color \\ \hline markersize or ms & float \\ \hline markevery & {[} None \textbar{} integer \textbar{} (startind, stride) {]} \\ \hline picker & used in interactive line selection \\ \hline pickradius & the line pick selection radius \\ \hline solid\_capstyle & {[}\sphinxcode{\sphinxupquote{'butt'}} \textbar{} \sphinxcode{\sphinxupquote{'round'}} \textbar{} \sphinxcode{\sphinxupquote{'projecting'}}{]} \\ \hline solid\_joinstyle & {[}\sphinxcode{\sphinxupquote{'miter'}} \textbar{} \sphinxcode{\sphinxupquote{'round'}} \textbar{} \sphinxcode{\sphinxupquote{'bevel'}}{]} \\ \hline transform & a matplotlib.transforms.Transform instance \\ \hline visible & {[}True \textbar{} False{]} \\ \hline xdata & np.array \\ \hline ydata & np.array \\ \hline zorder & any number \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} To get a list of settable line properties, call the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} function with a line or lines as argument \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [69]: }\PYG{n}{lines} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{In [70]: }\PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{)} \PYG{g+go}{ alpha: float} \PYG{g+go}{ animated: [True \textbar{} False]} \PYG{g+go}{ antialiased or aa: [True \textbar{} False]} \PYG{g+go}{ ...snip} \end{sphinxVerbatim} \paragraph{Working with multiple figures and axes} \label{\detokenize{tutorials/introductory/pyplot:working-with-multiple-figures-and-axes}}\label{\detokenize{tutorials/introductory/pyplot:multiple-figs-axes}} MATLAB, and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}}, have the concept of the current figure and the current axes. All plotting commands apply to the current axes. The function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gca:matplotlib.pyplot.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gca()}}}}} returns the current axes (a {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance), and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib.pyplot.gcf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gcf()}}}}} returns the current figure ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} instance). Normally, you don't have to worry about this, because it is all taken care of behind the scenes. Below is a script to create two subplots. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{f}\PYG{p}{(}\PYG{n}{t}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{t}\PYG{p}{)} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{n}{t1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{5.0}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{)} \PYG{n}{t2} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{5.0}\PYG{p}{,} \PYG{l+m+mf}{0.02}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t1}\PYG{p}{,} \PYG{n}{f}\PYG{p}{(}\PYG{n}{t1}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{t2}\PYG{p}{,} \PYG{n}{f}\PYG{p}{(}\PYG{n}{t2}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{212}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t2}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t2}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_007}.png} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}} command here is optional because \sphinxcode{\sphinxupquote{figure(1)}} will be created by default, just as a \sphinxcode{\sphinxupquote{subplot(111)}} will be created by default if you don't manually specify any axes. The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}} command specifies \sphinxcode{\sphinxupquote{numrows, numcols, plot\_number}} where \sphinxcode{\sphinxupquote{plot\_number}} ranges from 1 to \sphinxcode{\sphinxupquote{numrows*numcols}}. The commas in the \sphinxcode{\sphinxupquote{subplot}} command are optional if \sphinxcode{\sphinxupquote{numrows*numcols\textless{}10}}. So \sphinxcode{\sphinxupquote{subplot(211)}} is identical to \sphinxcode{\sphinxupquote{subplot(2, 1, 1)}}. You can create an arbitrary number of subplots and axes. If you want to place an axes manually, i.e., not on a rectangular grid, use the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes()}}}}} command, which allows you to specify the location as \sphinxcode{\sphinxupquote{axes({[}left, bottom, width, height{]})}} where all values are in fractional (0 to 1) coordinates. See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/axes\_demo} for an example of placing axes manually and \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/subplot\_demo} for an example with lots of subplots. You can create multiple figures by using multiple {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}} calls with an increasing figure number. Of course, each figure can contain as many axes and subplots as your heart desires: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the first figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the first subplot in the first figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{212}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the second subplot in the first figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a second figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} creates a subplot(111) by default} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} figure 1 current; subplot(212) still current} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make subplot(211) in figure1 current} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Easy as 1, 2, 3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} subplot 211 title} \end{sphinxVerbatim} You can clear the current figure with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clf:matplotlib.pyplot.clf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clf()}}}}} and the current axes with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cla:matplotlib.pyplot.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cla()}}}}}. If you find it annoying that states (specifically the current image, figure and axes) are being maintained for you behind the scenes, don't despair: this is just a thin stateful wrapper around an object oriented API, which you can use instead (see {\hyperref[\detokenize{tutorials/intermediate/artists::doc}]{\sphinxcrossref{\DUrole{doc}{Artist tutorial}}}}) If you are making lots of figures, you need to be aware of one more thing: the memory required for a figure is not completely released until the figure is explicitly closed with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close()}}}}}. Deleting all references to the figure, and/or using the window manager to kill the window in which the figure appears on the screen, is not enough, because pyplot maintains internal references until {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close()}}}}} is called. \paragraph{Working with text} \label{\detokenize{tutorials/introductory/pyplot:working-with-text}}\label{\detokenize{tutorials/introductory/pyplot:id2}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} command can be used to add text in an arbitrary location, and the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title()}}}}} are used to add text in the indicated locations (see {\hyperref[\detokenize{tutorials/text/text_intro::doc}]{\sphinxcrossref{\DUrole{doc}{Text in Matplotlib Plots}}}} for a more detailed example) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mu}\PYG{p}{,} \PYG{n}{sigma} \PYG{o}{=} \PYG{l+m+mi}{100}\PYG{p}{,} \PYG{l+m+mi}{15} \PYG{n}{x} \PYG{o}{=} \PYG{n}{mu} \PYG{o}{+} \PYG{n}{sigma} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the histogram of the data} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins}\PYG{p}{,} \PYG{n}{patches} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{n}{density}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Smarts}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Probability}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Histogram of IQ}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{60}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{025}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mu=100,}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sigma=15\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{40}\PYG{p}{,} \PYG{l+m+mi}{160}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.03}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_008}.png} All of the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} commands return an {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instance. Just as with with lines above, you can customize the properties by passing keyword arguments into the text functions or using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{t} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} These properties are covered in more detail in {\hyperref[\detokenize{tutorials/text/text_props::doc}]{\sphinxcrossref{\DUrole{doc}{Text properties and layout}}}}. \subsubsection{Using mathematical expressions in text} \label{\detokenize{tutorials/introductory/pyplot:using-mathematical-expressions-in-text}} matplotlib accepts TeX equation expressions in any text expression. For example to write the expression \(\sigma_i=15\) in the title, you can write a TeX expression surrounded by dollar signs: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sigma\PYGZus{}i=15\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} The \sphinxcode{\sphinxupquote{r}} preceding the title string is important -- it signifies that the string is a \sphinxstyleemphasis{raw} string and not to treat backslashes as python escapes. matplotlib has a built-in TeX expression parser and layout engine, and ships its own math fonts -- for details see {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{Writing mathematical expressions}}}}. Thus you can use mathematical text across platforms without requiring a TeX installation. For those who have LaTeX and dvipng installed, you can also use LaTeX to format your text and incorporate the output directly into your display figures or saved postscript -- see {\hyperref[\detokenize{tutorials/text/usetex::doc}]{\sphinxcrossref{\DUrole{doc}{Text rendering With LaTeX}}}}. \subsubsection{Annotating text} \label{\detokenize{tutorials/introductory/pyplot:annotating-text}} The uses of the basic {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} command above place text at an arbitrary position on the Axes. A common use for text is to annotate some feature of the plot, and the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} method provides helper functionality to make annotations easy. In an annotation, there are two points to consider: the location being annotated represented by the argument \sphinxcode{\sphinxupquote{xy}} and the location of the text \sphinxcode{\sphinxupquote{xytext}}. Both of these arguments are \sphinxcode{\sphinxupquote{(x,y)}} tuples. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{5.0}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{s} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{local max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)}\PYG{p}{,} \PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_009}.png} In this basic example, both the \sphinxcode{\sphinxupquote{xy}} (arrow tip) and \sphinxcode{\sphinxupquote{xytext}} locations (text location) are in data coordinates. There are a variety of other coordinate systems one can choose -- see {\hyperref[\detokenize{tutorials/text/annotations:annotations-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Basic annotation}}}} and {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}} for details. More examples can be found in \DUrole{xref,std,std-doc}{/gallery/text\_labels\_and\_annotations/annotation\_demo}. \paragraph{Logarithmic and other nonlinear axes} \label{\detokenize{tutorials/introductory/pyplot:logarithmic-and-other-nonlinear-axes}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} supports not only linear axis scales, but also logarithmic and logit scales. This is commonly used if data spans many orders of magnitude. Changing the scale of an axis is easy: \begin{quote} plt.xscale('log') \end{quote} An example of four plots with the same data and different scales for the y axis is shown below. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{import} \PYG{n}{NullFormatter} \PYG{c+c1}{\PYGZsh{} useful for {}`logit{}` scale} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make up some data in the interval ]0, 1[} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{normal}\PYG{p}{(}\PYG{n}{loc}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{scale}\PYG{o}{=}\PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{y}\PYG{p}{[}\PYG{p}{(}\PYG{n}{y} \PYG{o}{\PYGZgt{}} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{o}{\PYGZam{}} \PYG{p}{(}\PYG{n}{y} \PYG{o}{\PYGZlt{}} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{]} \PYG{n}{y}\PYG{o}{.}\PYG{n}{sort}\PYG{p}{(}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot with various axes scales} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} linear} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{221}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linear}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linear}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} log} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{222}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{log}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{log}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} symmetric log} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{\PYGZhy{}} \PYG{n}{y}\PYG{o}{.}\PYG{n}{mean}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{symlog}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linthreshy}\PYG{o}{=}\PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{symlog}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} logit} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{224}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{logit}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{logit}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Format the minor tick labels of the y\PYGZhy{}axis into empty strings with} \PYG{c+c1}{\PYGZsh{} {}`NullFormatter{}`, to avoid cumbering the axis with too many labels.} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}minor\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{NullFormatter}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Adjust the subplot layout, because the logit one may take more space} \PYG{c+c1}{\PYGZsh{} than usual, due to y\PYGZhy{}tick labels like \PYGZdq{}1 \PYGZhy{} 10\PYGZca{}\PYGZob{}\PYGZhy{}3\PYGZcb{}\PYGZdq{}} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.92}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.08}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.10}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.95}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.35}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_pyplot_010}.png} It is also possible to add your own scale, see {\hyperref[\detokenize{devel/add_new_projection:adding-new-scales}]{\sphinxcrossref{\DUrole{std,std-ref}{Developer's guide for creating scales and transformations}}}} for details. \phantomsection\label{\detokenize{tutorials/introductory/pyplot:sphx-glr-download-tutorials-introductory-pyplot-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/sample_plots:sphx-glr-download-tutorials-introductory-sample-plots-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Sample plots in Matplotlib} \label{\detokenize{tutorials/introductory/sample_plots:sample-plots-in-matplotlib}}\label{\detokenize{tutorials/introductory/sample_plots:sphx-glr-tutorials-introductory-sample-plots-py}}\label{\detokenize{tutorials/introductory/sample_plots::doc}} Here you'll find a host of example plots with the code that generated them. \subsubsection{Line Plot} \label{\detokenize{tutorials/introductory/sample_plots:line-plot}}\label{\detokenize{tutorials/introductory/sample_plots:matplotlibscreenshots}} Here's how to create a line plot with text labels using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/simple\_plot.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_plot_0011}.png}} \caption{Simple Plot}\label{\detokenize{tutorials/introductory/sample_plots:id1}}\end{figure} \subsubsection{Multiple subplots in one figure} \label{\detokenize{tutorials/introductory/sample_plots:multiple-subplots-in-one-figure}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-subplot-demo}} Multiple axes (i.e. subplots) are created with the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}} function: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/subplots\_axes\_and\_figures/subplot.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_subplot_0011}.png}} \caption{Subplot}\label{\detokenize{tutorials/introductory/sample_plots:id2}}\end{figure} \subsubsection{Images} \label{\detokenize{tutorials/introductory/sample_plots:images}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-images-demo}} Matplotlib can display images (assuming equally spaced horizontal dimensions) using the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} function. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/image\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_image_demo_0031}.png}} \caption{Example of using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} to display a CT scan}\label{\detokenize{tutorials/introductory/sample_plots:id3}}\end{figure} \subsubsection{Contouring and pseudocolor} \label{\detokenize{tutorials/introductory/sample_plots:contouring-and-pseudocolor}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-pcolormesh-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh()}}}}} function can make a colored representation of a two-dimensional array, even if the horizontal dimensions are unevenly spaced. The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} function is another way to represent the same data: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/pcolormesh\_levels.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_pcolormesh_levels_0011}.png}} \caption{Example comparing {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} for plotting two-dimensional data}\label{\detokenize{tutorials/introductory/sample_plots:id4}}\end{figure} \subsubsection{Histograms} \label{\detokenize{tutorials/introductory/sample_plots:histograms}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-histogram-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} function automatically generates histograms and returns the bin counts or probabilities: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/statistics/histogram\_features.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_histogram_features_0011}.png}} \caption{Histogram Features}\label{\detokenize{tutorials/introductory/sample_plots:id5}}\end{figure} \subsubsection{Paths} \label{\detokenize{tutorials/introductory/sample_plots:paths}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-path-demo}} You can add arbitrary paths in Matplotlib using the {\hyperref[\detokenize{api/path_api:module-matplotlib.path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path}}}}} module: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/shapes\_and\_collections/path\_patch.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_path_patch_0011}.png}} \caption{Path Patch}\label{\detokenize{tutorials/introductory/sample_plots:id6}}\end{figure} \subsubsection{Three-dimensional plotting} \label{\detokenize{tutorials/introductory/sample_plots:three-dimensional-plotting}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-mplot3d-surface}} The mplot3d toolkit (see {\hyperref[\detokenize{tutorials/toolkits/mplot3d:toolkit-mplot3d-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting started}}}} and \DUrole{xref,std,std-ref}{mplot3d-examples-index}) has support for simple 3d graphs including surface, wireframe, scatter, and bar charts. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/surface3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_surface3d_0011}.png}} \caption{Surface3d}\label{\detokenize{tutorials/introductory/sample_plots:id7}}\end{figure} Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for the \sphinxcode{\sphinxupquote{mplot3d}} toolkit. This toolkit is included with all standard Matplotlib installs. \subsubsection{Streamplot} \label{\detokenize{tutorials/introductory/sample_plots:streamplot}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-ellipse-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot()}}}}} function plots the streamlines of a vector field. In addition to simply plotting the streamlines, it allows you to map the colors and/or line widths of streamlines to a separate parameter, such as the speed or local intensity of the vector field. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/plot\_streamplot.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_plot_streamplot_0011}.png}} \caption{Streamplot with various plotting options.}\label{\detokenize{tutorials/introductory/sample_plots:id8}}\end{figure} This feature complements the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver()}}}}} function for plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the streamplot function. \subsubsection{Ellipses} \label{\detokenize{tutorials/introductory/sample_plots:ellipses}} In support of the \sphinxhref{http://www.jpl.nasa.gov/news/phoenix/main.php}{Phoenix} mission to Mars (which used Matplotlib to display ground tracking of spacecraft), Michael Droettboom built on work by Charlie Moad to provide an extremely accurate 8-spline approximation to elliptical arcs (see {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib.patches.Arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Arc}}}}}), which are insensitive to zoom level. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/shapes\_and\_collections/ellipse\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_ellipse_demo_0011}.png}} \caption{Ellipse Demo}\label{\detokenize{tutorials/introductory/sample_plots:id9}}\end{figure} \subsubsection{Bar charts} \label{\detokenize{tutorials/introductory/sample_plots:bar-charts}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-barchart-demo}} Use the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}} function to make bar charts, which includes customizations such as error bars: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/statistics/barchart\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_barchart_demo_0011}.png}} \caption{Barchart Demo}\label{\detokenize{tutorials/introductory/sample_plots:id10}}\end{figure} You can also create stacked bars (\sphinxhref{../../gallery/lines\_bars\_and\_markers/bar\_stacked.html}{bar\_stacked.py}), or horizontal bar charts (\sphinxhref{../../gallery/lines\_bars\_and\_markers/barh.html}{barh.py}). \subsubsection{Pie charts} \label{\detokenize{tutorials/introductory/sample_plots:pie-charts}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-pie-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib.pyplot.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pie()}}}}} function allows you to create pie charts. Optional features include auto-labeling the percentage of area, exploding one or more wedges from the center of the pie, and a shadow effect. Take a close look at the attached code, which generates this figure in just a few lines of code. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pie\_and\_polar\_charts/pie\_features.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_pie_features_0011}.png}} \caption{Pie Features}\label{\detokenize{tutorials/introductory/sample_plots:id11}}\end{figure} \subsubsection{Tables} \label{\detokenize{tutorials/introductory/sample_plots:tables}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-table-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.table:matplotlib.pyplot.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table()}}}}} function adds a text table to an axes. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/misc/table\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_table_demo_0011}.png}} \caption{Table Demo}\label{\detokenize{tutorials/introductory/sample_plots:id12}}\end{figure} \subsubsection{Scatter plots} \label{\detokenize{tutorials/introductory/sample_plots:scatter-plots}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-scatter-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} function makes a scatter plot with (optional) size and color arguments. This example plots changes in Google's stock price, with marker sizes reflecting the trading volume and colors varying with time. Here, the alpha attribute is used to make semitransparent circle markers. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/scatter\_demo2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_scatter_demo2_0011}.png}} \caption{Scatter Demo2}\label{\detokenize{tutorials/introductory/sample_plots:id13}}\end{figure} \subsubsection{GUI widgets} \label{\detokenize{tutorials/introductory/sample_plots:gui-widgets}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-slider-demo}} Matplotlib has basic GUI widgets that are independent of the graphical user interface you are using, allowing you to write cross GUI figures and widgets. See {\hyperref[\detokenize{api/widgets_api:module-matplotlib.widgets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets}}}}} and the \sphinxhref{../../gallery/index.html}{widget examples}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/widgets/slider\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_slider_demo_0011}.png}} \caption{Slider and radio-button GUI.}\label{\detokenize{tutorials/introductory/sample_plots:id14}}\end{figure} \subsubsection{Filled curves} \label{\detokenize{tutorials/introductory/sample_plots:filled-curves}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-fill-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill:matplotlib.pyplot.fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill()}}}}} function lets you plot filled curves and polygons: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/fill.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_fill_0011}.png}} \caption{Fill}\label{\detokenize{tutorials/introductory/sample_plots:id15}}\end{figure} Thanks to Andrew Straw for adding this function. \subsubsection{Date handling} \label{\detokenize{tutorials/introductory/sample_plots:date-handling}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-date-demo}} You can plot timeseries data with major and minor ticks and custom tick formatters for both. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/date.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_date_0011}.png}} \caption{Date}\label{\detokenize{tutorials/introductory/sample_plots:id16}}\end{figure} See {\hyperref[\detokenize{api/ticker_api:module-matplotlib.ticker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker}}}}} and {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}} for details and usage. \subsubsection{Log plots} \label{\detokenize{tutorials/introductory/sample_plots:log-plots}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-log-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib.pyplot.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogx()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib.pyplot.semilogy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogy()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.loglog:matplotlib.pyplot.loglog}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loglog()}}}}} functions simplify the creation of logarithmic plots. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/scales/log\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_log_demo_0011}.png}} \caption{Log Demo}\label{\detokenize{tutorials/introductory/sample_plots:id17}}\end{figure} Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions log-scaling infrastructure. \subsubsection{Polar plots} \label{\detokenize{tutorials/introductory/sample_plots:polar-plots}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-polar-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.polar:matplotlib.pyplot.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polar()}}}}} function generates polar plots. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pie\_and\_polar\_charts/polar\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_polar_demo_0011}.png}} \caption{Polar Demo}\label{\detokenize{tutorials/introductory/sample_plots:id18}}\end{figure} \subsubsection{Legends} \label{\detokenize{tutorials/introductory/sample_plots:legends}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-legend-demo}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} function automatically generates figure legends, with MATLAB-compatible legend-placement functions. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/legend.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_legend_0011}.png}} \caption{Legend}\label{\detokenize{tutorials/introductory/sample_plots:id19}}\end{figure} Thanks to Charles Twardy for input on the legend function. \subsubsection{TeX-notation for text objects} \label{\detokenize{tutorials/introductory/sample_plots:tex-notation-for-text-objects}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-mathtext-examples-demo}} Below is a sampling of the many TeX expressions now supported by Matplotlib's internal mathtext engine. The mathtext module provides TeX style mathematical expressions using \sphinxhref{https://www.freetype.org/}{FreeType} and the DejaVu, BaKoMa computer modern, or \sphinxhref{http://www.stixfonts.org}{STIX} fonts. See the {\hyperref[\detokenize{api/mathtext_api:module-matplotlib.mathtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext}}}}} module for additional details. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/mathtext\_examples.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_mathtext_examples_0011}.png}} \caption{Mathtext Examples}\label{\detokenize{tutorials/introductory/sample_plots:id20}}\end{figure} Matplotlib's mathtext infrastructure is an independent implementation and does not require TeX or any external packages installed on your computer. See the tutorial at {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{Writing mathematical expressions}}}}. \subsubsection{Native TeX rendering} \label{\detokenize{tutorials/introductory/sample_plots:native-tex-rendering}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-tex-demo}} Although Matplotlib's internal math rendering engine is quite powerful, sometimes you need TeX. Matplotlib supports external TeX rendering of strings with the \sphinxstyleemphasis{usetex} option. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/tex\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tex_demo_0011}.png}} \caption{Tex Demo}\label{\detokenize{tutorials/introductory/sample_plots:id21}}\end{figure} \subsubsection{EEG GUI} \label{\detokenize{tutorials/introductory/sample_plots:eeg-gui}}\label{\detokenize{tutorials/introductory/sample_plots:screenshots-eeg-demo}} You can embed Matplotlib into pygtk, wx, Tk, or Qt applications. Here is a screenshot of an EEG viewer called \sphinxhref{https://github.com/nipy/pbrain}{pbrain}. \noindent\sphinxincludegraphics{{eeg_small}.png} The lower axes uses {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} to plot the spectrogram of one of the EEG channels. For examples of how to embed Matplotlib in different toolkits, see: \begin{itemize} \item {} \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/embedding\_in\_gtk3\_sgskip} \item {} \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/embedding\_in\_wx2\_sgskip} \item {} \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/mpl\_with\_glade3\_sgskip} \item {} \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/embedding\_in\_qt\_sgskip} \item {} \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/embedding\_in\_tk\_sgskip} \end{itemize} \subsubsection{XKCD-style sketch plots} \label{\detokenize{tutorials/introductory/sample_plots:xkcd-style-sketch-plots}} Just for fun, Matplotlib supports plotting in the style of \sphinxcode{\sphinxupquote{xkcd}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/showcase/xkcd.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_xkcd_0011}.png}} \caption{xkcd}\label{\detokenize{tutorials/introductory/sample_plots:id22}}\end{figure} \subsubsection{Subplot example} \label{\detokenize{tutorials/introductory/sample_plots:subplot-example}} Many plot types can be combined in one figure to create powerful and flexible representations of data. \noindent\sphinxincludegraphics{{sphx_glr_sample_plots_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{hist2d}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/introductory/sample_plots:sphx-glr-download-tutorials-introductory-sample-plots-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/images:sphx-glr-download-tutorials-introductory-images-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Image tutorial} \label{\detokenize{tutorials/introductory/images:image-tutorial}}\label{\detokenize{tutorials/introductory/images:sphx-glr-tutorials-introductory-images-py}}\label{\detokenize{tutorials/introductory/images::doc}} A short tutorial on plotting images with Matplotlib. \subsubsection{Startup commands} \label{\detokenize{tutorials/introductory/images:startup-commands}}\label{\detokenize{tutorials/introductory/images:imaging-startup}} First, let's start IPython. It is a most excellent enhancement to the standard Python prompt, and it ties in especially well with Matplotlib. Start IPython either at a shell, or the IPython Notebook now. With IPython started, we now need to connect to a GUI event loop. This tells IPython where (and how) to display plots. To connect to a GUI loop, execute the \sphinxstylestrong{\%matplotlib} magic at your IPython prompt. There's more detail on exactly what this does at \sphinxhref{http://ipython.org/ipython-doc/2/interactive/reference.html\#gui-event-loop-support}{IPython's documentation on GUI event loops}. If you're using IPython Notebook, the same commands are available, but people commonly use a specific argument to the \%matplotlib magic: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [1]: }\PYG{o}{\PYGZpc{}}\PYG{k}{matplotlib} inline \end{sphinxVerbatim} This turns on inline plotting, where plot graphics will appear in your notebook. This has important implications for interactivity. For inline plotting, commands in cells below the cell that outputs a plot will not affect the plot. For example, changing the color map is not possible from cells below the cell that creates a plot. However, for other backends, such as Qt5, that open a separate window, cells below those that create the plot will change the plot - it is a live object in memory. This tutorial will use matplotlib's imperative-style plotting interface, pyplot. This interface maintains global state, and is very useful for quickly and easily experimenting with various plot settings. The alternative is the object-oriented interface, which is also very powerful, and generally more suitable for large application development. If you'd like to learn about the object-oriented interface, a great place to start is our {\hyperref[\detokenize{tutorials/introductory/usage::doc}]{\sphinxcrossref{\DUrole{doc}{Usage guide}}}}. For now, let's get on with the imperative-style approach: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{image} \PYG{k}{as} \PYG{n+nn}{mpimg} \end{sphinxVerbatim} \subsubsection{Importing image data into Numpy arrays} \label{\detokenize{tutorials/introductory/images:importing-image-data-into-numpy-arrays}}\label{\detokenize{tutorials/introductory/images:importing-data}} Loading image data is supported by the \sphinxhref{https://pillow.readthedocs.io/en/latest/}{Pillow} library. Natively, Matplotlib only supports PNG images. The commands shown below fall back on Pillow if the native read fails. The image used in this example is a PNG file, but keep that Pillow requirement in mind for your own data. Here's the image we're going to play with: \noindent\sphinxincludegraphics{{stinkbug}.png} It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending on where you get your data, the other kinds of image that you'll most likely encounter are RGBA images, which allow for transparency, or single-channel grayscale (luminosity) images. You can right click on it and choose "Save image as" to download it to your computer for the rest of this tutorial. And here we go... \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{img} \PYG{o}{=} \PYG{n}{mpimg}\PYG{o}{.}\PYG{n}{imread}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{../../doc/\PYGZus{}static/stinkbug.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{img}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] [[[0.40784314 0.40784314 0.40784314] [0.40784314 0.40784314 0.40784314] [0.40784314 0.40784314 0.40784314] ... [0.42745098 0.42745098 0.42745098] [0.42745098 0.42745098 0.42745098] [0.42745098 0.42745098 0.42745098]] [[0.4117647 0.4117647 0.4117647 ] [0.4117647 0.4117647 0.4117647 ] [0.4117647 0.4117647 0.4117647 ] ... [0.42745098 0.42745098 0.42745098] [0.42745098 0.42745098 0.42745098] [0.42745098 0.42745098 0.42745098]] [[0.41960785 0.41960785 0.41960785] [0.41568628 0.41568628 0.41568628] [0.41568628 0.41568628 0.41568628] ... [0.43137255 0.43137255 0.43137255] [0.43137255 0.43137255 0.43137255] [0.43137255 0.43137255 0.43137255]] ... [[0.4392157 0.4392157 0.4392157 ] [0.43529412 0.43529412 0.43529412] [0.43137255 0.43137255 0.43137255] ... [0.45490196 0.45490196 0.45490196] [0.4509804 0.4509804 0.4509804 ] [0.4509804 0.4509804 0.4509804 ]] [[0.44313726 0.44313726 0.44313726] [0.44313726 0.44313726 0.44313726] [0.4392157 0.4392157 0.4392157 ] ... [0.4509804 0.4509804 0.4509804 ] [0.44705883 0.44705883 0.44705883] [0.44705883 0.44705883 0.44705883]] [[0.44313726 0.44313726 0.44313726] [0.4509804 0.4509804 0.4509804 ] [0.4509804 0.4509804 0.4509804 ] ... [0.44705883 0.44705883 0.44705883] [0.44705883 0.44705883 0.44705883] [0.44313726 0.44313726 0.44313726]]] \end{sphinxVerbatim} Note the dtype there - float32. Matplotlib has rescaled the 8 bit data from each channel to floating point data between 0.0 and 1.0. As a side note, the only datatype that Pillow can work with is uint8. Matplotlib plotting can handle float32 and uint8, but image reading/writing for any format other than PNG is limited to uint8 data. Why 8 bits? Most displays can only render 8 bits per channel worth of color gradation. Why can they only render 8 bits/channel? Because that's about all the human eye can see. More here (from a photography standpoint): \sphinxhref{https://luminous-landscape.com/bit-depth/}{Luminous Landscape bit depth tutorial}. Each inner list represents a pixel. Here, with an RGB image, there are 3 values. Since it's a black and white image, R, G, and B are all similar. An RGBA (where A is alpha, or transparency), has 4 values per inner list, and a simple luminance image just has one value (and is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, matplotlib supports float32 and uint8 data types. For grayscale, matplotlib supports only float32. If your array data does not meet one of these descriptions, you need to rescale it. \subsubsection{Plotting numpy arrays as images} \label{\detokenize{tutorials/introductory/images:plotting-numpy-arrays-as-images}}\label{\detokenize{tutorials/introductory/images:plotting-data}} So, you have your data in a numpy array (either by importing it, or by generating it). Let's render it. In Matplotlib, this is performed using the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} function. Here we'll grab the plot object. This object gives you an easy way to manipulate the plot from the prompt. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{img}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_001}.png} You can also plot any numpy array. \paragraph{Applying pseudocolor schemes to image plots} \label{\detokenize{tutorials/introductory/images:applying-pseudocolor-schemes-to-image-plots}}\label{\detokenize{tutorials/introductory/images:pseudocolor}} Pseudocolor can be a useful tool for enhancing contrast and visualizing your data more easily. This is especially useful when making presentations of your data using projectors - their contrast is typically quite poor. Pseudocolor is only relevant to single-channel, grayscale, luminosity images. We currently have an RGB image. Since R, G, and B are all similar (see for yourself above or in your data), we can just pick one channel of our data: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lum\PYGZus{}img} \PYG{o}{=} \PYG{n}{img}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} This is array slicing. You can read more in the {}`Numpy tutorial} \PYG{c+c1}{\PYGZsh{} \PYGZlt{}https://docs.scipy.org/doc/numpy/user/quickstart.html\PYGZgt{}{}`\PYGZus{}.} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_002}.png} Now, with a luminosity (2D, no color) image, the default colormap (aka lookup table, LUT), is applied. The default is called viridis. There are plenty of others to choose from. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{hot}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_003}.png} Note that you can also change colormaps on existing plot objects using the \sphinxcode{\sphinxupquote{set\_cmap()}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{)} \PYG{n}{imgplot}\PYG{o}{.}\PYG{n}{set\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{nipy\PYGZus{}spectral}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_004}.png} \begin{sphinxadmonition}{note}{Note:} However, remember that in the IPython notebook with the inline backend, you can't make changes to plots that have already been rendered. If you create imgplot here in one cell, you cannot call set\_cmap() on it in a later cell and expect the earlier plot to change. Make sure that you enter these commands together in one cell. plt commands will not change plots from earlier cells. \end{sphinxadmonition} There are many other colormap schemes available. See the \sphinxhref{../colors/colormaps.html}{list and images of the colormaps}. \paragraph{Color scale reference} \label{\detokenize{tutorials/introductory/images:color-scale-reference}}\label{\detokenize{tutorials/introductory/images:color-bars}} It's helpful to have an idea of what value a color represents. We can do that by adding color bars. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_005}.png} This adds a colorbar to your existing figure. This won't automatically change if you change you switch to a different colormap - you have to re-create your plot, and add in the colorbar again. \paragraph{Examining a specific data range} \label{\detokenize{tutorials/introductory/images:examining-a-specific-data-range}}\label{\detokenize{tutorials/introductory/images:data-ranges}} Sometimes you want to enhance the contrast in your image, or expand the contrast in a particular region while sacrificing the detail in colors that don't vary much, or don't matter. A good tool to find interesting regions is the histogram. To create a histogram of our image data, we use the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} function. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{o}{.}\PYG{n}{ravel}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{bins}\PYG{o}{=}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{n+nb}{range}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ec}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_006}.png} Most often, the "interesting" part of the image is around the peak, and you can get extra contrast by clipping the regions above and/or below the peak. In our histogram, it looks like there's not much useful information in the high end (not many white things in the image). Let's adjust the upper limit, so that we effectively "zoom in on" part of the histogram. We do this by passing the clim argument to imshow. You could also do this by calling the \sphinxcode{\sphinxupquote{set\_clim()}} method of the image plot object, but make sure that you do so in the same cell as your plot command when working with the IPython Notebook - it will not change plots from earlier cells. You can specify the clim in the call to \sphinxcode{\sphinxupquote{plot}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{,} \PYG{n}{clim}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_007}.png} You can also specify the clim using the returned object \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{a} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{)} \PYG{n}{a}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Before}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{ticks}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{]}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{a} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{lum\PYGZus{}img}\PYG{p}{)} \PYG{n}{imgplot}\PYG{o}{.}\PYG{n}{set\PYGZus{}clim}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{)} \PYG{n}{a}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{After}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{ticks}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{]}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_008}.png} \paragraph{Array Interpolation schemes} \label{\detokenize{tutorials/introductory/images:array-interpolation-schemes}}\label{\detokenize{tutorials/introductory/images:interpolation}} Interpolation calculates what the color or value of a pixel "should" be, according to different mathematical schemes. One common place that this happens is when you resize an image. The number of pixels change, but you want the same information. Since pixels are discrete, there's missing space. Interpolation is how you fill that space. This is why your images sometimes come out looking pixelated when you blow them up. The effect is more pronounced when the difference between the original image and the expanded image is greater. Let's take our image and shrink it. We're effectively discarding pixels, only keeping a select few. Now when we plot it, that data gets blown up to the size on your screen. The old pixels aren't there anymore, and the computer has to draw in pixels to fill that space. We'll use the Pillow library that we used to load the image also to resize the image. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{PIL} \PYG{k}{import} \PYG{n}{Image} \PYG{n}{img} \PYG{o}{=} \PYG{n}{Image}\PYG{o}{.}\PYG{n}{open}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{../../doc/\PYGZus{}static/stinkbug.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{img}\PYG{o}{.}\PYG{n}{thumbnail}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{64}\PYG{p}{,} \PYG{l+m+mi}{64}\PYG{p}{)}\PYG{p}{,} \PYG{n}{Image}\PYG{o}{.}\PYG{n}{ANTIALIAS}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} resizes image in\PYGZhy{}place} \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{img}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_009}.png} Here we have the default interpolation, bilinear, since we did not give {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} any interpolation argument. Let's try some others. Here's "nearest", which does no interpolation. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{img}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{nearest}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_010}.png} and bicubic: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{img}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bicubic}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_images_011}.png} Bicubic interpolation is often used when blowing up photos - people tend to prefer blurry over pixelated. \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.153 seconds) \phantomsection\label{\detokenize{tutorials/introductory/images:sphx-glr-download-tutorials-introductory-images-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/lifecycle:sphx-glr-download-tutorials-introductory-lifecycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{The Lifecycle of a Plot} \label{\detokenize{tutorials/introductory/lifecycle:the-lifecycle-of-a-plot}}\label{\detokenize{tutorials/introductory/lifecycle:sphx-glr-tutorials-introductory-lifecycle-py}}\label{\detokenize{tutorials/introductory/lifecycle::doc}} This tutorial aims to show the beginning, middle, and end of a single visualization using Matplotlib. We'll begin with some raw data and end by saving a figure of a customized visualization. Along the way we'll try to highlight some neat features and best-practices using Matplotlib. \begin{sphinxadmonition}{note}{Note:} This tutorial is based off of \sphinxhref{http://pbpython.com/effective-matplotlib.html}{this excellent blog post} by Chris Moffitt. It was transformed into this tutorial by Chris Holdgraf. \end{sphinxadmonition} \subsubsection{A note on the Object-Oriented API vs Pyplot} \label{\detokenize{tutorials/introductory/lifecycle:a-note-on-the-object-oriented-api-vs-pyplot}} Matplotlib has two interfaces. The first is an object-oriented (OO) interface. In this case, we utilize an instance of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} in order to render visualizations on an instance of {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure.Figure}}}}}. The second is based on MATLAB and uses a state-based interface. This is encapsulated in the \sphinxcode{\sphinxupquote{pyplot}} module. See the {\hyperref[\detokenize{tutorials/introductory/pyplot::doc}]{\sphinxcrossref{\DUrole{doc}{pyplot tutorials}}}} for a more in-depth look at the pyplot interface. Most of the terms are straightforward but the main thing to remember is that: \begin{itemize} \item {} The Figure is the final image that may contain 1 or more Axes. \item {} The Axes represent an individual plot (don't confuse this with the word "axis", which refers to the x/y axis of a plot). \end{itemize} We call methods that do the plotting directly from the Axes, which gives us much more flexibility and power in customizing our plot. \begin{sphinxadmonition}{note}{Note:} In general, try to use the object-oriented interface over the pyplot interface. \end{sphinxadmonition} \subsubsection{Our data} \label{\detokenize{tutorials/introductory/lifecycle:our-data}} We'll use the data from the post from which this tutorial was derived. It contains sales information for a number of companies. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} sphinx\PYGZus{}gallery\PYGZus{}thumbnail\PYGZus{}number = 10} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{import} \PYG{n}{FuncFormatter} \PYG{n}{data} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Barton LLC}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{109438.50}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Frami, Hills and Schmidt}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{103569.59}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Fritsch, Russel and Anderson}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{112214.71}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Jerde\PYGZhy{}Hilpert}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{112591.43}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Keeling LLC}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{100934.30}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Koepp Ltd}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{103660.54}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Kulas Inc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{137351.96}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Trantow\PYGZhy{}Barrows}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{123381.38}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{White\PYGZhy{}Trantow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{135841.99}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Will LLC}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{104437.60}\PYG{p}{\PYGZcb{}} \PYG{n}{group\PYGZus{}data} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{data}\PYG{o}{.}\PYG{n}{values}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{group\PYGZus{}names} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{data}\PYG{o}{.}\PYG{n}{keys}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{group\PYGZus{}mean} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mean}\PYG{p}{(}\PYG{n}{group\PYGZus{}data}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Getting started} \label{\detokenize{tutorials/introductory/lifecycle:getting-started}} This data is naturally visualized as a barplot, with one bar per group. To do this with the object-oriented approach, we'll first generate an instance of {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure.Figure}}}}} and {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}}. The Figure is like a canvas, and the Axes is a part of that canvas on which we will make a particular visualization. \begin{sphinxadmonition}{note}{Note:} Figures can have multiple axes on them. For information on how to do this, see the {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Tight Layout tutorial}}}}. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_001}.png} Now that we have an Axes instance, we can plot on top of it. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_002}.png} \subsubsection{Controlling the style} \label{\detokenize{tutorials/introductory/lifecycle:controlling-the-style}} There are many styles available in Matplotlib in order to let you tailor your visualization to your needs. To see a list of styles, we can use \sphinxcode{\sphinxupquote{pyplot.style}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{available}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] [\PYGZsq{}seaborn\PYGZhy{}ticks\PYGZsq{}, \PYGZsq{}ggplot\PYGZsq{}, \PYGZsq{}dark\PYGZus{}background\PYGZsq{}, \PYGZsq{}bmh\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}poster\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}notebook\PYGZsq{}, \PYGZsq{}fast\PYGZsq{}, \PYGZsq{}seaborn\PYGZsq{}, \PYGZsq{}classic\PYGZsq{}, \PYGZsq{}Solarize\PYGZus{}Light2\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}dark\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}pastel\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}muted\PYGZsq{}, \PYGZsq{}\PYGZus{}classic\PYGZus{}test\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}paper\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}colorblind\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}bright\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}talk\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}dark\PYGZhy{}palette\PYGZsq{}, \PYGZsq{}tableau\PYGZhy{}colorblind10\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}darkgrid\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}whitegrid\PYGZsq{}, \PYGZsq{}fivethirtyeight\PYGZsq{}, \PYGZsq{}grayscale\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}white\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}deep\PYGZsq{}] \end{sphinxVerbatim} You can activate a style with the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fivethirtyeight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Now let's remake the above plot to see how it looks: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_003}.png} The style controls many things, such as color, linewidths, backgrounds, etc. \subsubsection{Customizing the plot} \label{\detokenize{tutorials/introductory/lifecycle:customizing-the-plot}} Now we've got a plot with the general look that we want, so let's fine-tune it so that it's ready for print. First let's rotate the labels on the x-axis so that they show up more clearly. We can gain access to these labels with the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels:matplotlib.axes.Axes.get_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.get\_xticklabels()}}}}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_004}.png} If we'd like to set the property of many items at once, it's useful to use the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.setp()}}}}} function. This will take a list (or many lists) of Matplotlib objects, and attempt to set some style element of each one. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_005}.png} It looks like this cut off some of the labels on the bottom. We can tell Matplotlib to automatically make room for elements in the figures that we create. To do this we'll set the \sphinxcode{\sphinxupquote{autolayout}} value of our rcParams. For more information on controlling the style, layout, and other features of plots with rcParams, see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.autolayout}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{True}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_006}.png} Next, we'll add labels to the plot. To do this with the OO interface, we can use the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set:matplotlib.axes.Axes.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.set()}}}}} method to set properties of this Axes object. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{xlim}\PYG{o}{=}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{10000}\PYG{p}{,} \PYG{l+m+mi}{140000}\PYG{p}{]}\PYG{p}{,} \PYG{n}{xlabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Total Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ylabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_007}.png} We can also adjust the size of this plot using the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots()}}}}} function. We can do this with the \sphinxcode{\sphinxupquote{figsize}} kwarg. \begin{sphinxadmonition}{note}{Note:} While indexing in NumPy follows the form (row, column), the figsize kwarg follows the form (width, height). This follows conventions in visualization, which unfortunately are different from those of linear algebra. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{xlim}\PYG{o}{=}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{10000}\PYG{p}{,} \PYG{l+m+mi}{140000}\PYG{p}{]}\PYG{p}{,} \PYG{n}{xlabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Total Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ylabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_008}.png} For labels, we can specify custom formatting guidelines in the form of functions by using the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FuncFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticker.FuncFormatter}}}}} class. Below we'll define a function that takes an integer as input, and returns a string as an output. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{currency}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{pos}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}The two args are the value and tick position\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{if} \PYG{n}{x} \PYG{o}{\PYGZgt{}}\PYG{o}{=} \PYG{l+m+mf}{1e6}\PYG{p}{:} \PYG{n}{s} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+si}{\PYGZob{}:1.1f\PYGZcb{}}\PYG{l+s+s1}{M}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{l+m+mf}{1e\PYGZhy{}6}\PYG{p}{)} \PYG{k}{else}\PYG{p}{:} \PYG{n}{s} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+si}{\PYGZob{}:1.0f\PYGZcb{}}\PYG{l+s+s1}{K}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{l+m+mf}{1e\PYGZhy{}3}\PYG{p}{)} \PYG{k}{return} \PYG{n}{s} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{FuncFormatter}\PYG{p}{(}\PYG{n}{currency}\PYG{p}{)} \end{sphinxVerbatim} We can then apply this formatter to the labels on our plot. To do this, we'll use the \sphinxcode{\sphinxupquote{xaxis}} attribute of our axis. This lets you perform actions on a specific axis on our plot. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{xlim}\PYG{o}{=}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{10000}\PYG{p}{,} \PYG{l+m+mi}{140000}\PYG{p}{]}\PYG{p}{,} \PYG{n}{xlabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Total Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ylabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_009}.png} \subsubsection{Combining multiple visualizations} \label{\detokenize{tutorials/introductory/lifecycle:combining-multiple-visualizations}} It is possible to draw multiple plot elements on the same instance of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}}. To do this we simply need to call another one of the plot methods on that axes object. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{barh}\PYG{p}{(}\PYG{n}{group\PYGZus{}names}\PYG{p}{,} \PYG{n}{group\PYGZus{}data}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{setp}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Add a vertical line, here we set the style in the function call} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{group\PYGZus{}mean}\PYG{p}{,} \PYG{n}{ls}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Annotate new companies} \PYG{k}{for} \PYG{n}{group} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{]}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{145000}\PYG{p}{,} \PYG{n}{group}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{New Company}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Now we\PYGZsq{}ll move our title up since it\PYGZsq{}s getting a little cramped} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{title}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{y}\PYG{o}{=}\PYG{l+m+mf}{1.05}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{xlim}\PYG{o}{=}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{10000}\PYG{p}{,} \PYG{l+m+mi}{140000}\PYG{p}{]}\PYG{p}{,} \PYG{n}{xlabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Total Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ylabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Company Revenue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{25e3}\PYG{p}{,} \PYG{l+m+mf}{50e3}\PYG{p}{,} \PYG{l+m+mf}{75e3}\PYG{p}{,} \PYG{l+m+mf}{100e3}\PYG{p}{,} \PYG{l+m+mf}{125e3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{right}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_lifecycle_010}.png} \subsubsection{Saving our plot} \label{\detokenize{tutorials/introductory/lifecycle:saving-our-plot}} Now that we're happy with the outcome of our plot, we want to save it to disk. There are many file formats we can save to in Matplotlib. To see a list of available options, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{get\PYGZus{}supported\PYGZus{}filetypes}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZob{}\PYGZsq{}ps\PYGZsq{}: \PYGZsq{}Postscript\PYGZsq{}, \PYGZsq{}eps\PYGZsq{}: \PYGZsq{}Encapsulated Postscript\PYGZsq{}, \PYGZsq{}pdf\PYGZsq{}: \PYGZsq{}Portable Document Format\PYGZsq{}, \PYGZsq{}pgf\PYGZsq{}: \PYGZsq{}PGF code for LaTeX\PYGZsq{}, \PYGZsq{}png\PYGZsq{}: \PYGZsq{}Portable Network Graphics\PYGZsq{}, \PYGZsq{}raw\PYGZsq{}: \PYGZsq{}Raw RGBA bitmap\PYGZsq{}, \PYGZsq{}rgba\PYGZsq{}: \PYGZsq{}Raw RGBA bitmap\PYGZsq{}, \PYGZsq{}svg\PYGZsq{}: \PYGZsq{}Scalable Vector Graphics\PYGZsq{}, \PYGZsq{}svgz\PYGZsq{}: \PYGZsq{}Scalable Vector Graphics\PYGZsq{}, \PYGZsq{}jpg\PYGZsq{}: \PYGZsq{}Joint Photographic Experts Group\PYGZsq{}, \PYGZsq{}jpeg\PYGZsq{}: \PYGZsq{}Joint Photographic Experts Group\PYGZsq{}, \PYGZsq{}tif\PYGZsq{}: \PYGZsq{}Tagged Image File Format\PYGZsq{}, \PYGZsq{}tiff\PYGZsq{}: \PYGZsq{}Tagged Image File Format\PYGZsq{}\PYGZcb{} \end{sphinxVerbatim} We can then use the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure.Figure.savefig()}}}}} in order to save the figure to disk. Note that there are several useful flags we'll show below: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{transparent=True}} makes the background of the saved figure transparent if the format supports it. \item {} \sphinxcode{\sphinxupquote{dpi=80}} controls the resolution (dots per square inch) of the output. \item {} \sphinxcode{\sphinxupquote{bbox\_inches="tight"}} fits the bounds of the figure to our plot. \end{itemize} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Uncomment this line to save the figure.} \PYG{c+c1}{\PYGZsh{} fig.savefig(\PYGZsq{}sales.png\PYGZsq{}, transparent=False, dpi=80, bbox\PYGZus{}inches=\PYGZdq{}tight\PYGZdq{})} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/introductory/lifecycle:sphx-glr-download-tutorials-introductory-lifecycle-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/introductory/customizing:sphx-glr-download-tutorials-introductory-customizing-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Customizing Matplotlib with style sheets and rcParams} \label{\detokenize{tutorials/introductory/customizing:customizing-matplotlib-with-style-sheets-and-rcparams}}\label{\detokenize{tutorials/introductory/customizing:sphx-glr-tutorials-introductory-customizing-py}}\label{\detokenize{tutorials/introductory/customizing::doc}} Tips for customizing the properties and default styles of Matplotlib. \subsubsection{Using style sheets} \label{\detokenize{tutorials/introductory/customizing:using-style-sheets}} The \sphinxcode{\sphinxupquote{style}} package adds support for easy-to-switch plotting "styles" with the same parameters as a {\hyperref[\detokenize{tutorials/introductory/customizing:customizing-with-matplotlibrc-files}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlib rc}}}} file (which is read at startup to configure matplotlib). There are a number of pre-defined styles \sphinxhref{https://github.com/matplotlib/matplotlib/tree/master/lib/matplotlib/mpl-data/stylelib}{provided by Matplotlib}. For example, there's a pre-defined style called "ggplot", which emulates the aesthetics of \sphinxhref{https://ggplot2.tidyverse.org/}{ggplot} (a popular plotting package for \sphinxhref{https://www.r-project.org/}{R}). To use this style, just add: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ggplot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)} \end{sphinxVerbatim} To list all available styles, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{available}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] [\PYGZsq{}seaborn\PYGZhy{}ticks\PYGZsq{}, \PYGZsq{}ggplot\PYGZsq{}, \PYGZsq{}dark\PYGZus{}background\PYGZsq{}, \PYGZsq{}bmh\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}poster\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}notebook\PYGZsq{}, \PYGZsq{}fast\PYGZsq{}, \PYGZsq{}seaborn\PYGZsq{}, \PYGZsq{}classic\PYGZsq{}, \PYGZsq{}Solarize\PYGZus{}Light2\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}dark\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}pastel\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}muted\PYGZsq{}, \PYGZsq{}\PYGZus{}classic\PYGZus{}test\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}paper\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}colorblind\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}bright\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}talk\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}dark\PYGZhy{}palette\PYGZsq{}, \PYGZsq{}tableau\PYGZhy{}colorblind10\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}darkgrid\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}whitegrid\PYGZsq{}, \PYGZsq{}fivethirtyeight\PYGZsq{}, \PYGZsq{}grayscale\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}white\PYGZsq{}, \PYGZsq{}seaborn\PYGZhy{}deep\PYGZsq{}] \end{sphinxVerbatim} \subsubsection{Defining your own style} \label{\detokenize{tutorials/introductory/customizing:defining-your-own-style}} You can create custom styles and use them by calling \sphinxcode{\sphinxupquote{style.use}} with the path or URL to the style sheet. Additionally, if you add your \sphinxcode{\sphinxupquote{\textless{}style-name\textgreater{}.mplstyle}} file to \sphinxcode{\sphinxupquote{mpl\_configdir/stylelib}}, you can reuse your custom style sheet with a call to \sphinxcode{\sphinxupquote{style.use(\textless{}style-name\textgreater{})}}. By default \sphinxcode{\sphinxupquote{mpl\_configdir}} should be \sphinxcode{\sphinxupquote{\textasciitilde{}/.config/matplotlib}}, but you can check where yours is with \sphinxcode{\sphinxupquote{matplotlib.get\_configdir()}}; you may need to create this directory. You also can change the directory where matplotlib looks for the stylelib/ folder by setting the MPLCONFIGDIR environment variable, see {\hyperref[\detokenize{faq/troubleshooting_faq:locating-matplotlib-config-dir}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlib configuration and cache directory locations}}}}. Note that a custom style sheet in \sphinxcode{\sphinxupquote{mpl\_configdir/stylelib}} will override a style sheet defined by matplotlib if the styles have the same name. For example, you might want to create \sphinxcode{\sphinxupquote{mpl\_configdir/stylelib/presentation.mplstyle}} with the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{titlesize} \PYG{p}{:} \PYG{l+m+mi}{24} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{labelsize} \PYG{p}{:} \PYG{l+m+mi}{20} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{linewidth} \PYG{p}{:} \PYG{l+m+mi}{3} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{markersize} \PYG{p}{:} \PYG{l+m+mi}{10} \PYG{n}{xtick}\PYG{o}{.}\PYG{n}{labelsize} \PYG{p}{:} \PYG{l+m+mi}{16} \PYG{n}{ytick}\PYG{o}{.}\PYG{n}{labelsize} \PYG{p}{:} \PYG{l+m+mi}{16} \end{sphinxVerbatim} Then, when you want to adapt a plot designed for a paper to one that looks good in a presentation, you can just add: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{presentation}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Composing styles} \label{\detokenize{tutorials/introductory/customizing:composing-styles}} Style sheets are designed to be composed together. So you can have a style sheet that customizes colors and a separate style sheet that alters element sizes for presentations. These styles can easily be combined by passing a list of styles: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dark\PYGZus{}background}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{presentation}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Note that styles further to the right will overwrite values that are already defined by styles on the left. \subsubsection{Temporary styling} \label{\detokenize{tutorials/introductory/customizing:temporary-styling}} If you only want to use a style for a specific block of code but don't want to change the global styling, the style package provides a context manager for limiting your changes to a specific scope. To isolate your styling changes, you can write something like the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{context}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dark\PYGZus{}background}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r\PYGZhy{}o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_customizing_001}.png} \subsection{matplotlib rcParams} \label{\detokenize{tutorials/introductory/customizing:matplotlib-rcparams}}\label{\detokenize{tutorials/introductory/customizing:id1}} \subsubsection{Dynamic rc settings} \label{\detokenize{tutorials/introductory/customizing:dynamic-rc-settings}}\label{\detokenize{tutorials/introductory/customizing:customizing-with-dynamic-rc-settings}} You can also dynamically change the default rc settings in a python script or interactively from the python shell. All of the rc settings are stored in a dictionary-like variable called {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}}, which is global to the matplotlib package. rcParams can be modified directly, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_customizing_002}.png} Matplotlib also provides a couple of convenience functions for modifying rc settings. The {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rc()}}}}} command can be used to modify multiple settings in a single group at once, using keyword arguments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_customizing_003}.png} The {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcdefaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcdefaults()}}}}} command will restore the standard matplotlib default settings. There is some degree of validation when setting the values of rcParams, see {\hyperref[\detokenize{api/rcsetup_api:module-matplotlib.rcsetup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcsetup}}}}} for details. \subsubsection{The \sphinxstyleliteralintitle{\sphinxupquote{matplotlibrc}} file} \label{\detokenize{tutorials/introductory/customizing:the-matplotlibrc-file}}\label{\detokenize{tutorials/introductory/customizing:customizing-with-matplotlibrc-files}} matplotlib uses \sphinxcode{\sphinxupquote{matplotlibrc}} configuration files to customize all kinds of properties, which we call \sphinxcode{\sphinxupquote{rc settings}} or \sphinxcode{\sphinxupquote{rc parameters}}. You can control the defaults of almost every property in matplotlib: figure size and dpi, line width, color and style, axes, axis and grid properties, text and font properties and so on. matplotlib looks for \sphinxcode{\sphinxupquote{matplotlibrc}} in four locations, in the following order: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxcode{\sphinxupquote{matplotlibrc}} in the current working directory, usually used for specific customizations that you do not want to apply elsewhere. \item {} \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC}} if it is a file, else \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC/matplotlibrc}}. \item {} It next looks in a user-specific place, depending on your platform: \begin{itemize} \item {} On Linux and FreeBSD, it looks in \sphinxcode{\sphinxupquote{.config/matplotlib/matplotlibrc}} (or \sphinxcode{\sphinxupquote{\$XDG\_CONFIG\_HOME/matplotlib/matplotlibrc}}) if you've customized your environment. \item {} On other platforms, it looks in \sphinxcode{\sphinxupquote{.matplotlib/matplotlibrc}}. \end{itemize} See {\hyperref[\detokenize{faq/troubleshooting_faq:locating-matplotlib-config-dir}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlib configuration and cache directory locations}}}}. \item {} \sphinxcode{\sphinxupquote{\sphinxstyleemphasis{INSTALL}/matplotlib/mpl-data/matplotlibrc}}, where \sphinxcode{\sphinxupquote{\sphinxstyleemphasis{INSTALL}}} is something like \sphinxcode{\sphinxupquote{/usr/lib/python3.7/site-packages}} on Linux, and maybe \sphinxcode{\sphinxupquote{C:\textbackslash{}Python37\textbackslash{}Lib\textbackslash{}site-packages}} on Windows. Every time you install matplotlib, this file will be overwritten, so if you want your customizations to be saved, please move this file to your user-specific matplotlib directory. \end{enumerate} Once a \sphinxcode{\sphinxupquote{matplotlibrc}} file has been found, it will \sphinxstyleemphasis{not} search any of the other paths. To display where the currently active \sphinxcode{\sphinxupquote{matplotlibrc}} file was loaded from, one can do the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{matplotlib\PYGZus{}fname}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}/home/foo/.config/matplotlib/matplotlibrc\PYGZsq{}} \end{sphinxVerbatim} See below for a sample {\hyperref[\detokenize{tutorials/introductory/customizing:matplotlibrc-sample}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlibrc file}}}}. \paragraph{A sample matplotlibrc file} \label{\detokenize{tutorials/introductory/customizing:a-sample-matplotlibrc-file}}\label{\detokenize{tutorials/introductory/customizing:matplotlibrc-sample}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} MATPLOTLIBRC FORMAT} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} This is a sample matplotlib configuration file \PYGZhy{} you can find a copy} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} of it on your system in} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} site\PYGZhy{}packages/matplotlib/mpl\PYGZhy{}data/matplotlibrc. If you edit it} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} there, please note that it will be overwritten in your next install.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} If you want to keep a permanent local copy that will not be} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} overwritten, place it in the following location:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} unix/linux:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdl{}HOME/.config/matplotlib/matplotlibrc or} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdl{}XDG\PYGZus{}CONFIG\PYGZus{}HOME/matplotlib/matplotlibrc (if \PYGZdl{}XDG\PYGZus{}CONFIG\PYGZus{}HOME is set)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} other platforms:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdl{}HOME/.matplotlib/matplotlibrc} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} See http://matplotlib.org/users/customizing.html\PYGZsh{}the\PYGZhy{}matplotlibrc\PYGZhy{}file for} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} more details on the paths which are checked for the configuration file.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} This file is best viewed in a editor which supports python mode} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} syntax highlighting. Blank lines, or lines starting with a comment} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} symbol, are ignored, as are trailing comments. Other lines must} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} have the format} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} key : val \PYGZsh{}\PYGZsh{} optional comment} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Colors: for the color values below, you can either use \PYGZhy{} a} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} matplotlib color string, such as r, k, or b \PYGZhy{} an rgb tuple, such as} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} (1.0, 0.5, 0.0) \PYGZhy{} a hex string, such as ff00ff \PYGZhy{} a scalar} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} grayscale intensity such as 0.75 \PYGZhy{} a legal html color name, e.g., red,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} blue, darkslategray} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} CONFIGURATION BEGINS HERE} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The default backend. If you omit this parameter, the first} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} working backend from the following list is used:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} MacOSX Qt5Agg Qt4Agg Gtk3Agg TkAgg WxAgg Agg} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Other choices include:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Qt5Cairo Qt4Cairo GTK3Cairo TkCairo WxCairo Cairo Wx PS PDF SVG Template.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} You can also deploy your own backend outside of matplotlib by} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} referring to the module name (which must be in the PYTHONPATH) as} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}module://my\PYGZus{}backend\PYGZsq{}.} \PYG{c+c1}{\PYGZsh{}backend : Agg} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Note that this can be overridden by the environment variable} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} QT\PYGZus{}API used by Enthought Tool Suite (ETS); valid values are} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdq{}pyqt\PYGZdq{} and \PYGZdq{}pyside\PYGZdq{}. The \PYGZdq{}pyqt\PYGZdq{} setting has the side effect of} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} forcing the use of Version 2 API for QString and QVariant.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The port to use for the web server in the WebAgg backend.} \PYG{c+c1}{\PYGZsh{}webagg.port : 8988} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The address on which the WebAgg web server should be reachable} \PYG{c+c1}{\PYGZsh{}webagg.address : 127.0.0.1} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} If webagg.port is unavailable, a number of other random ports will} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} be tried until one that is available is found.} \PYG{c+c1}{\PYGZsh{}webagg.port\PYGZus{}retries : 50} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} When True, open the webbrowser to the plot that is shown} \PYG{c+c1}{\PYGZsh{}webagg.open\PYGZus{}in\PYGZus{}browser : True} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} if you are running pyplot inside a GUI and your backend choice} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} conflicts, we will automatically try to find a compatible one for} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} you if backend\PYGZus{}fallback is True} \PYG{c+c1}{\PYGZsh{}backend\PYGZus{}fallback: True} \PYG{c+c1}{\PYGZsh{}interactive : False} \PYG{c+c1}{\PYGZsh{}toolbar : toolbar2 \PYGZsh{}\PYGZsh{} None \textbar{} toolbar2 (\PYGZdq{}classic\PYGZdq{} is deprecated)} \PYG{c+c1}{\PYGZsh{}timezone : UTC \PYGZsh{}\PYGZsh{} a pytz timezone string, e.g., US/Central or Europe/Paris} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Where your matplotlib data lives if you installed to a non\PYGZhy{}default} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} location. This is where the matplotlib fonts, bitmaps, etc reside} \PYG{c+c1}{\PYGZsh{}datapath : /home/jdhunter/mpldata} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} LINES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} See http://matplotlib.org/api/artist\PYGZus{}api.html\PYGZsh{}module\PYGZhy{}matplotlib.lines for more} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} information on line properties.} \PYG{c+c1}{\PYGZsh{}lines.linewidth : 1.5 \PYGZsh{}\PYGZsh{} line width in points} \PYG{c+c1}{\PYGZsh{}lines.linestyle : \PYGZhy{} \PYGZsh{}\PYGZsh{} solid line} \PYG{c+c1}{\PYGZsh{}lines.color : C0 \PYGZsh{}\PYGZsh{} has no affect on plot(); see axes.prop\PYGZus{}cycle} \PYG{c+c1}{\PYGZsh{}lines.marker : None \PYGZsh{}\PYGZsh{} the default marker} \PYG{c+c1}{\PYGZsh{}lines.markerfacecolor : auto \PYGZsh{}\PYGZsh{} the default markerfacecolor} \PYG{c+c1}{\PYGZsh{}lines.markeredgecolor : auto \PYGZsh{}\PYGZsh{} the default markeredgecolor} \PYG{c+c1}{\PYGZsh{}lines.markeredgewidth : 1.0 \PYGZsh{}\PYGZsh{} the line width around the marker symbol} \PYG{c+c1}{\PYGZsh{}lines.markersize : 6 \PYGZsh{}\PYGZsh{} markersize, in points} \PYG{c+c1}{\PYGZsh{}lines.dash\PYGZus{}joinstyle : round \PYGZsh{}\PYGZsh{} miter\textbar{}round\textbar{}bevel} \PYG{c+c1}{\PYGZsh{}lines.dash\PYGZus{}capstyle : butt \PYGZsh{}\PYGZsh{} butt\textbar{}round\textbar{}projecting} \PYG{c+c1}{\PYGZsh{}lines.solid\PYGZus{}joinstyle : round \PYGZsh{}\PYGZsh{} miter\textbar{}round\textbar{}bevel} \PYG{c+c1}{\PYGZsh{}lines.solid\PYGZus{}capstyle : projecting \PYGZsh{}\PYGZsh{} butt\textbar{}round\textbar{}projecting} \PYG{c+c1}{\PYGZsh{}lines.antialiased : True \PYGZsh{}\PYGZsh{} render lines in antialiased (no jaggies)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The three standard dash patterns. These are scaled by the linewidth.} \PYG{c+c1}{\PYGZsh{}lines.dashed\PYGZus{}pattern : 3.7, 1.6} \PYG{c+c1}{\PYGZsh{}lines.dashdot\PYGZus{}pattern : 6.4, 1.6, 1, 1.6} \PYG{c+c1}{\PYGZsh{}lines.dotted\PYGZus{}pattern : 1, 1.65} \PYG{c+c1}{\PYGZsh{}lines.scale\PYGZus{}dashes : True} \PYG{c+c1}{\PYGZsh{}markers.fillstyle: full \PYGZsh{}\PYGZsh{} full\textbar{}left\textbar{}right\textbar{}bottom\textbar{}top\textbar{}none} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} PATCHES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Patches are graphical objects that fill 2D space, like polygons or} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} circles. See} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} http://matplotlib.org/api/artist\PYGZus{}api.html\PYGZsh{}module\PYGZhy{}matplotlib.patches} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} information on patch properties} \PYG{c+c1}{\PYGZsh{}patch.linewidth : 1 \PYGZsh{}\PYGZsh{} edge width in points.} \PYG{c+c1}{\PYGZsh{}patch.facecolor : C0} \PYG{c+c1}{\PYGZsh{}patch.edgecolor : black \PYGZsh{}\PYGZsh{} if forced, or patch is not filled} \PYG{c+c1}{\PYGZsh{}patch.force\PYGZus{}edgecolor : False \PYGZsh{}\PYGZsh{} True to always use edgecolor} \PYG{c+c1}{\PYGZsh{}patch.antialiased : True \PYGZsh{}\PYGZsh{} render patches in antialiased (no jaggies)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} HATCHES} \PYG{c+c1}{\PYGZsh{}hatch.color : black} \PYG{c+c1}{\PYGZsh{}hatch.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} Boxplot} \PYG{c+c1}{\PYGZsh{}boxplot.notch : False} \PYG{c+c1}{\PYGZsh{}boxplot.vertical : True} \PYG{c+c1}{\PYGZsh{}boxplot.whiskers : 1.5} \PYG{c+c1}{\PYGZsh{}boxplot.bootstrap : None} \PYG{c+c1}{\PYGZsh{}boxplot.patchartist : False} \PYG{c+c1}{\PYGZsh{}boxplot.showmeans : False} \PYG{c+c1}{\PYGZsh{}boxplot.showcaps : True} \PYG{c+c1}{\PYGZsh{}boxplot.showbox : True} \PYG{c+c1}{\PYGZsh{}boxplot.showfliers : True} \PYG{c+c1}{\PYGZsh{}boxplot.meanline : False} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.color : black} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.marker : o} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.markerfacecolor : none} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.markeredgecolor : black} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.markeredgewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.markersize : 6} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.linestyle : none} \PYG{c+c1}{\PYGZsh{}boxplot.flierprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.boxprops.color : black} \PYG{c+c1}{\PYGZsh{}boxplot.boxprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.boxprops.linestyle : \PYGZhy{}} \PYG{c+c1}{\PYGZsh{}boxplot.whiskerprops.color : black} \PYG{c+c1}{\PYGZsh{}boxplot.whiskerprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.whiskerprops.linestyle : \PYGZhy{}} \PYG{c+c1}{\PYGZsh{}boxplot.capprops.color : black} \PYG{c+c1}{\PYGZsh{}boxplot.capprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.capprops.linestyle : \PYGZhy{}} \PYG{c+c1}{\PYGZsh{}boxplot.medianprops.color : C1} \PYG{c+c1}{\PYGZsh{}boxplot.medianprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}boxplot.medianprops.linestyle : \PYGZhy{}} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.color : C2} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.marker : \PYGZca{}} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.markerfacecolor : C2} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.markeredgecolor : C2} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.markersize : 6} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.linestyle : \PYGZhy{}\PYGZhy{}} \PYG{c+c1}{\PYGZsh{}boxplot.meanprops.linewidth : 1.0} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} FONT} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} font properties used by text.Text. See} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} http://matplotlib.org/api/font\PYGZus{}manager\PYGZus{}api.html for more} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} information on font properties. The 6 font properties used for font} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} matching are given below with their default values.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.family property has five values: \PYGZsq{}serif\PYGZsq{} (e.g., Times),} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}sans\PYGZhy{}serif\PYGZsq{} (e.g., Helvetica), \PYGZsq{}cursive\PYGZsq{} (e.g., Zapf\PYGZhy{}Chancery),} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}fantasy\PYGZsq{} (e.g., Western), and \PYGZsq{}monospace\PYGZsq{} (e.g., Courier). Each of} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} these font families has a default list of font names in decreasing} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} order of priority associated with them. When text.usetex is False,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} font.family may also be one or more concrete font names.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.style property has three values: normal (or roman), italic} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} or oblique. The oblique style will be used for italic, if it is not} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} present.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.variant property has two values: normal or small\PYGZhy{}caps. For} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} TrueType fonts, which are scalable fonts, small\PYGZhy{}caps is equivalent} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} to using a font size of \PYGZsq{}smaller\PYGZsq{}, or about 83\PYGZpc{}\PYGZpc{} of the current font} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} size.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.weight property has effectively 13 values: normal, bold,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} 400, and bold is 700. bolder and lighter are relative values with} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} respect to the current weight.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.stretch property has 11 values: ultra\PYGZhy{}condensed,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} extra\PYGZhy{}condensed, condensed, semi\PYGZhy{}condensed, normal, semi\PYGZhy{}expanded,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} expanded, extra\PYGZhy{}expanded, ultra\PYGZhy{}expanded, wider, and narrower. This} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} property is not currently implemented.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The font.size property is the default font size for text, given in pts.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} 10 pt is the standard value.} \PYG{c+c1}{\PYGZsh{}font.family : sans\PYGZhy{}serif} \PYG{c+c1}{\PYGZsh{}font.style : normal} \PYG{c+c1}{\PYGZsh{}font.variant : normal} \PYG{c+c1}{\PYGZsh{}font.weight : normal} \PYG{c+c1}{\PYGZsh{}font.stretch : normal} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} note that font.size controls default text sizes. To configure} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} special text sizes tick labels, axes, labels, title, etc, see the rc} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} settings for axes and ticks. Special text sizes can be defined} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} relative to font.size, using the following values: xx\PYGZhy{}small, x\PYGZhy{}small,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} small, medium, large, x\PYGZhy{}large, xx\PYGZhy{}large, larger, or smaller} \PYG{c+c1}{\PYGZsh{}font.size : 10.0} \PYG{c+c1}{\PYGZsh{}font.serif : DejaVu Serif, Bitstream Vera Serif, Computer Modern Roman, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif} \PYG{c+c1}{\PYGZsh{}font.sans\PYGZhy{}serif : DejaVu Sans, Bitstream Vera Sans, Computer Modern Sans Serif, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans\PYGZhy{}serif} \PYG{c+c1}{\PYGZsh{}font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, Script MT, Felipa, cursive} \PYG{c+c1}{\PYGZsh{}font.fantasy : Comic Sans MS, Chicago, Charcoal, ImpactWestern, Humor Sans, xkcd, fantasy} \PYG{c+c1}{\PYGZsh{}font.monospace : DejaVu Sans Mono, Bitstream Vera Sans Mono, Computer Modern Typewriter, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} TEXT} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} text properties used by text.Text. See} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} http://matplotlib.org/api/artist\PYGZus{}api.html\PYGZsh{}module\PYGZhy{}matplotlib.text for more} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} information on text properties} \PYG{c+c1}{\PYGZsh{}text.color : black} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} LaTeX customizations. See http://wiki.scipy.org/Cookbook/Matplotlib/UsingTex} \PYG{c+c1}{\PYGZsh{}text.usetex : False \PYGZsh{}\PYGZsh{} use latex for all text handling. The following fonts} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} are supported through the usual rc parameter settings:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} new century schoolbook, bookman, times, palatino,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} zapf chancery, charter, serif, sans\PYGZhy{}serif, helvetica,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} avant garde, courier, monospace, computer modern roman,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} computer modern sans serif, computer modern typewriter} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} If another font is desired which can loaded using the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} LaTeX \PYGZbs{}usepackage command, please inquire at the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} matplotlib mailing list} \PYG{c+c1}{\PYGZsh{}text.latex.preamble : \PYGZsh{}\PYGZsh{} IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} text.latex.preamble is a single line of LaTeX code that} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} will be passed on to the LaTeX system. It may contain} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} any code that is valid for the LaTeX \PYGZdq{}preamble\PYGZdq{}, i.e.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} between the \PYGZdq{}\PYGZbs{}documentclass\PYGZdq{} and \PYGZdq{}\PYGZbs{}begin\PYGZob{}document\PYGZcb{}\PYGZdq{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} statements.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Note that it has to be put on a single line, which may} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} become quite long.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The following packages are always loaded with usetex, so} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} beware of package collisions: color, geometry, graphicx,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} type1cm, textcomp.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Adobe Postscript (PSSNFS) font packages may also be} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} loaded, depending on your font settings.} \PYG{c+c1}{\PYGZsh{}text.latex.preview : False} \PYG{c+c1}{\PYGZsh{}text.hinting : auto \PYGZsh{}\PYGZsh{} May be one of the following:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} none: Perform no hinting} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} auto: Use FreeType\PYGZsq{}s autohinter} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} native: Use the hinting information in the} \PYG{c+c1}{\PYGZsh{} font file, if available, and if your} \PYG{c+c1}{\PYGZsh{} FreeType library supports it} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} either: Use the native hinting information,} \PYG{c+c1}{\PYGZsh{} or the autohinter if none is available.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} For backward compatibility, this value may also be} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} True === \PYGZsq{}auto\PYGZsq{} or False === \PYGZsq{}none\PYGZsq{}.} \PYG{c+c1}{\PYGZsh{}text.hinting\PYGZus{}factor : 8 \PYGZsh{}\PYGZsh{} Specifies the amount of softness for hinting in the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} horizontal direction. A value of 1 will hint to full} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} pixels. A value of 2 will hint to half pixels etc.} \PYG{c+c1}{\PYGZsh{}text.antialiased : True \PYGZsh{}\PYGZsh{} If True (default), the text will be antialiased.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} This only affects the Agg backend.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The following settings allow you to select the fonts in math mode.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} They map from a TeX font name to a fontconfig font pattern.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} These settings are only used if mathtext.fontset is \PYGZsq{}custom\PYGZsq{}.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Note that this \PYGZdq{}custom\PYGZdq{} mode is unsupported and may go away in the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} future.} \PYG{c+c1}{\PYGZsh{}mathtext.cal : cursive} \PYG{c+c1}{\PYGZsh{}mathtext.rm : sans} \PYG{c+c1}{\PYGZsh{}mathtext.tt : monospace} \PYG{c+c1}{\PYGZsh{}mathtext.it : sans:italic} \PYG{c+c1}{\PYGZsh{}mathtext.bf : sans:bold} \PYG{c+c1}{\PYGZsh{}mathtext.sf : sans} \PYG{c+c1}{\PYGZsh{}mathtext.fontset : dejavusans \PYGZsh{}\PYGZsh{} Should be \PYGZsq{}dejavusans\PYGZsq{} (default),} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}dejavuserif\PYGZsq{}, \PYGZsq{}cm\PYGZsq{} (Computer Modern), \PYGZsq{}stix\PYGZsq{},} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}stixsans\PYGZsq{} or \PYGZsq{}custom\PYGZsq{}} \PYG{c+c1}{\PYGZsh{}mathtext.fallback\PYGZus{}to\PYGZus{}cm : True \PYGZsh{}\PYGZsh{} When True, use symbols from the Computer Modern} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} fonts when a symbol can not be found in one of} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the custom math fonts.} \PYG{c+c1}{\PYGZsh{}mathtext.default : it \PYGZsh{}\PYGZsh{} The default font to use for math.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Can be any of the LaTeX font names, including} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the special name \PYGZdq{}regular\PYGZdq{} for the same font} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} used in regular text.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} AXES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} default face and edge color, default tick sizes,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} default fontsizes for ticklabels, and so on. See} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} http://matplotlib.org/api/axes\PYGZus{}api.html\PYGZsh{}module\PYGZhy{}matplotlib.axes} \PYG{c+c1}{\PYGZsh{}axes.facecolor : white \PYGZsh{}\PYGZsh{} axes background color} \PYG{c+c1}{\PYGZsh{}axes.edgecolor : black \PYGZsh{}\PYGZsh{} axes edge color} \PYG{c+c1}{\PYGZsh{}axes.linewidth : 0.8 \PYGZsh{}\PYGZsh{} edge linewidth} \PYG{c+c1}{\PYGZsh{}axes.grid : False \PYGZsh{}\PYGZsh{} display grid or not} \PYG{c+c1}{\PYGZsh{}axes.grid.axis : both \PYGZsh{}\PYGZsh{} which axis the grid should apply to} \PYG{c+c1}{\PYGZsh{}axes.grid.which : major \PYGZsh{}\PYGZsh{} gridlines at major, minor or both ticks} \PYG{c+c1}{\PYGZsh{}axes.titlesize : large \PYGZsh{}\PYGZsh{} fontsize of the axes title} \PYG{c+c1}{\PYGZsh{}axes.titleweight : normal \PYGZsh{}\PYGZsh{} font weight of title} \PYG{c+c1}{\PYGZsh{}axes.titlepad : 6.0 \PYGZsh{}\PYGZsh{} pad between axes and title in points} \PYG{c+c1}{\PYGZsh{}axes.labelsize : medium \PYGZsh{}\PYGZsh{} fontsize of the x any y labels} \PYG{c+c1}{\PYGZsh{}axes.labelpad : 4.0 \PYGZsh{}\PYGZsh{} space between label and axis} \PYG{c+c1}{\PYGZsh{}axes.labelweight : normal \PYGZsh{}\PYGZsh{} weight of the x and y labels} \PYG{c+c1}{\PYGZsh{}axes.labelcolor : black} \PYG{c+c1}{\PYGZsh{}axes.axisbelow : line \PYGZsh{}\PYGZsh{} draw axis gridlines and ticks below} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} patches (True); above patches but below} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} lines (\PYGZsq{}line\PYGZsq{}); or above all (False)} \PYG{c+c1}{\PYGZsh{}axes.formatter.limits : \PYGZhy{}7, 7 \PYGZsh{}\PYGZsh{} use scientific notation if log10} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} of the axis range is smaller than the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} first or larger than the second} \PYG{c+c1}{\PYGZsh{}axes.formatter.use\PYGZus{}locale : False \PYGZsh{}\PYGZsh{} When True, format tick labels} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} according to the user\PYGZsq{}s locale.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} For example, use \PYGZsq{},\PYGZsq{} as a decimal} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} separator in the fr\PYGZus{}FR locale.} \PYG{c+c1}{\PYGZsh{}axes.formatter.use\PYGZus{}mathtext : False \PYGZsh{}\PYGZsh{} When True, use mathtext for scientific} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} notation.} \PYG{c+c1}{\PYGZsh{}axes.formatter.min\PYGZus{}exponent: 0 \PYGZsh{}\PYGZsh{} minimum exponent to format in scientific notation} \PYG{c+c1}{\PYGZsh{}axes.formatter.useoffset : True \PYGZsh{}\PYGZsh{} If True, the tick label formatter} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} will default to labeling ticks relative} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} to an offset when the data range is} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} small compared to the minimum absolute} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} value of the data.} \PYG{c+c1}{\PYGZsh{}axes.formatter.offset\PYGZus{}threshold : 4 \PYGZsh{}\PYGZsh{} When useoffset is True, the offset} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} will be used when it can remove} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} at least this number of significant} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} digits from tick labels.} \PYG{c+c1}{\PYGZsh{}axes.spines.left : True \PYGZsh{}\PYGZsh{} display axis spines} \PYG{c+c1}{\PYGZsh{}axes.spines.bottom : True} \PYG{c+c1}{\PYGZsh{}axes.spines.top : True} \PYG{c+c1}{\PYGZsh{}axes.spines.right : True} \PYG{c+c1}{\PYGZsh{}axes.unicode\PYGZus{}minus : True \PYGZsh{}\PYGZsh{} use unicode for the minus symbol} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} rather than hyphen. See} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} http://en.wikipedia.org/wiki/Plus\PYGZus{}and\PYGZus{}minus\PYGZus{}signs\PYGZsh{}Character\PYGZus{}codes} \PYG{c+c1}{\PYGZsh{}axes.prop\PYGZus{}cycle : cycler(\PYGZsq{}color\PYGZsq{}, [\PYGZsq{}1f77b4\PYGZsq{}, \PYGZsq{}ff7f0e\PYGZsq{}, \PYGZsq{}2ca02c\PYGZsq{}, \PYGZsq{}d62728\PYGZsq{}, \PYGZsq{}9467bd\PYGZsq{}, \PYGZsq{}8c564b\PYGZsq{}, \PYGZsq{}e377c2\PYGZsq{}, \PYGZsq{}7f7f7f\PYGZsq{}, \PYGZsq{}bcbd22\PYGZsq{}, \PYGZsq{}17becf\PYGZsq{}])} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} color cycle for plot lines as list of string} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} colorspecs: single letter, long name, or web\PYGZhy{}style hex} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Note the use of string escapes here (\PYGZsq{}1f77b4\PYGZsq{}, instead of 1f77b4)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} as opposed to the rest of this file.} \PYG{c+c1}{\PYGZsh{}axes.autolimit\PYGZus{}mode : data \PYGZsh{}\PYGZsh{} How to scale axes limits to the data.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Use \PYGZdq{}data\PYGZdq{} to use data limits, plus some margin} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Use \PYGZdq{}round\PYGZus{}number\PYGZdq{} move to the nearest \PYGZdq{}round\PYGZdq{} number} \PYG{c+c1}{\PYGZsh{}axes.xmargin : .05 \PYGZsh{}\PYGZsh{} x margin. See {}`axes.Axes.margins{}`} \PYG{c+c1}{\PYGZsh{}axes.ymargin : .05 \PYGZsh{}\PYGZsh{} y margin See {}`axes.Axes.margins{}`} \PYG{c+c1}{\PYGZsh{}polaraxes.grid : True \PYGZsh{}\PYGZsh{} display grid on polar axes} \PYG{c+c1}{\PYGZsh{}axes3d.grid : True \PYGZsh{}\PYGZsh{} display grid on 3d axes} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} DATES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} These control the default format strings used in AutoDateFormatter.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Any valid format datetime format string can be used (see the python} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} {}`datetime{}` for details). For example using \PYGZsq{}\PYGZpc{}\PYGZpc{}x\PYGZsq{} will use the locale date representation} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}\PYGZpc{}\PYGZpc{}X\PYGZsq{} will use the locale time representation and \PYGZsq{}\PYGZpc{}\PYGZpc{}c\PYGZsq{} will use the full locale datetime} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} representation.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} These values map to the scales:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZob{}\PYGZsq{}year\PYGZsq{}: 365, \PYGZsq{}month\PYGZsq{}: 30, \PYGZsq{}day\PYGZsq{}: 1, \PYGZsq{}hour\PYGZsq{}: 1/24, \PYGZsq{}minute\PYGZsq{}: 1 / (24 * 60)\PYGZcb{}} \PYG{c+c1}{\PYGZsh{}date.autoformatter.year : \PYGZpc{}Y} \PYG{c+c1}{\PYGZsh{}date.autoformatter.month : \PYGZpc{}Y\PYGZhy{}\PYGZpc{}m} \PYG{c+c1}{\PYGZsh{}date.autoformatter.day : \PYGZpc{}Y\PYGZhy{}\PYGZpc{}m\PYGZhy{}\PYGZpc{}d} \PYG{c+c1}{\PYGZsh{}date.autoformatter.hour : \PYGZpc{}m\PYGZhy{}\PYGZpc{}d \PYGZpc{}H} \PYG{c+c1}{\PYGZsh{}date.autoformatter.minute : \PYGZpc{}d \PYGZpc{}H:\PYGZpc{}M} \PYG{c+c1}{\PYGZsh{}date.autoformatter.second : \PYGZpc{}H:\PYGZpc{}M:\PYGZpc{}S} \PYG{c+c1}{\PYGZsh{}date.autoformatter.microsecond : \PYGZpc{}M:\PYGZpc{}S.\PYGZpc{}f} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} TICKS} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} see http://matplotlib.org/api/axis\PYGZus{}api.html\PYGZsh{}matplotlib.axis.Tick} \PYG{c+c1}{\PYGZsh{}xtick.top : False \PYGZsh{}\PYGZsh{} draw ticks on the top side} \PYG{c+c1}{\PYGZsh{}xtick.bottom : True \PYGZsh{}\PYGZsh{} draw ticks on the bottom side} \PYG{c+c1}{\PYGZsh{}xtick.labeltop : False \PYGZsh{}\PYGZsh{} draw label on the top} \PYG{c+c1}{\PYGZsh{}xtick.labelbottom : True \PYGZsh{}\PYGZsh{} draw label on the bottom} \PYG{c+c1}{\PYGZsh{}xtick.major.size : 3.5 \PYGZsh{}\PYGZsh{} major tick size in points} \PYG{c+c1}{\PYGZsh{}xtick.minor.size : 2 \PYGZsh{}\PYGZsh{} minor tick size in points} \PYG{c+c1}{\PYGZsh{}xtick.major.width : 0.8 \PYGZsh{}\PYGZsh{} major tick width in points} \PYG{c+c1}{\PYGZsh{}xtick.minor.width : 0.6 \PYGZsh{}\PYGZsh{} minor tick width in points} \PYG{c+c1}{\PYGZsh{}xtick.major.pad : 3.5 \PYGZsh{}\PYGZsh{} distance to major tick label in points} \PYG{c+c1}{\PYGZsh{}xtick.minor.pad : 3.4 \PYGZsh{}\PYGZsh{} distance to the minor tick label in points} \PYG{c+c1}{\PYGZsh{}xtick.color : black \PYGZsh{}\PYGZsh{} color of the tick labels} \PYG{c+c1}{\PYGZsh{}xtick.labelsize : medium \PYGZsh{}\PYGZsh{} fontsize of the tick labels} \PYG{c+c1}{\PYGZsh{}xtick.direction : out \PYGZsh{}\PYGZsh{} direction: in, out, or inout} \PYG{c+c1}{\PYGZsh{}xtick.minor.visible : False \PYGZsh{}\PYGZsh{} visibility of minor ticks on x\PYGZhy{}axis} \PYG{c+c1}{\PYGZsh{}xtick.major.top : True \PYGZsh{}\PYGZsh{} draw x axis top major ticks} \PYG{c+c1}{\PYGZsh{}xtick.major.bottom : True \PYGZsh{}\PYGZsh{} draw x axis bottom major ticks} \PYG{c+c1}{\PYGZsh{}xtick.minor.top : True \PYGZsh{}\PYGZsh{} draw x axis top minor ticks} \PYG{c+c1}{\PYGZsh{}xtick.minor.bottom : True \PYGZsh{}\PYGZsh{} draw x axis bottom minor ticks} \PYG{c+c1}{\PYGZsh{}xtick.alignment : center \PYGZsh{}\PYGZsh{} alignment of xticks} \PYG{c+c1}{\PYGZsh{}ytick.left : True \PYGZsh{}\PYGZsh{} draw ticks on the left side} \PYG{c+c1}{\PYGZsh{}ytick.right : False \PYGZsh{}\PYGZsh{} draw ticks on the right side} \PYG{c+c1}{\PYGZsh{}ytick.labelleft : True \PYGZsh{}\PYGZsh{} draw tick labels on the left side} \PYG{c+c1}{\PYGZsh{}ytick.labelright : False \PYGZsh{}\PYGZsh{} draw tick labels on the right side} \PYG{c+c1}{\PYGZsh{}ytick.major.size : 3.5 \PYGZsh{}\PYGZsh{} major tick size in points} \PYG{c+c1}{\PYGZsh{}ytick.minor.size : 2 \PYGZsh{}\PYGZsh{} minor tick size in points} \PYG{c+c1}{\PYGZsh{}ytick.major.width : 0.8 \PYGZsh{}\PYGZsh{} major tick width in points} \PYG{c+c1}{\PYGZsh{}ytick.minor.width : 0.6 \PYGZsh{}\PYGZsh{} minor tick width in points} \PYG{c+c1}{\PYGZsh{}ytick.major.pad : 3.5 \PYGZsh{}\PYGZsh{} distance to major tick label in points} \PYG{c+c1}{\PYGZsh{}ytick.minor.pad : 3.4 \PYGZsh{}\PYGZsh{} distance to the minor tick label in points} \PYG{c+c1}{\PYGZsh{}ytick.color : black \PYGZsh{}\PYGZsh{} color of the tick labels} \PYG{c+c1}{\PYGZsh{}ytick.labelsize : medium \PYGZsh{}\PYGZsh{} fontsize of the tick labels} \PYG{c+c1}{\PYGZsh{}ytick.direction : out \PYGZsh{}\PYGZsh{} direction: in, out, or inout} \PYG{c+c1}{\PYGZsh{}ytick.minor.visible : False \PYGZsh{}\PYGZsh{} visibility of minor ticks on y\PYGZhy{}axis} \PYG{c+c1}{\PYGZsh{}ytick.major.left : True \PYGZsh{}\PYGZsh{} draw y axis left major ticks} \PYG{c+c1}{\PYGZsh{}ytick.major.right : True \PYGZsh{}\PYGZsh{} draw y axis right major ticks} \PYG{c+c1}{\PYGZsh{}ytick.minor.left : True \PYGZsh{}\PYGZsh{} draw y axis left minor ticks} \PYG{c+c1}{\PYGZsh{}ytick.minor.right : True \PYGZsh{}\PYGZsh{} draw y axis right minor ticks} \PYG{c+c1}{\PYGZsh{}ytick.alignment : center\PYGZus{}baseline \PYGZsh{}\PYGZsh{} alignment of yticks} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} GRIDS} \PYG{c+c1}{\PYGZsh{}grid.color : b0b0b0 \PYGZsh{}\PYGZsh{} grid color} \PYG{c+c1}{\PYGZsh{}grid.linestyle : \PYGZhy{} \PYGZsh{}\PYGZsh{} solid} \PYG{c+c1}{\PYGZsh{}grid.linewidth : 0.8 \PYGZsh{}\PYGZsh{} in points} \PYG{c+c1}{\PYGZsh{}grid.alpha : 1.0 \PYGZsh{}\PYGZsh{} transparency, between 0.0 and 1.0} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} Legend} \PYG{c+c1}{\PYGZsh{}legend.loc : best} \PYG{c+c1}{\PYGZsh{}legend.frameon : True \PYGZsh{}\PYGZsh{} if True, draw the legend on a background patch} \PYG{c+c1}{\PYGZsh{}legend.framealpha : 0.8 \PYGZsh{}\PYGZsh{} legend patch transparency} \PYG{c+c1}{\PYGZsh{}legend.facecolor : inherit \PYGZsh{}\PYGZsh{} inherit from axes.facecolor; or color spec} \PYG{c+c1}{\PYGZsh{}legend.edgecolor : 0.8 \PYGZsh{}\PYGZsh{} background patch boundary color} \PYG{c+c1}{\PYGZsh{}legend.fancybox : True \PYGZsh{}\PYGZsh{} if True, use a rounded box for the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} legend background, else a rectangle} \PYG{c+c1}{\PYGZsh{}legend.shadow : False \PYGZsh{}\PYGZsh{} if True, give background a shadow effect} \PYG{c+c1}{\PYGZsh{}legend.numpoints : 1 \PYGZsh{}\PYGZsh{} the number of marker points in the legend line} \PYG{c+c1}{\PYGZsh{}legend.scatterpoints : 1 \PYGZsh{}\PYGZsh{} number of scatter points} \PYG{c+c1}{\PYGZsh{}legend.markerscale : 1.0 \PYGZsh{}\PYGZsh{} the relative size of legend markers vs. original} \PYG{c+c1}{\PYGZsh{}legend.fontsize : medium} \PYG{c+c1}{\PYGZsh{}legend.title\PYGZus{}fontsize : None \PYGZsh{}\PYGZsh{} None sets to the same as the default axes.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Dimensions as fraction of fontsize:} \PYG{c+c1}{\PYGZsh{}legend.borderpad : 0.4 \PYGZsh{}\PYGZsh{} border whitespace} \PYG{c+c1}{\PYGZsh{}legend.labelspacing : 0.5 \PYGZsh{}\PYGZsh{} the vertical space between the legend entries} \PYG{c+c1}{\PYGZsh{}legend.handlelength : 2.0 \PYGZsh{}\PYGZsh{} the length of the legend lines} \PYG{c+c1}{\PYGZsh{}legend.handleheight : 0.7 \PYGZsh{}\PYGZsh{} the height of the legend handle} \PYG{c+c1}{\PYGZsh{}legend.handletextpad : 0.8 \PYGZsh{}\PYGZsh{} the space between the legend line and legend text} \PYG{c+c1}{\PYGZsh{}legend.borderaxespad : 0.5 \PYGZsh{}\PYGZsh{} the border between the axes and legend edge} \PYG{c+c1}{\PYGZsh{}legend.columnspacing : 2.0 \PYGZsh{}\PYGZsh{} column separation} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} FIGURE} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} See http://matplotlib.org/api/figure\PYGZus{}api.html\PYGZsh{}matplotlib.figure.Figure} \PYG{c+c1}{\PYGZsh{}figure.titlesize : large \PYGZsh{}\PYGZsh{} size of the figure title (Figure.suptitle())} \PYG{c+c1}{\PYGZsh{}figure.titleweight : normal \PYGZsh{}\PYGZsh{} weight of the figure title} \PYG{c+c1}{\PYGZsh{}figure.figsize : 6.4, 4.8 \PYGZsh{}\PYGZsh{} figure size in inches} \PYG{c+c1}{\PYGZsh{}figure.dpi : 100 \PYGZsh{}\PYGZsh{} figure dots per inch} \PYG{c+c1}{\PYGZsh{}figure.facecolor : white \PYGZsh{}\PYGZsh{} figure facecolor} \PYG{c+c1}{\PYGZsh{}figure.edgecolor : white \PYGZsh{}\PYGZsh{} figure edgecolor} \PYG{c+c1}{\PYGZsh{}figure.frameon : True \PYGZsh{}\PYGZsh{} enable figure frame} \PYG{c+c1}{\PYGZsh{}figure.max\PYGZus{}open\PYGZus{}warning : 20 \PYGZsh{}\PYGZsh{} The maximum number of figures to open through} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the pyplot interface before emitting a warning.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} If less than one this feature is disabled.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} The figure subplot parameters. All dimensions are a fraction of the} \PYG{c+c1}{\PYGZsh{}figure.subplot.left : 0.125 \PYGZsh{}\PYGZsh{} the left side of the subplots of the figure} \PYG{c+c1}{\PYGZsh{}figure.subplot.right : 0.9 \PYGZsh{}\PYGZsh{} the right side of the subplots of the figure} \PYG{c+c1}{\PYGZsh{}figure.subplot.bottom : 0.11 \PYGZsh{}\PYGZsh{} the bottom of the subplots of the figure} \PYG{c+c1}{\PYGZsh{}figure.subplot.top : 0.88 \PYGZsh{}\PYGZsh{} the top of the subplots of the figure} \PYG{c+c1}{\PYGZsh{}figure.subplot.wspace : 0.2 \PYGZsh{}\PYGZsh{} the amount of width reserved for space between subplots,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} expressed as a fraction of the average axis width} \PYG{c+c1}{\PYGZsh{}figure.subplot.hspace : 0.2 \PYGZsh{}\PYGZsh{} the amount of height reserved for space between subplots,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} expressed as a fraction of the average axis height} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Figure layout} \PYG{c+c1}{\PYGZsh{}figure.autolayout : False \PYGZsh{}\PYGZsh{} When True, automatically adjust subplot} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} parameters to make the plot fit the figure} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} using {}`tight\PYGZus{}layout{}`} \PYG{c+c1}{\PYGZsh{}figure.constrained\PYGZus{}layout.use: False \PYGZsh{}\PYGZsh{} When True, automatically make plot} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} elements fit on the figure. (Not compatible} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} with {}`autolayout{}`, above).} \PYG{c+c1}{\PYGZsh{}figure.constrained\PYGZus{}layout.h\PYGZus{}pad : 0.04167 \PYGZsh{}\PYGZsh{} Padding around axes objects. Float representing} \PYG{c+c1}{\PYGZsh{}figure.constrained\PYGZus{}layout.w\PYGZus{}pad : 0.04167 \PYGZsh{}\PYGZsh{} inches. Default is 3./72. inches (3 pts)} \PYG{c+c1}{\PYGZsh{}figure.constrained\PYGZus{}layout.hspace : 0.02 \PYGZsh{}\PYGZsh{} Space between subplot groups. Float representing} \PYG{c+c1}{\PYGZsh{}figure.constrained\PYGZus{}layout.wspace : 0.02 \PYGZsh{}\PYGZsh{} a fraction of the subplot widths being separated.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} IMAGES} \PYG{c+c1}{\PYGZsh{}image.aspect : equal \PYGZsh{}\PYGZsh{} equal \textbar{} auto \textbar{} a number} \PYG{c+c1}{\PYGZsh{}image.interpolation : nearest \PYGZsh{}\PYGZsh{} see help(imshow) for options} \PYG{c+c1}{\PYGZsh{}image.cmap : viridis \PYGZsh{}\PYGZsh{} A colormap name, gray etc...} \PYG{c+c1}{\PYGZsh{}image.lut : 256 \PYGZsh{}\PYGZsh{} the size of the colormap lookup table} \PYG{c+c1}{\PYGZsh{}image.origin : upper \PYGZsh{}\PYGZsh{} lower \textbar{} upper} \PYG{c+c1}{\PYGZsh{}image.resample : True} \PYG{c+c1}{\PYGZsh{}image.composite\PYGZus{}image : True \PYGZsh{}\PYGZsh{} When True, all the images on a set of axes are} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} combined into a single composite image before} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} saving a figure as a vector graphics file,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} such as a PDF.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} CONTOUR PLOTS} \PYG{c+c1}{\PYGZsh{}contour.negative\PYGZus{}linestyle : dashed \PYGZsh{}\PYGZsh{} string or on\PYGZhy{}off ink sequence} \PYG{c+c1}{\PYGZsh{}contour.corner\PYGZus{}mask : True \PYGZsh{}\PYGZsh{} True \textbar{} False \textbar{} legacy} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} ERRORBAR PLOTS} \PYG{c+c1}{\PYGZsh{}errorbar.capsize : 0 \PYGZsh{}\PYGZsh{} length of end cap on error bars in pixels} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} HISTOGRAM PLOTS} \PYG{c+c1}{\PYGZsh{}hist.bins : 10 \PYGZsh{}\PYGZsh{} The default number of histogram bins.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} If Numpy 1.11 or later is} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} installed, may also be {}`auto{}`} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} SCATTER PLOTS} \PYG{c+c1}{\PYGZsh{}scatter.marker : o \PYGZsh{}\PYGZsh{} The default marker type for scatter plots.} \PYG{c+c1}{\PYGZsh{}scatter.edgecolors : face \PYGZsh{}\PYGZsh{} The default edgecolors for scatter plots.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} Agg rendering} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} Warning: experimental, 2008/10/10} \PYG{c+c1}{\PYGZsh{}agg.path.chunksize : 0 \PYGZsh{}\PYGZsh{} 0 to disable; values in the range} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} 10000 to 100000 can improve speed slightly} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} and prevent an Agg rendering failure} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} when plotting very large data sets,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} especially if they are very gappy.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} It may cause minor artifacts, though.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} A value of 20000 is probably a good} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} starting point.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} PATHS} \PYG{c+c1}{\PYGZsh{}path.simplify : True \PYGZsh{}\PYGZsh{} When True, simplify paths by removing \PYGZdq{}invisible\PYGZdq{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} points to reduce file size and increase rendering} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} speed} \PYG{c+c1}{\PYGZsh{}path.simplify\PYGZus{}threshold : 0.111111111111 \PYGZsh{}\PYGZsh{} The threshold of similarity below which} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} vertices will be removed in the} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} simplification process} \PYG{c+c1}{\PYGZsh{}path.snap : True \PYGZsh{}\PYGZsh{} When True, rectilinear axis\PYGZhy{}aligned paths will be snapped to} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the nearest pixel when certain criteria are met. When False,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} paths will never be snapped.} \PYG{c+c1}{\PYGZsh{}path.sketch : None \PYGZsh{}\PYGZsh{} May be none, or a 3\PYGZhy{}tuple of the form (scale, length,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} randomness).} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} *scale* is the amplitude of the wiggle} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} perpendicular to the line (in pixels). *length*} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} is the length of the wiggle along the line (in} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} pixels). *randomness* is the factor by which} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the length is randomly scaled.} \PYG{c+c1}{\PYGZsh{}path.effects : [] \PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{} SAVING FIGURES} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the default savefig params can be different from the display params} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} e.g., you may want a higher resolution, or to make the figure} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} background white} \PYG{c+c1}{\PYGZsh{}savefig.dpi : figure \PYGZsh{}\PYGZsh{} figure dots per inch or \PYGZsq{}figure\PYGZsq{}} \PYG{c+c1}{\PYGZsh{}savefig.facecolor : white \PYGZsh{}\PYGZsh{} figure facecolor when saving} \PYG{c+c1}{\PYGZsh{}savefig.edgecolor : white \PYGZsh{}\PYGZsh{} figure edgecolor when saving} \PYG{c+c1}{\PYGZsh{}savefig.format : png \PYGZsh{}\PYGZsh{} png, ps, pdf, svg} \PYG{c+c1}{\PYGZsh{}savefig.bbox : standard \PYGZsh{}\PYGZsh{} \PYGZsq{}tight\PYGZsq{} or \PYGZsq{}standard\PYGZsq{}.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZsq{}tight\PYGZsq{} is incompatible with pipe\PYGZhy{}based animation} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} backends but will workd with temporary file based ones:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} e.g. setting animation.writer to ffmpeg will not work,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} use ffmpeg\PYGZus{}file instead} \PYG{c+c1}{\PYGZsh{}savefig.pad\PYGZus{}inches : 0.1 \PYGZsh{}\PYGZsh{} Padding to be used when bbox is set to \PYGZsq{}tight\PYGZsq{}} \PYG{c+c1}{\PYGZsh{}savefig.jpeg\PYGZus{}quality: 95 \PYGZsh{}\PYGZsh{} when a jpeg is saved, the default quality parameter.} \PYG{c+c1}{\PYGZsh{}savefig.directory : \PYGZti{} \PYGZsh{}\PYGZsh{} default directory in savefig dialog box,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} leave empty to always use current working directory} \PYG{c+c1}{\PYGZsh{}savefig.transparent : False \PYGZsh{}\PYGZsh{} setting that controls whether figures are saved with a} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} transparent background by default} \PYG{c+c1}{\PYGZsh{}savefig.orientation : portrait \PYGZsh{}\PYGZsh{} Orientation of saved figure} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} tk backend params} \PYG{c+c1}{\PYGZsh{}tk.window\PYGZus{}focus : False \PYGZsh{}\PYGZsh{} Maintain shell focus for TkAgg} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} ps backend params} \PYG{c+c1}{\PYGZsh{}ps.papersize : letter \PYGZsh{}\PYGZsh{} auto, letter, legal, ledger, A0\PYGZhy{}A10, B0\PYGZhy{}B10} \PYG{c+c1}{\PYGZsh{}ps.useafm : False \PYGZsh{}\PYGZsh{} use of afm fonts, results in small files} \PYG{c+c1}{\PYGZsh{}ps.usedistiller : False \PYGZsh{}\PYGZsh{} can be: None, ghostscript or xpdf} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Experimental: may produce smaller files.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} xpdf intended for production of publication quality files,} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} but requires ghostscript, xpdf and ps2eps} \PYG{c+c1}{\PYGZsh{}ps.distiller.res : 6000 \PYGZsh{}\PYGZsh{} dpi} \PYG{c+c1}{\PYGZsh{}ps.fonttype : 3 \PYGZsh{}\PYGZsh{} Output Type 3 (Type3) or Type 42 (TrueType)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} pdf backend params} \PYG{c+c1}{\PYGZsh{}pdf.compression : 6 \PYGZsh{}\PYGZsh{} integer from 0 to 9} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} 0 disables compression (good for debugging)} \PYG{c+c1}{\PYGZsh{}pdf.fonttype : 3 \PYGZsh{}\PYGZsh{} Output Type 3 (Type3) or Type 42 (TrueType)} \PYG{c+c1}{\PYGZsh{}pdf.use14corefonts : False} \PYG{c+c1}{\PYGZsh{}pdf.inheritcolor : False} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} svg backend params} \PYG{c+c1}{\PYGZsh{}svg.image\PYGZus{}inline : True \PYGZsh{}\PYGZsh{} write raster image data directly into the svg file} \PYG{c+c1}{\PYGZsh{}svg.fonttype : path \PYGZsh{}\PYGZsh{} How to handle SVG fonts:} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} none: Assume fonts are installed on the machine where the SVG will be viewed.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} path: Embed characters as paths \PYGZhy{}\PYGZhy{} supported by most SVG renderers} \PYG{c+c1}{\PYGZsh{}svg.hashsalt : None \PYGZsh{}\PYGZsh{} if not None, use this string as hash salt} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} instead of uuid4} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} pgf parameter} \PYG{c+c1}{\PYGZsh{}pgf.rcfonts : True} \PYG{c+c1}{\PYGZsh{}pgf.preamble : \PYGZsh{}\PYGZsh{} see text.latex.preamble for documentation} \PYG{c+c1}{\PYGZsh{}pgf.texsystem : xelatex} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{} docstring params} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}docstring.hardcopy = False \PYGZsh{}\PYGZsh{} set this when you want to generate hardcopy docstring} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Event keys to interact with figures/plots via keyboard.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Customize these settings according to your needs.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Leave the field(s) empty if you don\PYGZsq{}t need a key\PYGZhy{}map. (i.e., fullscreen : \PYGZsq{}\PYGZsq{})} \PYG{c+c1}{\PYGZsh{}keymap.fullscreen : f, ctrl+f \PYGZsh{}\PYGZsh{} toggling} \PYG{c+c1}{\PYGZsh{}keymap.home : h, r, home \PYGZsh{}\PYGZsh{} home or reset mnemonic} \PYG{c+c1}{\PYGZsh{}keymap.back : left, c, backspace, MouseButton.BACK \PYGZsh{}\PYGZsh{} forward / backward keys} \PYG{c+c1}{\PYGZsh{}keymap.forward : right, v, MouseButton.FORWARD \PYGZsh{}\PYGZsh{} for quick navigation} \PYG{c+c1}{\PYGZsh{}keymap.pan : p \PYGZsh{}\PYGZsh{} pan mnemonic} \PYG{c+c1}{\PYGZsh{}keymap.zoom : o \PYGZsh{}\PYGZsh{} zoom mnemonic} \PYG{c+c1}{\PYGZsh{}keymap.save : s, ctrl+s \PYGZsh{}\PYGZsh{} saving current figure} \PYG{c+c1}{\PYGZsh{}keymap.help : f1 \PYGZsh{}\PYGZsh{} display help about active tools} \PYG{c+c1}{\PYGZsh{}keymap.quit : ctrl+w, cmd+w, q \PYGZsh{}\PYGZsh{} close the current figure} \PYG{c+c1}{\PYGZsh{}keymap.quit\PYGZus{}all : W, cmd+W, Q \PYGZsh{}\PYGZsh{} close all figures} \PYG{c+c1}{\PYGZsh{}keymap.grid : g \PYGZsh{}\PYGZsh{} switching on/off major grids in current axes} \PYG{c+c1}{\PYGZsh{}keymap.grid\PYGZus{}minor : G \PYGZsh{}\PYGZsh{} switching on/off minor grids in current axes} \PYG{c+c1}{\PYGZsh{}keymap.yscale : l \PYGZsh{}\PYGZsh{} toggle scaling of y\PYGZhy{}axes (\PYGZsq{}log\PYGZsq{}/\PYGZsq{}linear\PYGZsq{})} \PYG{c+c1}{\PYGZsh{}keymap.xscale : k, L \PYGZsh{}\PYGZsh{} toggle scaling of x\PYGZhy{}axes (\PYGZsq{}log\PYGZsq{}/\PYGZsq{}linear\PYGZsq{})} \PYG{c+c1}{\PYGZsh{}keymap.all\PYGZus{}axes : a \PYGZsh{}\PYGZsh{} enable all axes} \PYG{c+c1}{\PYGZsh{}keymap.copy : ctrl+c, cmd+c \PYGZsh{}\PYGZsh{} Copy figure to clipboard} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}ANIMATION settings} \PYG{c+c1}{\PYGZsh{}animation.html : none \PYGZsh{}\PYGZsh{} How to display the animation as HTML in} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} the IPython notebook. \PYGZsq{}html5\PYGZsq{} uses} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} HTML5 video tag; \PYGZsq{}jshtml\PYGZsq{} creates a} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} Javascript animation} \PYG{c+c1}{\PYGZsh{}animation.writer : ffmpeg \PYGZsh{}\PYGZsh{} MovieWriter \PYGZsq{}backend\PYGZsq{} to use} \PYG{c+c1}{\PYGZsh{}animation.codec : h264 \PYGZsh{}\PYGZsh{} Codec to use for writing movie} \PYG{c+c1}{\PYGZsh{}animation.bitrate: \PYGZhy{}1 \PYGZsh{}\PYGZsh{} Controls size/quality tradeoff for movie.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZhy{}1 implies let utility auto\PYGZhy{}determine} \PYG{c+c1}{\PYGZsh{}animation.frame\PYGZus{}format: png \PYGZsh{}\PYGZsh{} Controls frame format used by temp files} \PYG{c+c1}{\PYGZsh{}animation.html\PYGZus{}args: \PYGZsh{}\PYGZsh{} Additional arguments to pass to html writer} \PYG{c+c1}{\PYGZsh{}animation.ffmpeg\PYGZus{}path: ffmpeg \PYGZsh{}\PYGZsh{} Path to ffmpeg binary. Without full path} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdl{}PATH is searched} \PYG{c+c1}{\PYGZsh{}animation.ffmpeg\PYGZus{}args: \PYGZsh{}\PYGZsh{} Additional arguments to pass to ffmpeg} \PYG{c+c1}{\PYGZsh{}animation.avconv\PYGZus{}path: avconv \PYGZsh{}\PYGZsh{} Path to avconv binary. Without full path} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} \PYGZdl{}PATH is searched} \PYG{c+c1}{\PYGZsh{}animation.avconv\PYGZus{}args: \PYGZsh{}\PYGZsh{} Additional arguments to pass to avconv} \PYG{c+c1}{\PYGZsh{}animation.convert\PYGZus{}path: convert \PYGZsh{}\PYGZsh{} Path to ImageMagick\PYGZsq{}s convert binary.} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} On Windows use the full path since convert} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} is also the name of a system tool.} \PYG{c+c1}{\PYGZsh{}animation.convert\PYGZus{}args: \PYGZsh{}\PYGZsh{} Additional arguments to pass to convert} \PYG{c+c1}{\PYGZsh{}animation.embed\PYGZus{}limit : 20.0} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/introductory/customizing:sphx-glr-download-tutorials-introductory-customizing-py}} \section{Intermediate} \label{\detokenize{tutorials/index:intermediate}}\label{\detokenize{tutorials/index:tutorials-intermediate}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-intermediate}} These tutorials cover some of the more complicated classes and functions in Matplotlib. They can be useful for particular custom and complex visualizations. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-download-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Artist tutorial} \label{\detokenize{tutorials/intermediate/artists:artist-tutorial}}\label{\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}}\label{\detokenize{tutorials/intermediate/artists::doc}} Using Artist objects to render on the canvas. There are three layers to the matplotlib API. \begin{itemize} \item {} the \sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvas}} is the area onto which the figure is drawn \item {} the \sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Renderer}} is the object which knows how to draw on the \sphinxcode{\sphinxupquote{FigureCanvas}} \item {} and the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} is the object that knows how to use a renderer to paint onto the canvas. \end{itemize} The \sphinxcode{\sphinxupquote{FigureCanvas}} and \sphinxcode{\sphinxupquote{Renderer}} handle all the details of talking to user interface toolkits like \sphinxhref{https://www.wxpython.org}{wxPython} or drawing languages like PostScript®, and the \sphinxcode{\sphinxupquote{Artist}} handles all the high level constructs like representing and laying out the figure, text, and lines. The typical user will spend 95\% of their time working with the \sphinxcode{\sphinxupquote{Artists}}. There are two types of \sphinxcode{\sphinxupquote{Artists}}: primitives and containers. The primitives represent the standard graphical objects we want to paint onto our canvas: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}}, {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}, etc., and the containers are places to put them ({\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}, {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}). The standard use is to create a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance, use the \sphinxcode{\sphinxupquote{Figure}} to create one or more {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} or \sphinxcode{\sphinxupquote{Subplot}} instances, and use the \sphinxcode{\sphinxupquote{Axes}} instance helper methods to create the primitives. In the example below, we create a \sphinxcode{\sphinxupquote{Figure}} instance using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.figure()}}}}}, which is a convenience method for instantiating \sphinxcode{\sphinxupquote{Figure}} instances and connecting them with your user interface or drawing toolkit \sphinxcode{\sphinxupquote{FigureCanvas}}. As we will discuss below, this is not necessary -- you can work directly with PostScript, PDF Gtk+, or wxPython \sphinxcode{\sphinxupquote{FigureCanvas}} instances, instantiate your \sphinxcode{\sphinxupquote{Figures}} directly and connect them yourselves -- but since we are focusing here on the \sphinxcode{\sphinxupquote{Artist}} API we'll let {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} handle some of those details for us: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} two rows, one column, first plot} \end{sphinxVerbatim} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} is probably the most important class in the matplotlib API, and the one you will be working with most of the time. This is because the \sphinxcode{\sphinxupquote{Axes}} is the plotting area into which most of the objects go, and the \sphinxcode{\sphinxupquote{Axes}} has many special helper methods ({\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}) to create the most common graphics primitives ({\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}}, \sphinxcode{\sphinxupquote{Image}}, respectively). These helper methods will take your data (e.g., \sphinxcode{\sphinxupquote{numpy}} arrays and strings) and create primitive \sphinxcode{\sphinxupquote{Artist}} instances as needed (e.g., \sphinxcode{\sphinxupquote{Line2D}}), add them to the relevant containers, and draw them when requested. Most of you are probably familiar with the \sphinxcode{\sphinxupquote{Subplot}}, which is just a special case of an \sphinxcode{\sphinxupquote{Axes}} that lives on a regular rows by columns grid of \sphinxcode{\sphinxupquote{Subplot}} instances. If you want to create an \sphinxcode{\sphinxupquote{Axes}} at an arbitrary location, simply use the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}} method which takes a list of \sphinxcode{\sphinxupquote{{[}left, bottom, width, height{]}}} values in 0-1 relative figure coordinates: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Continuing with our example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{s} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} In this example, \sphinxcode{\sphinxupquote{ax}} is the \sphinxcode{\sphinxupquote{Axes}} instance created by the \sphinxcode{\sphinxupquote{fig.add\_subplot}} call above (remember \sphinxcode{\sphinxupquote{Subplot}} is just a subclass of \sphinxcode{\sphinxupquote{Axes}}) and when you call \sphinxcode{\sphinxupquote{ax.plot}}, it creates a \sphinxcode{\sphinxupquote{Line2D}} instance and adds it to the \sphinxcode{\sphinxupquote{Axes.lines}} list. In the interactive \sphinxhref{http://ipython.org/}{ipython} session below, you can see that the \sphinxcode{\sphinxupquote{Axes.lines}} list is length one and contains the same line that was returned by the \sphinxcode{\sphinxupquote{line, = ax.plot...}} call: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [101]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{lines}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{g+gh}{Out[101]: }\PYG{g+go}{\PYGZlt{}matplotlib.lines.Line2D instance at 0x19a95710\PYGZgt{}} \PYG{g+gp}{In [102]: }\PYG{n}{line} \PYG{g+gh}{Out[102]: }\PYG{g+go}{\PYGZlt{}matplotlib.lines.Line2D instance at 0x19a95710\PYGZgt{}} \end{sphinxVerbatim} If you make subsequent calls to \sphinxcode{\sphinxupquote{ax.plot}} (and the hold state is "on" which is the default) then additional lines will be added to the list. You can remove lines later simply by calling the list methods; either of these will work: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{del} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{lines}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{lines}\PYG{o}{.}\PYG{n}{remove}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} one or the other, not both!} \end{sphinxVerbatim} The Axes also has helper methods to configure and decorate the x-axis and y-axis tick, tick labels and axis labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xtext} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my xdata}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} returns a Text instance} \PYG{n}{ytext} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my ydata}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} When you call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ax.set\_xlabel}}}}}, it passes the information on the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance of the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis}}}}}. Each \sphinxcode{\sphinxupquote{Axes}} instance contains an {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis}}}}} and a {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis}}}}} instance, which handle the layout and drawing of the ticks, tick labels and axis labels. Try creating the figure below. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.8}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{volts}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a sine wave}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{s} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins}\PYG{p}{,} \PYG{n}{patches} \PYG{o}{=} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time (s)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_artists_001}.png} \subsubsection{Customizing your objects} \label{\detokenize{tutorials/intermediate/artists:customizing-your-objects}}\label{\detokenize{tutorials/intermediate/artists:customizing-artists}} Every element in the figure is represented by a matplotlib {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, and each has an extensive list of properties to configure its appearance. The figure itself contains a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} exactly the size of the figure, which you can use to set the background color and transparency of the figures. Likewise, each {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} bounding box (the standard white box with black edges in the typical matplotlib plot, has a \sphinxcode{\sphinxupquote{Rectangle}} instance that determines the color, transparency, and other properties of the Axes. These instances are stored as member variables \sphinxcode{\sphinxupquote{Figure.patch}} and \sphinxcode{\sphinxupquote{Axes.patch}} ("Patch" is a name inherited from MATLAB, and is a 2D "patch" of color on the figure, e.g., rectangles, circles and polygons). Every matplotlib \sphinxcode{\sphinxupquote{Artist}} has the following properties \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline alpha & The transparency - a scalar from 0-1 \\ \hline animated & A boolean that is used to facilitate animated drawing \\ \hline axes & The axes that the Artist lives in, possibly None \\ \hline clip\_box & The bounding box that clips the Artist \\ \hline clip\_on & Whether clipping is enabled \\ \hline clip\_path & The path the artist is clipped to \\ \hline contains & A picking function to test whether the artist contains the pick point \\ \hline figure & The figure instance the artist lives in, possibly None \\ \hline label & A text label (e.g., for auto-labeling) \\ \hline picker & A python object that controls object picking \\ \hline transform & The transformation \\ \hline visible & A boolean whether the artist should be drawn \\ \hline zorder & A number which determines the drawing order \\ \hline rasterized & Boolean; Turns vectors into raster graphics (for compression \& eps transparency) \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Each of the properties is accessed with an old-fashioned setter or getter (yes we know this irritates Pythonistas and we plan to support direct access via properties or traits but it hasn't been done yet). For example, to multiply the current alpha by a half: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{o}{=} \PYG{n}{o}\PYG{o}{.}\PYG{n}{get\PYGZus{}alpha}\PYG{p}{(}\PYG{p}{)} \PYG{n}{o}\PYG{o}{.}\PYG{n}{set\PYGZus{}alpha}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{n}{a}\PYG{p}{)} \end{sphinxVerbatim} If you want to set a number of properties at once, you can also use the \sphinxcode{\sphinxupquote{set}} method with keyword arguments. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{o}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{zorder}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} If you are working interactively at the python shell, a handy way to inspect the \sphinxcode{\sphinxupquote{Artist}} properties is to use the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.getp()}}}}} function (simply \sphinxcode{\sphinxupquote{getp()}} in pyplot), which lists the properties and their values. This works for classes derived from \sphinxcode{\sphinxupquote{Artist}} as well, e.g., \sphinxcode{\sphinxupquote{Figure}} and \sphinxcode{\sphinxupquote{Rectangle}}. Here are the \sphinxcode{\sphinxupquote{Figure}} rectangle properties mentioned above: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [149]: }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{artist}\PYG{o}{.}\PYG{n}{getp}\PYG{p}{(}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{patch}\PYG{p}{)} \PYG{g+go}{ alpha = 1.0} \PYG{g+go}{ animated = False} \PYG{g+go}{ antialiased or aa = True} \PYG{g+go}{ axes = None} \PYG{g+go}{ clip\PYGZus{}box = None} \PYG{g+go}{ clip\PYGZus{}on = False} \PYG{g+go}{ clip\PYGZus{}path = None} \PYG{g+go}{ contains = None} \PYG{g+go}{ edgecolor or ec = w} \PYG{g+go}{ facecolor or fc = 0.75} \PYG{g+go}{ figure = Figure(8.125x6.125)} \PYG{g+go}{ fill = 1} \PYG{g+go}{ hatch = None} \PYG{g+go}{ height = 1} \PYG{g+go}{ label =} \PYG{g+go}{ linewidth or lw = 1.0} \PYG{g+go}{ picker = None} \PYG{g+go}{ transform = \PYGZlt{}Affine object at 0x134cca84\PYGZgt{}} \PYG{g+go}{ verts = ((0, 0), (0, 1), (1, 1), (1, 0))} \PYG{g+go}{ visible = True} \PYG{g+go}{ width = 1} \PYG{g+go}{ window\PYGZus{}extent = \PYGZlt{}Bbox object at 0x134acbcc\PYGZgt{}} \PYG{g+go}{ x = 0} \PYG{g+go}{ y = 0} \PYG{g+go}{ zorder = 1} \end{sphinxVerbatim} The docstrings for all of the classes also contain the \sphinxcode{\sphinxupquote{Artist}} properties, so you can consult the interactive "help" or the {\hyperref[\detokenize{api/artist_api:artist-api}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlib.artist}}}} for a listing of properties for a given object. \subsubsection{Object containers} \label{\detokenize{tutorials/intermediate/artists:object-containers}}\label{\detokenize{tutorials/intermediate/artists:id1}} Now that we know how to inspect and set the properties of a given object we want to configure, we need to know how to get at that object. As mentioned in the introduction, there are two kinds of objects: primitives and containers. The primitives are usually the things you want to configure (the font of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance, the width of a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}) although the containers also have some properties as well -- for example the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} is a container that contains many of the primitives in your plot, but it also has properties like the \sphinxcode{\sphinxupquote{xscale}} to control whether the xaxis is 'linear' or 'log'. In this section we'll review where the various container objects store the \sphinxcode{\sphinxupquote{Artists}} that you want to get at. \paragraph{Figure container} \label{\detokenize{tutorials/intermediate/artists:figure-container}}\label{\detokenize{tutorials/intermediate/artists:id2}} The top level container \sphinxcode{\sphinxupquote{Artist}} is the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}, and it contains everything in the figure. The background of the figure is a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} which is stored in \sphinxcode{\sphinxupquote{Figure.patch}}. As you add subplots ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}}) and axes ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}}) to the figure these will be appended to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.axes}}}}}. These are also returned by the methods that create them: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [156]: }\PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{In [157]: }\PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{g+gp}{In [158]: }\PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{In [159]: }\PYG{n}{ax1} \PYG{g+gh}{Out[159]: }\PYG{g+go}{\PYGZlt{}matplotlib.axes.Subplot instance at 0xd54b26c\PYGZgt{}} \PYG{g+gp}{In [160]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{)} \PYG{g+go}{[\PYGZlt{}matplotlib.axes.Subplot instance at 0xd54b26c\PYGZgt{}, \PYGZlt{}matplotlib.axes.Axes instance at 0xd3f0b2c\PYGZgt{}]} \end{sphinxVerbatim} Because the figure maintains the concept of the "current axes" (see {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.gca}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.sca}}}}}) to support the pylab/pyplot state machine, you should not insert or remove axes directly from the axes list, but rather use the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}} methods to insert, and the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.delaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delaxes()}}}}} method to delete. You are free however, to iterate over the list of axes or index into it to get access to \sphinxcode{\sphinxupquote{Axes}} instances you want to customize. Here is an example which turns all the axes grids on: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} The figure also has its own text, lines, patches and images, which you can use to add primitives directly. The default coordinate system for the \sphinxcode{\sphinxupquote{Figure}} will simply be in pixels (which is not usually what you want) but you can control this by setting the transform property of the \sphinxcode{\sphinxupquote{Artist}} you are adding to the figure. More useful is "figure coordinates" where (0, 0) is the bottom-left of the figure and (1, 1) is the top-right of the figure which you can obtain by setting the \sphinxcode{\sphinxupquote{Artist}} transform to \sphinxcode{\sphinxupquote{fig.transFigure}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{lines} \PYG{k}{as} \PYG{n+nn}{lines} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{l1} \PYG{o}{=} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{Line2D}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{transFigure}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{l2} \PYG{o}{=} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{Line2D}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{transFigure}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{lines}\PYG{o}{.}\PYG{n}{extend}\PYG{p}{(}\PYG{p}{[}\PYG{n}{l1}\PYG{p}{,} \PYG{n}{l2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_artists_002}.png} Here is a summary of the Artists the figure contains \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Figure attribute &\sphinxstyletheadfamily Description \\ \hline axes & A list of Axes instances (includes Subplot) \\ \hline patch & The Rectangle background \\ \hline images & A list of FigureImages patches - useful for raw pixel display \\ \hline legends & A list of Figure Legend instances (different from Axes.legends) \\ \hline lines & A list of Figure Line2D instances (rarely used, see Axes.lines) \\ \hline patches & A list of Figure patches (rarely used, see Axes.patches) \\ \hline texts & A list Figure Text instances \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{Axes container} \label{\detokenize{tutorials/intermediate/artists:axes-container}}\label{\detokenize{tutorials/intermediate/artists:id3}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} is the center of the matplotlib universe -- it contains the vast majority of all the \sphinxcode{\sphinxupquote{Artists}} used in a figure with many helper methods to create and add these \sphinxcode{\sphinxupquote{Artists}} to itself, as well as helper methods to access and customize the \sphinxcode{\sphinxupquote{Artists}} it contains. Like the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}, it contains a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \sphinxcode{\sphinxupquote{patch}} which is a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} for Cartesian coordinates and a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Circle}}}}} for polar coordinates; this patch determines the shape, background and border of the plotting region: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{rect} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{patch} \PYG{c+c1}{\PYGZsh{} a Rectangle instance} \PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} When you call a plotting method, e.g., the canonical {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} and pass in arrays or lists of values, the method will create a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D()}}}}} instance, update the line with all the \sphinxcode{\sphinxupquote{Line2D}} properties passed as keyword arguments, add the line to the \sphinxcode{\sphinxupquote{Axes.lines}} container, and returns it to you: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [213]: }\PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{g+gp}{In [214]: }\PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{plot}} returns a list of lines because you can pass in multiple x, y pairs to plot, and we are unpacking the first element of the length one list into the line variable. The line has been added to the \sphinxcode{\sphinxupquote{Axes.lines}} list: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [229]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{lines}\PYG{p}{)} \PYG{g+go}{[\PYGZlt{}matplotlib.lines.Line2D instance at 0xd378b0c\PYGZgt{}]} \end{sphinxVerbatim} Similarly, methods that create patches, like {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}} creates a list of rectangles, will add the patches to the \sphinxcode{\sphinxupquote{Axes.patches}} list: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [233]: }\PYG{n}{n}\PYG{p}{,} \PYG{n}{bins}\PYG{p}{,} \PYG{n}{rectangles} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{In [234]: }\PYG{n}{rectangles} \PYG{g+gh}{Out[234]: }\PYG{g+go}{\PYGZlt{}a list of 50 Patch objects\PYGZgt{}} \PYG{g+gp}{In [235]: }\PYG{k}{print}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{patches}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} You should not add objects directly to the \sphinxcode{\sphinxupquote{Axes.lines}} or \sphinxcode{\sphinxupquote{Axes.patches}} lists unless you know exactly what you are doing, because the \sphinxcode{\sphinxupquote{Axes}} needs to do a few things when it creates and adds an object. It sets the figure and axes property of the \sphinxcode{\sphinxupquote{Artist}}, as well as the default \sphinxcode{\sphinxupquote{Axes}} transformation (unless a transformation is set). It also inspects the data contained in the \sphinxcode{\sphinxupquote{Artist}} to update the data structures controlling auto-scaling, so that the view limits can be adjusted to contain the plotted data. You can, nonetheless, create objects yourself and add them directly to the \sphinxcode{\sphinxupquote{Axes}} using helper methods like {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line:matplotlib.axes.Axes.add_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_line()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch:matplotlib.axes.Axes.add_patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_patch()}}}}}. Here is an annotated interactive session illustrating what is going on: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [262]: }\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsh{} create a rectangle instance} \PYG{g+gp}{In [263]: }\PYG{n}{rect} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{patches}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{g+go}{\PYGZsh{} by default the axes instance is None} \PYG{g+gp}{In [264]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{get\PYGZus{}axes}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{None} \PYG{g+go}{\PYGZsh{} and the transformation instance is set to the \PYGZdq{}identity transform\PYGZdq{}} \PYG{g+gp}{In [265]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{get\PYGZus{}transform}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}Affine object at 0x13695544\PYGZgt{}} \PYG{g+go}{\PYGZsh{} now we add the Rectangle to the Axes} \PYG{g+gp}{In [266]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{)} \PYG{g+go}{\PYGZsh{} and notice that the ax.add\PYGZus{}patch method has set the axes} \PYG{g+go}{\PYGZsh{} instance} \PYG{g+gp}{In [267]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{get\PYGZus{}axes}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{Axes(0.125,0.1;0.775x0.8)} \PYG{g+go}{\PYGZsh{} and the transformation has been set too} \PYG{g+gp}{In [268]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{get\PYGZus{}transform}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}Affine object at 0x15009ca4\PYGZgt{}} \PYG{g+go}{\PYGZsh{} the default axes transformation is ax.transData} \PYG{g+gp}{In [269]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}Affine object at 0x15009ca4\PYGZgt{}} \PYG{g+go}{\PYGZsh{} notice that the xlimits of the Axes have not been changed} \PYG{g+gp}{In [270]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{(0.0, 1.0)} \PYG{g+go}{\PYGZsh{} but the data limits have been updated to encompass the rectangle} \PYG{g+gp}{In [271]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{dataLim}\PYG{o}{.}\PYG{n}{bounds}\PYG{p}{)} \PYG{g+go}{(1.0, 1.0, 5.0, 12.0)} \PYG{g+go}{\PYGZsh{} we can manually invoke the auto\PYGZhy{}scaling machinery} \PYG{g+gp}{In [272]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{autoscale\PYGZus{}view}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsh{} and now the xlim are updated to encompass the rectangle} \PYG{g+gp}{In [273]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{(1.0, 6.0)} \PYG{g+go}{\PYGZsh{} we have to manually force a figure draw} \PYG{g+gp}{In [274]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} There are many, many \sphinxcode{\sphinxupquote{Axes}} helper methods for creating primitive \sphinxcode{\sphinxupquote{Artists}} and adding them to their respective containers. The table below summarizes a small sampling of them, the kinds of \sphinxcode{\sphinxupquote{Artist}} they create, and where they store them \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Helper method &\sphinxstyletheadfamily Artist &\sphinxstyletheadfamily Container \\ \hline ax.annotate - text annotations & Annotate & ax.texts \\ \hline ax.bar - bar charts & Rectangle & ax.patches \\ \hline ax.errorbar - error bar plots & Line2D and Rectangle & ax.lines and ax.patches \\ \hline ax.fill - shared area & Polygon & ax.patches \\ \hline ax.hist - histograms & Rectangle & ax.patches \\ \hline ax.imshow - image data & AxesImage & ax.images \\ \hline ax.legend - axes legends & Legend & ax.legends \\ \hline ax.plot - xy plots & Line2D & ax.lines \\ \hline ax.scatter - scatter charts & PolygonCollection & ax.collections \\ \hline ax.text - text & Text & ax.texts \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} In addition to all of these \sphinxcode{\sphinxupquote{Artists}}, the \sphinxcode{\sphinxupquote{Axes}} contains two important \sphinxcode{\sphinxupquote{Artist}} containers: the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis}}}}} and {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis}}}}}, which handle the drawing of the ticks and labels. These are stored as instance variables \sphinxcode{\sphinxupquote{xaxis}} and \sphinxcode{\sphinxupquote{yaxis}}. The \sphinxcode{\sphinxupquote{XAxis}} and \sphinxcode{\sphinxupquote{YAxis}} containers will be detailed below, but note that the \sphinxcode{\sphinxupquote{Axes}} contains many helper methods which forward calls on to the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} instances so you often do not need to work with them directly unless you want to. For example, you can set the font color of the \sphinxcode{\sphinxupquote{XAxis}} ticklabels using the \sphinxcode{\sphinxupquote{Axes}} helper method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{label} \PYG{o+ow}{in} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{orange}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Below is a summary of the Artists that the Axes contains \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Axes attribute &\sphinxstyletheadfamily Description \\ \hline artists & A list of Artist instances \\ \hline patch & Rectangle instance for Axes background \\ \hline collections & A list of Collection instances \\ \hline images & A list of AxesImage \\ \hline legends & A list of Legend instances \\ \hline lines & A list of Line2D instances \\ \hline patches & A list of Patch instances \\ \hline texts & A list of Text instances \\ \hline xaxis & matplotlib.axis.XAxis instance \\ \hline yaxis & matplotlib.axis.YAxis instance \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{Axis containers} \label{\detokenize{tutorials/intermediate/artists:axis-containers}}\label{\detokenize{tutorials/intermediate/artists:axis-container}} The {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Axis}}}}} instances handle the drawing of the tick lines, the grid lines, the tick labels and the axis label. You can configure the left and right ticks separately for the y-axis, and the upper and lower ticks separately for the x-axis. The \sphinxcode{\sphinxupquote{Axis}} also stores the data and view intervals used in auto-scaling, panning and zooming, as well as the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} and {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} instances which control where the ticks are placed and how they are represented as strings. Each \sphinxcode{\sphinxupquote{Axis}} object contains a \sphinxcode{\sphinxupquote{label}} attribute (this is what {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} modifies in calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel()}}}}}) as well as a list of major and minor ticks. The ticks are {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XTick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick}}}}} and {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YTick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick}}}}} instances, which contain the actual line and text primitives that render the ticks and ticklabels. Because the ticks are dynamically created as needed (e.g., when panning and zooming), you should access the lists of major and minor ticks through their accessor methods {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks:matplotlib.axis.Axis.get_major_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_major\_ticks()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_ticks:matplotlib.axis.Axis.get_minor_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_minor\_ticks()}}}}}. Although the ticks contain all the primitives and will be covered below, \sphinxcode{\sphinxupquote{Axis}} instances have accessor methods that return the tick lines, tick labels, tick locations etc.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{axis} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis} \PYG{n}{axis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklocs}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_artists_003}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklabels}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{description} \item[{note there are twice as many ticklines as labels because by}] \leavevmode default there are tick lines at the top and bottom but only tick labels below the xaxis; this can be customized \end{description} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklines}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} by default you get the major ticks back \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklines}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} but you can also ask for the minor ticks \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklines}\PYG{p}{(}\PYG{n}{minor}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Here is a summary of some of the useful accessor methods of the {}`{}`Axis{}`{}`} \PYG{c+c1}{\PYGZsh{} (these have corresponding setters where useful, such as} \PYG{c+c1}{\PYGZsh{} set\PYGZus{}major\PYGZus{}formatter)} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} ====================== =========================================================} \PYG{c+c1}{\PYGZsh{} Accessor method Description} \PYG{c+c1}{\PYGZsh{} ====================== =========================================================} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}scale The scale of the axis, e.g., \PYGZsq{}log\PYGZsq{} or \PYGZsq{}linear\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}view\PYGZus{}interval The interval instance of the axis view limits} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}data\PYGZus{}interval The interval instance of the axis data limits} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}gridlines A list of grid lines for the Axis} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}label The axis label \PYGZhy{} a Text instance} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}ticklabels A list of Text instances \PYGZhy{} keyword minor=True\textbar{}False} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}ticklines A list of Line2D instances \PYGZhy{} keyword minor=True\textbar{}False} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}ticklocs A list of Tick locations \PYGZhy{} keyword minor=True\textbar{}False} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}major\PYGZus{}locator The matplotlib.ticker.Locator instance for major ticks} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}major\PYGZus{}formatter The matplotlib.ticker.Formatter instance for major ticks} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}minor\PYGZus{}locator The matplotlib.ticker.Locator instance for minor ticks} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}minor\PYGZus{}formatter The matplotlib.ticker.Formatter instance for minor ticks} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}major\PYGZus{}ticks A list of Tick instances for major ticks} \PYG{c+c1}{\PYGZsh{} get\PYGZus{}minor\PYGZus{}ticks A list of Tick instances for minor ticks} \PYG{c+c1}{\PYGZsh{} grid Turn the grid on or off for the major or minor ticks} \PYG{c+c1}{\PYGZsh{} ====================== =========================================================} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} Here is an example, not recommended for its beauty, which customizes} \PYG{c+c1}{\PYGZsh{} the axes and tick properties} \PYG{c+c1}{\PYGZsh{} plt.figure creates a matplotlib.figure.Figure instance} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{rect} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{patch} \PYG{c+c1}{\PYGZsh{} a rectangle instance} \PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lightgoldenrodyellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{]}\PYG{p}{)} \PYG{n}{rect} \PYG{o}{=} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{patch} \PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lightslategray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{for} \PYG{n}{label} \PYG{o+ow}{in} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklabels}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} label is a Text instance} \PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}rotation}\PYG{p}{(}\PYG{l+m+mi}{45}\PYG{p}{)} \PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}fontsize}\PYG{p}{(}\PYG{l+m+mi}{16}\PYG{p}{)} \PYG{k}{for} \PYG{n}{line} \PYG{o+ow}{in} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{get\PYGZus{}ticklines}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} line is a Line2D instance} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}markersize}\PYG{p}{(}\PYG{l+m+mi}{25}\PYG{p}{)} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}markeredgewidth}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_artists_004}.png} \paragraph{Tick containers} \label{\detokenize{tutorials/intermediate/artists:tick-containers}}\label{\detokenize{tutorials/intermediate/artists:tick-container}} The {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Tick}}}}} is the final container object in our descent from the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} to the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}}. The \sphinxcode{\sphinxupquote{Tick}} contains the tick and grid line instances, as well as the label instances for the upper and lower ticks. Each of these is accessible directly as an attribute of the \sphinxcode{\sphinxupquote{Tick}}. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Tick attribute &\sphinxstyletheadfamily Description \\ \hline tick1line & Line2D instance \\ \hline tick2line & Line2D instance \\ \hline gridline & Line2D instance \\ \hline label1 & Text instance \\ \hline label2 & Text instance \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Here is an example which sets the formatter for the right side ticks with dollar signs and colors them green on the right side of the yaxis \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{as} \PYG{n+nn}{ticker} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FormatStrFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+si}{\PYGZpc{}1.2f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{k}{for} \PYG{n}{tick} \PYG{o+ow}{in} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{get\PYGZus{}major\PYGZus{}ticks}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{tick}\PYG{o}{.}\PYG{n}{label1}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{tick}\PYG{o}{.}\PYG{n}{label2}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{tick}\PYG{o}{.}\PYG{n}{label2}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_artists_005}.png} \phantomsection\label{\detokenize{tutorials/intermediate/artists:sphx-glr-download-tutorials-intermediate-artists-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-download-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Legend guide} \label{\detokenize{tutorials/intermediate/legend_guide:legend-guide}}\label{\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}}\label{\detokenize{tutorials/intermediate/legend_guide::doc}} Generating legends flexibly in Matplotlib. This legend guide is an extension of the documentation available at {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} - please ensure you are familiar with contents of that documentation before proceeding with this guide. This guide makes use of some common terms, which are documented here for clarity: \begin{description} \item[{legend entry\index{legend entry@\spxentry{legend entry}|spxpagem}\phantomsection\label{\detokenize{tutorials/intermediate/legend_guide:term-legend-entry}}}] \leavevmode A legend is made up of one or more legend entries. An entry is made up of exactly one key and one label. \item[{legend key\index{legend key@\spxentry{legend key}|spxpagem}\phantomsection\label{\detokenize{tutorials/intermediate/legend_guide:term-legend-key}}}] \leavevmode The colored/patterned marker to the left of each legend label. \item[{legend label\index{legend label@\spxentry{legend label}|spxpagem}\phantomsection\label{\detokenize{tutorials/intermediate/legend_guide:term-legend-label}}}] \leavevmode The text which describes the handle represented by the key. \item[{legend handle\index{legend handle@\spxentry{legend handle}|spxpagem}\phantomsection\label{\detokenize{tutorials/intermediate/legend_guide:term-legend-handle}}}] \leavevmode The original object which is used to generate an appropriate entry in the legend. \end{description} \subsubsection{Controlling the legend entries} \label{\detokenize{tutorials/intermediate/legend_guide:controlling-the-legend-entries}} Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} with no arguments automatically fetches the legend handles and their associated labels. This functionality is equivalent to: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{handles}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}legend\PYGZus{}handles\PYGZus{}labels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{p}{,} \PYG{n}{labels}\PYG{p}{)} \end{sphinxVerbatim} The {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels:matplotlib.axes.Axes.get_legend_handles_labels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_legend\_handles\_labels()}}}}} function returns a list of handles/artists which exist on the Axes which can be used to generate entries for the resulting legend - it is worth noting however that not all artists can be added to a legend, at which point a "proxy" will have to be created (see {\hyperref[\detokenize{tutorials/intermediate/legend_guide:proxy-legend-handles}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating artists specifically for adding to the legend (aka. Proxy artists)}}}} for further details). For full control of what is being added to the legend, it is common to pass the appropriate handles directly to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line\PYGZus{}up}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line\PYGZus{}down}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{o}{=}\PYG{p}{[}\PYG{n}{line\PYGZus{}up}\PYG{p}{,} \PYG{n}{line\PYGZus{}down}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} In some cases, it is not possible to set the label of the handle, so it is possible to pass through the list of labels to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line\PYGZus{}up}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line\PYGZus{}down}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{n}{line\PYGZus{}up}\PYG{p}{,} \PYG{n}{line\PYGZus{}down}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line Up}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line Down}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Creating artists specifically for adding to the legend (aka. Proxy artists)} \label{\detokenize{tutorials/intermediate/legend_guide:creating-artists-specifically-for-adding-to-the-legend-aka-proxy-artists}}\label{\detokenize{tutorials/intermediate/legend_guide:proxy-legend-handles}} Not all handles can be turned into legend entries automatically, so it is often necessary to create an artist which \sphinxstyleemphasis{can}. Legend handles don't have to exists on the Figure or Axes in order to be used. Suppose we wanted to create a legend which has an entry for some data which is represented by a red color: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{mpatches} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{red\PYGZus{}patch} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Patch}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{The red data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{o}{=}\PYG{p}{[}\PYG{n}{red\PYGZus{}patch}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_001}.png} There are many supported legend handles, instead of creating a patch of color we could have created a line with a marker: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{lines} \PYG{k}{as} \PYG{n+nn}{mlines} \PYG{n}{blue\PYGZus{}line} \PYG{o}{=} \PYG{n}{mlines}\PYG{o}{.}\PYG{n}{Line2D}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{*}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Blue stars}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{o}{=}\PYG{p}{[}\PYG{n}{blue\PYGZus{}line}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_002}.png} \subsubsection{Legend location} \label{\detokenize{tutorials/intermediate/legend_guide:legend-location}} The location of the legend can be specified by the keyword argument \sphinxstyleemphasis{loc}. Please see the documentation at {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} for more details. The \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} keyword gives a great degree of control for manual legend placement. For example, if you want your axes legend located at the figure's top right-hand corner instead of the axes' corner, simply specify the corner's location, and the coordinate system of that location: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}transform}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{gcf}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{transFigure}\PYG{p}{)} \end{sphinxVerbatim} More examples of custom legend placement: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{test1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{test2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Place a legend above this subplot, expanding itself to} \PYG{c+c1}{\PYGZsh{} fully use the given bounding box.} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{1.02}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{102}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ncol}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{mode}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{expand}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{borderaxespad}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{test1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{test2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Place a legend to the right of this smaller subplot.} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{1.05}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{borderaxespad}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_003}.png} \subsubsection{Multiple legends on the same Axes} \label{\detokenize{tutorials/intermediate/legend_guide:multiple-legends-on-the-same-axes}} Sometimes it is more clear to split legend entries across multiple legends. Whilst the instinctive approach to doing this might be to call the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} function multiple times, you will find that only one legend ever exists on the Axes. This has been done so that it is possible to call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} repeatedly to update the legend to the latest handles on the Axes, so to persist old legend instances, we must add them manually to the Axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line1}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Line 1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line2}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Line 2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create a legend for the first line.} \PYG{n}{first\PYGZus{}legend} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{o}{=}\PYG{p}{[}\PYG{n}{line1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Add the legend manually to the current Axes.} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{first\PYGZus{}legend}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create another legend for the second line.} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{o}{=}\PYG{p}{[}\PYG{n}{line2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_004}.png} \subsubsection{Legend Handlers} \label{\detokenize{tutorials/intermediate/legend_guide:legend-handlers}} In order to create legend entries, handles are given as an argument to an appropriate {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerBase}}}}} subclass. The choice of handler subclass is determined by the following rules: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Update {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_legend\_handler\_map()}}}}} with the value in the \sphinxcode{\sphinxupquote{handler\_map}} keyword. \item {} Check if the \sphinxcode{\sphinxupquote{handle}} is in the newly created \sphinxcode{\sphinxupquote{handler\_map}}. \item {} Check if the type of \sphinxcode{\sphinxupquote{handle}} is in the newly created \sphinxcode{\sphinxupquote{handler\_map}}. \item {} Check if any of the types in the \sphinxcode{\sphinxupquote{handle}}'s mro is in the newly created \sphinxcode{\sphinxupquote{handler\_map}}. \end{enumerate} For completeness, this logic is mostly implemented in {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_legend\_handler()}}}}}. All of this flexibility means that we have the necessary hooks to implement custom handlers for our own type of legend key. The simplest example of using custom handlers is to instantiate one of the existing {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerBase}}}}} subclasses. For the sake of simplicity, let's choose {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.HandlerLine2D}}}}} which accepts a \sphinxcode{\sphinxupquote{numpoints}} argument (note numpoints is a keyword on the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} function for convenience). We can then pass the mapping of instance to Handler as a keyword to legend. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{legend\PYGZus{}handler} \PYG{k}{import} \PYG{n}{HandlerLine2D} \PYG{n}{line1}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line2}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Line 2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{handler\PYGZus{}map}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{n}{line1}\PYG{p}{:} \PYG{n}{HandlerLine2D}\PYG{p}{(}\PYG{n}{numpoints}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_005}.png} As you can see, "Line 1" now has 4 marker points, where "Line 2" has 2 (the default). Try the above code, only change the map's key from \sphinxcode{\sphinxupquote{line1}} to \sphinxcode{\sphinxupquote{type(line1)}}. Notice how now both {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances get 4 markers. Along with handlers for complex plot types such as errorbars, stem plots and histograms, the default \sphinxcode{\sphinxupquote{handler\_map}} has a special \sphinxcode{\sphinxupquote{tuple}} handler ({\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerTuple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerTuple}}}}}) which simply plots the handles on top of one another for each item in the given tuple. The following example demonstrates combining two legend keys on top of one another: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{numpy}\PYG{n+nn}{.}\PYG{n+nn}{random} \PYG{k}{import} \PYG{n}{randn} \PYG{n}{z} \PYG{o}{=} \PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{red\PYGZus{}dot}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{z}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ro}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Put a white cross over some of the data.} \PYG{n}{white\PYGZus{}cross}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{z}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w+}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{markeredgewidth}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{n}{red\PYGZus{}dot}\PYG{p}{,} \PYG{p}{(}\PYG{n}{red\PYGZus{}dot}\PYG{p}{,} \PYG{n}{white\PYGZus{}cross}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Attr A}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Attr A+B}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_006}.png} The {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerTuple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerTuple}}}}} class can also be used to assign several legend keys to the same entry: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{legend\PYGZus{}handler} \PYG{k}{import} \PYG{n}{HandlerLine2D}\PYG{p}{,} \PYG{n}{HandlerTuple} \PYG{n}{p1}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r\PYGZhy{}d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{p2}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k\PYGZhy{}o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{l} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{p}{(}\PYG{n}{p1}\PYG{p}{,} \PYG{n}{p2}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Two keys}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{numpoints}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{handler\PYGZus{}map}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{n+nb}{tuple}\PYG{p}{:} \PYG{n}{HandlerTuple}\PYG{p}{(}\PYG{n}{ndivide}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_007}.png} \paragraph{Implementing a custom legend handler} \label{\detokenize{tutorials/intermediate/legend_guide:implementing-a-custom-legend-handler}} A custom handler can be implemented to turn any handle into a legend key (handles don't necessarily need to be matplotlib artists). The handler must implement a "legend\_artist" method which returns a single artist for the legend to use. Signature details about the "legend\_artist" are documented at {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.legend_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend\_artist()}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{mpatches} \PYG{k}{class} \PYG{n+nc}{AnyObject}\PYG{p}{(}\PYG{n+nb}{object}\PYG{p}{)}\PYG{p}{:} \PYG{k}{pass} \PYG{k}{class} \PYG{n+nc}{AnyObjectHandler}\PYG{p}{(}\PYG{n+nb}{object}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{legend\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{fontsize}\PYG{p}{,} \PYG{n}{handlebox}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0} \PYG{o}{=} \PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{ydescent} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height} \PYG{o}{=} \PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{width}\PYG{p}{,} \PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{height} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{hatch}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xx}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{get\PYGZus{}transform}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{handlebox}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \PYG{k}{return} \PYG{n}{patch} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{n}{AnyObject}\PYG{p}{(}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{My first handler}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{handler\PYGZus{}map}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{n}{AnyObject}\PYG{p}{:} \PYG{n}{AnyObjectHandler}\PYG{p}{(}\PYG{p}{)}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_008}.png} Alternatively, had we wanted to globally accept \sphinxcode{\sphinxupquote{AnyObject}} instances without needing to manually set the \sphinxcode{\sphinxupquote{handler\_map}} keyword all the time, we could have registered the new handler with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{legend} \PYG{k}{import} \PYG{n}{Legend} \PYG{n}{Legend}\PYG{o}{.}\PYG{n}{update\PYGZus{}default\PYGZus{}handler\PYGZus{}map}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{n}{AnyObject}\PYG{p}{:} \PYG{n}{AnyObjectHandler}\PYG{p}{(}\PYG{p}{)}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} Whilst the power here is clear, remember that there are already many handlers implemented and what you want to achieve may already be easily possible with existing classes. For example, to produce elliptical legend keys, rather than rectangular ones: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{legend\PYGZus{}handler} \PYG{k}{import} \PYG{n}{HandlerPatch} \PYG{k}{class} \PYG{n+nc}{HandlerEllipse}\PYG{p}{(}\PYG{n}{HandlerPatch}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{create\PYGZus{}artists}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{ydescent}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{fontsize}\PYG{p}{,} \PYG{n}{trans}\PYG{p}{)}\PYG{p}{:} \PYG{n}{center} \PYG{o}{=} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{width} \PYG{o}{\PYGZhy{}} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{xdescent}\PYG{p}{,} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{height} \PYG{o}{\PYGZhy{}} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{ydescent} \PYG{n}{p} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Ellipse}\PYG{p}{(}\PYG{n}{xy}\PYG{o}{=}\PYG{n}{center}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{n}{width} \PYG{o}{+} \PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{n}{height} \PYG{o}{+} \PYG{n}{ydescent}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{update\PYGZus{}prop}\PYG{p}{(}\PYG{n}{p}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{legend}\PYG{p}{)} \PYG{n}{p}\PYG{o}{.}\PYG{n}{set\PYGZus{}transform}\PYG{p}{(}\PYG{n}{trans}\PYG{p}{)} \PYG{k}{return} \PYG{p}{[}\PYG{n}{p}\PYG{p}{]} \PYG{n}{c} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{green}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{c}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{n}{c}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{An ellipse, not a rectangle}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{handler\PYGZus{}map}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{:} \PYG{n}{HandlerEllipse}\PYG{p}{(}\PYG{p}{)}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_legend_guide_009}.png} \phantomsection\label{\detokenize{tutorials/intermediate/legend_guide:sphx-glr-download-tutorials-intermediate-legend-guide-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/color_cycle:sphx-glr-download-tutorials-intermediate-color-cycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Styling with cycler} \label{\detokenize{tutorials/intermediate/color_cycle:styling-with-cycler}}\label{\detokenize{tutorials/intermediate/color_cycle:sphx-glr-tutorials-intermediate-color-cycle-py}}\label{\detokenize{tutorials/intermediate/color_cycle::doc}} Demo of custom property-cycle settings to control colors and other style properties for multi-line plots. \begin{sphinxadmonition}{note}{Note:} More complete documentation of the \sphinxcode{\sphinxupquote{cycler}} API can be found \sphinxhref{http://matplotlib.org/cycler/}{here}. \end{sphinxadmonition} This example demonstrates two different APIs: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Setting the default rc parameter specifying the property cycle. This affects all subsequent axes (but not axes already created). \item {} Setting the property cycle for a single pair of axes. \end{enumerate} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{cycler} \PYG{k}{import} \PYG{n}{cycler} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \end{sphinxVerbatim} First we'll generate some sample data, in this case, four offset sine curves. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{)} \PYG{n}{offsets} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{endpoint}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{yy} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{transpose}\PYG{p}{(}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x} \PYG{o}{+} \PYG{n}{phi}\PYG{p}{)} \PYG{k}{for} \PYG{n}{phi} \PYG{o+ow}{in} \PYG{n}{offsets}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Now \sphinxcode{\sphinxupquote{yy}} has shape \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{yy}\PYG{o}{.}\PYG{n}{shape}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] (50, 4) \end{sphinxVerbatim} So \sphinxcode{\sphinxupquote{yy{[}:, i{]}}} will give you the \sphinxcode{\sphinxupquote{i}}-th offset sine curve. Let's set the default prop\_cycle using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rc:matplotlib.pyplot.rc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.rc()}}}}}. We'll combine a color cycler and a linestyle cycler by adding (\sphinxcode{\sphinxupquote{+}}) two \sphinxcode{\sphinxupquote{cycler}}'s together. See the bottom of this tutorial for more information about combining different cyclers. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{default\PYGZus{}cycler} \PYG{o}{=} \PYG{p}{(}\PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{linestyle}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{prop\PYGZus{}cycle}\PYG{o}{=}\PYG{n}{default\PYGZus{}cycler}\PYG{p}{)} \end{sphinxVerbatim} Now we'll generate a figure with two axes, one on top of the other. On the first axis, we'll plot with the default cycler. On the second axis, we'll set the prop\_cycler using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle:matplotlib.axes.Axes.set_prop_cycle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_prop\_cycle()}}}}} which will only set the \sphinxcode{\sphinxupquote{prop\_cycle}} for this {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance. We'll use a second \sphinxcode{\sphinxupquote{cycler}} that combines a color cycler and a linewidth cycler. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{custom\PYGZus{}cycler} \PYG{o}{=} \PYG{p}{(}\PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{m}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{lw}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax0}\PYG{p}{,} \PYG{n}{ax1}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax0}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{yy}\PYG{p}{)} \PYG{n}{ax0}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Set default color cycle to rgby}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{custom\PYGZus{}cycler}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{yy}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Set axes color cycle to cmyk}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Add a bit more space between the two plots.} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.3}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_color_cycle_001}.png} \subsubsection{Setting \sphinxstyleliteralintitle{\sphinxupquote{prop\_cycler}} in the \sphinxstyleliteralintitle{\sphinxupquote{matplotlibrc}} file or style files} \label{\detokenize{tutorials/intermediate/color_cycle:setting-prop-cycler-in-the-matplotlibrc-file-or-style-files}} Remember, if you want to set a custom \sphinxcode{\sphinxupquote{prop\_cycler}} in your \sphinxcode{\sphinxupquote{.matplotlibrc}} file or a style file (\sphinxcode{\sphinxupquote{style.mplstyle}}), you can set the \sphinxcode{\sphinxupquote{axes.prop\_cycle}} property: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{prop\PYGZus{}cycle} \PYG{p}{:} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bgrcmyk}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Cycling through multiple properties} \label{\detokenize{tutorials/intermediate/color_cycle:cycling-through-multiple-properties}} You can add cyclers: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{cycler} \PYG{k+kn}{import} \PYG{n}{cycler} \PYG{n}{cc} \PYG{o}{=} \PYG{p}{(}\PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{n+nb}{list}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rgb}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \PYG{o}{+} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{linestyle}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{k}{for} \PYG{n}{d} \PYG{o+ow}{in} \PYG{n}{cc}\PYG{p}{:} \PYG{k}{print}\PYG{p}{(}\PYG{n}{d}\PYG{p}{)} \end{sphinxVerbatim} Results in: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} You can multiply cyclers: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{cycler} \PYG{k+kn}{import} \PYG{n}{cycler} \PYG{n}{cc} \PYG{o}{=} \PYG{p}{(}\PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{n+nb}{list}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rgb}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{linestyle}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{k}{for} \PYG{n}{d} \PYG{o+ow}{in} \PYG{n}{cc}\PYG{p}{:} \PYG{k}{print}\PYG{p}{(}\PYG{n}{d}\PYG{p}{)} \end{sphinxVerbatim} Results in: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/intermediate/color_cycle:sphx-glr-download-tutorials-intermediate-color-cycle-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-download-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Customizing Figure Layouts Using GridSpec and Other Functions} \label{\detokenize{tutorials/intermediate/gridspec:customizing-figure-layouts-using-gridspec-and-other-functions}}\label{\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}}\label{\detokenize{tutorials/intermediate/gridspec::doc}} How to create grid-shaped combinations of axes. \begin{quote} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}}}] \leavevmode Perhaps the primary function used to create figures and axes. It's also similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.subplot()}}}}}, but creates and places all axes on the figure at once. See also \sphinxcode{\sphinxupquote{matplotlib.Figure.subplots}}. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}}] \leavevmode Specifies the geometry of the grid that a subplot will be placed. The number of rows and number of columns of the grid need to be set. Optionally, the subplot layout parameters (e.g., left, right, etc.) can be tuned. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}}}] \leavevmode Specifies the location of the subplot in the given \sphinxstyleemphasis{GridSpec}. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid()}}}}}}] \leavevmode A helper function that is similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}}, but uses 0-based indexing and let subplot to occupy multiple cells. This function is not covered in this tutorial. \end{description} \end{quote} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{gridspec} \PYG{k}{as} \PYG{n+nn}{gridspec} \end{sphinxVerbatim} \subsubsection{Basic Quickstart Guide} \label{\detokenize{tutorials/intermediate/gridspec:basic-quickstart-guide}} These first two examples show how to create a basic 2-by-2 grid using both {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} and {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}}. Using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} is quite simple. It returns a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance and an array of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} objects. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig1}\PYG{p}{,} \PYG{n}{f1\PYGZus{}axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_001}.png} For a simple use case such as this, {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}} is perhaps overly verbose. You have to create the figure and {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} instance separately, then pass elements of gridspec instance to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}} method to create the axes objects. The elements of the gridspec are accessed in generally the same manner as numpy arrays. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{spec2} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig2}\PYG{p}{)} \PYG{n}{f2\PYGZus{}ax1} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec2}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f2\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec2}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f2\PYGZus{}ax3} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec2}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f2\PYGZus{}ax4} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec2}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_002}.png} The power of gridspec comes in being able to create subplots that span rows and columns. Note the \sphinxhref{https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html}{Numpy slice} syntax for selecting the part of the gridspec each subplot will occupy. Note that we have also used the convenience method {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_gridspec}}}}} instead of {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec.GridSpec}}}}}, potentially saving the user an import, and keeping the namespace cleaner. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig3} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax1} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gs[0, :]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gs[1, :\PYGZhy{}1]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax3} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax3}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gs[1:, \PYGZhy{}1]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax4} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax4}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gs[\PYGZhy{}1, 0]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax5} \PYG{o}{=} \PYG{n}{fig3}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f3\PYGZus{}ax5}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gs[\PYGZhy{}1, \PYGZhy{}2]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_003}.png} {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}} is also indispensable for creating subplots of different widths via a couple of methods. The method shown here is similar to the one above and initializes a uniform grid specification, and then uses numpy indexing and slices to allocate multiple "cells" for a given subplot. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig4} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{spec4} \PYG{o}{=} \PYG{n}{fig4}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{anno\PYGZus{}opts} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{f4\PYGZus{}ax1} \PYG{o}{=} \PYG{n}{fig4}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec4}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f4\PYGZus{}ax1}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{GridSpec[0, 0]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{anno\PYGZus{}opts}\PYG{p}{)} \PYG{n}{fig4}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec4}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{GridSpec[0, 1:]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{anno\PYGZus{}opts}\PYG{p}{)} \PYG{n}{fig4}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec4}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{GridSpec[1:, 0]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{anno\PYGZus{}opts}\PYG{p}{)} \PYG{n}{fig4}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec4}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{GridSpec[1:, 1:]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{anno\PYGZus{}opts}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_004}.png} Another option is to use the \sphinxcode{\sphinxupquote{width\_ratios}} and \sphinxcode{\sphinxupquote{height\_ratios}} parameters. These keyword arguments are lists of numbers. Note that absolute values are meaningless, only their relative ratios matter. That means that \sphinxcode{\sphinxupquote{width\_ratios={[}2, 4, 8{]}}} is equivalent to \sphinxcode{\sphinxupquote{width\_ratios={[}1, 2, 4{]}}} within equally wide figures. For the sake of demonstration, we'll blindly create the axes within \sphinxcode{\sphinxupquote{for}} loops since we won't need them later. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig5} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{widths} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{p}{]} \PYG{n}{heights} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]} \PYG{n}{spec5} \PYG{o}{=} \PYG{n}{fig5}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{width\PYGZus{}ratios}\PYG{o}{=}\PYG{n}{widths}\PYG{p}{,} \PYG{n}{height\PYGZus{}ratios}\PYG{o}{=}\PYG{n}{heights}\PYG{p}{)} \PYG{k}{for} \PYG{n}{row} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{col} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig5}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{spec5}\PYG{p}{[}\PYG{n}{row}\PYG{p}{,} \PYG{n}{col}\PYG{p}{]}\PYG{p}{)} \PYG{n}{label} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Width: }\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{Height: }\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{widths}\PYG{p}{[}\PYG{n}{col}\PYG{p}{]}\PYG{p}{,} \PYG{n}{heights}\PYG{p}{[}\PYG{n}{row}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{label}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_005}.png} Learning to use \sphinxcode{\sphinxupquote{width\_ratios}} and \sphinxcode{\sphinxupquote{height\_ratios}} is particularly useful since the top-level function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} accepts them within the \sphinxcode{\sphinxupquote{gridspec\_kw}} parameter. For that matter, any parameter accepted by {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} can be passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} via the \sphinxcode{\sphinxupquote{gridspec\_kw}} parameter. This example recreates the previous figure without directly using a gridspec instance. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{gs\PYGZus{}kw} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{width\PYGZus{}ratios}\PYG{o}{=}\PYG{n}{widths}\PYG{p}{,} \PYG{n}{height\PYGZus{}ratios}\PYG{o}{=}\PYG{n}{heights}\PYG{p}{)} \PYG{n}{fig6}\PYG{p}{,} \PYG{n}{f6\PYGZus{}axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{gridspec\PYGZus{}kw}\PYG{o}{=}\PYG{n}{gs\PYGZus{}kw}\PYG{p}{)} \PYG{k}{for} \PYG{n}{r}\PYG{p}{,} \PYG{n}{row} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{f6\PYGZus{}axes}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{c}\PYG{p}{,} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{row}\PYG{p}{)}\PYG{p}{:} \PYG{n}{label} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Width: }\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{Height: }\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{widths}\PYG{p}{[}\PYG{n}{c}\PYG{p}{]}\PYG{p}{,} \PYG{n}{heights}\PYG{p}{[}\PYG{n}{r}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{label}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_006}.png} The \sphinxcode{\sphinxupquote{subplots}} and \sphinxcode{\sphinxupquote{gridspec}} methods can be combined since it is sometimes more convenient to make most of the subplots using \sphinxcode{\sphinxupquote{subplots}} and then remove some and combine them. Here we create a layout with the bottom two axes in the last column combined. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig7}\PYG{p}{,} \PYG{n}{f7\PYGZus{}axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{f7\PYGZus{}axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}gridspec}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} remove the underlying axes} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{f7\PYGZus{}axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{remove}\PYG{p}{(}\PYG{p}{)} \PYG{n}{axbig} \PYG{o}{=} \PYG{n}{fig7}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axbig}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Big Axes }\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{GridSpec[1:, \PYGZhy{}1]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig7}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_007}.png} \subsubsection{Fine Adjustments to a Gridspec Layout} \label{\detokenize{tutorials/intermediate/gridspec:fine-adjustments-to-a-gridspec-layout}} When a GridSpec is explicitly used, you can adjust the layout parameters of subplots that are created from the GridSpec. Note this option is not compatible with \sphinxcode{\sphinxupquote{constrained\_layout}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout}}}}} which both adjust subplot sizes to fill the figure. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig8} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{fig8}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.48}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)} \PYG{n}{f8\PYGZus{}ax1} \PYG{o}{=} \PYG{n}{fig8}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f8\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{fig8}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f8\PYGZus{}ax3} \PYG{o}{=} \PYG{n}{fig8}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_008}.png} This is similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib.pyplot.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots\_adjust()}}}}}, but it only affects the subplots that are created from the given GridSpec. For example, compare the left and right sides of this figure: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig9} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.48}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax1} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax3} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gs2} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.55}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.98}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax4} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs2}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax5} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs2}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f9\PYGZus{}ax6} \PYG{o}{=} \PYG{n}{fig9}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs2}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_009}.png} \subsubsection{GridSpec using SubplotSpec} \label{\detokenize{tutorials/intermediate/gridspec:gridspec-using-subplotspec}} You can create GridSpec from the {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}}, in which case its layout parameters are set to that of the location of the given SubplotSpec. Note this is also available from the more verbose {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec.GridSpecFromSubplotSpec}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig10} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig10}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{gs00} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{gs01} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{k}{for} \PYG{n}{a} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{b} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig10}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs00}\PYG{p}{[}\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig10}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs01}\PYG{p}{[}\PYG{n}{b}\PYG{p}{,} \PYG{n}{a}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_010}.png} \subsubsection{A Complex Nested GridSpec using SubplotSpec} \label{\detokenize{tutorials/intermediate/gridspec:a-complex-nested-gridspec-using-subplotspec}} Here's a more sophisticated example of nested GridSpec where we put a box around each cell of the outer 4x4 grid, by hiding appropriate spines in each of the inner 3x3 grids. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{from} \PYG{n+nn}{itertools} \PYG{k}{import} \PYG{n}{product} \PYG{k}{def} \PYG{n+nf}{squiggle\PYGZus{}xy}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{c}\PYG{p}{,} \PYG{n}{d}\PYG{p}{,} \PYG{n}{i}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mf}{0.05}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{i}\PYG{o}{*}\PYG{n}{a}\PYG{p}{)}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{i}\PYG{o}{*}\PYG{n}{b}\PYG{p}{)}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{i}\PYG{o}{*}\PYG{n}{c}\PYG{p}{)}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{i}\PYG{o}{*}\PYG{n}{d}\PYG{p}{)} \PYG{n}{fig11} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} gridspec inside gridspec} \PYG{n}{outer\PYGZus{}grid} \PYG{o}{=} \PYG{n}{fig11}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{16}\PYG{p}{)}\PYG{p}{:} \PYG{n}{inner\PYGZus{}grid} \PYG{o}{=} \PYG{n}{outer\PYGZus{}grid}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{)} \PYG{n}{a}\PYG{p}{,} \PYG{n}{b} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{i}\PYG{o}{/}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{i} \PYG{o}{\PYGZpc{}} \PYG{l+m+mi}{4}\PYG{o}{+}\PYG{l+m+mi}{1} \PYG{k}{for} \PYG{n}{j}\PYG{p}{,} \PYG{p}{(}\PYG{n}{c}\PYG{p}{,} \PYG{n}{d}\PYG{p}{)} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{product}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{repeat}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig11}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{inner\PYGZus{}grid}\PYG{p}{[}\PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{o}{*}\PYG{n}{squiggle\PYGZus{}xy}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{c}\PYG{p}{,} \PYG{n}{d}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig11}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{all\PYGZus{}axes} \PYG{o}{=} \PYG{n}{fig11}\PYG{o}{.}\PYG{n}{get\PYGZus{}axes}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} show only the outside spines} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{all\PYGZus{}axes}\PYG{p}{:} \PYG{k}{for} \PYG{n}{sp} \PYG{o+ow}{in} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{spines}\PYG{o}{.}\PYG{n}{values}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{sp}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{is\PYGZus{}first\PYGZus{}row}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{spines}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{is\PYGZus{}last\PYGZus{}row}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{spines}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{is\PYGZus{}first\PYGZus{}col}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{spines}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{is\PYGZus{}last\PYGZus{}col}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{spines}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_gridspec_011}.png} \bigskip\hrule\bigskip \paragraph{References} \label{\detokenize{tutorials/intermediate/gridspec:references}} The usage of the following functions and methods is shown in this example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{pyplot}\PYG{o}{.}\PYG{n}{subplots} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{Figure}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{Figure}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{SubplotSpec}\PYG{o}{.}\PYG{n}{subgridspec} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpecFromSubplotSpec} \end{sphinxVerbatim} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 4.891 seconds) \phantomsection\label{\detokenize{tutorials/intermediate/gridspec:sphx-glr-download-tutorials-intermediate-gridspec-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-download-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Constrained Layout Guide} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:constrained-layout-guide}}\label{\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}}\label{\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}} How to use constrained-layout to fit plots within your figure cleanly. \sphinxstyleemphasis{constrained\_layout} automatically adjusts subplots and decorations like legends and colorbars so that they fit in the figure window while still preserving, as best they can, the logical layout requested by the user. \sphinxstyleemphasis{constrained\_layout} is similar to {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{tight\_layout}}}}, but uses a constraint solver to determine the size of axes that allows them to fit. \sphinxstyleemphasis{constrained\_layout} needs to be activated before any axes are added to a figure. Two ways of doing so are \begin{itemize} \item {} using the respective argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \item {} activate it via {\hyperref[\detokenize{tutorials/introductory/customizing:matplotlib-rcparams}]{\sphinxcrossref{\DUrole{std,std-ref}{rcParams}}}}, like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.constrained\PYGZus{}layout.use}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \end{sphinxVerbatim} \end{itemize} Those are described in detail throughout the following sections. \begin{sphinxadmonition}{warning}{Warning:} Currently Constrained Layout is \sphinxstylestrong{experimental}. The behaviour and API are subject to change, or the whole functionality may be removed without a deprecation period. If you \sphinxstyleemphasis{require} your plots to be absolutely reproducible, get the Axes positions after running Constrained Layout and use \sphinxcode{\sphinxupquote{ax.set\_position()}} in your code with \sphinxcode{\sphinxupquote{constrained\_layout=False}}. \end{sphinxadmonition} \subsubsection{Simple Example} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:simple-example}} In Matplotlib, the location of axes (including subplots) are specified in normalized figure coordinates. It can happen that your axis labels or titles (or sometimes even ticklabels) go outside the figure area, and are thus clipped. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} sphinx\PYGZus{}gallery\PYGZus{}thumbnail\PYGZus{}number = 18} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{colors} \PYG{k}{as} \PYG{n+nn}{mcolors} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{gridspec} \PYG{k}{as} \PYG{n+nn}{gridspec} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{savefig.facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0.8}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.figsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{4.5}\PYG{p}{,} \PYG{l+m+mf}{4.} \PYG{k}{def} \PYG{n+nf}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{,} \PYG{n}{nodec}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{locator\PYGZus{}params}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{k}{if} \PYG{o+ow}{not} \PYG{n}{nodec}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{k}{else}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_001}.png} To prevent this, the location of axes needs to be adjusted. For subplots, this can be done by adjusting the subplot params ({\hyperref[\detokenize{faq/howto_faq:howto-subplots-adjust}]{\sphinxcrossref{\DUrole{std,std-ref}{Move the edge of an axes to make room for tick labels}}}}). However, specifying your figure with the \sphinxcode{\sphinxupquote{constrained\_layout=True}} kwarg will do the adjusting automatically. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_002}.png} When you have multiple subplots, often you see labels of different axes overlapping each other. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_003}.png} Specifying \sphinxcode{\sphinxupquote{constrained\_layout=True}} in the call to \sphinxcode{\sphinxupquote{plt.subplots}} causes the layout to be properly constrained. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_004}.png} \subsubsection{Colorbars} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:colorbars}} If you create a colorbar with the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} command you need to make room for it. \sphinxcode{\sphinxupquote{constrained\_layout}} does this automatically. Note that if you specify \sphinxcode{\sphinxupquote{use\_gridspec=True}} it will be ignored because this option is made for improving the layout via \sphinxcode{\sphinxupquote{tight\_layout}}. \begin{sphinxadmonition}{note}{Note:} For the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} kwargs (\sphinxcode{\sphinxupquote{pc\_kwargs}}) we use a dictionary. Below we will assign one colorbar to a number of axes each containing a {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}}; specifying the norm and colormap ensures the colorbar is accurate for all the axes. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{arr} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{mcolors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mf}{100.}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} see note above: this makes all pcolormesh calls consistent:} \PYG{n}{pc\PYGZus{}kwargs} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rasterized}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{True}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cmap}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{norm}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{norm}\PYG{p}{\PYGZcb{}} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_005}.png} If you specify a list of axes (or other iterable container) to the \sphinxcode{\sphinxupquote{ax}} argument of \sphinxcode{\sphinxupquote{colorbar}}, constrained\_layout will take space from the specified axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_006}.png} If you specify a list of axes from inside a grid of axes, the colorbar will steal space appropriately, and leave a gap, but all subplots will still be the same size. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.8}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_007}.png} Note that there is a bit of a subtlety when specifying a single axes as the parent. In the following, it might be desirable and expected for the colorbars to line up, but they don't because the colorbar paired with the bottom axes is tied to the subplotspec of the axes, and hence shrinks when the gridspec-level colorbar is added. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_008}.png} The API to make a single-axes behave like a list of axes is to specify it as a list (or other iterable container), as below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{p}{[}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_009}.png} \subsubsection{Suptitle} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:suptitle}} \sphinxcode{\sphinxupquote{constrained\_layout}} can also make room for {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Big Suptitle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_010}.png} \subsubsection{Legends} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:legends}} Legends can be placed outside of their parent axis. Constrained-layout is designed to handle this for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend()}}}}}. However, constrained-layout does \sphinxstyleemphasis{not} handle legends being created via {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend()}}}}} (yet). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is a plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_011}.png} However, this will steal space from a subplot layout: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is a plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_012}.png} In order for a legend or other artist to \sphinxstyleemphasis{not} steal space from the subplot layout, we can \sphinxcode{\sphinxupquote{leg.set\_in\_layout(False)}}. Of course this can mean the legend ends up cropped, but can be useful if the plot is subsequently called with \sphinxcode{\sphinxupquote{fig.savefig('outname.png', bbox\_inches='tight')}}. Note, however, that the legend's \sphinxcode{\sphinxupquote{get\_in\_layout}} status will have to be toggled again to make the saved file work, and we must manually trigger a draw if we want constrained\_layout to adjust the size of the axes before printing. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is a plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{leg} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{leg}\PYG{o}{.}\PYG{n}{set\PYGZus{}in\PYGZus{}layout}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} trigger a draw so that constrained\PYGZus{}layout is executed once} \PYG{c+c1}{\PYGZsh{} before we turn it off when printing....} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} we want the legend included in the bbox\PYGZus{}inches=\PYGZsq{}tight\PYGZsq{} calcs.} \PYG{n}{leg}\PYG{o}{.}\PYG{n}{set\PYGZus{}in\PYGZus{}layout}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} we don\PYGZsq{}t want the layout to change at this point.} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{CL01.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}inches}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_013}.png} The saved file looks like: \noindent{\hspace*{\fill}\sphinxincludegraphics{{CL01}.png}\hspace*{\fill}} A better way to get around this awkwardness is to simply use the legend method provided by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{lines} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is a plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{labels} \PYG{o}{=} \PYG{p}{[}\PYG{n}{l}\PYG{o}{.}\PYG{n}{get\PYGZus{}label}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{l} \PYG{o+ow}{in} \PYG{n}{lines}\PYG{p}{]} \PYG{n}{leg} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}transform}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{CL02.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}inches}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_014}.png} The saved file looks like: \noindent{\hspace*{\fill}\sphinxincludegraphics{{CL02}.png}\hspace*{\fill}} \subsubsection{Padding and Spacing} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:padding-and-spacing}} For constrained\_layout, we have implemented a padding around the edge of each axes. This padding sets the distance from the edge of the plot, and the minimum distance between adjacent plots. It is specified in inches by the keyword arguments \sphinxcode{\sphinxupquote{w\_pad}} and \sphinxcode{\sphinxupquote{h\_pad}} to the function {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_constrained_layout_pads}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_constrained\_layout\_pads}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{nodec}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout\PYGZus{}pads}\PYG{p}{(}\PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{4.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{4.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{nodec}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout\PYGZus{}pads}\PYG{p}{(}\PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{)} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_015}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_016}.png} \end{itemize} Spacing between subplots is set by \sphinxcode{\sphinxupquote{wspace}} and \sphinxcode{\sphinxupquote{hspace}}. There are specified as a fraction of the size of the subplot group as a whole. If the size of the figure is changed, then these spaces change in proportion. Note in the blow how the space at the edges doesn't change from the above, but the space between subplots does. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{nodec}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout\PYGZus{}pads}\PYG{p}{(}\PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_017}.png} \paragraph{Spacing with colorbars} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:spacing-with-colorbars}} Colorbars will be placed \sphinxcode{\sphinxupquote{wspace}} and \sphinxcode{\sphinxupquote{hsapce}} apart from other subplots. The padding between the colorbar and the axis it is attached to will never be less than \sphinxcode{\sphinxupquote{w\_pad}} (for a vertical colorbar) or \sphinxcode{\sphinxupquote{h\_pad}} (for a horizontal colorbar). Note the use of the \sphinxcode{\sphinxupquote{pad}} kwarg here in the \sphinxcode{\sphinxupquote{colorbar}} call. It defaults to 0.02 of the size of the axis it is attached to. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{pc} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pc}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout\PYGZus{}pads}\PYG{p}{(}\PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_018}.png} In the above example, the colorbar will not ever be closer than 2 pts to the plot, but if we want it a bit further away, we can specify its value for \sphinxcode{\sphinxupquote{pad}} to be non-zero. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{pc} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticklabels}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}constrained\PYGZus{}layout\PYGZus{}pads}\PYG{p}{(}\PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{n}{hspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_019}.png} \subsubsection{rcParams} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:rcparams}} There are five {\hyperref[\detokenize{tutorials/introductory/customizing:matplotlib-rcparams}]{\sphinxcrossref{\DUrole{std,std-ref}{rcParams}}}} that can be set, either in a script or in the \sphinxcode{\sphinxupquote{matplotlibrc}} file. They all have the prefix \sphinxcode{\sphinxupquote{figure.constrained\_layout}}: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{use}}: Whether to use constrained\_layout. Default is False \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{w\_pad}}, \sphinxcode{\sphinxupquote{h\_pad}}: Padding around axes objects.}] \leavevmode Float representing inches. Default is 3./72. inches (3 pts) \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{wspace}}, \sphinxcode{\sphinxupquote{hspace}}: Space between subplot groups.}] \leavevmode Float representing a fraction of the subplot widths being separated. Default is 0.02. \end{description} \end{itemize} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.constrained\PYGZus{}layout.use}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_020}.png} \subsubsection{Use with GridSpec} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:use-with-gridspec}} constrained\_layout is meant to be used with {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}}. Note that in what follows \sphinxcode{\sphinxupquote{constrained\_layout=True}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_021}.png} More complicated gridspec layouts are possible. Note here we use the convenience functions \sphinxcode{\sphinxupquote{add\_gridspec}} and \sphinxcode{\sphinxupquote{subgridspec}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{gs2} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ss} \PYG{o+ow}{in} \PYG{n}{gs2}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ss}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{x\PYGZhy{}label}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_022}.png} Note that in the above the left and columns don't have the same vertical extent. If we want the top and bottom of the two grids to line up then they need to be in the same gridspec: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_023}.png} This example uses two gridspecs to have the colorbar only pertain to one set of pcolors. Note how the left column is wider than the two right-hand columns because of this. Of course, if you wanted the subplots to be the same size you only needed one gridspec. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{docomplicated}\PYG{p}{(}\PYG{n}{suptitle}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{width\PYGZus{}ratios}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gsl} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{gsr} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{k}{for} \PYG{n}{gs} \PYG{o+ow}{in} \PYG{n}{gsl}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{axs} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{gs} \PYG{o+ow}{in} \PYG{n}{gsr}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{axs} \PYG{o}{+}\PYG{o}{=} \PYG{p}{[}\PYG{n}{ax}\PYG{p}{]} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{)} \PYG{k}{if} \PYG{n}{suptitle} \PYG{o+ow}{is} \PYG{o+ow}{not} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{n}{suptitle}\PYG{p}{)} \PYG{n}{docomplicated}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_024}.png} \subsubsection{Manually setting axes positions} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:manually-setting-axes-positions}} There can be good reasons to manually set an axes position. A manual call to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position}}}}} will set the axes so constrained\_layout has no effect on it anymore. (Note that constrained\_layout still leaves the space for the axes that is moved). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}position}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_025}.png} If you want an inset axes in data-space, you need to manually execute the layout using \sphinxcode{\sphinxupquote{fig.execute\_constrained\_layout()}} call. The inset figure will then be properly positioned. However, it will not be properly positioned if the size of the figure is subsequently changed. Similarly, if the figure is printed to another backend, there may be slight changes of location due to small differences in how the backends render fonts. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{transforms} \PYG{k}{import} \PYG{n}{Bbox} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{execute\PYGZus{}constrained\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} put into data\PYGZhy{}space:} \PYG{n}{bb\PYGZus{}data\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{Bbox}\PYG{o}{.}\PYG{n}{from\PYGZus{}bounds}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{)} \PYG{n}{disp\PYGZus{}coords} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{n}{bb\PYGZus{}data\PYGZus{}ax2}\PYG{p}{)} \PYG{n}{fig\PYGZus{}coords\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{transFigure}\PYG{o}{.}\PYG{n}{inverted}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{n}{disp\PYGZus{}coords}\PYG{p}{)} \PYG{n}{bb\PYGZus{}ax2} \PYG{o}{=} \PYG{n}{Bbox}\PYG{p}{(}\PYG{n}{fig\PYGZus{}coords\PYGZus{}ax2}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{bb\PYGZus{}ax2}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_026}.png} \subsubsection{Manually turning off \sphinxstyleliteralintitle{\sphinxupquote{constrained\_layout}}} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:manually-turning-off-constrained-layout}} \sphinxcode{\sphinxupquote{constrained\_layout}} usually adjusts the axes positions on each draw of the figure. If you want to get the spacing provided by \sphinxcode{\sphinxupquote{constrained\_layout}} but not have it update, then do the initial draw and then call \sphinxcode{\sphinxupquote{fig.set\_constrained\_layout(False)}}. This is potentially useful for animations where the tick labels may change length. Note that \sphinxcode{\sphinxupquote{constrained\_layout}} is turned off for \sphinxcode{\sphinxupquote{ZOOM}} and \sphinxcode{\sphinxupquote{PAN}} GUI events for the backends that use the toolbar. This prevents the axes from changing position during zooming and panning. \subsubsection{Limitations} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:limitations}} \paragraph{Incompatible functions} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:incompatible-functions}} \sphinxcode{\sphinxupquote{constrained\_layout}} will not work on subplots created via the \sphinxcode{\sphinxupquote{subplot}} command. The reason is that each of these commands creates a separate \sphinxcode{\sphinxupquote{GridSpec}} instance and \sphinxcode{\sphinxupquote{constrained\_layout}} uses (nested) gridspecs to carry out the layout. So the following fails to yield a nice layout: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{221}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{122}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_027}.png} Of course that layout is possible using a gridspec: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_028}.png} Similarly, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid()}}}}} doesn't work for the same reason: each call creates a different parent gridspec. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax4} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_029}.png} The way to make this plot compatible with \sphinxcode{\sphinxupquote{constrained\_layout}} is again to use \sphinxcode{\sphinxupquote{gridspec}} directly \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax4} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_030}.png} \paragraph{Other Caveats} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:other-caveats}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{constrained\_layout}} only considers ticklabels, axis labels, titles, and legends. Thus, other artists may be clipped and also may overlap. \item {} It assumes that the extra space needed for ticklabels, axis labels, and titles is independent of original location of axes. This is often true, but there are rare cases where it is not. \item {} There are small differences in how the backends handle rendering fonts, so the results will not be pixel-identical. \end{itemize} \subsubsection{Debugging} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:debugging}} Constrained-layout can fail in somewhat unexpected ways. Because it uses a constraint solver the solver can find solutions that are mathematically correct, but that aren't at all what the user wants. The usual failure mode is for all sizes to collapse to their smallest allowable value. If this happens, it is for one of two reasons: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} There was not enough room for the elements you were requesting to draw. \item {} There is a bug - in which case open an issue at \sphinxurl{https://github.com/matplotlib/matplotlib/issues}. \end{enumerate} If there is a bug, please report with a self-contained example that does not require outside data or dependencies (other than numpy). \subsubsection{Notes on the algorithm} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:notes-on-the-algorithm}} The algorithm for the constraint is relatively straightforward, but has some complexity due to the complex ways we can layout a figure. \paragraph{Figure layout} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:figure-layout}} Figures are laid out in a hierarchy: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Figure: \sphinxcode{\sphinxupquote{fig = plt.figure()}} \end{enumerate} \begin{enumerate} \def\theenumi{\alph{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Gridspec \sphinxcode{\sphinxupquote{gs0 = gridspec.GridSpec(1, 2, figure=fig)}} \begin{quote} \begin{enumerate} \def\theenumii{\roman{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} Subplotspec: \sphinxcode{\sphinxupquote{ss = gs{[}0, 0{]}}} \begin{enumerate} \def\theenumiii{\arabic{enumiii}} \def\labelenumiii{\theenumiii .} \makeatletter\def\p@enumiv{\p@enumiii \theenumiii .}\makeatother \item {} Axes: \sphinxcode{\sphinxupquote{ax0 = fig.add\_subplot(ss)}} \end{enumerate} \item {} Subplotspec: \sphinxcode{\sphinxupquote{ss = gs{[}0, 1{]}}} \end{enumerate} \begin{enumerate} \def\theenumii{\arabic{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} Gridspec: \sphinxcode{\sphinxupquote{gsR = gridspec.GridSpecFromSubplotSpec(2, 1, ss)}} \begin{itemize} \item {} Subplotspec: \sphinxcode{\sphinxupquote{ss = gsR{[}0, 0{]}}} \begin{itemize} \item {} Axes: \sphinxcode{\sphinxupquote{axR0 = fig.add\_subplot(ss)}} \end{itemize} \item {} Subplotspec: \sphinxcode{\sphinxupquote{ss = gsR{[}1, 0{]}}} \begin{itemize} \item {} Axes: \sphinxcode{\sphinxupquote{axR1 = fig.add\_subplot(ss)}} \end{itemize} \end{itemize} \end{enumerate} \end{quote} \end{enumerate} Each item has a layoutbox associated with it. The nesting of gridspecs created with {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec}}}}} can be arbitrarily deep. Each {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} has \sphinxstyleemphasis{two} layoutboxes. The first one, \sphinxcode{\sphinxupquote{ax.\_layoutbox}} represents the outside of the Axes and all its decorations (i.e. ticklabels,axis labels, etc.). The second layoutbox corresponds to the Axes' \sphinxcode{\sphinxupquote{ax.position}}, which sets where in the figure the spines are placed. Why so many stacked containers? Ideally, all that would be needed are the Axes layout boxes. For the Gridspec case, a container is needed if the Gridspec is nested via {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec}}}}}. At the top level, it is desirable for symmetry, but it also makes room for {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}}. For the Subplotspec/Axes case, Axes often have colorbars or other annotations that need to be packaged inside the Subplotspec, hence the need for the outer layer. \paragraph{Simple case: one Axes} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:simple-case-one-axes}} For a single Axes the layout is straight forward. The Figure and outer Gridspec layoutboxes coincide. The Subplotspec and Axes boxes also coincide because the Axes has no colorbar. Note the difference between the red \sphinxcode{\sphinxupquote{pos}} box and the green \sphinxcode{\sphinxupquote{ax}} box is set by the size of the decorations around the Axes. In the code, this is accomplished by the entries in \sphinxcode{\sphinxupquote{do\_constrained\_layout()}} like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{\PYGZus{}poslayoutbox}\PYG{o}{.}\PYG{n}{edit\PYGZus{}left\PYGZus{}margin\PYGZus{}min}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{bbox}\PYG{o}{.}\PYG{n}{x0} \PYG{o}{+} \PYG{n}{pos}\PYG{o}{.}\PYG{n}{x0} \PYG{o}{+} \PYG{n}{w\PYGZus{}padt}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{\PYGZus{}layoutbox} \PYG{k}{import} \PYG{n}{plot\PYGZus{}children} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_031}.png} \paragraph{Simple case: two Axes} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:simple-case-two-axes}} For this case, the Axes layoutboxes and the Subplotspec boxes still co-incide. However, because the decorations in the right-hand plot are so much smaller than the left-hand, so the right-hand layoutboxes are smaller. The Subplotspec boxes are laid out in the code in the subroutine \sphinxcode{\sphinxupquote{arange\_subplotspecs()}}, which simply checks the subplotspecs in the code against one another and stacks them appropriately. The two \sphinxcode{\sphinxupquote{pos}} axes are lined up. Because they have the same minimum row, they are lined up at the top. Because they have the same maximum row they are lined up at the bottom. In the code this is accomplished via the calls to \sphinxcode{\sphinxupquote{layoutbox.align}}. If there was more than one row, then the same horizontal alignment would occur between the rows. The two \sphinxcode{\sphinxupquote{pos}} axes are given the same width because the subplotspecs occupy the same number of columns. This is accomplished in the code where \sphinxcode{\sphinxupquote{dcols0}} is compared to \sphinxcode{\sphinxupquote{dcolsC}}. If they are equal, then their widths are constrained to be equal. While it is a bit subtle in this case, note that the division between the Subplotspecs is \sphinxstyleemphasis{not} centered, but has been moved to the right to make space for the larger labels on the left-hand plot. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{32}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{8}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_032}.png} \paragraph{Two Axes and colorbar} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:two-axes-and-colorbar}} Adding a colorbar makes it clear why the Subplotspec layoutboxes must be different from the axes layoutboxes. Here we see the left-hand subplotspec has more room to accommodate the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}}, and that there are two green \sphinxcode{\sphinxupquote{ax}} boxes inside the \sphinxcode{\sphinxupquote{ss}} box. Note that the width of the \sphinxcode{\sphinxupquote{pos}} boxes is still the same because of the constraint on their widths because their subplotspecs occupy the same number of columns (one in this example). The colorbar layout logic is contained in {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.make_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes}}}}} which calls \sphinxcode{\sphinxupquote{\_constrained\_layout.layoutcolorbarsingle()}} for cbars attached to a single axes, and \sphinxcode{\sphinxupquote{\_constrained\_layout.layoutcolorbargridspec()}} if the colorbar is associated with a gridspec. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_033}.png} \paragraph{Colorbar associated with a Gridspec} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:colorbar-associated-with-a-gridspec}} This example shows the Subplotspec layoutboxes being made smaller by a colorbar layoutbox. The size of the colorbar layoutbox is set to be \sphinxcode{\sphinxupquote{shrink}} smaller than the vertical extent of the \sphinxcode{\sphinxupquote{pos}} layoutboxes in the gridspec, and it is made to be centered between those two points. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{axs}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_034}.png} \paragraph{Uneven sized Axes} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:uneven-sized-axes}} There are two ways to make axes have an uneven size in a Gridspec layout, either by specifying them to cross Gridspecs rows or columns, or by specifying width and height ratios. The first method is used here. The constraint that makes the heights be correct is in the code where \sphinxcode{\sphinxupquote{drowsC \textless{} drows0}} which in this case would be 1 is less than 2. So we constrain the height of the 1-row Axes to be less than half the height of the 2-row Axes. \begin{sphinxadmonition}{note}{Note:} This algorithm can be wrong if the decorations attached to the smaller axes are very large, so there is an unaccounted-for edge case. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_035}.png} Height and width ratios are accommodated with the same part of the code with the smaller axes always constrained to be less in size than the larger. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{height\PYGZus{}ratios}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{p}{]}\PYG{p}{,} \PYG{n}{width\PYGZus{}ratios}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{1.2}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_036}.png} \paragraph{Empty gridspec slots} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:empty-gridspec-slots}} The final piece of the code that has not been explained is what happens if there is an empty gridspec opening. In that case a fake invisible axes is added and we proceed as before. The empty gridspec has no decorations, but the axes position in made the same size as the occupied Axes positions. This is done at the start of \sphinxcode{\sphinxupquote{\_constrained\_layout.do\_constrained\_layout()}} (\sphinxcode{\sphinxupquote{hassubplotspec}}). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{pc\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{plot\PYGZus{}children}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{\PYGZus{}layoutbox}\PYG{p}{,} \PYG{n}{printit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_constrainedlayout_guide_037}.png} \paragraph{Other notes} \label{\detokenize{tutorials/intermediate/constrainedlayout_guide:other-notes}} The layout is called only once. This is OK if the original layout was pretty close (which it should be in most cases). However, if the layout changes a lot from the default layout then the decorators can change size. In particular the x and ytick labels can change. If this happens, then we should probably call the whole routine twice. \sphinxstylestrong{Total running time of the script:} ( 0 minutes 8.249 seconds) \phantomsection\label{\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-download-tutorials-intermediate-constrainedlayout-guide-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-download-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Tight Layout guide} \label{\detokenize{tutorials/intermediate/tight_layout_guide:tight-layout-guide}}\label{\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}}\label{\detokenize{tutorials/intermediate/tight_layout_guide::doc}} How to use tight-layout to fit plots within your figure cleanly. \sphinxstyleemphasis{tight\_layout} automatically adjusts subplot params so that the subplot(s) fits in to the figure area. This is an experimental feature and may not work for some cases. It only checks the extents of ticklabels, axis labels, and titles. An alternative to \sphinxstyleemphasis{tight\_layout} is {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{constrained\_layout}}}}. \subsubsection{Simple Example} \label{\detokenize{tutorials/intermediate/tight_layout_guide:simple-example}} In matplotlib, the location of axes (including subplots) are specified in normalized figure coordinates. It can happen that your axis labels or titles (or sometimes even ticklabels) go outside the figure area, and are thus clipped. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} sphinx\PYGZus{}gallery\PYGZus{}thumbnail\PYGZus{}number = 7} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{savefig.facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0.8}\PYG{l+s+s2}{\PYGZdq{}} \PYG{k}{def} \PYG{n+nf}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{locator\PYGZus{}params}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y\PYGZhy{}label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_001}.png} To prevent this, the location of axes needs to be adjusted. For subplots, this can be done by adjusting the subplot params ({\hyperref[\detokenize{faq/howto_faq:howto-subplots-adjust}]{\sphinxcrossref{\DUrole{std,std-ref}{Move the edge of an axes to make room for tick labels}}}}). Matplotlib v1.1 introduces a new command {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} that does this automatically for you. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_002}.png} Note that {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.tight\_layout()}}}}} will only adjust the subplot params when it is called. In order to perform this adjustment each time the figure is redrawn, you can call \sphinxcode{\sphinxupquote{fig.set\_tight\_layout(True)}}, or, equivalently, set the \sphinxcode{\sphinxupquote{figure.autolayout}} rcParam to \sphinxcode{\sphinxupquote{True}}. When you have multiple subplots, often you see labels of different axes overlapping each other. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax3}\PYG{p}{,} \PYG{n}{ax4}\PYG{p}{)}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_003}.png} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} will also adjust spacing between subplots to minimize the overlaps. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax3}\PYG{p}{,} \PYG{n}{ax4}\PYG{p}{)}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_004}.png} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} can take keyword arguments of \sphinxstyleemphasis{pad}, \sphinxstyleemphasis{w\_pad} and \sphinxstyleemphasis{h\_pad}. These control the extra padding around the figure border and between subplots. The pads are specified in fraction of fontsize. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax3}\PYG{p}{,} \PYG{n}{ax4}\PYG{p}{)}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{n}{w\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{1.0}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_005}.png} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} will work even if the sizes of subplots are different as far as their grid specification is compatible. In the example below, \sphinxstyleemphasis{ax1} and \sphinxstyleemphasis{ax2} are subplots of a 2x2 grid, while \sphinxstyleemphasis{ax3} is of a 1x2 grid. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{221}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{122}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_006}.png} It works with subplots created with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid()}}}}}. In general, subplots created from the gridspec ({\hyperref[\detokenize{tutorials/intermediate/gridspec::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Figure Layouts Using GridSpec and Other Functions}}}}) will work. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax4} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot2grid}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax3}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax4}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_007}.png} Although not thoroughly tested, it seems to work for subplots with aspect != "auto" (e.g., axes with images). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{arr} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_008}.png} \subsubsection{Caveats} \label{\detokenize{tutorials/intermediate/tight_layout_guide:caveats}}\begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} only considers ticklabels, axis labels, and titles. Thus, other artists may be clipped and also may overlap. \item {} It assumes that the extra space needed for ticklabels, axis labels, and titles is independent of original location of axes. This is often true, but there are rare cases where it is not. \item {} pad=0 clips some of the texts by a few pixels. This may be a bug or a limitation of the current algorithm and it is not clear why it happens. Meanwhile, use of pad at least larger than 0.3 is recommended. \end{itemize} \subsubsection{Use with GridSpec} \label{\detokenize{tutorials/intermediate/tight_layout_guide:use-with-gridspec}} GridSpec has its own {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} method (the pyplot api {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} also works). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{gridspec} \PYG{k}{as} \PYG{n+nn}{gridspec} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_009}.png} You may provide an optional \sphinxstyleemphasis{rect} parameter, which specifies the bounding box that the subplots will be fit inside. The coordinates must be in normalized figure coordinates and the default is (0, 0, 1, 1). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_010}.png} For example, this can be used for a figure with multiple gridspecs. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gs2} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ss} \PYG{o+ow}{in} \PYG{n}{gs2}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ss}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{x\PYGZhy{}label}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} We may try to match the top and bottom of two grids ::} \PYG{n}{top} \PYG{o}{=} \PYG{n+nb}{min}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{top}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{top}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n+nb}{max}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{n}{top}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{n}{top}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_011}.png} While this should be mostly good enough, adjusting top and bottom may require adjustment of hspace also. To update hspace \& vspace, we call {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} again with updated rect argument. Note that the rect argument specifies the area including the ticklabels, etc. Thus, we will increase the bottom (which is 0 for the normal case) by the difference between the \sphinxstyleemphasis{bottom} from above and the bottom of each gridspec. Same thing for the top. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gcf}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs1} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs1}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gs2} \PYG{o}{=} \PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ss} \PYG{o+ow}{in} \PYG{n}{gs2}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ss}\PYG{p}{)} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{x\PYGZhy{}label}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n+nb}{min}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{top}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{top}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n+nb}{max}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{n}{top}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{n}{top}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n+nb}{min}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{top}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{top}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n+nb}{max}\PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{)} \PYG{n}{gs1}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{k+kc}{None}\PYG{p}{,} \PYG{l+m+mi}{0} \PYG{o}{+} \PYG{p}{(}\PYG{n}{bottom}\PYG{o}{\PYGZhy{}}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{gs1}\PYG{o}{.}\PYG{n}{top}\PYG{o}{\PYGZhy{}}\PYG{n}{top}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gs2}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{0} \PYG{o}{+} \PYG{p}{(}\PYG{n}{bottom}\PYG{o}{\PYGZhy{}}\PYG{n}{gs2}\PYG{o}{.}\PYG{n}{bottom}\PYG{p}{)}\PYG{p}{,} \PYG{k+kc}{None}\PYG{p}{,} \PYG{l+m+mi}{1} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{gs2}\PYG{o}{.}\PYG{n}{top}\PYG{o}{\PYGZhy{}}\PYG{n}{top}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_012}.png} \subsubsection{Legends and Annotations} \label{\detokenize{tutorials/intermediate/tight_layout_guide:legends-and-annotations}} Pre Matplotlib 2.2, legends and annotations were excluded from the bounding box calculations that decide the layout. Subsequently these artists were added to the calculation, but sometimes it is undesirable to include them. For instance in this case it might be good to have the axes shring a bit to make room for the legend: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{lines} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A simple plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_013}.png} However, sometimes this is not desired (quite often when using \sphinxcode{\sphinxupquote{fig.savefig('outname.png', bbox\_inches='tight')}}). In order to remove the legend from the bounding box calculation, we simply set its bounding \sphinxcode{\sphinxupquote{leg.set\_in\_layout(False)}} and the legend will be ignored. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{lines} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{B simple plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{leg} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,}\PYG{p}{)} \PYG{n}{leg}\PYG{o}{.}\PYG{n}{set\PYGZus{}in\PYGZus{}layout}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_014}.png} \subsubsection{Use with AxesGrid1} \label{\detokenize{tutorials/intermediate/tight_layout_guide:use-with-axesgrid1}} While limited, the axes\_grid1 toolkit is also supported. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1} \PYG{k}{import} \PYG{n}{Grid} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{grid} \PYG{o}{=} \PYG{n}{Grid}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{o}{=}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{nrows\PYGZus{}ncols}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{axes\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{label\PYGZus{}mode}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{L}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{)} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{grid}\PYG{p}{:} \PYG{n}{example\PYGZus{}plot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{title}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_015}.png} \subsubsection{Colorbar} \label{\detokenize{tutorials/intermediate/tight_layout_guide:colorbar}} If you create a colorbar with the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} command, the created colorbar is an instance of Axes, \sphinxstyleemphasis{not} Subplot, so tight\_layout does not work. With Matplotlib v1.1, you may create a colorbar as a subplot using the gridspec. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{arr} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{use\PYGZus{}gridspec}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_016}.png} Another option is to use AxesGrid1 toolkit to explicitly create an axes for colorbar. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1} \PYG{k}{import} \PYG{n}{make\PYGZus{}axes\PYGZus{}locatable} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{arr} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{im} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{arr}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{none}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{divider} \PYG{o}{=} \PYG{n}{make\PYGZus{}axes\PYGZus{}locatable}\PYG{p}{(}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{cax} \PYG{o}{=} \PYG{n}{divider}\PYG{o}{.}\PYG{n}{append\PYGZus{}axes}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{5}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{3}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{im}\PYG{p}{,} \PYG{n}{cax}\PYG{o}{=}\PYG{n}{cax}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_tight_layout_guide_017}.png} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.978 seconds) \phantomsection\label{\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-download-tutorials-intermediate-tight-layout-guide-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/intermediate/imshow_extent:sphx-glr-download-tutorials-intermediate-imshow-extent-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{\sphinxstyleemphasis{origin} and \sphinxstyleemphasis{extent} in \sphinxstyleliteralintitle{\sphinxupquote{imshow}}} \label{\detokenize{tutorials/intermediate/imshow_extent:origin-and-extent-in-imshow}}\label{\detokenize{tutorials/intermediate/imshow_extent:sphx-glr-tutorials-intermediate-imshow-extent-py}}\label{\detokenize{tutorials/intermediate/imshow_extent::doc}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} allows you to render an image (either a 2D array which will be color-mapped (based on \sphinxstyleemphasis{norm} and \sphinxstyleemphasis{cmap}) or and 3D RGB(A) array which will be used as-is) to a rectangular region in dataspace. The orientation of the image in the final rendering is controlled by the \sphinxstyleemphasis{origin} and \sphinxstyleemphasis{extent} kwargs (and attributes on the resulting {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} instance) and the data limits of the axes. The \sphinxstyleemphasis{extent} kwarg controls the bounding box in data coordinates that the image will fill specified as \sphinxcode{\sphinxupquote{(left, right, bottom, top)}} in \sphinxstylestrong{data coordinates}, the \sphinxstyleemphasis{origin} kwarg controls how the image fills that bounding box, and the orientation in the final rendered image is also affected by the axes limits. \begin{sphinxadmonition}{hint}{Hint:} Most of the code below is used for adding labels and informative text to the plots. The described effects of \sphinxstyleemphasis{origin} and \sphinxstyleemphasis{extent} can be seen in the plots without the need to follow all code details. For a quick understanding, you may want to skip the code details below and directly continue with the discussion of the results. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{gridspec} \PYG{k}{import} \PYG{n}{GridSpec} \PYG{k}{def} \PYG{n+nf}{index\PYGZus{}to\PYGZus{}coordinate}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Return the pixel center of an index.\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{extent} \PYG{n}{hshift} \PYG{o}{=} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sign}\PYG{p}{(}\PYG{n}{right} \PYG{o}{\PYGZhy{}} \PYG{n}{left}\PYG{p}{)} \PYG{n}{left}\PYG{p}{,} \PYG{n}{right} \PYG{o}{=} \PYG{n}{left} \PYG{o}{+} \PYG{n}{hshift}\PYG{p}{,} \PYG{n}{right} \PYG{o}{\PYGZhy{}} \PYG{n}{hshift} \PYG{n}{vshift} \PYG{o}{=} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sign}\PYG{p}{(}\PYG{n}{top} \PYG{o}{\PYGZhy{}} \PYG{n}{bottom}\PYG{p}{)} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{vshift}\PYG{p}{,} \PYG{n}{top} \PYG{o}{\PYGZhy{}} \PYG{n}{vshift} \PYG{k}{if} \PYG{n}{origin} \PYG{o}{==} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{top}\PYG{p}{,} \PYG{n}{bottom} \PYG{k}{return} \PYG{p}{\PYGZob{}} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{p}{\PYGZcb{}}\PYG{p}{[}\PYG{n}{index}\PYG{p}{]} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}index\PYGZus{}label\PYGZus{}pos}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{,} \PYG{n}{inverted\PYGZus{}xindex}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Return the desired position and horizontal alignment of an index label.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{if} \PYG{n}{extent} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{extent} \PYG{o}{=} \PYG{n}{lookup\PYGZus{}extent}\PYG{p}{(}\PYG{n}{origin}\PYG{p}{)} \PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{extent} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{index\PYGZus{}to\PYGZus{}coordinate}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{)} \PYG{n}{is\PYGZus{}x0} \PYG{o}{=} \PYG{n}{index}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{]} \PYG{o}{==} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0]}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{halign} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{is\PYGZus{}x0} \PYG{o}{\PYGZca{}} \PYG{n}{inverted\PYGZus{}xindex} \PYG{k}{else} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{hshift} \PYG{o}{=} \PYG{l+m+mf}{0.5} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sign}\PYG{p}{(}\PYG{n}{left} \PYG{o}{\PYGZhy{}} \PYG{n}{right}\PYG{p}{)} \PYG{n}{x} \PYG{o}{+}\PYG{o}{=} \PYG{n}{hshift} \PYG{o}{*} \PYG{p}{(}\PYG{l+m+mi}{1} \PYG{k}{if} \PYG{n}{is\PYGZus{}x0} \PYG{k}{else} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{return} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{halign} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}color}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{data}\PYG{p}{,} \PYG{n}{cmap}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Return the data color of an index.\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{val} \PYG{o}{=} \PYG{p}{\PYGZob{}} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{n}{data}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{n}{data}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{p}{\PYGZcb{}}\PYG{p}{[}\PYG{n}{index}\PYG{p}{]} \PYG{k}{return} \PYG{n}{cmap}\PYG{p}{(}\PYG{n}{val} \PYG{o}{/} \PYG{n}{data}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{lookup\PYGZus{}extent}\PYG{p}{(}\PYG{n}{origin}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Return extent for label positioning when not given explicitly.\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{if} \PYG{n}{origin} \PYG{o}{==} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k}{return} \PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{)} \PYG{k}{else}\PYG{p}{:} \PYG{k}{return} \PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}extent\PYGZus{}None\PYGZus{}text}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{equals}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{extent=None}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{large}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{plot\PYGZus{}imshow\PYGZus{}with\PYGZus{}labels}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{data}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{,} \PYG{n}{xlim}\PYG{p}{,} \PYG{n}{ylim}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Actually run {}`{}`imshow(){}`{}` and add extent and index labels.\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{im} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{origin}\PYG{o}{=}\PYG{n}{origin}\PYG{p}{,} \PYG{n}{extent}\PYG{o}{=}\PYG{n}{extent}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} extent labels (left, right, bottom, top)} \PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{im}\PYG{o}{.}\PYG{n}{get\PYGZus{}extent}\PYG{p}{(}\PYG{p}{)} \PYG{k}{if} \PYG{n}{xlim} \PYG{o+ow}{is} \PYG{k+kc}{None} \PYG{o+ow}{or} \PYG{n}{top} \PYG{o}{\PYGZgt{}} \PYG{n}{bottom}\PYG{p}{:} \PYG{n}{upper\PYGZus{}string}\PYG{p}{,} \PYG{n}{lower\PYGZus{}string} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{else}\PYG{p}{:} \PYG{n}{upper\PYGZus{}string}\PYG{p}{,} \PYG{n}{lower\PYGZus{}string} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{ylim} \PYG{o+ow}{is} \PYG{k+kc}{None} \PYG{o+ow}{or} \PYG{n}{left} \PYG{o}{\PYGZlt{}} \PYG{n}{right}\PYG{p}{:} \PYG{n}{port\PYGZus{}string}\PYG{p}{,} \PYG{n}{starboard\PYGZus{}string} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{inverted\PYGZus{}xindex} \PYG{o}{=} \PYG{k+kc}{False} \PYG{k}{else}\PYG{p}{:} \PYG{n}{port\PYGZus{}string}\PYG{p}{,} \PYG{n}{starboard\PYGZus{}string} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{inverted\PYGZus{}xindex} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{bbox\PYGZus{}kwargs} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{alpha}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{o}{.}\PYG{l+m+mi}{75}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxstyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round4}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{\PYGZcb{}} \PYG{n}{ann\PYGZus{}kwargs} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xycoords}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{textcoords}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{offset points}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bbox}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}kwargs}\PYG{p}{\PYGZcb{}} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{upper\PYGZus{}string}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{ann\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{lower\PYGZus{}string}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{ann\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{port\PYGZus{}string}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{90}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{ann\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{starboard\PYGZus{}string}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{90}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{ann\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{origin: }\PYG{l+s+si}{\PYGZob{}origin\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{origin}\PYG{o}{=}\PYG{n}{origin}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} index labels} \PYG{k}{for} \PYG{n}{index} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[0, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, 0]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{[M}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{, N}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{]}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{:} \PYG{n}{tx}\PYG{p}{,} \PYG{n}{ty}\PYG{p}{,} \PYG{n}{halign} \PYG{o}{=} \PYG{n}{get\PYGZus{}index\PYGZus{}label\PYGZus{}pos}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{,} \PYG{n}{inverted\PYGZus{}xindex}\PYG{p}{)} \PYG{n}{facecolor} \PYG{o}{=} \PYG{n}{get\PYGZus{}color}\PYG{p}{(}\PYG{n}{index}\PYG{p}{,} \PYG{n}{data}\PYG{p}{,} \PYG{n}{im}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{tx}\PYG{p}{,} \PYG{n}{ty}\PYG{p}{,} \PYG{n}{index}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{white}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{n}{halign}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxstyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{square}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{facecolor}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{k}{if} \PYG{n}{xlim}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{o}{*}\PYG{n}{xlim}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ylim}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{*}\PYG{n}{ylim}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{generate\PYGZus{}imshow\PYGZus{}demo\PYGZus{}grid}\PYG{p}{(}\PYG{n}{extents}\PYG{p}{,} \PYG{n}{xlim}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{ylim}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{n}{N} \PYG{o}{=} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{extents}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}size\PYGZus{}inches}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{n}{N} \PYG{o}{*} \PYG{p}{(}\PYG{l+m+mf}{11.25}\PYG{p}{)} \PYG{o}{/} \PYG{l+m+mi}{5}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{GridSpec}\PYG{p}{(}\PYG{n}{N}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{figure}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{)} \PYG{n}{columns} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{n}{j}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{n}{j}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{n}{j}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)}\PYG{p}{]}\PYG{p}{\PYGZcb{}} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ogrid}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{7}\PYG{p}{]} \PYG{n}{data} \PYG{o}{=} \PYG{n}{x} \PYG{o}{+} \PYG{n}{y} \PYG{k}{for} \PYG{n}{origin} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{:} \PYG{k}{for} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{extent} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{columns}\PYG{p}{[}\PYG{n}{origin}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extents}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plot\PYGZus{}imshow\PYGZus{}with\PYGZus{}labels}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{data}\PYG{p}{,} \PYG{n}{extent}\PYG{p}{,} \PYG{n}{origin}\PYG{p}{,} \PYG{n}{xlim}\PYG{p}{,} \PYG{n}{ylim}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{extent} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{columns}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extents}\PYG{p}{)}\PYG{p}{:} \PYG{n}{text\PYGZus{}kwargs} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ha}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{va}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xycoords}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xy}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{\PYGZcb{}} \PYG{k}{if} \PYG{n}{extent} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{None}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{text\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{extent=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{else}\PYG{p}{:} \PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{extent} \PYG{n}{text} \PYG{o}{=} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left: }\PYG{l+s+si}{\PYGZob{}left:0.1f\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{right: }\PYG{l+s+si}{\PYGZob{}right:0.1f\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom: }\PYG{l+s+si}{\PYGZob{}bottom:0.1f\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{top: }\PYG{l+s+si}{\PYGZob{}top:0.1f\PYGZcb{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(} \PYG{n}{left}\PYG{o}{=}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{o}{=}\PYG{n}{top}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{n}{text}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{text\PYGZus{}kwargs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{off}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{return} \PYG{n}{columns} \end{sphinxVerbatim} \subsubsection{Default extent} \label{\detokenize{tutorials/intermediate/imshow_extent:default-extent}} First, let's have a look at the default \sphinxcode{\sphinxupquote{extent=None}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{generate\PYGZus{}imshow\PYGZus{}demo\PYGZus{}grid}\PYG{p}{(}\PYG{n}{extents}\PYG{o}{=}\PYG{p}{[}\PYG{k+kc}{None}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_imshow_extent_001}.png} Generally, for an array of shape (M, N), the first index runs along the vertical, the second index runs along the horizontal. The pixel centers are at integer positions ranging from 0 to \sphinxcode{\sphinxupquote{N' = N - 1}} horizontally and from 0 to \sphinxcode{\sphinxupquote{M' = M - 1}} vertically. \sphinxstyleemphasis{origin} determines how to the data is filled in the bounding box. For \sphinxcode{\sphinxupquote{origin='lower'}}: \begin{itemize} \item {} {[}0, 0{]} is at (left, bottom) \item {} {[}M', 0{]} is at (left, top) \item {} {[}0, N'{]} is at (right, bottom) \item {} {[}M', N'{]} is at (right, top) \end{itemize} \sphinxcode{\sphinxupquote{origin='upper'}} reverses the vertical axes direction and filling: \begin{itemize} \item {} {[}0, 0{]} is at (left, top) \item {} {[}M', 0{]} is at (left, bottom) \item {} {[}0, N'{]} is at (right, top) \item {} {[}M', N'{]} is at (right, bottom) \end{itemize} In summary, the position of the {[}0, 0{]} index as well as the extent are influenced by \sphinxstyleemphasis{origin}: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily origin &\sphinxstyletheadfamily {[}0, 0{]} position &\sphinxstyletheadfamily extent \\ \hline upper & top left & \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, numrows-0.5, -0.5)}} \\ \hline lower & bottom left & \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, -0.5, numrows-0.5)}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The default value of \sphinxstyleemphasis{origin} is set by \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} which defaults to \sphinxcode{\sphinxupquote{'upper'}} to match the matrix indexing conventions in math and computer graphics image indexing conventions. \subsubsection{Explicit extent} \label{\detokenize{tutorials/intermediate/imshow_extent:explicit-extent}} By setting \sphinxstyleemphasis{extent} we define the coordinates of the image area. The underlying image data is interpolated/resampled to fill that area. If the axes is set to autoscale, then the view limits of the axes are set to match the \sphinxstyleemphasis{extent} which ensures that the coordinate set by \sphinxcode{\sphinxupquote{(left, bottom)}} is at the bottom left of the axes! However, this may invert the axis so they do not increase in the 'natural' direction. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{extents} \PYG{o}{=} \PYG{p}{[}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{6.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{5.5}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{]} \PYG{n}{columns} \PYG{o}{=} \PYG{n}{generate\PYGZus{}imshow\PYGZus{}demo\PYGZus{}grid}\PYG{p}{(}\PYG{n}{extents}\PYG{p}{)} \PYG{n}{set\PYGZus{}extent\PYGZus{}None\PYGZus{}text}\PYG{p}{(}\PYG{n}{columns}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{set\PYGZus{}extent\PYGZus{}None\PYGZus{}text}\PYG{p}{(}\PYG{n}{columns}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_imshow_extent_002}.png} \subsubsection{Explicit extent and axes limits} \label{\detokenize{tutorials/intermediate/imshow_extent:explicit-extent-and-axes-limits}} If we fix the axes limits by explicitly setting \sphinxcode{\sphinxupquote{set\_xlim}} / \sphinxcode{\sphinxupquote{set\_ylim}}, we force a certain size and orientation of the axes. This can decouple the 'left-right' and 'top-bottom' sense of the image from the orientation on the screen. In the example below we have chosen the limits slightly larger than the extent (note the white areas within the Axes). While we keep the extents as in the examples before, the coordinate (0, 0) is now explicitly put at the bottom left and values increase to up and to the right (from the viewer point of view). We can see that: \begin{itemize} \item {} The coordinate \sphinxcode{\sphinxupquote{(left, bottom)}} anchors the image which then fills the box going towards the \sphinxcode{\sphinxupquote{(right, top)}} point in data space. \item {} The first column is always closest to the 'left'. \item {} \sphinxstyleemphasis{origin} controls if the first row is closest to 'top' or 'bottom'. \item {} The image may be inverted along either direction. \item {} The 'left-right' and 'top-bottom' sense of the image may be uncoupled from the orientation on the screen. \end{itemize} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{generate\PYGZus{}imshow\PYGZus{}demo\PYGZus{}grid}\PYG{p}{(}\PYG{n}{extents}\PYG{o}{=}\PYG{p}{[}\PYG{k+kc}{None}\PYG{p}{]} \PYG{o}{+} \PYG{n}{extents}\PYG{p}{,} \PYG{n}{xlim}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ylim}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_imshow_extent_003}.png} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.154 seconds) \phantomsection\label{\detokenize{tutorials/intermediate/imshow_extent:sphx-glr-download-tutorials-intermediate-imshow-extent-py}} \section{Advanced} \label{\detokenize{tutorials/index:advanced}}\label{\detokenize{tutorials/index:tutorials-advanced}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-advanced}} These tutorials cover advanced topics for experienced Matplotlib users and developers. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/advanced/path_tutorial:sphx-glr-download-tutorials-advanced-path-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Path Tutorial} \label{\detokenize{tutorials/advanced/path_tutorial:path-tutorial}}\label{\detokenize{tutorials/advanced/path_tutorial:sphx-glr-tutorials-advanced-path-tutorial-py}}\label{\detokenize{tutorials/advanced/path_tutorial::doc}} Defining paths in your Matplotlib visualization. The object underlying all of the \sphinxcode{\sphinxupquote{matplotlib.patch}} objects is the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, which supports the standard set of moveto, lineto, curveto commands to draw simple and compound outlines consisting of line segments and splines. The \sphinxcode{\sphinxupquote{Path}} is instantiated with a (N,2) array of (x,y) vertices, and a N-length array of path codes. For example to draw the unit rectangle from (0,0) to (1,1), we could use this code \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{k}{import} \PYG{n}{Path} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{patches} \PYG{n}{verts} \PYG{o}{=} \PYG{p}{[} \PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} left, bottom} \PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} left, top} \PYG{p}{(}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} right, top} \PYG{p}{(}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} right, bottom} \PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} ignored} \PYG{p}{]} \PYG{n}{codes} \PYG{o}{=} \PYG{p}{[} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{MOVETO}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{CLOSEPOLY}\PYG{p}{,} \PYG{p}{]} \PYG{n}{path} \PYG{o}{=} \PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{PathPatch}\PYG{p}{(}\PYG{n}{path}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{orange}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_path_tutorial_001}.png} The following path codes are recognized \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Code &\sphinxstyletheadfamily Vertices &\sphinxstyletheadfamily Description \\ \hline \sphinxcode{\sphinxupquote{STOP}} & 1 (ignored) & A marker for the end of the entire path (currently not required and ignored) \\ \hline \sphinxcode{\sphinxupquote{MOVETO}} & 1 & Pick up the pen and move to the given vertex. \\ \hline \sphinxcode{\sphinxupquote{LINETO}} & 1 & Draw a line from the current position to the given vertex. \\ \hline \sphinxcode{\sphinxupquote{CURVE3}} & 2 (1 control point, 1 endpoint) & Draw a quadratic Bézier curve from the current position, with the given control point, to the given end point. \\ \hline \sphinxcode{\sphinxupquote{CURVE4}} & 3 (2 control points, 1 endpoint) & Draw a cubic Bézier curve from the current position, with the given control points, to the given end point. \\ \hline \sphinxcode{\sphinxupquote{CLOSEPOLY}} & 1 (point itself is ignored) & Draw a line segment to the start point of the current polyline. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsubsection{Bézier example} \label{\detokenize{tutorials/advanced/path_tutorial:bezier-example}} Some of the path components require multiple vertices to specify them: for example CURVE 3 is a \sphinxhref{https://en.wikipedia.org/wiki/B\%C3\%A9zier\_curve}{bézier} curve with one control point and one end point, and CURVE4 has three vertices for the two control points and the end point. The example below shows a CURVE4 Bézier spline -- the bézier curve will be contained in the convex hull of the start point, the two control points, and the end point \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{verts} \PYG{o}{=} \PYG{p}{[} \PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} P0} \PYG{p}{(}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} P1} \PYG{p}{(}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} P2} \PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{)}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} P3} \PYG{p}{]} \PYG{n}{codes} \PYG{o}{=} \PYG{p}{[} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{MOVETO}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{CURVE4}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{CURVE4}\PYG{p}{,} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{CURVE4}\PYG{p}{,} \PYG{p}{]} \PYG{n}{path} \PYG{o}{=} \PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{PathPatch}\PYG{p}{(}\PYG{n}{path}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{none}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \PYG{n}{xs}\PYG{p}{,} \PYG{n}{ys} \PYG{o}{=} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{o}{*}\PYG{n}{verts}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{xs}\PYG{p}{,} \PYG{n}{ys}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ms}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{P0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{l+m+mf}{1.05}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{P1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{1.05}\PYG{p}{,} \PYG{l+m+mf}{0.85}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{P2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.85}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{P3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{1.1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{1.1}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_path_tutorial_002}.png} \subsubsection{Compound paths} \label{\detokenize{tutorials/advanced/path_tutorial:compound-paths}} All of the simple patch primitives in matplotlib, Rectangle, Circle, Polygon, etc, are implemented with simple path. Plotting functions like {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}}, which create a number of primitives, e.g., a bunch of Rectangles, can usually be implemented more efficiently using a compound path. The reason \sphinxcode{\sphinxupquote{bar}} creates a list of rectangles and not a compound path is largely historical: the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} code is comparatively new and \sphinxcode{\sphinxupquote{bar}} predates it. While we could change it now, it would break old code, so here we will cover how to create compound paths, replacing the functionality in bar, in case you need to do so in your own code for efficiency reasons, e.g., you are creating an animated bar plot. We will make the histogram chart by creating a series of rectangles for each histogram bar: the rectangle width is the bin width and the rectangle height is the number of datapoints in that bin. First we'll create some random normally distributed data and compute the histogram. Because numpy returns the bin edges and not centers, the length of \sphinxcode{\sphinxupquote{bins}} is 1 greater than the length of \sphinxcode{\sphinxupquote{n}} in the example below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} histogram our data with numpy} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \end{sphinxVerbatim} We'll now extract the corners of the rectangles. Each of the \sphinxcode{\sphinxupquote{left}}, \sphinxcode{\sphinxupquote{bottom}}, etc, arrays below is \sphinxcode{\sphinxupquote{len(n)}}, where \sphinxcode{\sphinxupquote{n}} is the array of counts for each histogram bar: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} get the corners of the rectangles for the histogram} \PYG{n}{left} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{right} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{left}\PYG{p}{)}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{n} \end{sphinxVerbatim} Now we have to construct our compound path, which will consist of a series of \sphinxcode{\sphinxupquote{MOVETO}}, \sphinxcode{\sphinxupquote{LINETO}} and \sphinxcode{\sphinxupquote{CLOSEPOLY}} for each rectangle. For each rectangle, we need 5 vertices: 1 for the \sphinxcode{\sphinxupquote{MOVETO}}, 3 for the \sphinxcode{\sphinxupquote{LINETO}}, and 1 for the \sphinxcode{\sphinxupquote{CLOSEPOLY}}. As indicated in the table above, the vertex for the closepoly is ignored but we still need it to keep the codes aligned with the vertices: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{nverts} \PYG{o}{=} \PYG{n}{nrects}\PYG{o}{*}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{o}{+}\PYG{l+m+mi}{3}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{verts} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{codes} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ones}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{n+nb}{int}\PYG{p}{)} \PYG{o}{*} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{MOVETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{CLOSEPOLY} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \end{sphinxVerbatim} All that remains is to create the path, attach it to a \sphinxcode{\sphinxupquote{PathPatch}}, and add it to our axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{barpath} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{)} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{PathPatch}\PYG{p}{(}\PYG{n}{barpath}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{patches} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{k}{as} \PYG{n+nn}{path} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} histogram our data with numpy} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get the corners of the rectangles for the histogram} \PYG{n}{left} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{right} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{left}\PYG{p}{)}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{n} \PYG{n}{nrects} \PYG{o}{=} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{left}\PYG{p}{)} \PYG{n}{nverts} \PYG{o}{=} \PYG{n}{nrects}\PYG{o}{*}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{o}{+}\PYG{l+m+mi}{3}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{verts} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{codes} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ones}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{n+nb}{int}\PYG{p}{)} \PYG{o}{*} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{MOVETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{CLOSEPOLY} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \PYG{n}{barpath} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{)} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{PathPatch}\PYG{p}{(}\PYG{n}{barpath}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{right}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{.}\PYG{n}{min}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{top}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_path_tutorial_003}.png} \phantomsection\label{\detokenize{tutorials/advanced/path_tutorial:sphx-glr-download-tutorials-advanced-path-tutorial-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-download-tutorials-advanced-patheffects-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Path effects guide} \label{\detokenize{tutorials/advanced/patheffects_guide:path-effects-guide}}\label{\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-tutorials-advanced-patheffects-guide-py}}\label{\detokenize{tutorials/advanced/patheffects_guide::doc}} Defining paths that objects follow on a canvas. \phantomsection\label{\detokenize{tutorials/advanced/patheffects_guide:module-matplotlib.patheffects}}\index{matplotlib.patheffects (module)@\spxentry{matplotlib.patheffects}\spxextra{module}} Matplotlib's {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:module-matplotlib.patheffects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patheffects}}}}} module provides functionality to apply a multiple draw stage to any Artist which can be rendered via a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}. Artists which can have a path effect applied to them include {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} and even {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. Each artist's path effects can be controlled via the \sphinxcode{\sphinxupquote{set\_path\_effects}} method ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_path\_effects}}}}}), which takes an iterable of {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} instances. The simplest path effect is the {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Normal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normal}}}}} effect, which simply draws the artist without any effect: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patheffects} \PYG{k}{as} \PYG{n+nn}{path\PYGZus{}effects} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{text} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Hello path effects world!}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{This is the normal }\PYG{l+s+s1}{\PYGZsq{}} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{path effect.}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{Pretty dull, huh?}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{)} \PYG{n}{text}\PYG{o}{.}\PYG{n}{set\PYGZus{}path\PYGZus{}effects}\PYG{p}{(}\PYG{p}{[}\PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{Normal}\PYG{p}{(}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_patheffects_guide_001}.png} Whilst the plot doesn't look any different to what you would expect without any path effects, the drawing of the text now been changed to use the path effects framework, opening up the possibilities for more interesting examples. \subsubsection{Adding a shadow} \label{\detokenize{tutorials/advanced/patheffects_guide:adding-a-shadow}} A far more interesting path effect than {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Normal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normal}}}}} is the drop-shadow, which we can apply to any of our path based artists. The classes {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimplePatchShadow}}}}} and {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimpleLineShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimpleLineShadow}}}}} do precisely this by drawing either a filled patch or a line patch below the original artist: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patheffects} \PYG{k}{as} \PYG{n+nn}{path\PYGZus{}effects} \PYG{n}{text} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Hello path effects world!}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{path\PYGZus{}effects}\PYG{o}{=}\PYG{p}{[}\PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{withSimplePatchShadow}\PYG{p}{(}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{]}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{path\PYGZus{}effects}\PYG{o}{=}\PYG{p}{[}\PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{SimpleLineShadow}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{Normal}\PYG{p}{(}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_patheffects_guide_002}.png} Notice the two approaches to setting the path effects in this example. The first uses the \sphinxcode{\sphinxupquote{with*}} classes to include the desired functionality automatically followed with the "normal" effect, whereas the latter explicitly defines the two path effects to draw. \subsubsection{Making an artist stand out} \label{\detokenize{tutorials/advanced/patheffects_guide:making-an-artist-stand-out}} One nice way of making artists visually stand out is to draw an outline in a bold color below the actual artist. The {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Stroke}}}}} path effect makes this a relatively simple task: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{text} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This text stands out because of}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{\PYGZsq{}} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{its black border.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{white}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{)} \PYG{n}{text}\PYG{o}{.}\PYG{n}{set\PYGZus{}path\PYGZus{}effects}\PYG{p}{(}\PYG{p}{[}\PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{Stroke}\PYG{p}{(}\PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{foreground}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{Normal}\PYG{p}{(}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_patheffects_guide_003}.png} It is important to note that this effect only works because we have drawn the text path twice; once with a thick black line, and then once with the original text path on top. You may have noticed that the keywords to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Stroke}}}}} and {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimplePatchShadow}}}}} and {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimpleLineShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimpleLineShadow}}}}} are not the usual Artist keywords (such as \sphinxcode{\sphinxupquote{facecolor}} and \sphinxcode{\sphinxupquote{edgecolor}} etc.). This is because with these path effects we are operating at lower level of matplotlib. In fact, the keywords which are accepted are those for a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}} instance, which have been designed for making it easy to create new backends - and not for its user interface. \subsubsection{Greater control of the path effect artist} \label{\detokenize{tutorials/advanced/patheffects_guide:greater-control-of-the-path-effect-artist}} As already mentioned, some of the path effects operate at a lower level than most users will be used to, meaning that setting keywords such as \sphinxcode{\sphinxupquote{facecolor}} and \sphinxcode{\sphinxupquote{edgecolor}} raise an AttributeError. Luckily there is a generic {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathPatchEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatchEffect}}}}} path effect which creates a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}} class with the original path. The keywords to this effect are identical to those of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.02}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Hatch shadow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{75}\PYG{p}{,} \PYG{n}{weight}\PYG{o}{=}\PYG{l+m+mi}{1000}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{t}\PYG{o}{.}\PYG{n}{set\PYGZus{}path\PYGZus{}effects}\PYG{p}{(}\PYG{p}{[}\PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{PathPatchEffect}\PYG{p}{(}\PYG{n}{offset}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{hatch}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xxxx}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{path\PYGZus{}effects}\PYG{o}{.}\PYG{n}{PathPatchEffect}\PYG{p}{(}\PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{white}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mf}{1.1}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_patheffects_guide_004}.png} \phantomsection\label{\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-download-tutorials-advanced-patheffects-guide-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-download-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Transformations Tutorial} \label{\detokenize{tutorials/advanced/transforms_tutorial:transformations-tutorial}}\label{\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}}\label{\detokenize{tutorials/advanced/transforms_tutorial::doc}} Like any graphics packages, Matplotlib is built on top of a transformation framework to easily move between coordinate systems, the userland \sphinxcode{\sphinxupquote{data}} coordinate system, the \sphinxcode{\sphinxupquote{axes}} coordinate system, the \sphinxcode{\sphinxupquote{figure}} coordinate system, and the \sphinxcode{\sphinxupquote{display}} coordinate system. In 95\% of your plotting, you won't need to think about this, as it happens under the hood, but as you push the limits of custom figure generation, it helps to have an understanding of these objects so you can reuse the existing transformations Matplotlib makes available to you, or create your own (see {\hyperref[\detokenize{api/transformations:module-matplotlib.transforms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms}}}}}). The table below summarizes the some useful coordinate systems, the transformation object you should use to work in that coordinate system, and the description of that system. In the \sphinxcode{\sphinxupquote{Transformation Object}} column, \sphinxcode{\sphinxupquote{ax}} is a {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance, and \sphinxcode{\sphinxupquote{fig}} is a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Coordinates &\sphinxstyletheadfamily Transformation object &\sphinxstyletheadfamily Description \\ \hline "data" & \sphinxcode{\sphinxupquote{ax.transData}} & The coordinate system for the data, controlled by xlim and ylim. \\ \hline "axes" & \sphinxcode{\sphinxupquote{ax.transAxes}} & The coordinate system of the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}; (0, 0) is bottom left of the axes, and (1, 1) is top right of the axes. \\ \hline "figure" & \sphinxcode{\sphinxupquote{fig.transFigure}} & The coordinate system of the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}; (0, 0) is bottom left of the figure, and (1, 1) is top right of the figure. \\ \hline "figure-inches" & \sphinxcode{\sphinxupquote{fig.dpi\_scale\_trans}} & The coordinate system of the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} in inches; (0, 0) is bottom left of the figure, and (width, height) is the top right of the figure in inches. \\ \hline "display" & \sphinxcode{\sphinxupquote{None}}, or \sphinxcode{\sphinxupquote{IdentityTransform()}} & The pixel coordinate system of the display window; (0, 0) is bottom left of the window, and (width, height) is top right of the display window in pixels. \\ \hline "xaxis", "yaxis" & \sphinxcode{\sphinxupquote{ax.get\_xaxis\_transform()}}, \sphinxcode{\sphinxupquote{ax.get\_yaxis\_transform()}} & Blended coordinate systems; use data coordinates on one of the axis and axes coordinates on the other. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} All of the transformation objects in the table above take inputs in their coordinate system, and transform the input to the \sphinxcode{\sphinxupquote{display}} coordinate system. That is why the \sphinxcode{\sphinxupquote{display}} coordinate system has \sphinxcode{\sphinxupquote{None}} for the \sphinxcode{\sphinxupquote{Transformation Object}} column -- it already is in display coordinates. The transformations also know how to invert themselves, to go from \sphinxcode{\sphinxupquote{display}} back to the native coordinate system. This is particularly useful when processing events from the user interface, which typically occur in display space, and you want to know where the mouse click or key-press occurred in your data coordinate system. Note that specifying objects in \sphinxcode{\sphinxupquote{display}} coordinates will change their location if the \sphinxcode{\sphinxupquote{dpi}} of the figure changes. This can cause confusion when printing or changing screen resolution, because the object can change location and size. Therefore it is most common for artists placed in an axes or figure to have their transform set to something \sphinxstyleemphasis{other} than the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IdentityTransform()}}}}}; the default when an artist is placed on an axes using \sphinxcode{\sphinxupquote{add\_artist}} is for the transform to be \sphinxcode{\sphinxupquote{ax.transData}}. \subsubsection{Data coordinates} \label{\detokenize{tutorials/advanced/transforms_tutorial:data-coordinates}}\label{\detokenize{tutorials/advanced/transforms_tutorial:data-coords}} Let's start with the most commonly used coordinate, the \sphinxcode{\sphinxupquote{data}} coordinate system. Whenever you add data to the axes, Matplotlib updates the datalimits, most commonly updated with the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} methods. For example, in the figure below, the data limits stretch from 0 to 10 on the x-axis, and -1 to 1 on the y-axis. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{mpatches} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mf}{0.005}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{x}\PYG{o}{/}\PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_001}.png} You can use the \sphinxcode{\sphinxupquote{ax.transData}} instance to transform from your \sphinxcode{\sphinxupquote{data}} to your \sphinxcode{\sphinxupquote{display}} coordinate system, either a single point or a sequence of points as shown below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [14]: }\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \PYG{g+gh}{Out[14]: }\PYG{g+go}{\PYGZlt{}class \PYGZsq{}matplotlib.transforms.CompositeGenericTransform\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{In [15]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[15]: }\PYG{g+go}{array([ 335.175, 247. ])} \PYG{g+gp}{In [16]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{[}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{g+gh}{Out[16]:} \PYG{g+go}{array([[ 335.175, 247. ],} \PYG{g+go}{ [ 132.435, 642.2 ]])} \end{sphinxVerbatim} You can use the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inverted()}}}}} method to create a transform which will take you from display to data coordinates: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [41]: }\PYG{n}{inv} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{inverted}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{In [42]: }\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{inv}\PYG{p}{)} \PYG{g+gh}{Out[42]: }\PYG{g+go}{\PYGZlt{}class \PYGZsq{}matplotlib.transforms.CompositeGenericTransform\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{In [43]: }\PYG{n}{inv}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{335.175}\PYG{p}{,} \PYG{l+m+mf}{247.}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[43]: }\PYG{g+go}{array([ 5., 0.])} \end{sphinxVerbatim} If your are typing along with this tutorial, the exact values of the display coordinates may differ if you have a different window size or dpi setting. Likewise, in the figure below, the display labeled points are probably not the same as in the ipython session because the documentation figure size defaults are different. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mf}{0.005}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{x}\PYG{o}{/}\PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata} \PYG{o}{=} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0} \PYG{n}{xdisplay}\PYG{p}{,} \PYG{n}{ydisplay} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform\PYGZus{}point}\PYG{p}{(}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n}{bbox} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{boxstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0.8}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{arrowprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(} \PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{connectionstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{angle,angleA=0,angleB=90,rad=10}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{offset} \PYG{o}{=} \PYG{l+m+mi}{72} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{data = (}\PYG{l+s+si}{\PYGZpc{}.1f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}.1f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{offset}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{offset points}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n}{bbox}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n}{arrowprops}\PYG{p}{)} \PYG{n}{disp} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{display = (}\PYG{l+s+si}{\PYGZpc{}.1f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}.1f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{xdisplay}\PYG{p}{,} \PYG{n}{ydisplay}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{xdisplay}\PYG{p}{,} \PYG{n}{ydisplay}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{n}{offset}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{n}{offset}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure pixels}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{offset points}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n}{bbox}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n}{arrowprops}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_002}.png} \begin{sphinxadmonition}{note}{Note:} If you run the source code in the example above in a GUI backend, you may also find that the two arrows for the \sphinxcode{\sphinxupquote{data}} and \sphinxcode{\sphinxupquote{display}} annotations do not point to exactly the same point. This is because the display point was computed before the figure was displayed, and the GUI backend may slightly resize the figure when it is created. The effect is more pronounced if you resize the figure yourself. This is one good reason why you rarely want to work in display space, but you can connect to the \sphinxcode{\sphinxupquote{'on\_draw'}} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} to update figure coordinates on figure draws; see {\hyperref[\detokenize{users/event_handling:event-handling-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Event handling and picking}}}}. \end{sphinxadmonition} When you change the x or y limits of your axes, the data limits are updated so the transformation yields a new display point. Note that when we just change the ylim, only the y-display coordinate is altered, and when we change the xlim too, both are altered. More on this later when we talk about the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [54]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[54]: }\PYG{g+go}{array([ 335.175, 247. ])} \PYG{g+gp}{In [55]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{g+gh}{Out[55]: }\PYG{g+go}{(\PYGZhy{}1, 2)} \PYG{g+gp}{In [56]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[56]: }\PYG{g+go}{array([ 335.175 , 181.13333333])} \PYG{g+gp}{In [57]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{)} \PYG{g+gh}{Out[57]: }\PYG{g+go}{(10, 20)} \PYG{g+gp}{In [58]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[58]: }\PYG{g+go}{array([\PYGZhy{}171.675 , 181.13333333])} \end{sphinxVerbatim} \subsubsection{Axes coordinates} \label{\detokenize{tutorials/advanced/transforms_tutorial:axes-coordinates}}\label{\detokenize{tutorials/advanced/transforms_tutorial:axes-coords}} After the \sphinxcode{\sphinxupquote{data}} coordinate system, \sphinxcode{\sphinxupquote{axes}} is probably the second most useful coordinate system. Here the point (0, 0) is the bottom left of your axes or subplot, (0.5, 0.5) is the center, and (1.0, 1.0) is the top right. You can also refer to points outside the range, so (-0.1, 1.1) is to the left and above your axes. This coordinate system is extremely useful when placing text in your axes, because you often want a text bubble in a fixed, location, e.g., the upper left of the axes pane, and have that location remain fixed when you pan or zoom. Here is a simple example that creates four panels and labels them 'A', 'B', 'C', 'D' as you often see in journals. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i}\PYG{p}{,} \PYG{n}{label} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{B}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{D}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{l+m+mf}{0.95}\PYG{p}{,} \PYG{n}{label}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{16}\PYG{p}{,} \PYG{n}{fontweight}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_003}.png} You can also make lines or patches in the axes coordinate system, but this is less useful in my experience than using \sphinxcode{\sphinxupquote{ax.transAxes}} for placing text. Nonetheless, here is a silly example which plots some random dots in \sphinxcode{\sphinxupquote{data}} space, and overlays a semi-transparent {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Circle}}}}} centered in the middle of the axes with a radius one quarter of the axes -- if your axes does not preserve aspect ratio (see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_aspect()}}}}}), this will look like an ellipse. Use the pan/zoom tool to move around, or manually change the data xlim and ylim, and you will see the data move, but the circle will remain fixed because it is not in \sphinxcode{\sphinxupquote{data}} coordinates and will always remain at the center of the axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{l+m+mi}{10}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot some data in data coordinates} \PYG{n}{circ} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{circ}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_004}.png} \subsubsection{Blended transformations} \label{\detokenize{tutorials/advanced/transforms_tutorial:blended-transformations}}\label{\detokenize{tutorials/advanced/transforms_tutorial:id1}} Drawing in \sphinxcode{\sphinxupquote{blended}} coordinate spaces which mix \sphinxcode{\sphinxupquote{axes}} with \sphinxcode{\sphinxupquote{data}} coordinates is extremely useful, for example to create a horizontal span which highlights some region of the y-data but spans across the x-axis regardless of the data limits, pan or zoom level, etc. In fact these blended lines and spans are so useful, we have built in functions to make them easy to plot (see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:matplotlib.axes.Axes.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvline()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib.axes.Axes.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib.axes.Axes.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan()}}}}}) but for didactic purposes we will implement the horizontal span here using a blended transformation. This trick only works for separable transformations, like you see in normal Cartesian coordinate systems, but not on inseparable transformations like the {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolarTransform}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{transforms} \PYG{k}{as} \PYG{n+nn}{transforms} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sigma=1 }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{/ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{dots }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{/ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sigma=2\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{16}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the x coords of this transformation are data, and the} \PYG{c+c1}{\PYGZsh{} y coord are axes} \PYG{n}{trans} \PYG{o}{=} \PYG{n}{transforms}\PYG{o}{.}\PYG{n}{blended\PYGZus{}transform\PYGZus{}factory}\PYG{p}{(} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} highlight the 1..2 stddev region with a span.} \PYG{c+c1}{\PYGZsh{} We want x to be in data coordinates and y to} \PYG{c+c1}{\PYGZsh{} span from 0..1 in axes coords} \PYG{n}{rect} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{trans}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_005}.png} \begin{sphinxadmonition}{note}{Note:} The blended transformations where x is in data coords and y in axes coordinates is so useful that we have helper methods to return the versions mpl uses internally for drawing ticks, ticklabels, etc. The methods are {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform:matplotlib.axes.Axes.get_xaxis_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_xaxis\_transform()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform:matplotlib.axes.Axes.get_yaxis_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_yaxis\_transform()}}}}}. So in the example above, the call to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.blended_transform_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{blended\_transform\_factory()}}}}} can be replaced by \sphinxcode{\sphinxupquote{get\_xaxis\_transform}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{trans} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xaxis\PYGZus{}transform}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{sphinxadmonition} \subsubsection{Plotting in physical units} \label{\detokenize{tutorials/advanced/transforms_tutorial:plotting-in-physical-units}}\label{\detokenize{tutorials/advanced/transforms_tutorial:transforms-fig-scale-dpi}} Sometimes we want an object to be a certain physical size on the plot. Here we draw the same circle as above, but in physical units. If done interactively, you can see that changing the size of the figure does not change the offset of the circle from the lower-left corner, does not change its size, and the circle remains a circle regardless of the aspect ratio of the axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{l+m+mi}{10}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{o}{*}\PYG{l+m+mf}{10.}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot some data in data coordinates} \PYG{c+c1}{\PYGZsh{} add a circle in fixed\PYGZhy{}units} \PYG{n}{circ} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{dpi\PYGZus{}scale\PYGZus{}trans}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{circ}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_006}.png} If we change the figure size, the circle does not change its absolute position and is cropped. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{l+m+mi}{10}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{o}{*}\PYG{l+m+mf}{10.}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot some data in data coordinates} \PYG{c+c1}{\PYGZsh{} add a circle in fixed\PYGZhy{}units} \PYG{n}{circ} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{dpi\PYGZus{}scale\PYGZus{}trans}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{circ}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_007}.png} Another use is putting a patch with a set physical dimension around a data point on the axes. Here we add together two transforms. The first sets the scaling of how large the ellipse should be and the second sets its position. The ellipse is then placed at the origin, and then we use the helper transform {\hyperref[\detokenize{api/transformations:matplotlib.transforms.ScaledTranslation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaledTranslation}}}}} to move it to the right place in the \sphinxcode{\sphinxupquote{ax.transData}} coordinate system. This helper is instantiated with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{trans} \PYG{o}{=} \PYG{n}{ScaledTranslation}\PYG{p}{(}\PYG{n}{xt}\PYG{p}{,} \PYG{n}{yt}\PYG{p}{,} \PYG{n}{scale\PYGZus{}trans}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{xt}} and \sphinxcode{\sphinxupquote{yt}} are the translation offsets, and \sphinxcode{\sphinxupquote{scale\_trans}} is a transformation which scales \sphinxcode{\sphinxupquote{xt}} and \sphinxcode{\sphinxupquote{yt}} at transformation time before applying the offsets. Note the use of the plus operator on the transforms below. This code says: first apply the scale transformation \sphinxcode{\sphinxupquote{fig.dpi\_scale\_trans}} to make the ellipse the proper size, but still centered at (0, 0), and then translate the data to \sphinxcode{\sphinxupquote{xdata{[}0{]}}} and \sphinxcode{\sphinxupquote{ydata{[}0{]}}} in data space. In interactive use, the ellipse stays the same size even if the axes limits are changed via zoom. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.7}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{o}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{trans} \PYG{o}{=} \PYG{p}{(}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{dpi\PYGZus{}scale\PYGZus{}trans} \PYG{o}{+} \PYG{n}{transforms}\PYG{o}{.}\PYG{n}{ScaledTranslation}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot an ellipse around the point that is 150 x 130 points in diameter...} \PYG{n}{circle} \PYG{o}{=} \PYG{n}{mpatches}\PYG{o}{.}\PYG{n}{Ellipse}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{150}\PYG{o}{/}\PYG{l+m+mi}{72}\PYG{p}{,} \PYG{l+m+mi}{130}\PYG{o}{/}\PYG{l+m+mi}{72}\PYG{p}{,} \PYG{n}{angle}\PYG{o}{=}\PYG{l+m+mi}{40}\PYG{p}{,} \PYG{n}{fill}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{trans}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{circle}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_008}.png} \begin{sphinxadmonition}{note}{Note:} The order of transformation matters. Here the ellipse is given the right dimensions in display space \sphinxstyleemphasis{first} and then moved in data space to the correct spot. If we had done the \sphinxcode{\sphinxupquote{ScaledTranslation}} first, then \sphinxcode{\sphinxupquote{xdata{[}0{]}}} and \sphinxcode{\sphinxupquote{ydata{[}0{]}}} would first be transformed to \sphinxcode{\sphinxupquote{display}} coordinates (\sphinxcode{\sphinxupquote{{[} 358.4 475.2{]}}} on a 200-dpi monitor) and then those coordinates would be scaled by \sphinxcode{\sphinxupquote{fig.dpi\_scale\_trans}} pushing the center of the ellipse well off the screen (i.e. \sphinxcode{\sphinxupquote{{[} 71680. 95040.{]}}}). \end{sphinxadmonition} \subsubsection{Using offset transforms to create a shadow effect} \label{\detokenize{tutorials/advanced/transforms_tutorial:using-offset-transforms-to-create-a-shadow-effect}}\label{\detokenize{tutorials/advanced/transforms_tutorial:offset-transforms-shadow}} Another use of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.ScaledTranslation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaledTranslation}}}}} is to create a new transformation that is offset from another transformation, e.g., to place one object shifted a bit relative to another object. Typically you want the shift to be in some physical dimension, like points or inches rather than in data coordinates, so that the shift effect is constant at different zoom levels and dpi settings. One use for an offset is to create a shadow effect, where you draw one object identical to the first just to the right of it, and just below it, adjusting the zorder to make sure the shadow is drawn first and then the object it is shadowing above it. Here we apply the transforms in the \sphinxstyleemphasis{opposite} order to the use of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.ScaledTranslation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaledTranslation}}}}} above. The plot is first made in data units (\sphinxcode{\sphinxupquote{ax.transData}}) and then shifted by \sphinxcode{\sphinxupquote{dx}} and \sphinxcode{\sphinxupquote{dy}} points using \sphinxcode{\sphinxupquote{fig.dpi\_scale\_trans}}. (In typography, a{}`point \textless{}\sphinxurl{https://en.wikipedia.org/wiki/Point\_\%28typography\%29}\textgreater{}{}`\_ is 1/72 inches, and by specifying your offsets in points, your figure will look the same regardless of the dpi resolution it is saved in.) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make a simple sine wave} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} shift the object over 2 points, and down 2 points} \PYG{n}{dx}\PYG{p}{,} \PYG{n}{dy} \PYG{o}{=} \PYG{l+m+mi}{2}\PYG{o}{/}\PYG{l+m+mf}{72.}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{o}{/}\PYG{l+m+mf}{72.} \PYG{n}{offset} \PYG{o}{=} \PYG{n}{transforms}\PYG{o}{.}\PYG{n}{ScaledTranslation}\PYG{p}{(}\PYG{n}{dx}\PYG{p}{,} \PYG{n}{dy}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{dpi\PYGZus{}scale\PYGZus{}trans}\PYG{p}{)} \PYG{n}{shadow\PYGZus{}transform} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData} \PYG{o}{+} \PYG{n}{offset} \PYG{c+c1}{\PYGZsh{} now plot the same data with our offset transform;} \PYG{c+c1}{\PYGZsh{} use the zorder to make sure we are below the line} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{shadow\PYGZus{}transform}\PYG{p}{,} \PYG{n}{zorder}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{n}{line}\PYG{o}{.}\PYG{n}{get\PYGZus{}zorder}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{creating a shadow effect with an offset transform}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_transforms_tutorial_009}.png} \begin{sphinxadmonition}{note}{Note:} The dpi and inches offset is a common-enough use case that we have a special helper function to create it in {\hyperref[\detokenize{api/transformations:matplotlib.transforms.offset_copy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.offset\_copy()}}}}}, which returns a new transform with an added offset. So above we could have done: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{shadow\PYGZus{}transform} \PYG{o}{=} \PYG{n}{transforms}\PYG{o}{.}\PYG{n}{offset\PYGZus{}copy}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{dx}\PYG{p}{,} \PYG{n}{dy}\PYG{p}{,} \PYG{n}{units}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{inches}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \end{sphinxadmonition} \subsubsection{The transformation pipeline} \label{\detokenize{tutorials/advanced/transforms_tutorial:the-transformation-pipeline}}\label{\detokenize{tutorials/advanced/transforms_tutorial:transformation-pipeline}} The \sphinxcode{\sphinxupquote{ax.transData}} transform we have been working with in this tutorial is a composite of three different transformations that comprise the transformation pipeline from \sphinxcode{\sphinxupquote{data}} -\textgreater{} \sphinxcode{\sphinxupquote{display}} coordinates. Michael Droettboom implemented the transformations framework, taking care to provide a clean API that segregated the nonlinear projections and scales that happen in polar and logarithmic plots, from the linear affine transformations that happen when you pan and zoom. There is an efficiency here, because you can pan and zoom in your axes which affects the affine transformation, but you may not need to compute the potentially expensive nonlinear scales or projections on simple navigation events. It is also possible to multiply affine transformation matrices together, and then apply them to coordinates in one step. This is not true of all possible transformations. Here is how the \sphinxcode{\sphinxupquote{ax.transData}} instance is defined in the basic separable axis {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} class: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transData} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transScale} \PYG{o}{+} \PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transLimits} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} We've been introduced to the \sphinxcode{\sphinxupquote{transAxes}} instance above in {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:axes-coords}]{\sphinxcrossref{\DUrole{std,std-ref}{Axes coordinates}}}}, which maps the (0, 0), (1, 1) corners of the axes or subplot bounding box to \sphinxcode{\sphinxupquote{display}} space, so let's look at these other two pieces. \sphinxcode{\sphinxupquote{self.transLimits}} is the transformation that takes you from \sphinxcode{\sphinxupquote{data}} to \sphinxcode{\sphinxupquote{axes}} coordinates; i.e., it maps your view xlim and ylim to the unit space of the axes (and \sphinxcode{\sphinxupquote{transAxes}} then takes that unit space to display space). We can see this in action here \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [80]: }\PYG{n}{ax} \PYG{o}{=} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{g+gp}{In [81]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{g+gh}{Out[81]: }\PYG{g+go}{(0, 10)} \PYG{g+gp}{In [82]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{g+gh}{Out[82]: }\PYG{g+go}{(\PYGZhy{}1, 1)} \PYG{g+gp}{In [84]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transLimits}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[84]: }\PYG{g+go}{array([ 0., 0.])} \PYG{g+gp}{In [85]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transLimits}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[85]: }\PYG{g+go}{array([ 1., 0.])} \PYG{g+gp}{In [86]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transLimits}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[86]: }\PYG{g+go}{array([ 1., 1.])} \PYG{g+gp}{In [87]: }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transLimits}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[87]: }\PYG{g+go}{array([ 0.5, 0.5])} \end{sphinxVerbatim} and we can use this same inverted transformation to go from the unit \sphinxcode{\sphinxupquote{axes}} coordinates back to \sphinxcode{\sphinxupquote{data}} coordinates. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [90]: }\PYG{n}{inv}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.25}\PYG{p}{)}\PYG{p}{)} \PYG{g+gh}{Out[90]: }\PYG{g+go}{array([ 2.5, \PYGZhy{}0.5])} \end{sphinxVerbatim} The final piece is the \sphinxcode{\sphinxupquote{self.transScale}} attribute, which is responsible for the optional non-linear scaling of the data, e.g., for logarithmic axes. When an Axes is initially setup, this is just set to the identity transform, since the basic Matplotlib axes has linear scale, but when you call a logarithmic scaling function like {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogx:matplotlib.axes.Axes.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogx()}}}}} or explicitly set the scale to logarithmic with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xscale()}}}}}, then the \sphinxcode{\sphinxupquote{ax.transScale}} attribute is set to handle the nonlinear projection. The scales transforms are properties of the respective \sphinxcode{\sphinxupquote{xaxis}} and \sphinxcode{\sphinxupquote{yaxis}} {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} instances. For example, when you call \sphinxcode{\sphinxupquote{ax.set\_xscale('log')}}, the xaxis updates its scale to a {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} instance. For non-separable axes the PolarAxes, there is one more piece to consider, the projection transformation. The \sphinxcode{\sphinxupquote{transData}} {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar.PolarAxes}}}}} is similar to that for the typical separable matplotlib Axes, with one additional piece \sphinxcode{\sphinxupquote{transProjection}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transData} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transScale} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transProjection} \PYG{o}{+} \PYGZbs{} \PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transProjectionAffine} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{transProjection}} handles the projection from the space, e.g., latitude and longitude for map data, or radius and theta for polar data, to a separable Cartesian coordinate system. There are several projection examples in the \sphinxcode{\sphinxupquote{matplotlib.projections}} package, and the best way to learn more is to open the source for those packages and see how to make your own, since Matplotlib supports extensible axes and projections. Michael Droettboom has provided a nice tutorial example of creating a Hammer projection axes; see \DUrole{xref,std,std-doc}{/gallery/misc/custom\_projection}. \phantomsection\label{\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-download-tutorials-advanced-transforms-tutorial-py}} \section{Colors} \label{\detokenize{tutorials/index:colors}}\label{\detokenize{tutorials/index:tutorials-colors}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-colors}} Matplotlib has support for visualizing information with a wide array of colors and colormaps. These tutorials cover the basics of how these colormaps look, how you can create your own, and how you can customize colormaps for your use case. For even more information see the \DUrole{xref,std,std-ref}{examples page}. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/colors/colors:sphx-glr-download-tutorials-colors-colors-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Specifying Colors} \label{\detokenize{tutorials/colors/colors:specifying-colors}}\label{\detokenize{tutorials/colors/colors:sphx-glr-tutorials-colors-colors-py}}\label{\detokenize{tutorials/colors/colors::doc}} Matplotlib recognizes the following formats to specify a color: \begin{itemize} \item {} an RGB or RGBA (red, green, blue, alpha) tuple of float values in \sphinxcode{\sphinxupquote{{[}0, 1{]}}} (e.g., \sphinxcode{\sphinxupquote{(0.1, 0.2, 0.5)}} or \sphinxcode{\sphinxupquote{(0.1, 0.2, 0.5, 0.3)}}); \item {} a hex RGB or RGBA string (e.g., \sphinxcode{\sphinxupquote{'\#0f0f0f'}} or \sphinxcode{\sphinxupquote{'\#0f0f0f80'}}; case-insensitive); \item {} a string representation of a float value in \sphinxcode{\sphinxupquote{{[}0, 1{]}}} inclusive for gray level (e.g., \sphinxcode{\sphinxupquote{'0.5'}}); \item {} one of \sphinxcode{\sphinxupquote{\{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'\}}}; \item {} a X11/CSS4 color name (case-insensitive); \item {} a name from the \sphinxhref{https://xkcd.com/color/rgb/}{xkcd color survey}, prefixed with \sphinxcode{\sphinxupquote{'xkcd:'}} (e.g., \sphinxcode{\sphinxupquote{'xkcd:sky blue'}}; case insensitive); \item {} one of the Tableau Colors from the 'T10' categorical palette (the default color cycle): \sphinxcode{\sphinxupquote{\{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'\}}} (case-insensitive); \item {} a "CN" color spec, i.e. \sphinxcode{\sphinxupquote{'C'}} followed by a number, which is an index into the default property cycle (\sphinxcode{\sphinxupquote{matplotlib.rcParams{[}'axes.prop\_cycle'{]}}}); the indexing is intended to occur at rendering time, and defaults to black if the cycle does not include color. \end{itemize} "Red", "Green", and "Blue" are the intensities of those colors, the combination of which span the colorspace. How "Alpha" behaves depends on the \sphinxcode{\sphinxupquote{zorder}} of the Artist. Higher \sphinxcode{\sphinxupquote{zorder}} Artists are drawn on top of lower Artists, and "Alpha" determines whether the lower artist is covered by the higher. If the old RGB of a pixel is \sphinxcode{\sphinxupquote{RGBold}} and the RGB of the pixel of the Artist being added is \sphinxcode{\sphinxupquote{RGBnew}} with Alpha \sphinxcode{\sphinxupquote{alpha}}, then the RGB of the pixel is updated to: \sphinxcode{\sphinxupquote{RGB = RGBOld * (1 - Alpha) + RGBnew * Alpha}}. Alpha of 1 means the old color is completely covered by the new Artist, Alpha of 0 means that pixel of the Artist is transparent. For more information on colors in matplotlib see \begin{itemize} \item {} the \DUrole{xref,std,std-doc}{/gallery/color/color\_demo} example; \item {} the {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors}}}}} API; \item {} the \DUrole{xref,std,std-doc}{/gallery/color/named\_colors} example. \end{itemize} \subsubsection{"CN" color selection} \label{\detokenize{tutorials/colors/colors:cn-color-selection}} "CN" colors are converted to RGBA as soon as the artist is created. For example, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{th} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{demo}\PYG{p}{(}\PYG{n}{sty}\PYG{p}{)}\PYG{p}{:} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{n}{sty}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{style: }\PYG{l+s+si}{\PYGZob{}!r\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{format}\PYG{p}{(}\PYG{n}{sty}\PYG{p}{)}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{th}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{th}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{th}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{th}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{C2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \PYG{n}{demo}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{default}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{demo}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{seaborn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colors_001}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colors_002}.png} \end{itemize} will use the first color for the title and then plot using the second and third colors of each style's \sphinxcode{\sphinxupquote{mpl.rcParams{[}'axes.prop\_cycle'{]}}}. \subsubsection{xkcd v X11/CSS4} \label{\detokenize{tutorials/colors/colors:xkcd-v-x11-css4}}\label{\detokenize{tutorials/colors/colors:xkcd-colors}} The xkcd colors are derived from a user survey conducted by the webcomic xkcd. \sphinxhref{https://blog.xkcd.com/2010/05/03/color-survey-results/}{Details of the survey are available on the xkcd blog}. Out of 148 colors in the CSS color list, there are 95 name collisions between the X11/CSS4 names and the xkcd names, all but 3 of which have different hex values. For example \sphinxcode{\sphinxupquote{'blue'}} maps to \sphinxcode{\sphinxupquote{'\#0000FF'}} where as \sphinxcode{\sphinxupquote{'xkcd:blue'}} maps to \sphinxcode{\sphinxupquote{'\#0343DF'}}. Due to these name collisions all of the xkcd colors have \sphinxcode{\sphinxupquote{'xkcd:'}} prefixed. As noted in the blog post, while it might be interesting to re-define the X11/CSS4 names based on such a survey, we do not do so unilaterally. The name collisions are shown in the table below; the color names where the hex values agree are shown in bold. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{\PYGZus{}color\PYGZus{}data} \PYG{k}{as} \PYG{n+nn}{mcd} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{mpatch} \PYG{n}{overlap} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{n}{name} \PYG{k}{for} \PYG{n}{name} \PYG{o+ow}{in} \PYG{n}{mcd}\PYG{o}{.}\PYG{n}{CSS4\PYGZus{}COLORS} \PYG{k}{if} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{xkcd:}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{+} \PYG{n}{name} \PYG{o+ow}{in} \PYG{n}{mcd}\PYG{o}{.}\PYG{n}{XKCD\PYGZus{}COLORS}\PYG{p}{\PYGZcb{}} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{4.8}\PYG{p}{,} \PYG{l+m+mi}{16}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j}\PYG{p}{,} \PYG{n}{n} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n+nb}{sorted}\PYG{p}{(}\PYG{n}{overlap}\PYG{p}{,} \PYG{n}{reverse}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{n}{weight} \PYG{o}{=} \PYG{k+kc}{None} \PYG{n}{cn} \PYG{o}{=} \PYG{n}{mcd}\PYG{o}{.}\PYG{n}{CSS4\PYGZus{}COLORS}\PYG{p}{[}\PYG{n}{n}\PYG{p}{]} \PYG{n}{xkcd} \PYG{o}{=} \PYG{n}{mcd}\PYG{o}{.}\PYG{n}{XKCD\PYGZus{}COLORS}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{xkcd:}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{+} \PYG{n}{n}\PYG{p}{]}\PYG{o}{.}\PYG{n}{upper}\PYG{p}{(}\PYG{p}{)} \PYG{k}{if} \PYG{n}{cn} \PYG{o}{==} \PYG{n}{xkcd}\PYG{p}{:} \PYG{n}{weight} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{r1} \PYG{o}{=} \PYG{n}{mpatch}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{j}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{n}{cn}\PYG{p}{)} \PYG{n}{r2} \PYG{o}{=} \PYG{n}{mpatch}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{n}{xkcd}\PYG{p}{)} \PYG{n}{txt} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{n}{n}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{weight}\PYG{o}{=}\PYG{n}{weight}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{r1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{r2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{j}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{j} \PYG{o}{+} \PYG{l+m+mf}{1.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{X11}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{1.5}\PYG{p}{,} \PYG{n}{j} \PYG{o}{+} \PYG{l+m+mf}{1.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xkcd}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{j} \PYG{o}{+} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{off}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colors_003}.png} \phantomsection\label{\detokenize{tutorials/colors/colors:sphx-glr-download-tutorials-colors-colors-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/colors/colorbar_only:sphx-glr-download-tutorials-colors-colorbar-only-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Customized Colorbars Tutorial} \label{\detokenize{tutorials/colors/colorbar_only:customized-colorbars-tutorial}}\label{\detokenize{tutorials/colors/colorbar_only:sphx-glr-tutorials-colors-colorbar-only-py}}\label{\detokenize{tutorials/colors/colorbar_only::doc}} This tutorial shows how to build colorbars without an attached plot. \subsubsection{Customized Colorbars} \label{\detokenize{tutorials/colors/colorbar_only:customized-colorbars}} {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}} puts a colorbar in a specified axes, and can make a colorbar for a given colormap; it does not need a mappable object like an image. In this tutorial we will explore what can be done with standalone colorbar. \paragraph{Basic continuous colorbar} \label{\detokenize{tutorials/colors/colorbar_only:basic-continuous-colorbar}} Set the colormap and norm to correspond to the data for which the colorbar will be used. Then create the colorbar by calling {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}} and specify axis, colormap, norm and orientation as parameters. Here we create a basic continuous colorbar with ticks and labels. For more information see the {\hyperref[\detokenize{api/colorbar_api:module-matplotlib.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}} API. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{cmap} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{cool} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{cb1} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colorbar}\PYG{o}{.}\PYG{n}{ColorbarBase}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cb1}\PYG{o}{.}\PYG{n}{set\PYGZus{}label}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Some Units}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colorbar_only_001}.png} \paragraph{Discrete intervals colorbar} \label{\detokenize{tutorials/colors/colorbar_only:discrete-intervals-colorbar}} The second example illustrates the use of a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}} which generates a colormap from a set of listed colors, \sphinxcode{\sphinxupquote{colors.BoundaryNorm()}} which generates a colormap index based on discrete intervals and extended ends to show the "over" and "under" value colors. Over and under are used to display data outside of the normalized {[}0,1{]} range. Here we pass colors as gray shades as a string encoding a float in the 0-1 range. If a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}} is used, the length of the bounds array must be one greater than the length of the color list. The bounds must be monotonically increasing. This time we pass some more arguments in addition to previous arguments to {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}. For the out-of-range values to display on the colorbar, we have to use the \sphinxstyleemphasis{extend} keyword argument. To use \sphinxstyleemphasis{extend}, you must specify two extra boundaries. Finally spacing argument ensures that intervals are shown on colorbar proportionally. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{cmap} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{ListedColormap}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cyan}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{0.25}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{0.75}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{bounds} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{]} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{BoundaryNorm}\PYG{p}{(}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{N}\PYG{p}{)} \PYG{n}{cb2} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colorbar}\PYG{o}{.}\PYG{n}{ColorbarBase}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{boundaries}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{+} \PYG{n}{bounds} \PYG{o}{+} \PYG{p}{[}\PYG{l+m+mi}{13}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ticks}\PYG{o}{=}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{spacing}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{proportional}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cb2}\PYG{o}{.}\PYG{n}{set\PYGZus{}label}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Discrete intervals, some other units}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colorbar_only_002}.png} \paragraph{Colorbar with custom extension lengths} \label{\detokenize{tutorials/colors/colorbar_only:colorbar-with-custom-extension-lengths}} Here we illustrate the use of custom length colorbar extensions, used on a colorbar with discrete intervals. To make the length of each extension the same as the length of the interior colors, use \sphinxcode{\sphinxupquote{extendfrac='auto'}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{cmap} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{ListedColormap}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{royalblue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cyan}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{orange}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{bounds} \PYG{o}{=} \PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{BoundaryNorm}\PYG{p}{(}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{.}\PYG{n}{N}\PYG{p}{)} \PYG{n}{cb3} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colorbar}\PYG{o}{.}\PYG{n}{ColorbarBase}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{boundaries}\PYG{o}{=}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{10}\PYG{p}{]} \PYG{o}{+} \PYG{n}{bounds} \PYG{o}{+} \PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{extendfrac}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{auto}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ticks}\PYG{o}{=}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{spacing}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{uniform}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cb3}\PYG{o}{.}\PYG{n}{set\PYGZus{}label}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Custom extension lengths, some other units}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colorbar_only_003}.png} \phantomsection\label{\detokenize{tutorials/colors/colorbar_only:sphx-glr-download-tutorials-colors-colorbar-only-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-download-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Creating Colormaps in Matplotlib} \label{\detokenize{tutorials/colors/colormap-manipulation:creating-colormaps-in-matplotlib}}\label{\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}}\label{\detokenize{tutorials/colors/colormap-manipulation::doc}} Matplotlib has a number of built-in colormaps accessible via {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.get\_cmap}}}}}. There are also external libraries like \sphinxhref{https://jiffyclub.github.io/palettable/}{palettable} that have many extra colormaps. However, we often want to create or manipulate colormaps in Matplotlib. This can be done using the class {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}} and a Nx4 numpy array of values between 0 and 1 to represent the RGBA values of the colormap. There is also a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap}}}}} class that allows colormaps to be specified with a few anchor points defining segments, and linearly interpolating between the anchor points. \subsubsection{Getting colormaps and accessing their values} \label{\detokenize{tutorials/colors/colormap-manipulation:getting-colormaps-and-accessing-their-values}} First, getting a named colormap, most of which are listed in {\hyperref[\detokenize{tutorials/colors/colormaps::doc}]{\sphinxcrossref{\DUrole{doc}{Choosing Colormaps in Matplotlib}}}} requires the use of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.get\_cmap}}}}}, which returns a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.ListedColormap}}}}} object. The second argument gives the size of the list of colors used to define the colormap, and below we use a modest value of 12 so there are not a lot of values to look at. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{cm} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{colors} \PYG{k}{import} \PYG{n}{ListedColormap}\PYG{p}{,} \PYG{n}{LinearSegmentedColormap} \PYG{n}{viridis} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{viridis}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZlt{}matplotlib.colors.ListedColormap object at 0x7f7b193e6860\PYGZgt{} \end{sphinxVerbatim} The object \sphinxcode{\sphinxupquote{viridis}} is a callable, that when passed a float between 0 and 1 returns an RGBA value from the colormap: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{viridis}\PYG{p}{(}\PYG{l+m+mf}{0.56}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] (0.119512, 0.607464, 0.540218, 1.0) \end{sphinxVerbatim} The list of colors that comprise the colormap can be directly accessed using the \sphinxcode{\sphinxupquote{colors}} property, or it can be accessed indirectly by calling \sphinxcode{\sphinxupquote{viridis}} with an array of values matching the length of the colormap. Note that the returned list is in the form of an RGBA Nx4 array, where N is the length of the colormap. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis.colors}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{viridis}\PYG{o}{.}\PYG{n}{colors}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis(range(12))}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{viridis}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis(np.linspace(0, 1, 12))}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{viridis}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] viridis.colors [[0.267004 0.004874 0.329415 1. ] [0.283072 0.130895 0.449241 1. ] [0.262138 0.242286 0.520837 1. ] [0.220057 0.343307 0.549413 1. ] [0.177423 0.437527 0.557565 1. ] [0.143343 0.522773 0.556295 1. ] [0.119512 0.607464 0.540218 1. ] [0.166383 0.690856 0.496502 1. ] [0.319809 0.770914 0.411152 1. ] [0.525776 0.833491 0.288127 1. ] [0.762373 0.876424 0.137064 1. ] [0.993248 0.906157 0.143936 1. ]] viridis(range(12)) [[0.267004 0.004874 0.329415 1. ] [0.283072 0.130895 0.449241 1. ] [0.262138 0.242286 0.520837 1. ] [0.220057 0.343307 0.549413 1. ] [0.177423 0.437527 0.557565 1. ] [0.143343 0.522773 0.556295 1. ] [0.119512 0.607464 0.540218 1. ] [0.166383 0.690856 0.496502 1. ] [0.319809 0.770914 0.411152 1. ] [0.525776 0.833491 0.288127 1. ] [0.762373 0.876424 0.137064 1. ] [0.993248 0.906157 0.143936 1. ]] viridis(np.linspace(0, 1, 12)) [[0.267004 0.004874 0.329415 1. ] [0.283072 0.130895 0.449241 1. ] [0.262138 0.242286 0.520837 1. ] [0.220057 0.343307 0.549413 1. ] [0.177423 0.437527 0.557565 1. ] [0.143343 0.522773 0.556295 1. ] [0.119512 0.607464 0.540218 1. ] [0.166383 0.690856 0.496502 1. ] [0.319809 0.770914 0.411152 1. ] [0.525776 0.833491 0.288127 1. ] [0.762373 0.876424 0.137064 1. ] [0.993248 0.906157 0.143936 1. ]] \end{sphinxVerbatim} The colormap is a lookup table, so "oversampling" the colormap returns nearest-neighbor interpolation (note the repeated colors in the list below) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis(np.linspace(0, 1, 15))}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{viridis}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Out: \begin{sphinxVerbatim}[commandchars=\\\{\}] viridis(np.linspace(0, 1, 15)) [[0.267004 0.004874 0.329415 1. ] [0.267004 0.004874 0.329415 1. ] [0.283072 0.130895 0.449241 1. ] [0.262138 0.242286 0.520837 1. ] [0.220057 0.343307 0.549413 1. ] [0.177423 0.437527 0.557565 1. ] [0.143343 0.522773 0.556295 1. ] [0.119512 0.607464 0.540218 1. ] [0.119512 0.607464 0.540218 1. ] [0.166383 0.690856 0.496502 1. ] [0.319809 0.770914 0.411152 1. ] [0.525776 0.833491 0.288127 1. ] [0.762373 0.876424 0.137064 1. ] [0.993248 0.906157 0.143936 1. ] [0.993248 0.906157 0.143936 1. ]] \end{sphinxVerbatim} \subsubsection{Creating listed colormaps} \label{\detokenize{tutorials/colors/colormap-manipulation:creating-listed-colormaps}} This is essential the inverse operation of the above where we supply a Nx4 numpy array with all values between 0 and 1, to {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}} to make a new colormap. This means that any numpy operations that we can do on a Nx4 array make carpentry of new colormaps from existing colormaps quite straight forward. Suppose we want to make the first 25 entries of a 256-length "viridis" colormap pink for some reason: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{viridis} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{newcolors} \PYG{o}{=} \PYG{n}{viridis}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{)} \PYG{n}{pink} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{248}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{24}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{148}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{newcolors}\PYG{p}{[}\PYG{p}{:}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{n}{pink} \PYG{n}{newcmp} \PYG{o}{=} \PYG{n}{ListedColormap}\PYG{p}{(}\PYG{n}{newcolors}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{plot\PYGZus{}examples}\PYG{p}{(}\PYG{n}{cms}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ helper function to plot two colormaps} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{p}{[}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{cmap}\PYG{p}{]} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{,} \PYG{n}{cms}\PYG{p}{)}\PYG{p}{:} \PYG{n}{psm} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{,} \PYG{n}{rasterized}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{psm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plot\PYGZus{}examples}\PYG{p}{(}\PYG{p}{[}\PYG{n}{viridis}\PYG{p}{,} \PYG{n}{newcmp}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_001}.png} We can easily reduce the dynamic range of a colormap; here we choose the middle 0.5 of the colormap. However, we need to interpolate from a larger colormap, otherwise the new colormap will have repeated values. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{viridisBig} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{512}\PYG{p}{)} \PYG{n}{newcmp} \PYG{o}{=} \PYG{n}{ListedColormap}\PYG{p}{(}\PYG{n}{viridisBig}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.75}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plot\PYGZus{}examples}\PYG{p}{(}\PYG{p}{[}\PYG{n}{viridis}\PYG{p}{,} \PYG{n}{newcmp}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_002}.png} and we can easily concatenate two colormaps: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{top} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Oranges\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Blues}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)} \PYG{n}{newcolors} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{vstack}\PYG{p}{(}\PYG{p}{(}\PYG{n}{top}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n}{newcmp} \PYG{o}{=} \PYG{n}{ListedColormap}\PYG{p}{(}\PYG{n}{newcolors}\PYG{p}{,} \PYG{n}{name}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{OrangeBlue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plot\PYGZus{}examples}\PYG{p}{(}\PYG{p}{[}\PYG{n}{viridis}\PYG{p}{,} \PYG{n}{newcmp}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_003}.png} Of course we need not start from a named colormap, we just need to create the Nx4 array to pass to {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}}. Here we create a brown colormap that goes to white.... \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{256} \PYG{n}{vals} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ones}\PYG{p}{(}\PYG{p}{(}\PYG{n}{N}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{)} \PYG{n}{vals}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{90}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \PYG{n}{vals}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{39}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \PYG{n}{vals}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{41}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \PYG{n}{newcmp} \PYG{o}{=} \PYG{n}{ListedColormap}\PYG{p}{(}\PYG{n}{vals}\PYG{p}{)} \PYG{n}{plot\PYGZus{}examples}\PYG{p}{(}\PYG{p}{[}\PYG{n}{viridis}\PYG{p}{,} \PYG{n}{newcmp}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_004}.png} \subsubsection{Creating linear segmented colormaps} \label{\detokenize{tutorials/colors/colormap-manipulation:creating-linear-segmented-colormaps}} {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap}}}}} class specifies colormaps using anchor points between which RGB(A) values are interpolated. The format to specify these colormaps allows discontinuities at the anchor points. Each anchor point is specified as a row in a matrix of the form \sphinxcode{\sphinxupquote{{[}x{[}i{]} yleft{[}i{]} yright{[}i{]}{]}}}, where \sphinxcode{\sphinxupquote{x{[}i{]}}} is the anchor, and \sphinxcode{\sphinxupquote{yleft{[}i{]}}} and \sphinxcode{\sphinxupquote{yright{[}i{]}}} are the values of the color on either side of the anchor point. If there are no discontinuities, then \sphinxcode{\sphinxupquote{yleft{[}i{]}=yright{[}i{]}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cdict} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.75}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{]}\PYG{p}{\PYGZcb{}} \PYG{k}{def} \PYG{n+nf}{plot\PYGZus{}linearmap}\PYG{p}{(}\PYG{n}{cdict}\PYG{p}{)}\PYG{p}{:} \PYG{n}{newcmp} \PYG{o}{=} \PYG{n}{LinearSegmentedColormap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{testCmap}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{segmentdata}\PYG{o}{=}\PYG{n}{cdict}\PYG{p}{,} \PYG{n}{N}\PYG{o}{=}\PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{rgba} \PYG{o}{=} \PYG{n}{newcmp}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{constrained\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{col} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{k}{for} \PYG{n}{xx} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.75}\PYG{p}{]}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{xx}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{0.7}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{256}\PYG{p}{)}\PYG{o}{/}\PYG{l+m+mi}{256}\PYG{p}{,} \PYG{n}{rgba}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{n}{i}\PYG{p}{]}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{n}{col}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{index}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RGB}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plot\PYGZus{}linearmap}\PYG{p}{(}\PYG{n}{cdict}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_005}.png} In order to make a discontinuity at an anchor point, the third column is different than the second. The matrix for each of "red", "green", "blue", and optionally "alpha" is set up as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cdict}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{p}{[}\PYG{n}{x}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]} \PYG{n}{yleft}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]} \PYG{n}{yright}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{n}{yleft}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{n}{yright}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} and for values passed to the colormap between \sphinxcode{\sphinxupquote{x{[}i{]}}} and \sphinxcode{\sphinxupquote{x{[}i+1{]}}}, the interpolation is between \sphinxcode{\sphinxupquote{yright{[}i{]}}} and \sphinxcode{\sphinxupquote{yleft{[}i+1{]}}}. In the example below there is a discontinuity in red at 0.5. The interpolation between 0 and 0.5 goes from 0.3 to 1, and between 0.5 and 1 it goes from 0.9 to 1. Note that red{[}0, 1{]}, and red{[}2, 2{]} are both superfluous to the interpolation because red{[}0, 1{]} is the value to the left of 0, and red{[}2, 2{]} is the value to the right of 1.0. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cdict}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{0.9}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{]} \PYG{n}{plot\PYGZus{}linearmap}\PYG{p}{(}\PYG{n}{cdict}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormap-manipulation_006}.png} \bigskip\hrule\bigskip \paragraph{References} \label{\detokenize{tutorials/colors/colormap-manipulation:references}} The use of the following functions, methods, classes and modules is shown in this example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{pcolormesh} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{Figure}\PYG{o}{.}\PYG{n}{colorbar} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{colors} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{LinearSegmentedColormap} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{ListedColormap} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{cm} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap} \end{sphinxVerbatim} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.024 seconds) \phantomsection\label{\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-download-tutorials-colors-colormap-manipulation-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-download-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Colormap Normalization} \label{\detokenize{tutorials/colors/colormapnorms:colormap-normalization}}\label{\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}}\label{\detokenize{tutorials/colors/colormapnorms::doc}} Objects that use colormaps by default linearly map the colors in the colormap from data values \sphinxstyleemphasis{vmin} to \sphinxstyleemphasis{vmax}. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} will map the data in \sphinxstyleemphasis{Z} linearly from -1 to +1, so \sphinxstyleemphasis{Z=0} will give a color at the center of the colormap \sphinxstyleemphasis{RdBu\_r} (white in this case). Matplotlib does this mapping in two steps, with a normalization from {[}0,1{]} occurring first, and then mapping onto the indices in the colormap. Normalizations are classes defined in the {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors()}}}}} module. The default, linear normalization is {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize()}}}}}. Artists that map data to color pass the arguments \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} to construct a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize()}}}}} instance, then call it: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [1]: }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k+kn}{as} \PYG{n+nn}{mpl} \PYG{g+gp}{In [2]: }\PYG{n}{norm} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.}\PYG{p}{,}\PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{)} \PYG{g+gp}{In [3]: }\PYG{n}{norm}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{)} \PYG{g+gh}{Out[3]: }\PYG{g+go}{0.5} \end{sphinxVerbatim} However, there are sometimes cases where it is useful to map data to colormaps in a non-linear fashion. \subsubsection{Logarithmic} \label{\detokenize{tutorials/colors/colormapnorms:logarithmic}} One of the most common transformations is to plot data by taking its logarithm (to the base-10). This transformation is useful to display changes across disparate scales. Using \sphinxcode{\sphinxupquote{colors.LogNorm()}} normalizes the data via \(log_{10}\). In the example below, there are two bumps, one much smaller than the other. Using \sphinxcode{\sphinxupquote{colors.LogNorm()}}, the shape and location of each bump can clearly be seen: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{colors} \PYG{k}{as} \PYG{n+nn}{colors} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{as} \PYG{n+nn}{cbook} \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{100} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mgrid}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} A low hump with a spike coming out of the top right. Needs to have} \PYG{c+c1}{\PYGZsh{} z/colour axis on a log scale so we see both hump and spike. linear} \PYG{c+c1}{\PYGZsh{} scale only shows the spike.} \PYG{n}{Z1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{p}{(}\PYG{n}{X}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{Y}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z2} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{p}{(}\PYG{n}{X} \PYG{o}{*} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{Y} \PYG{o}{*} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z} \PYG{o}{=} \PYG{n}{Z1} \PYG{o}{+} \PYG{l+m+mi}{50} \PYG{o}{*} \PYG{n}{Z2} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolor}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{LogNorm}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{n}{Z}\PYG{o}{.}\PYG{n}{min}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{n}{Z}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolor}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_001}.png} \subsubsection{Symmetric logarithmic} \label{\detokenize{tutorials/colors/colormapnorms:symmetric-logarithmic}} Similarly, it sometimes happens that there is data that is positive and negative, but we would still like a logarithmic scaling applied to both. In this case, the negative numbers are also scaled logarithmically, and mapped to smaller numbers; e.g., if \sphinxcode{\sphinxupquote{vmin=-vmax}}, then they the negative numbers are mapped from 0 to 0.5 and the positive from 0.5 to 1. Since the logarithm of values close to zero tends toward infinity, a small range around zero needs to be mapped linearly. The parameter \sphinxstyleemphasis{linthresh} allows the user to specify the size of this range (-\sphinxstyleemphasis{linthresh}, \sphinxstyleemphasis{linthresh}). The size of this range in the colormap is set by \sphinxstyleemphasis{linscale}. When \sphinxstyleemphasis{linscale} == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{100} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mgrid}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{]} \PYG{n}{Z1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{X}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{n}{Y}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z2} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{p}{(}\PYG{n}{X} \PYG{o}{\PYGZhy{}} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{Y} \PYG{o}{\PYGZhy{}} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z} \PYG{o}{=} \PYG{p}{(}\PYG{n}{Z1} \PYG{o}{\PYGZhy{}} \PYG{n}{Z2}\PYG{p}{)} \PYG{o}{*} \PYG{l+m+mi}{2} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{SymLogNorm}\PYG{p}{(}\PYG{n}{linthresh}\PYG{o}{=}\PYG{l+m+mf}{0.03}\PYG{p}{,} \PYG{n}{linscale}\PYG{o}{=}\PYG{l+m+mf}{0.03}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{n}{np}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_002}.png} \subsubsection{Power-law} \label{\detokenize{tutorials/colors/colormapnorms:power-law}} Sometimes it is useful to remap the colors onto a power-law relationship (i.e. \(y=x^{\gamma}\), where \(\gamma\) is the power). For this we use the \sphinxcode{\sphinxupquote{colors.PowerNorm()}}. It takes as an argument \sphinxstyleemphasis{gamma} (\sphinxstyleemphasis{gamma} == 1.0 will just yield the default linear normalization): \begin{sphinxadmonition}{note}{Note:} There should probably be a good reason for plotting the data using this type of transformation. Technical viewers are used to linear and logarithmic axes and data transformations. Power laws are less common, and viewers should explicitly be made aware that they have been used. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{100} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mgrid}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{]} \PYG{n}{Z1} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{1} \PYG{o}{+} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{Y} \PYG{o}{*} \PYG{l+m+mf}{10.}\PYG{p}{)}\PYG{p}{)} \PYG{o}{*} \PYG{n}{X}\PYG{o}{*}\PYG{o}{*}\PYG{p}{(}\PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z1}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{PowerNorm}\PYG{p}{(}\PYG{n}{gamma}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z1}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_003}.png} \subsubsection{Discrete bounds} \label{\detokenize{tutorials/colors/colormapnorms:discrete-bounds}} Another normaization that comes with Matplotlib is \sphinxcode{\sphinxupquote{colors.BoundaryNorm()}}. In addition to \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax}, this takes as arguments boundaries between which data is to be mapped. The colors are then linearly distributed between these "bounds". For instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [4]: }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib.colors} \PYG{k+kn}{as} \PYG{n+nn}{colors} \PYG{g+gp}{In [5]: }\PYG{n}{bounds} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.125}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{In [6]: }\PYG{n}{norm} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{BoundaryNorm}\PYG{p}{(}\PYG{n}{boundaries}\PYG{o}{=}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{ncolors}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \PYG{g+gp}{In [7]: }\PYG{k}{print}\PYG{p}{(}\PYG{n}{norm}\PYG{p}{(}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.2}\PYG{p}{,}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.15}\PYG{p}{,}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.02}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.99}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[0 0 1 2 3 3]} \end{sphinxVerbatim} Note unlike the other norms, this norm returns values from 0 to \sphinxstyleemphasis{ncolors}-1. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{100} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mgrid}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{n+nb}{complex}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)}\PYG{p}{]} \PYG{n}{Z1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{X}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{n}{Y}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z2} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{p}{(}\PYG{n}{X} \PYG{o}{\PYGZhy{}} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{Y} \PYG{o}{\PYGZhy{}} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{Z} \PYG{o}{=} \PYG{p}{(}\PYG{n}{Z1} \PYG{o}{\PYGZhy{}} \PYG{n}{Z2}\PYG{p}{)} \PYG{o}{*} \PYG{l+m+mi}{2} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{flatten}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} even bounds gives a contour\PYGZhy{}like effect} \PYG{n}{bounds} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{BoundaryNorm}\PYG{p}{(}\PYG{n}{boundaries}\PYG{o}{=}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{ncolors}\PYG{o}{=}\PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} uneven bounds changes the colormapping:} \PYG{n}{bounds} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.125}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{norm} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{BoundaryNorm}\PYG{p}{(}\PYG{n}{boundaries}\PYG{o}{=}\PYG{n}{bounds}\PYG{p}{,} \PYG{n}{ncolors}\PYG{o}{=}\PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{n}{np}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_004}.png} \subsubsection{DivergingNorm: Different mapping on either side of a center} \label{\detokenize{tutorials/colors/colormapnorms:divergingnorm-different-mapping-on-either-side-of-a-center}} Sometimes we want to have a different colormap on either side of a conceptual center point, and we want those two colormaps to have different linear scales. An example is a topographic map where the land and ocean have a center at zero, but land typically has a greater elevation range than the water has depth range, and they are often represented by a different colormap. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{filename} \PYG{o}{=} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{get\PYGZus{}sample\PYGZus{}data}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{topobathy.npz}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{asfileobj}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{k}{with} \PYG{n}{np}\PYG{o}{.}\PYG{n}{load}\PYG{p}{(}\PYG{n}{filename}\PYG{p}{)} \PYG{k}{as} \PYG{n}{dem}\PYG{p}{:} \PYG{n}{topo} \PYG{o}{=} \PYG{n}{dem}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{topo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{n}{longitude} \PYG{o}{=} \PYG{n}{dem}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{longitude}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{n}{latitude} \PYG{o}{=} \PYG{n}{dem}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{latitude}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make a colormap that has land and ocean clearly delineated and of the} \PYG{c+c1}{\PYGZsh{} same length (256 + 256)} \PYG{n}{colors\PYGZus{}undersea} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{terrain}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.17}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{)} \PYG{n}{colors\PYGZus{}land} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{terrain}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)}\PYG{p}{)} \PYG{n}{all\PYGZus{}colors} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{vstack}\PYG{p}{(}\PYG{p}{(}\PYG{n}{colors\PYGZus{}undersea}\PYG{p}{,} \PYG{n}{colors\PYGZus{}land}\PYG{p}{)}\PYG{p}{)} \PYG{n}{terrain\PYGZus{}map} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{LinearSegmentedColormap}\PYG{o}{.}\PYG{n}{from\PYGZus{}list}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{terrain\PYGZus{}map}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{all\PYGZus{}colors}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make the norm: Note the center is offset so that the land has more} \PYG{c+c1}{\PYGZsh{} dynamic range:} \PYG{n}{divnorm} \PYG{o}{=} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{DivergingNorm}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{500.}\PYG{p}{,} \PYG{n}{vcenter}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mi}{4000}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{longitude}\PYG{p}{,} \PYG{n}{latitude}\PYG{p}{,} \PYG{n}{topo}\PYG{p}{,} \PYG{n}{rasterized}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{divnorm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{terrain\PYGZus{}map}\PYG{p}{,}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Simple geographic plot, set aspect ratio beecause distance between lines of} \PYG{c+c1}{\PYGZsh{} longitude depends on latitude.} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}aspect}\PYG{p}{(}\PYG{l+m+mi}{1} \PYG{o}{/} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{deg2rad}\PYG{p}{(}\PYG{l+m+mi}{49}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_005}.png} \subsubsection{Custom normalization: Manually implement two linear ranges} \label{\detokenize{tutorials/colors/colormapnorms:custom-normalization-manually-implement-two-linear-ranges}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:matplotlib.colors.DivergingNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DivergingNorm}}}}} described above makes a useful example for defining your own norm. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{MidpointNormalize}\PYG{p}{(}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{vcenter}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{clip}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{vcenter} \PYG{o}{=} \PYG{n}{vcenter} \PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{o}{.}\PYG{n+nf+fm}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{vmin}\PYG{p}{,} \PYG{n}{vmax}\PYG{p}{,} \PYG{n}{clip}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{value}\PYG{p}{,} \PYG{n}{clip}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} I\PYGZsq{}m ignoring masked values and all kinds of edge cases to make a} \PYG{c+c1}{\PYGZsh{} simple example...} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{p}{[}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{vmin}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{vcenter}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{vmax}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{k}{return} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ma}\PYG{o}{.}\PYG{n}{masked\PYGZus{}array}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{interp}\PYG{p}{(}\PYG{n}{value}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{midnorm} \PYG{o}{=} \PYG{n}{MidpointNormalize}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{500.}\PYG{p}{,} \PYG{n}{vcenter}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mi}{4000}\PYG{p}{)} \PYG{n}{pcm} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolormesh}\PYG{p}{(}\PYG{n}{longitude}\PYG{p}{,} \PYG{n}{latitude}\PYG{p}{,} \PYG{n}{topo}\PYG{p}{,} \PYG{n}{rasterized}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{midnorm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{terrain\PYGZus{}map}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}aspect}\PYG{p}{(}\PYG{l+m+mi}{1} \PYG{o}{/} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{deg2rad}\PYG{p}{(}\PYG{l+m+mi}{49}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{pcm}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_colormapnorms_006}.png} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.021 seconds) \phantomsection\label{\detokenize{tutorials/colors/colormapnorms:sphx-glr-download-tutorials-colors-colormapnorms-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/colors/colormaps:sphx-glr-download-tutorials-colors-colormaps-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Choosing Colormaps in Matplotlib} \label{\detokenize{tutorials/colors/colormaps:choosing-colormaps-in-matplotlib}}\label{\detokenize{tutorials/colors/colormaps:sphx-glr-tutorials-colors-colormaps-py}}\label{\detokenize{tutorials/colors/colormaps::doc}} Matplotlib has a number of built-in colormaps accessible via {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.get\_cmap}}}}}. There are also external libraries like \sphinxcite{tutorials/colors/colormaps:palettable} and \sphinxcite{tutorials/colors/colormaps:colorcet} that have many extra colormaps. Here we briefly discuss how to choose between the many options. For help on creating your own colormaps, see {\hyperref[\detokenize{tutorials/colors/colormap-manipulation::doc}]{\sphinxcrossref{\DUrole{doc}{Creating Colormaps in Matplotlib}}}}. \subsubsection{Overview} \label{\detokenize{tutorials/colors/colormaps:overview}} The idea behind choosing a good colormap is to find a good representation in 3D colorspace for your data set. The best colormap for any given data set depends on many things including: \begin{itemize} \item {} Whether representing form or metric data (\sphinxcite{tutorials/colors/colormaps:ware}) \item {} Your knowledge of the data set (\sphinxstyleemphasis{e.g.}, is there a critical value from which the other values deviate?) \item {} If there is an intuitive color scheme for the parameter you are plotting \item {} If there is a standard in the field the audience may be expecting \end{itemize} For many applications, a perceptually uniform colormap is the best choice --- one in which equal steps in data are perceived as equal steps in the color space. Researchers have found that the human brain perceives changes in the lightness parameter as changes in the data much better than, for example, changes in hue. Therefore, colormaps which have monotonically increasing lightness through the colormap will be better interpreted by the viewer. A wonderful example of perceptually uniform colormaps is \sphinxcite{tutorials/colors/colormaps:colorcet}. Color can be represented in 3D space in various ways. One way to represent color is using CIELAB. In CIELAB, color space is represented by lightness, \(L^*\); red-green, \(a^*\); and yellow-blue, \(b^*\). The lightness parameter \(L^*\) can then be used to learn more about how the matplotlib colormaps will be perceived by viewers. An excellent starting resource for learning about human perception of colormaps is from \sphinxcite{tutorials/colors/colormaps:ibm}. \subsubsection{Classes of colormaps} \label{\detokenize{tutorials/colors/colormaps:classes-of-colormaps}} Colormaps are often split into several categories based on their function (see, \sphinxstyleemphasis{e.g.}, \sphinxcite{tutorials/colors/colormaps:moreland}): \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Sequential: change in lightness and often saturation of color incrementally, often using a single hue; should be used for representing information that has ordering. \item {} Diverging: change in lightness and possibly saturation of two different colors that meet in the middle at an unsaturated color; should be used when the information being plotted has a critical middle value, such as topography or when the data deviates around zero. \item {} Cyclic: change in lightness of two different colors that meet in the middle and beginning/end at an unsaturated color; should be used for values that wrap around at the endpoints, such as phase angle, wind direction, or time of day. \item {} Qualitative: often are miscellaneous colors; should be used to represent information which does not have ordering or relationships. \end{enumerate} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} sphinx\PYGZus{}gallery\PYGZus{}thumbnail\PYGZus{}number = 2} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{cm} \PYG{k+kn}{from} \PYG{n+nn}{colorspacious} \PYG{k}{import} \PYG{n}{cspace\PYGZus{}converter} \PYG{k+kn}{from} \PYG{n+nn}{collections} \PYG{k}{import} \PYG{n}{OrderedDict} \PYG{n}{cmaps} \PYG{o}{=} \PYG{n}{OrderedDict}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{Sequential} \label{\detokenize{tutorials/colors/colormaps:sequential}} For the Sequential plots, the lightness value increases monotonically through the colormaps. This is good. Some of the \(L^*\) values in the colormaps span from 0 to 100 (binary and the other grayscale), and others start around \(L^*=20\). Those that have a smaller range of \(L^*\) will accordingly have a smaller perceptual range. Note also that the \(L^*\) function varies amongst the colormaps: some are approximately linear in \(L^*\) and others are more curved. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Perceptually Uniform Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{viridis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{plasma}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{inferno}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{magma}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cividis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Greys}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Purples}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Blues}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Greens}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Oranges}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Reds}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YlOrBr}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YlOrRd}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{OrRd}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuRd}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdPu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BuPu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{GnBu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YlGnBu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuBuGn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BuGn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YlGn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \paragraph{Sequential2} \label{\detokenize{tutorials/colors/colormaps:sequential2}} Many of the \(L^*\) values from the Sequential2 plots are monotonically increasing, but some (autumn, cool, spring, and winter) plateau or even go both up and down in \(L^*\) space. Others (afmhot, copper, gist\_heat, and hot) have kinks in the \(L^*\) functions. Data that is being represented in a region of the colormap that is at a plateau or kink will lead to a perception of banding of the data in those values in the colormap (see \sphinxcite{tutorials/colors/colormaps:mycarta-banding} for an excellent example of this). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential (2)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{binary}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}yarg}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}gray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bone}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pink}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{spring}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{summer}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{autumn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{winter}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cool}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Wistia}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{afmhot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}heat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{copper}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \paragraph{Diverging} \label{\detokenize{tutorials/colors/colormaps:diverging}} For the Diverging maps, we want to have monotonically increasing \(L^*\) values up to a maximum, which should be close to \(L^*=100\), followed by monotonically decreasing \(L^*\) values. We are looking for approximately equal minimum \(L^*\) values at opposite ends of the colormap. By these measures, BrBG and RdBu are good options. coolwarm is a good option, but it doesn't span a wide range of \(L^*\) values (see grayscale section below). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Diverging}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PiYG}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PRGn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BrBG}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{PuOr}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdGy}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdBu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdYlBu}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RdYlGn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Spectral}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{coolwarm}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bwr}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{seismic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \paragraph{Cyclic} \label{\detokenize{tutorials/colors/colormaps:cyclic}} For Cyclic maps, we want to start and end on the same color, and meet a symmetric center point in the middle. \(L^*\) should change monotonically from start to middle, and inversely from middle to end. It should be symmetric on the increasing and decreasing side, and only differ in hue. At the ends and middle, \(L^*\) will reverse direction, which should be smoothed in \(L^*\) space to reduce artifacts. See \sphinxcite{tutorials/colors/colormaps:kovesi-colormaps} for more information on the design of cyclic maps. The often-used HSV colormap is included in this set of colormaps, although it is not symmetric to a center point. Additionally, the \(L^*\) values vary widely throughout the colormap, making it a poor choice for representing data for viewers to see perceptually. See an extension on this idea at \sphinxcite{tutorials/colors/colormaps:mycarta-jet}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Cyclic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{twilight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{twilight\PYGZus{}shifted}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hsv}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \paragraph{Qualitative} \label{\detokenize{tutorials/colors/colormaps:qualitative}} Qualitative colormaps are not aimed at being perceptual maps, but looking at the lightness parameter can verify that for us. The \(L^*\) values move all over the place throughout the colormap, and are clearly not monotonically increasing. These would not be good options for use as perceptual colormaps. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Qualitative}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Pastel1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Pastel2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Paired}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Accent}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Dark2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Set1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Set2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Set3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tab10}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tab20}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tab20b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tab20c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \paragraph{Miscellaneous} \label{\detokenize{tutorials/colors/colormaps:miscellaneous}} Some of the miscellaneous colormaps have particular uses for which they have been created. For example, gist\_earth, ocean, and terrain all seem to be created for plotting topography (green/brown) and water depths (blue) together. We would expect to see a divergence in these colormaps, then, but multiple kinks may not be ideal, such as in gist\_earth and terrain. CMRmap was created to convert well to grayscale, though it does appear to have some small kinks in \(L^*\). cubehelix was created to vary smoothly in both lightness and hue, but appears to have a small hump in the green hue area. The often-used jet colormap is included in this set of colormaps. We can see that the \(L^*\) values vary widely throughout the colormap, making it a poor choice for representing data for viewers to see perceptually. See an extension on this idea at \sphinxcite{tutorials/colors/colormaps:mycarta-jet}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cmaps}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Miscellaneous}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{flag}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{prism}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ocean}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}earth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{terrain}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}stern}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gnuplot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gnuplot2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{CMRmap}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cubehelix}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{brg}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}rainbow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rainbow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{jet}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{nipy\PYGZus{}spectral}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{gist\PYGZus{}ncar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \phantomsection\label{\detokenize{tutorials/colors/colormaps:color-colormaps-reference}} First, we'll show the range of each colormap. Note that some seem to change more "quickly" than others. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{nrows} \PYG{o}{=} \PYG{n+nb}{max}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}list}\PYG{p}{)} \PYG{k}{for} \PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list} \PYG{o+ow}{in} \PYG{n}{cmaps}\PYG{o}{.}\PYG{n}{items}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{gradient} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{gradient} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{vstack}\PYG{p}{(}\PYG{p}{(}\PYG{n}{gradient}\PYG{p}{,} \PYG{n}{gradient}\PYG{p}{)}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{plot\PYGZus{}color\PYGZus{}gradients}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{,} \PYG{n}{nrows}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{n}{nrows}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.95}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.01}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.99}\PYG{p}{)} \PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ colormaps}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{name} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{axes}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{gradient}\PYG{p}{,} \PYG{n}{aspect}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{auto}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)}\PYG{p}{)} \PYG{n}{pos} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}position}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{bounds}\PYG{p}{)} \PYG{n}{x\PYGZus{}text} \PYG{o}{=} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{\PYGZhy{}} \PYG{l+m+mf}{0.01} \PYG{n}{y\PYGZus{}text} \PYG{o}{=} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{+} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{o}{/}\PYG{l+m+mf}{2.} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{x\PYGZus{}text}\PYG{p}{,} \PYG{n}{y\PYGZus{}text}\PYG{p}{,} \PYG{n}{name}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Turn off *all* ticks \PYGZam{} spines, not just the ones with colormaps.} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axes}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}off}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list} \PYG{o+ow}{in} \PYG{n}{cmaps}\PYG{o}{.}\PYG{n}{items}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plot\PYGZus{}color\PYGZus{}gradients}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{,} \PYG{n}{nrows}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_001}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_002}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_003}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_004}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_005}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_006}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_007}.png} \end{itemize} \subsubsection{Lightness of matplotlib colormaps} \label{\detokenize{tutorials/colors/colormaps:lightness-of-matplotlib-colormaps}} Here we examine the lightness values of the matplotlib colormaps. Note that some documentation on the colormaps is available (\sphinxcite{tutorials/colors/colormaps:list-colormaps}). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font.size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{12}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Number of colormap per subplot for particular cmap categories} \PYG{n}{\PYGZus{}DSUBS} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Perceptually Uniform Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential (2)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Diverging}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Cyclic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Qualitative}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Miscellaneous}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{\PYGZcb{}} \PYG{c+c1}{\PYGZsh{} Spacing between the colormaps of a subplot} \PYG{n}{\PYGZus{}DC} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Perceptually Uniform Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{0.7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential (2)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Diverging}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Cyclic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Qualitative}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Miscellaneous}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.4}\PYG{p}{\PYGZcb{}} \PYG{c+c1}{\PYGZsh{} Indices to step through colormap} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Do plot} \PYG{k}{for} \PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list} \PYG{o+ow}{in} \PYG{n}{cmaps}\PYG{o}{.}\PYG{n}{items}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Do subplots so that colormaps have enough space.} \PYG{c+c1}{\PYGZsh{} Default is 6 colormaps per subplot.} \PYG{n}{dsub} \PYG{o}{=} \PYG{n}{\PYGZus{}DSUBS}\PYG{o}{.}\PYG{n}{get}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)} \PYG{n}{nsubplots} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{ceil}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}list}\PYG{p}{)} \PYG{o}{/} \PYG{n}{dsub}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} squeeze=False to handle similarly the case of a single subplot} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{n}{nsubplots}\PYG{p}{,} \PYG{n}{squeeze}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mf}{2.6}\PYG{o}{*}\PYG{n}{nsubplots}\PYG{p}{)}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i}\PYG{p}{,} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{)}\PYG{p}{:} \PYG{n}{locs} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} locations for text labels} \PYG{k}{for} \PYG{n}{j}\PYG{p}{,} \PYG{n}{cmap} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}list}\PYG{p}{[}\PYG{n}{i}\PYG{o}{*}\PYG{n}{dsub}\PYG{p}{:}\PYG{p}{(}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{n}{dsub}\PYG{p}{]}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Get RGB values for colormap and convert the colormap in} \PYG{c+c1}{\PYGZsh{} CAM02\PYGZhy{}UCS colorspace. lab[0, :, 0] is the lightness.} \PYG{n}{rgb} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{cmap}\PYG{p}{)}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{newaxis}\PYG{p}{,} \PYG{p}{:}\PYG{p}{,} \PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{n}{lab} \PYG{o}{=} \PYG{n}{cspace\PYGZus{}converter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sRGB1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{CAM02\PYGZhy{}UCS}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{(}\PYG{n}{rgb}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Plot colormap L values. Do separately for each category} \PYG{c+c1}{\PYGZsh{} so each plot can be pretty. To make scatter markers change} \PYG{c+c1}{\PYGZsh{} color along plot:} \PYG{c+c1}{\PYGZsh{} http://stackoverflow.com/questions/8202605/} \PYG{k}{if} \PYG{n}{cmap\PYGZus{}category} \PYG{o}{==} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} These colormaps all start at high lightness but we want them} \PYG{c+c1}{\PYGZsh{} reversed to look nice in the plot, so reverse the order.} \PYG{n}{y\PYGZus{}} \PYG{o}{=} \PYG{n}{lab}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{p}{:}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n}{c\PYGZus{}} \PYG{o}{=} \PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{k}{else}\PYG{p}{:} \PYG{n}{y\PYGZus{}} \PYG{o}{=} \PYG{n}{lab}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n}{c\PYGZus{}} \PYG{o}{=} \PYG{n}{x} \PYG{n}{dc} \PYG{o}{=} \PYG{n}{\PYGZus{}DC}\PYG{o}{.}\PYG{n}{get}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{l+m+mf}{1.4}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} cmaps horizontal spacing} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x} \PYG{o}{+} \PYG{n}{j}\PYG{o}{*}\PYG{n}{dc}\PYG{p}{,} \PYG{n}{y\PYGZus{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{n}{c\PYGZus{}}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{,} \PYG{n}{s}\PYG{o}{=}\PYG{l+m+mi}{300}\PYG{p}{,} \PYG{n}{linewidths}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Store locations for colormap labels} \PYG{k}{if} \PYG{n}{cmap\PYGZus{}category} \PYG{o+ow}{in} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Perceptually Uniform Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{locs}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{x}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{+} \PYG{n}{j}\PYG{o}{*}\PYG{n}{dc}\PYG{p}{)} \PYG{k}{elif} \PYG{n}{cmap\PYGZus{}category} \PYG{o+ow}{in} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Diverging}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Qualitative}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Cyclic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Miscellaneous}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sequential (2)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{locs}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{x}\PYG{p}{[}\PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{x}\PYG{o}{.}\PYG{n}{size}\PYG{o}{/}\PYG{l+m+mf}{2.}\PYG{p}{)}\PYG{p}{]} \PYG{o}{+} \PYG{n}{j}\PYG{o}{*}\PYG{n}{dc}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set up the axis limits:} \PYG{c+c1}{\PYGZsh{} * the 1st subplot is used as a reference for the x\PYGZhy{}axis limits} \PYG{c+c1}{\PYGZsh{} * lightness values goes from 0 to 100 (y\PYGZhy{}axis limits)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{100.0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set up labels for colormaps} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticks\PYGZus{}position}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ticker} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FixedLocator}\PYG{p}{(}\PYG{n}{locs}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{ticker}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FixedFormatter}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}list}\PYG{p}{[}\PYG{n}{i}\PYG{o}{*}\PYG{n}{dsub}\PYG{p}{:}\PYG{p}{(}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{*}\PYG{n}{dsub}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{50}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ colormaps}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.55}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Lightness \PYGZdl{}L\PYGZca{}*\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{transFigure}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{90}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{n}{h\PYGZus{}pad}\PYG{o}{=}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{1.5}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_008}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_009}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_010}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_011}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_012}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_013}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_014}.png} \end{itemize} \subsubsection{Grayscale conversion} \label{\detokenize{tutorials/colors/colormaps:grayscale-conversion}} It is important to pay attention to conversion to grayscale for color plots, since they may be printed on black and white printers. If not carefully considered, your readers may end up with indecipherable plots because the grayscale changes unpredictably through the colormap. Conversion to grayscale is done in many different ways \sphinxcite{tutorials/colors/colormaps:bw}. Some of the better ones use a linear combination of the rgb values of a pixel, but weighted according to how we perceive color intensity. A nonlinear method of conversion to grayscale is to use the \(L^*\) values of the pixels. In general, similar principles apply for this question as they do for presenting one's information perceptually; that is, if a colormap is chosen that is monotonically increasing in \(L^*\) values, it will print in a reasonable manner to grayscale. With this in mind, we see that the Sequential colormaps have reasonable representations in grayscale. Some of the Sequential2 colormaps have decent enough grayscale representations, though some (autumn, spring, summer, winter) have very little grayscale change. If a colormap like this was used in a plot and then the plot was printed to grayscale, a lot of the information may map to the same gray values. The Diverging colormaps mostly vary from darker gray on the outer edges to white in the middle. Some (PuOr and seismic) have noticeably darker gray on one side than the other and therefore are not very symmetric. coolwarm has little range of gray scale and would print to a more uniform plot, losing a lot of detail. Note that overlaid, labeled contours could help differentiate between one side of the colormap vs. the other since color cannot be used once a plot is printed to grayscale. Many of the Qualitative and Miscellaneous colormaps, such as Accent, hsv, and jet, change from darker to lighter and back to darker gray throughout the colormap. This would make it impossible for a viewer to interpret the information in a plot once it is printed in grayscale. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font.size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{14}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Indices to step through colormap.} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{gradient} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{256}\PYG{p}{)} \PYG{n}{gradient} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{vstack}\PYG{p}{(}\PYG{p}{(}\PYG{n}{gradient}\PYG{p}{,} \PYG{n}{gradient}\PYG{p}{)}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{plot\PYGZus{}color\PYGZus{}gradients}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}list}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ncols}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.95}\PYG{p}{,} \PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.01}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{l+m+mf}{0.99}\PYG{p}{,} \PYG{n}{wspace}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category} \PYG{o}{+} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ colormaps}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{,} \PYG{n}{y}\PYG{o}{=}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{n}{x}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \PYG{k}{for} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{name} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{axes}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Get RGB values for colormap.} \PYG{n}{rgb} \PYG{o}{=} \PYG{n}{cm}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)}\PYG{p}{)}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{newaxis}\PYG{p}{,} \PYG{p}{:}\PYG{p}{,} \PYG{p}{:}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} Get colormap in CAM02\PYGZhy{}UCS colorspace. We want the lightness.} \PYG{n}{lab} \PYG{o}{=} \PYG{n}{cspace\PYGZus{}converter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sRGB1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{CAM02\PYGZhy{}UCS}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{(}\PYG{n}{rgb}\PYG{p}{)} \PYG{n}{L} \PYG{o}{=} \PYG{n}{lab}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n}{L} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{float32}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{vstack}\PYG{p}{(}\PYG{p}{(}\PYG{n}{L}\PYG{p}{,} \PYG{n}{L}\PYG{p}{,} \PYG{n}{L}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{gradient}\PYG{p}{,} \PYG{n}{aspect}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{auto}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{get\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{L}\PYG{p}{,} \PYG{n}{aspect}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{auto}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{binary\PYGZus{}r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{vmin}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{n}{vmax}\PYG{o}{=}\PYG{l+m+mf}{100.}\PYG{p}{)} \PYG{n}{pos} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}position}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{bounds}\PYG{p}{)} \PYG{n}{x\PYGZus{}text} \PYG{o}{=} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{\PYGZhy{}} \PYG{l+m+mf}{0.01} \PYG{n}{y\PYGZus{}text} \PYG{o}{=} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{+} \PYG{n}{pos}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{o}{/}\PYG{l+m+mf}{2.} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{x\PYGZus{}text}\PYG{p}{,} \PYG{n}{y\PYGZus{}text}\PYG{p}{,} \PYG{n}{name}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Turn off *all* ticks \PYGZam{} spines, not just the ones with colormaps.} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}off}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list} \PYG{o+ow}{in} \PYG{n}{cmaps}\PYG{o}{.}\PYG{n}{items}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plot\PYGZus{}color\PYGZus{}gradients}\PYG{p}{(}\PYG{n}{cmap\PYGZus{}category}\PYG{p}{,} \PYG{n}{cmap\PYGZus{}list}\PYG{p}{)} \end{sphinxVerbatim} \begin{itemize} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_015}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_016}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_017}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_018}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_019}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_020}.png} \item {} \noindent\sphinxincludegraphics{{sphx_glr_colormaps_021}.png} \end{itemize} \subsubsection{Color vision deficiencies} \label{\detokenize{tutorials/colors/colormaps:color-vision-deficiencies}} There is a lot of information available about color blindness (\sphinxstyleemphasis{e.g.}, \sphinxcite{tutorials/colors/colormaps:colorblindness}). Additionally, there are tools available to convert images to how they look for different types of color vision deficiencies. The most common form of color vision deficiency involves differentiating between red and green. Thus, avoiding colormaps with both red and green will avoid many problems in general. \subsubsection{References} \label{\detokenize{tutorials/colors/colormaps:references}} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 4.634 seconds) \phantomsection\label{\detokenize{tutorials/colors/colormaps:sphx-glr-download-tutorials-colors-colormaps-py}} \section{Text} \label{\detokenize{tutorials/index:text}}\label{\detokenize{tutorials/index:tutorials-text}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-text}} matplotlib has extensive text support, including support for mathematical expressions, truetype support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. These tutorials cover the basics of working with text in Matplotlib. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/text_intro:sphx-glr-download-tutorials-text-text-intro-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Text in Matplotlib Plots} \label{\detokenize{tutorials/text/text_intro:text-in-matplotlib-plots}}\label{\detokenize{tutorials/text/text_intro:sphx-glr-tutorials-text-text-intro-py}}\label{\detokenize{tutorials/text/text_intro::doc}} Introduction to plotting and working with text in Matplotlib. Matplotlib has extensive text support, including support for mathematical expressions, truetype support for raster and vector outputs, newline separated text with arbitrary rotations, and unicode support. Because it embeds fonts directly in output documents, e.g., for postscript or PDF, what you see on the screen is what you get in the hardcopy. \sphinxhref{https://www.freetype.org/}{FreeType} support produces very nice, antialiased fonts, that look good even at small raster sizes. Matplotlib includes its own {\hyperref[\detokenize{api/font_manager_api:module-matplotlib.font_manager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager}}}}} (thanks to Paul Barrett), which implements a cross platform, \sphinxcode{\sphinxupquote{W3C}} compliant font finding algorithm. The user has a great deal of control over text properties (font size, font weight, text location and color, etc.) with sensible defaults set in the {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{rc file}}}}. And significantly, for those interested in mathematical or scientific figures, Matplotlib implements a large number of TeX math symbols and commands, supporting {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{mathematical expressions}}}} anywhere in your figure. \subsubsection{Basic text commands} \label{\detokenize{tutorials/text/text_intro:basic-text-commands}} The following commands are used to create text in the pyplot interface and the object-oriented API: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} API &\sphinxstyletheadfamily OO API &\sphinxstyletheadfamily description \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & Add text at an arbitrary location of the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate}}}}} & Add an annotation, with an optional arrow, at an arbitrary location of the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlabel}}}}} & Add a label to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}'s x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylabel}}}}} & Add a label to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}'s y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_title}}}}} & Add a title to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figtext:matplotlib.pyplot.figtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figtext}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & Add text at an arbitrary location of the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:matplotlib.pyplot.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}} & Add a title to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} All of these functions create and return a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance, which can be configured with a variety of font and other properties. The example below shows all of these commands in action, and more detail is provided in the sections that follow. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold figure suptitle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{,} \PYG{n}{fontweight}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.85}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xlabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ylabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxed italics text in data coords}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{style}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{italic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{alpha}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pad}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{10}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{an equation: \PYGZdl{}E=mc\PYGZca{}2\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{unicode: Institut für Festkörperphysik}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.95}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{colored text in axes coords}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{annotate}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_001}.png} \subsubsection{Labels for x- and y-axis} \label{\detokenize{tutorials/text/text_intro:labels-for-x-and-y-axis}} Specifying the labels for the x- and y-axis is straightforward, via the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlabel}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylabel}}}}} methods. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{x1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{5.0}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{y1} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi} \PYG{o}{*} \PYG{n}{x1}\PYG{p}{)} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{x1}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Damped oscillation [V]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_002}.png} The x- and y-labels are automatically placed so that they clear the x- and y-ticklabels. Compare the plot below with that above, and note the y-label is to the left of the one above. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{o}{*}\PYG{l+m+mi}{10000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Damped oscillation [V]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_003}.png} If you want to move the labels, you can specify the \sphinxstyleemphasis{labelpad} keyword argument, where the value is points (1/72", the same unit used to specify fontsizes). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{o}{*}\PYG{l+m+mi}{10000}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Damped oscillation [V]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{labelpad}\PYG{o}{=}\PYG{l+m+mi}{18}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_004}.png} Or, the labels accept all the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} keyword arguments, including \sphinxstyleemphasis{position}, via which we can manually specify the label positions. Here we put the xlabel to the far left of the axis. Note, that the y-coordinate of this position has no effect - to adjust the y-position we need to use the \sphinxstyleemphasis{labelpad} kwarg. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{position}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{1e6}\PYG{p}{)}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Damped oscillation [V]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_005}.png} All the labelling in this tutorial can be changed by manipulating the {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} method, or by named kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlabel}}}}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{font\PYGZus{}manager} \PYG{k}{import} \PYG{n}{FontProperties} \PYG{n}{font} \PYG{o}{=} \PYG{n}{FontProperties}\PYG{p}{(}\PYG{p}{)} \PYG{n}{font}\PYG{o}{.}\PYG{n}{set\PYGZus{}family}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{serif}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{font}\PYG{o}{.}\PYG{n}{set\PYGZus{}name}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Times New Roman}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{font}\PYG{o}{.}\PYG{n}{set\PYGZus{}style}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{italic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{large}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontweight}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Damped oscillation [V]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontproperties}\PYG{o}{=}\PYG{n}{font}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_006}.png} Finally, we can use native TeX rendering in all text objects and have multiple lines: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{left}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cumsum}\PYG{p}{(}\PYG{n}{y1}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time [s] }\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{ This was a long experiment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{int}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ Y\PYGZca{}2}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ dt}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ [V\PYGZca{}2 s]\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_007}.png} \subsubsection{Titles} \label{\detokenize{tutorials/text/text_intro:titles}} Subplot titles are set in much the same way as labels, but there is the \sphinxstyleemphasis{loc} keyword arguments that can change the position and justification from the default value of \sphinxcode{\sphinxupquote{loc=center}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{locs} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{k}{for} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{loc} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{,} \PYG{n}{locs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Title with loc at }\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{+}\PYG{n}{loc}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{n}{loc}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_008}.png} Vertical spacing for titles is controlled via \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.titlepad"{]}}}}, which defaults to 5 points. Setting to a different value moves the title. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mf}{0.8}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Vertically offset title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_009}.png} \subsubsection{Ticks and ticklabels} \label{\detokenize{tutorials/text/text_intro:ticks-and-ticklabels}} Placing ticks and ticklabels is a very tricky aspect of making a figure. Matplotlib does the best it can automatically, but it also offers a very flexible framework for determining the choices for tick locations, and how they are labelled. \paragraph{Terminology} \label{\detokenize{tutorials/text/text_intro:terminology}} \sphinxstyleemphasis{Axes} have an {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis}}}}} object for the \sphinxcode{\sphinxupquote{ax.xaxis}} and \sphinxcode{\sphinxupquote{ax.yaxis}} that contain the information about how the labels in the axis are laid out. The axis API is explained in detail in the documentation to {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}}. An Axis object has major and minor ticks. The Axis has a \sphinxcode{\sphinxupquote{matplotlib.xaxis.set\_major\_locator}} and \sphinxcode{\sphinxupquote{matplotlib.xaxis.set\_minor\_locator}} methods that use the data being plotted to determine the location of major and minor ticks. There are also \sphinxcode{\sphinxupquote{matplotlib.xaxis.set\_major\_formatter}} and \sphinxcode{\sphinxupquote{matplotlib.xaxis.set\_minor\_formatters}} methods that format the tick labels. \paragraph{Simple ticks} \label{\detokenize{tutorials/text/text_intro:simple-ticks}} It often is convenient to simply define the tick values, and sometimes the tick labels, overriding the default locators and formatters. This is discouraged because it breaks itneractive navigation of the plot. It also can reset the axis limits: note that the second plot has the ticks we asked for, including ones that are well outside the automatic view limits. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{8.1}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_010}.png} We can of course fix this after the fact, but it does highlight a weakness of hard-coding the ticks. This example also changes the format of the ticks: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ticks} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{8.1}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} list comprehension to get all tick labels...} \PYG{n}{tickla} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.2f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{n}{tick} \PYG{k}{for} \PYG{n}{tick} \PYG{o+ow}{in} \PYG{n}{ticks}\PYG{p}{]} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticks}\PYG{p}{(}\PYG{n}{ticks}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticklabels}\PYG{p}{(}\PYG{n}{tickla}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_011}.png} \paragraph{Tick Locators and Formatters} \label{\detokenize{tutorials/text/text_intro:tick-locators-and-formatters}} Instead of making a list of all the tickalbels, we could have used a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FormatStrFormatter}}}}} and passed it to the \sphinxcode{\sphinxupquote{ax.xaxis}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ticks} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{8.1}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} list comprehension to get all tick labels...} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{StrMethodFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZob{}x:1.1f\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticks}\PYG{p}{(}\PYG{n}{ticks}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_012}.png} And of course we could have used a non-default locator to set the tick locations. Note we still pass in the tick values, but the x-limit fix used above is \sphinxstyleemphasis{not} needed. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FormatStrFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.1f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FixedLocator}\PYG{p}{(}\PYG{n}{ticks}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_013}.png} The default formatter is the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} called as \sphinxcode{\sphinxupquote{ticker.MaxNLocator(self, nbins='auto', steps={[}1, 2, 2.5, 5, 10{]})}} The \sphinxstyleemphasis{steps} keyword contains a list of multiples that can be used for tick values. i.e. in this case, 2, 4, 6 would be acceptable ticks, as would 20, 40, 60 or 0.2, 0.4, 0.6. However, 3, 6, 9 would not be acceptable because 3 doesn't appear in the list of steps. \sphinxcode{\sphinxupquote{nbins=auto}} uses an algorithm to determine how many ticks will be acceptable based on how long the axis is. The fontsize of the ticklabel is taken into account, but the length of the tick string is not (because its not yet known.) In the bottom row, the ticklabels are quite large, so we set \sphinxcode{\sphinxupquote{nbins=4}} to make the labels fit in the right-hand plot. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{k}{for} \PYG{n}{n}\PYG{p}{,} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{axs}\PYG{o}{.}\PYG{n}{flat}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{o}{*}\PYG{l+m+mf}{10.}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FormatStrFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.1f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{MaxNLocator}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{auto}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{steps}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FormatStrFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.5f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{AutoLocator}\PYG{p}{(}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FormatStrFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.5f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{MaxNLocator}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_014}.png} Finally, we can specify functions for the formatter using {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FuncFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FuncFormatter}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{formatoddticks}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{pos}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}Format odd tick positions} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{if} \PYG{n}{x} \PYG{o}{\PYGZpc{}} \PYG{l+m+mi}{2}\PYG{p}{:} \PYG{k}{return} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}1.2f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{n}{x} \PYG{k}{else}\PYG{p}{:} \PYG{k}{return} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FuncFormatter}\PYG{p}{(}\PYG{n}{formatoddticks}\PYG{p}{)} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{MaxNLocator}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{6}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_015}.png} \paragraph{Dateticks} \label{\detokenize{tutorials/text/text_intro:dateticks}} Matplotlib can accept \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime.datetime}}} and \sphinxcode{\sphinxupquote{numpy.datetime64}} objects as plotting arguments. Dates and times require special formatting, which can often benefit from manual intervention. In order to help, dates have special Locators and Formatters, defined in the {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}} module. A simple example is as follows. Note how we have to rotate the tick labels so that they don't over-run each other. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{datetime} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{base} \PYG{o}{=} \PYG{n}{datetime}\PYG{o}{.}\PYG{n}{datetime}\PYG{p}{(}\PYG{l+m+mi}{2017}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{time} \PYG{o}{=} \PYG{p}{[}\PYG{n}{base} \PYG{o}{+} \PYG{n}{datetime}\PYG{o}{.}\PYG{n}{timedelta}\PYG{p}{(}\PYG{n}{days}\PYG{o}{=}\PYG{n}{x}\PYG{p}{)} \PYG{k}{for} \PYG{n}{x} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{y1}\PYG{p}{)}\PYG{p}{)}\PYG{p}{]} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{time}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{axis}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{70}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_016}.png} We can pass a format to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.DateFormatter}}}}}. Also note that the 29th and the next month are very close together. We can fix this by using the \sphinxcode{\sphinxupquote{dates.DayLocator}} class, which allows us to specify a list of days of the month to use. Similar formatters are listed in the {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}} module. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{as} \PYG{n+nn}{mdates} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DayLocator}\PYG{p}{(}\PYG{n}{bymonthday}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{]}\PYG{p}{)} \PYG{n}{formatter} \PYG{o}{=} \PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b }\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{tight\PYGZus{}layout}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{time}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{axis}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{70}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_intro_017}.png} \subsubsection{Legends and Annotations} \label{\detokenize{tutorials/text/text_intro:legends-and-annotations}}\begin{itemize} \item {} Legends: {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} \item {} Annotations: {\hyperref[\detokenize{tutorials/text/annotations::doc}]{\sphinxcrossref{\DUrole{doc}{Annotations}}}} \end{itemize} \sphinxstylestrong{Total running time of the script:} ( 0 minutes 1.366 seconds) \phantomsection\label{\detokenize{tutorials/text/text_intro:sphx-glr-download-tutorials-text-text-intro-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/text_props:sphx-glr-download-tutorials-text-text-props-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Text properties and layout} \label{\detokenize{tutorials/text/text_props:text-properties-and-layout}}\label{\detokenize{tutorials/text/text_props:sphx-glr-tutorials-text-text-props-py}}\label{\detokenize{tutorials/text/text_props::doc}} Controlling properties of text and its layout with Matplotlib. The {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instances have a variety of properties which can be configured via keyword arguments to the text commands (e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}}). \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Value Type \\ \hline alpha & \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#float}{\sphinxcode{\sphinxupquote{float}}} \\ \hline backgroundcolor & any matplotlib {\hyperref[\detokenize{tutorials/colors/colors::doc}]{\sphinxcrossref{\DUrole{doc}{color}}}} \\ \hline bbox & {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} prop dict plus key \sphinxcode{\sphinxupquote{'pad'}} which is a pad in points \\ \hline clip\_box & a matplotlib.transform.Bbox instance \\ \hline clip\_on & bool \\ \hline clip\_path & a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance and a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \\ \hline color & any matplotlib {\hyperref[\detokenize{tutorials/colors/colors::doc}]{\sphinxcrossref{\DUrole{doc}{color}}}} \\ \hline family & {[} \sphinxcode{\sphinxupquote{'serif'}} \textbar{} \sphinxcode{\sphinxupquote{'sans-serif'}} \textbar{} \sphinxcode{\sphinxupquote{'cursive'}} \textbar{} \sphinxcode{\sphinxupquote{'fantasy'}} \textbar{} \sphinxcode{\sphinxupquote{'monospace'}} {]} \\ \hline fontproperties & a {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} instance \\ \hline horizontalalignment or ha & {[} \sphinxcode{\sphinxupquote{'center'}} \textbar{} \sphinxcode{\sphinxupquote{'right'}} \textbar{} \sphinxcode{\sphinxupquote{'left'}} {]} \\ \hline label & any string \\ \hline linespacing & \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#float}{\sphinxcode{\sphinxupquote{float}}} \\ \hline multialignment & {[}\sphinxcode{\sphinxupquote{'left'}} \textbar{} \sphinxcode{\sphinxupquote{'right'}} \textbar{} \sphinxcode{\sphinxupquote{'center'}} {]} \\ \hline name or fontname & string e.g., {[}\sphinxcode{\sphinxupquote{'Sans'}} \textbar{} \sphinxcode{\sphinxupquote{'Courier'}} \textbar{} \sphinxcode{\sphinxupquote{'Helvetica'}} ...{]} \\ \hline picker & {[}None\textbar{}float\textbar{}boolean\textbar{}callable{]} \\ \hline position & (x, y) \\ \hline rotation & {[} angle in degrees \textbar{} \sphinxcode{\sphinxupquote{'vertical'}} \textbar{} \sphinxcode{\sphinxupquote{'horizontal'}} {]} \\ \hline size or fontsize & {[} size in points \textbar{} relative size, e.g., \sphinxcode{\sphinxupquote{'smaller'}}, \sphinxcode{\sphinxupquote{'x-large'}} {]} \\ \hline style or fontstyle & {[} \sphinxcode{\sphinxupquote{'normal'}} \textbar{} \sphinxcode{\sphinxupquote{'italic'}} \textbar{} \sphinxcode{\sphinxupquote{'oblique'}} {]} \\ \hline text & string or anything printable with '\%s' conversion \\ \hline transform & a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance \\ \hline variant & {[} \sphinxcode{\sphinxupquote{'normal'}} \textbar{} \sphinxcode{\sphinxupquote{'small-caps'}} {]} \\ \hline verticalalignment or va & {[} \sphinxcode{\sphinxupquote{'center'}} \textbar{} \sphinxcode{\sphinxupquote{'top'}} \textbar{} \sphinxcode{\sphinxupquote{'bottom'}} \textbar{} \sphinxcode{\sphinxupquote{'baseline'}} {]} \\ \hline visible & bool \\ \hline weight or fontweight & {[} \sphinxcode{\sphinxupquote{'normal'}} \textbar{} \sphinxcode{\sphinxupquote{'bold'}} \textbar{} \sphinxcode{\sphinxupquote{'heavy'}} \textbar{} \sphinxcode{\sphinxupquote{'light'}} \textbar{} \sphinxcode{\sphinxupquote{'ultrabold'}} \textbar{} \sphinxcode{\sphinxupquote{'ultralight'}}{]} \\ \hline x & \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#float}{\sphinxcode{\sphinxupquote{float}}} \\ \hline y & \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#float}{\sphinxcode{\sphinxupquote{float}}} \\ \hline zorder & any number \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} You can lay out text with the alignment arguments \sphinxcode{\sphinxupquote{horizontalalignment}}, \sphinxcode{\sphinxupquote{verticalalignment}}, and \sphinxcode{\sphinxupquote{multialignment}}. \sphinxcode{\sphinxupquote{horizontalalignment}} controls whether the x positional argument for the text indicates the left, center or right side of the text bounding box. \sphinxcode{\sphinxupquote{verticalalignment}} controls whether the y positional argument for the text indicates the bottom, center or top side of the text bounding box. \sphinxcode{\sphinxupquote{multialignment}}, for newline separated strings only, controls whether the different lines are left, center or right justified. Here is an example which uses the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} command to show the various alignment possibilities. The use of \sphinxcode{\sphinxupquote{transform=ax.transAxes}} throughout the code indicates that the coordinates are given relative to the axes bounding box, with 0,0 being the lower left of the axes and 1,1 the upper right. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{patches} \PYG{c+c1}{\PYGZsh{} build a rectangle in axes coords} \PYG{n}{left}\PYG{p}{,} \PYG{n}{width} \PYG{o}{=} \PYG{o}{.}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{height} \PYG{o}{=} \PYG{o}{.}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5} \PYG{n}{right} \PYG{o}{=} \PYG{n}{left} \PYG{o}{+} \PYG{n}{width} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{height} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} axes coordinates are 0,0 is bottom left and 1,1 is upper right} \PYG{n}{p} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{Rectangle}\PYG{p}{(} \PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{)}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{fill}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{clip\PYGZus{}on}\PYG{o}{=}\PYG{k+kc}{False} \PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{p}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{n}{top}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bottom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{n}{top}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{+}\PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{+}\PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{p}{(}\PYG{n}{left}\PYG{o}{+}\PYG{n}{right}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{+}\PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{middle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{right}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{o}{*}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{+}\PYG{n}{top}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{centered}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{vertical}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{top}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rotated}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{with newlines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}off}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_text_props_001}.png} \subsection{Default Font} \label{\detokenize{tutorials/text/text_props:default-font}} The base default font is controlled by a set of rcParams. To set the font for mathematical expressions, use the rcParams beginning with \sphinxcode{\sphinxupquote{mathtext}} (see {\hyperref[\detokenize{tutorials/text/mathtext:mathtext-fonts}]{\sphinxcrossref{\DUrole{std,std-ref}{mathtext}}}}). \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily rcParam &\sphinxstyletheadfamily usage \\ \hline \sphinxcode{\sphinxupquote{'font.family'}} & List of either names of font or \sphinxcode{\sphinxupquote{\{'cursive', 'fantasy', 'monospace', 'sans', 'sans serif', 'sans-serif', 'serif'\}}}. \\ \hline \sphinxcode{\sphinxupquote{'font.style'}} & The default style, ex \sphinxcode{\sphinxupquote{'normal'}}, \sphinxcode{\sphinxupquote{'italic'}}. \\ \hline \sphinxcode{\sphinxupquote{'font.variant'}} & Default variant, ex \sphinxcode{\sphinxupquote{'normal'}}, \sphinxcode{\sphinxupquote{'small-caps'}} (untested) \\ \hline \sphinxcode{\sphinxupquote{'font.stretch'}} & Default stretch, ex \sphinxcode{\sphinxupquote{'normal'}}, \sphinxcode{\sphinxupquote{'condensed'}} (incomplete) \\ \hline \sphinxcode{\sphinxupquote{'font.weight'}} & Default weight. Either string or integer \\ \hline \sphinxcode{\sphinxupquote{'font.size'}} & Default font size in points. Relative font sizes (\sphinxcode{\sphinxupquote{'large'}}, \sphinxcode{\sphinxupquote{'x-small'}}) are computed against this size. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The mapping between the family aliases (\sphinxcode{\sphinxupquote{\{'cursive', 'fantasy', 'monospace', 'sans', 'sans serif', 'sans-serif', 'serif'\}}}) and actual font names is controlled by the following rcParams: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily family alias &\sphinxstyletheadfamily rcParam with mappings \\ \hline \sphinxcode{\sphinxupquote{'serif'}} & \sphinxcode{\sphinxupquote{'font.serif'}} \\ \hline \sphinxcode{\sphinxupquote{'monospace'}} & \sphinxcode{\sphinxupquote{'font.monospace'}} \\ \hline \sphinxcode{\sphinxupquote{'fantasy'}} & \sphinxcode{\sphinxupquote{'font.fantasy'}} \\ \hline \sphinxcode{\sphinxupquote{'cursive'}} & \sphinxcode{\sphinxupquote{'font.cursive'}} \\ \hline \sphinxcode{\sphinxupquote{\{'sans', 'sans serif', 'sans-serif'\}}} & \sphinxcode{\sphinxupquote{'font.sans-serif'}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} which are lists of font names. \subsubsection{Text with non-latin glyphs} \label{\detokenize{tutorials/text/text_props:text-with-non-latin-glyphs}} As of v2.0 the {\hyperref[\detokenize{users/dflt_style_changes:default-changes-font}]{\sphinxcrossref{\DUrole{std,std-ref}{default font}}}} contains glyphs for many western alphabets, but still does not cover all of the glyphs that may be required by mpl users. For example, DejaVu has no coverage of Chinese, Korean, or Japanese. To set the default font to be one that supports the code points you need, prepend the font name to \sphinxcode{\sphinxupquote{'font.family'}} or the desired alias lists \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font.sans\PYGZhy{}serif}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Source Han Sans TW}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{sans\PYGZhy{}serif}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} or set it in your \sphinxcode{\sphinxupquote{.matplotlibrc}} file: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{font}\PYG{o}{.}\PYG{n}{sans}\PYG{o}{\PYGZhy{}}\PYG{n}{serif}\PYG{p}{:} \PYG{n}{Source} \PYG{n}{Han} \PYG{n}{Sans} \PYG{n}{TW}\PYG{p}{,} \PYG{n}{Arial}\PYG{p}{,} \PYG{n}{sans}\PYG{o}{\PYGZhy{}}\PYG{n}{serif} \end{sphinxVerbatim} To control the font used on per-artist basis use the \sphinxcode{\sphinxupquote{'name'}}, \sphinxcode{\sphinxupquote{'fontname'}} or \sphinxcode{\sphinxupquote{'fontproperties'}} kwargs documented {\hyperref[\detokenize{tutorials/text/text_props::doc}]{\sphinxcrossref{\DUrole{doc}{above}}}}. On linux, \sphinxhref{https://linux.die.net/man/1/fc-list}{fc-list} can be a useful tool to discover the font name; for example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} fc\PYGZhy{}list :lang=zh family Noto to Sans Mono CJK TC,Noto Sans Mono CJK TC Bold Noto Sans CJK TC,Noto Sans CJK TC Medium Noto Sans CJK TC,Noto Sans CJK TC DemiLight Noto Sans CJK KR,Noto Sans CJK KR Black Noto Sans CJK TC,Noto Sans CJK TC Black Noto Sans Mono CJK TC,Noto Sans Mono CJK TC Regular Noto Sans CJK SC,Noto Sans CJK SC Light \end{sphinxVerbatim} lists all of the fonts that support Chinese. \phantomsection\label{\detokenize{tutorials/text/text_props:sphx-glr-download-tutorials-text-text-props-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/annotations:sphx-glr-download-tutorials-text-annotations-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Annotations} \label{\detokenize{tutorials/text/annotations:annotations}}\label{\detokenize{tutorials/text/annotations:sphx-glr-tutorials-text-annotations-py}}\label{\detokenize{tutorials/text/annotations::doc}} Annotating text with Matplotlib. \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id23}}{\hyperref[\detokenize{tutorials/text/annotations:annotations}]{\sphinxcrossref{Annotations}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id24}}{\hyperref[\detokenize{tutorials/text/annotations:basic-annotation}]{\sphinxcrossref{Basic annotation}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id25}}{\hyperref[\detokenize{tutorials/text/annotations:advanced-annotation}]{\sphinxcrossref{Advanced Annotation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id26}}{\hyperref[\detokenize{tutorials/text/annotations:annotating-with-text-with-box}]{\sphinxcrossref{Annotating with Text with Box}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id27}}{\hyperref[\detokenize{tutorials/text/annotations:annotating-with-arrow}]{\sphinxcrossref{Annotating with Arrow}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id28}}{\hyperref[\detokenize{tutorials/text/annotations:placing-artist-at-the-anchored-location-of-the-axes}]{\sphinxcrossref{Placing Artist at the anchored location of the Axes}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id29}}{\hyperref[\detokenize{tutorials/text/annotations:using-complex-coordinates-with-annotations}]{\sphinxcrossref{Using Complex Coordinates with Annotations}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id30}}{\hyperref[\detokenize{tutorials/text/annotations:using-connectionpatch}]{\sphinxcrossref{Using ConnectionPatch}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id31}}{\hyperref[\detokenize{tutorials/text/annotations:advanced-topics}]{\sphinxcrossref{Advanced Topics}}} \end{itemize} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id32}}{\hyperref[\detokenize{tutorials/text/annotations:zoom-effect-between-axes}]{\sphinxcrossref{Zoom effect between Axes}}} \item {} \phantomsection\label{\detokenize{tutorials/text/annotations:id33}}{\hyperref[\detokenize{tutorials/text/annotations:define-custom-boxstyle}]{\sphinxcrossref{Define Custom BoxStyle}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{Basic annotation} \label{\detokenize{tutorials/text/annotations:basic-annotation}}\label{\detokenize{tutorials/text/annotations:annotations-tutorial}} The uses of the basic {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} will place text at an arbitrary position on the Axes. A common use case of text is to annotate some feature of the plot, and the \sphinxcode{\sphinxupquote{annotate()}} method provides helper functionality to make annotations easy. In an annotation, there are two points to consider: the location being annotated represented by the argument \sphinxcode{\sphinxupquote{xy}} and the location of the text \sphinxcode{\sphinxupquote{xytext}}. Both of these arguments are \sphinxcode{\sphinxupquote{(x,y)}} tuples. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/annotation\_basic.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotation_basic_0011}.png}} \caption{Annotation Basic}\label{\detokenize{tutorials/text/annotations:id1}}\end{figure} In this example, both the \sphinxcode{\sphinxupquote{xy}} (arrow tip) and \sphinxcode{\sphinxupquote{xytext}} locations (text location) are in data coordinates. There are a variety of other coordinate systems one can choose -- you can specify the coordinate system of \sphinxcode{\sphinxupquote{xy}} and \sphinxcode{\sphinxupquote{xytext}} with one of the following strings for \sphinxcode{\sphinxupquote{xycoords}} and \sphinxcode{\sphinxupquote{textcoords}} (default is 'data') \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily argument &\sphinxstyletheadfamily coordinate system \\ \hline 'figure points' & points from the lower left corner of the figure \\ \hline 'figure pixels' & pixels from the lower left corner of the figure \\ \hline 'figure fraction' & 0,0 is lower left of figure and 1,1 is upper right \\ \hline 'axes points' & points from lower left corner of axes \\ \hline 'axes pixels' & pixels from lower left corner of axes \\ \hline 'axes fraction' & 0,0 is lower left of axes and 1,1 is upper right \\ \hline 'data' & use the axes data coordinate system \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} For example to place the text coordinates in fractional axes coordinates, one could do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{local max}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.95}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes fraction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{shrink}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{)}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} For physical coordinate systems (points or pixels) the origin is the bottom-left of the figure or axes. Optionally, you can enable drawing of an arrow from the text to the annotated point by giving a dictionary of arrow properties in the optional keyword argument \sphinxcode{\sphinxupquote{arrowprops}}. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily \sphinxcode{\sphinxupquote{arrowprops}} key &\sphinxstyletheadfamily description \\ \hline width & the width of the arrow in points \\ \hline frac & the fraction of the arrow length occupied by the head \\ \hline headwidth & the width of the base of the arrow head in points \\ \hline shrink & move the tip and base some percent away from the annotated point and text \\ \hline **kwargs & any key for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Polygon}}}}}, e.g., \sphinxcode{\sphinxupquote{facecolor}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} In the example below, the \sphinxcode{\sphinxupquote{xy}} point is in native coordinates (\sphinxcode{\sphinxupquote{xycoords}} defaults to 'data'). For a polar axes, this is in (theta, radius) space. The text in this example is placed in the fractional figure coordinate system. {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} keyword args like \sphinxcode{\sphinxupquote{horizontalalignment}}, \sphinxcode{\sphinxupquote{verticalalignment}} and \sphinxcode{\sphinxupquote{fontsize}} are passed from \sphinxcode{\sphinxupquote{annotate}} to the \sphinxcode{\sphinxupquote{Text}} instance. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/annotation\_polar.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotation_polar_0011}.png}} \caption{Annotation Polar}\label{\detokenize{tutorials/text/annotations:id2}}\end{figure} For more on all the wild and wonderful things you can do with annotations, including fancy arrows, see {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}} and \DUrole{xref,std,std-doc}{/gallery/text\_labels\_and\_annotations/annotation\_demo}. Do not proceed unless you have already read {\hyperref[\detokenize{tutorials/text/annotations:annotations-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Basic annotation}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}}! \subsection{Advanced Annotation} \label{\detokenize{tutorials/text/annotations:advanced-annotation}}\label{\detokenize{tutorials/text/annotations:plotting-guide-annotation}} \subsubsection{Annotating with Text with Box} \label{\detokenize{tutorials/text/annotations:annotating-with-text-with-box}} Let's start with a simple example. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_text\_arrow.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_text_arrow_0011}.png}} \caption{Annotate Text Arrow}\label{\detokenize{tutorials/text/annotations:id3}}\end{figure} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} function in the pyplot module (or text method of the Axes class) takes bbox keyword argument, and when given, a box around the text is drawn. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bbox\PYGZus{}props} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{boxstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{rarrow,pad=0.3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{cyan}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{ec}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Direction}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n}{bbox\PYGZus{}props}\PYG{p}{)} \end{sphinxVerbatim} The patch object associated with the text can be accessed by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bb} \PYG{o}{=} \PYG{n}{t}\PYG{o}{.}\PYG{n}{get\PYGZus{}bbox\PYGZus{}patch}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The return value is an instance of FancyBboxPatch and the patch properties like facecolor, edgewidth, etc. can be accessed and modified as usual. To change the shape of the box, use the \sphinxstyleemphasis{set\_boxstyle} method. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bb}\PYG{o}{.}\PYG{n}{set\PYGZus{}boxstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{rarrow}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.6}\PYG{p}{)} \end{sphinxVerbatim} The arguments are the name of the box style with its attributes as keyword arguments. Currently, following box styles are implemented. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Circle & \sphinxcode{\sphinxupquote{circle}} & pad=0.3 \\ \hline DArrow & \sphinxcode{\sphinxupquote{darrow}} & pad=0.3 \\ \hline LArrow & \sphinxcode{\sphinxupquote{larrow}} & pad=0.3 \\ \hline RArrow & \sphinxcode{\sphinxupquote{rarrow}} & pad=0.3 \\ \hline Round & \sphinxcode{\sphinxupquote{round}} & pad=0.3,rounding\_size=None \\ \hline Round4 & \sphinxcode{\sphinxupquote{round4}} & pad=0.3,rounding\_size=None \\ \hline Roundtooth & \sphinxcode{\sphinxupquote{roundtooth}} & pad=0.3,tooth\_size=None \\ \hline Sawtooth & \sphinxcode{\sphinxupquote{sawtooth}} & pad=0.3,tooth\_size=None \\ \hline Square & \sphinxcode{\sphinxupquote{square}} & pad=0.3 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/shapes\_and\_collections/fancybox\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_fancybox_demo_0011}.png}} \caption{Fancybox Demo}\label{\detokenize{tutorials/text/annotations:id4}}\end{figure} Note that the attribute arguments can be specified within the style name with separating comma (this form can be used as "boxstyle" value of bbox argument when initializing the text instance) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bb}\PYG{o}{.}\PYG{n}{set\PYGZus{}boxstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{rarrow,pad=0.6}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Annotating with Arrow} \label{\detokenize{tutorials/text/annotations:annotating-with-arrow}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} function in the pyplot module (or annotate method of the Axes class) is used to draw an arrow connecting two points on the plot. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Annotation}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{offset points}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} This annotates a point at \sphinxcode{\sphinxupquote{xy}} in the given coordinate (\sphinxcode{\sphinxupquote{xycoords}}) with the text at \sphinxcode{\sphinxupquote{xytext}} given in \sphinxcode{\sphinxupquote{textcoords}}. Often, the annotated point is specified in the \sphinxstyleemphasis{data} coordinate and the annotating text in \sphinxstyleemphasis{offset points}. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} for available coordinate systems. An arrow connecting two points (xy \& xytext) can be optionally drawn by specifying the \sphinxcode{\sphinxupquote{arrowprops}} argument. To draw only an arrow, use empty string as the first argument. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{data}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{connectionstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{arc3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple01_0011}.png}} \caption{Annotate Simple01}\label{\detokenize{tutorials/text/annotations:id5}}\end{figure} The arrow drawing takes a few steps. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} a connecting path between two points are created. This is controlled by \sphinxcode{\sphinxupquote{connectionstyle}} key value. \item {} If patch object is given (\sphinxstyleemphasis{patchA} \& \sphinxstyleemphasis{patchB}), the path is clipped to avoid the patch. \item {} The path is further shrunk by given amount of pixels (\sphinxstyleemphasis{shrinkA} \& \sphinxstyleemphasis{shrinkB}) \item {} The path is transmuted to arrow patch, which is controlled by the \sphinxcode{\sphinxupquote{arrowstyle}} key value. \end{enumerate} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_explain.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_explain_0011}.png}} \caption{Annotate Explain}\label{\detokenize{tutorials/text/annotations:id6}}\end{figure} The creation of the connecting path between two points is controlled by \sphinxcode{\sphinxupquote{connectionstyle}} key and the following styles are available. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline \sphinxcode{\sphinxupquote{angle}} & angleA=90,angleB=0,rad=0.0 \\ \hline \sphinxcode{\sphinxupquote{angle3}} & angleA=90,angleB=0 \\ \hline \sphinxcode{\sphinxupquote{arc}} & angleA=0,angleB=0,armA=None,armB=None,rad=0.0 \\ \hline \sphinxcode{\sphinxupquote{arc3}} & rad=0.0 \\ \hline \sphinxcode{\sphinxupquote{bar}} & armA=0.0,armB=0.0,fraction=0.3,angle=None \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Note that "3" in \sphinxcode{\sphinxupquote{angle3}} and \sphinxcode{\sphinxupquote{arc3}} is meant to indicate that the resulting path is a quadratic spline segment (three control points). As will be discussed below, some arrow style options can only be used when the connecting path is a quadratic spline. The behavior of each connection style is (limitedly) demonstrated in the example below. (Warning : The behavior of the \sphinxcode{\sphinxupquote{bar}} style is currently not well defined, it may be changed in the future). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/connectionstyle\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_connectionstyle_demo_0011}.png}} \caption{Connectionstyle Demo}\label{\detokenize{tutorials/text/annotations:id7}}\end{figure} The connecting path (after clipping and shrinking) is then mutated to an arrow patch, according to the given \sphinxcode{\sphinxupquote{arrowstyle}}. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline \sphinxcode{\sphinxupquote{-}} & None \\ \hline \sphinxcode{\sphinxupquote{-\textgreater{}}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{-{[}}} & widthB=1.0,lengthB=0.2,angleB=None \\ \hline \sphinxcode{\sphinxupquote{\textbar{}-\textbar{}}} & widthA=1.0,widthB=1.0 \\ \hline \sphinxcode{\sphinxupquote{-\textbar{}\textgreater{}}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{\textless{}-}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{\textless{}-\textgreater{}}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{\textless{}\textbar{}-}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{\textless{}\textbar{}-\textbar{}\textgreater{}}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{fancy}} & head\_length=0.4,head\_width=0.4,tail\_width=0.4 \\ \hline \sphinxcode{\sphinxupquote{simple}} & head\_length=0.5,head\_width=0.5,tail\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{wedge}} & tail\_width=0.3,shrink\_factor=0.5 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/fancyarrow\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_fancyarrow_demo_0011}.png}} \caption{Fancyarrow Demo}\label{\detokenize{tutorials/text/annotations:id8}}\end{figure} Some arrowstyles only work with connection styles that generate a quadratic-spline segment. They are \sphinxcode{\sphinxupquote{fancy}}, \sphinxcode{\sphinxupquote{simple}}, and \sphinxcode{\sphinxupquote{wedge}}. For these arrow styles, you must use the "angle3" or "arc3" connection style. If the annotation string is given, the patchA is set to the bbox patch of the text by default. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple02.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple02_0011}.png}} \caption{Annotate Simple02}\label{\detokenize{tutorials/text/annotations:id9}}\end{figure} As in the text command, a box around the text can be drawn using the \sphinxcode{\sphinxupquote{bbox}} argument. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple03.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple03_0011}.png}} \caption{Annotate Simple03}\label{\detokenize{tutorials/text/annotations:id10}}\end{figure} By default, the starting point is set to the center of the text extent. This can be adjusted with \sphinxcode{\sphinxupquote{relpos}} key value. The values are normalized to the extent of the text. For example, (0,0) means lower-left corner and (1,1) means top-right. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple04.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple04_0011}.png}} \caption{Annotate Simple04}\label{\detokenize{tutorials/text/annotations:id11}}\end{figure} \subsubsection{Placing Artist at the anchored location of the Axes} \label{\detokenize{tutorials/text/annotations:placing-artist-at-the-anchored-location-of-the-axes}} There are classes of artists that can be placed at an anchored location in the Axes. A common example is the legend. This type of artist can be created by using the OffsetBox class. A few predefined classes are available in \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists}} others in \sphinxcode{\sphinxupquote{matplotlib.offsetbox}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{offsetbox} \PYG{k}{import} \PYG{n}{AnchoredText} \PYG{n}{at} \PYG{o}{=} \PYG{n}{AnchoredText}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Figure 1a}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{prop}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{)} \PYG{n}{at}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}boxstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round,pad=0.,rounding\PYGZus{}size=0.2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{at}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/anchored\_box01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_anchored_box01_0011}.png}} \caption{Anchored Box01}\label{\detokenize{tutorials/text/annotations:id12}}\end{figure} The \sphinxstyleemphasis{loc} keyword has same meaning as in the legend command. A simple application is when the size of the artist (or collection of artists) is known in pixel size during the time of creation. For example, If you want to draw a circle with fixed size of 20 pixel x 20 pixel (radius = 10 pixel), you can utilize \sphinxcode{\sphinxupquote{AnchoredDrawingArea}}. The instance is created with a size of the drawing area (in pixels), and arbitrary artists can added to the drawing area. Note that the extents of the artists that are added to the drawing area are not related to the placement of the drawing area itself. Only the initial size matters. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{anchored\PYGZus{}artists} \PYG{k}{import} \PYG{n}{AnchoredDrawingArea} \PYG{n}{ada} \PYG{o}{=} \PYG{n}{AnchoredDrawingArea}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{p1} \PYG{o}{=} \PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{ada}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{p1}\PYG{p}{)} \PYG{n}{p2} \PYG{o}{=} \PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ada}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{p2}\PYG{p}{)} \end{sphinxVerbatim} The artists that are added to the drawing area should not have a transform set (it will be overridden) and the dimensions of those artists are interpreted as a pixel coordinate, i.e., the radius of the circles in above example are 10 pixels and 5 pixels, respectively. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/anchored\_box02.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_anchored_box02_0011}.png}} \caption{Anchored Box02}\label{\detokenize{tutorials/text/annotations:id13}}\end{figure} Sometimes, you want your artists to scale with the data coordinate (or coordinates other than canvas pixels). You can use \sphinxcode{\sphinxupquote{AnchoredAuxTransformBox}} class. This is similar to \sphinxcode{\sphinxupquote{AnchoredDrawingArea}} except that the extent of the artist is determined during the drawing time respecting the specified transform. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{anchored\PYGZus{}artists} \PYG{k}{import} \PYG{n}{AnchoredAuxTransformBox} \PYG{n}{box} \PYG{o}{=} \PYG{n}{AnchoredAuxTransformBox}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{el} \PYG{o}{=} \PYG{n}{Ellipse}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{n}{angle}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} in data coordinates!} \PYG{n}{box}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{el}\PYG{p}{)} \end{sphinxVerbatim} The ellipse in the above example will have width and height corresponding to 0.1 and 0.4 in data coordinates and will be automatically scaled when the view limits of the axes change. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/anchored\_box03.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_anchored_box03_0011}.png}} \caption{Anchored Box03}\label{\detokenize{tutorials/text/annotations:id14}}\end{figure} As in the legend, the bbox\_to\_anchor argument can be set. Using the HPacker and VPacker, you can have an arrangement(?) of artist as in the legend (as a matter of fact, this is how the legend is created). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/anchored\_box04.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_anchored_box04_0011}.png}} \caption{Anchored Box04}\label{\detokenize{tutorials/text/annotations:id15}}\end{figure} Note that unlike the legend, the \sphinxcode{\sphinxupquote{bbox\_transform}} is set to IdentityTransform by default. \subsubsection{Using Complex Coordinates with Annotations} \label{\detokenize{tutorials/text/annotations:using-complex-coordinates-with-annotations}} The Annotation in matplotlib supports several types of coordinates as described in {\hyperref[\detokenize{tutorials/text/annotations:annotations-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Basic annotation}}}}. For an advanced user who wants more control, it supports a few other options. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance. For example, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} is identical to \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{axes fraction}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} With this, you can annotate a point in other axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{121}\PYG{p}{)}\PYG{p}{,} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{122}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{n}{ax1}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{n}{ax2}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \item {} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instance. The xy value (or xytext) is interpreted as a fractional coordinate of the bbox (return value of \sphinxstyleemphasis{get\_window\_extent}) of the artist. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{an1} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test 1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{data}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{boxstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \PYG{n}{an2} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test 2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{n}{an1}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} (1,0.5) of the an1\PYGZsq{}s bbox} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{offset points}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{center}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{boxstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple\_coord01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple_coord01_0011}.png}} \caption{Annotation with Simple Coordinates}\label{\detokenize{tutorials/text/annotations:id16}}\end{figure} Note that it is your responsibility that the extent of the coordinate artist (\sphinxstyleemphasis{an1} in above example) is determined before \sphinxstyleemphasis{an2} gets drawn. In most cases, it means that \sphinxstyleemphasis{an2} needs to be drawn later than \sphinxstyleemphasis{an1}. \item {} A callable object that returns an instance of either {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}. If a transform is returned, it is the same as 1 and if a bbox is returned, it is the same as 2. The callable object should take a single argument of the renderer instance. For example, the following two commands give identical results \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{an2} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test 2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{n}{an1}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{offset points}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{an2} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test 2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{n}{an1}\PYG{o}{.}\PYG{n}{get\PYGZus{}window\PYGZus{}extent}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{textcoords}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{offset points}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} A tuple of two coordinate specifications. The first item is for the x-coordinate and the second is for the y-coordinate. For example, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Test}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xycoords}\PYG{o}{=}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{data}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{axes fraction}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} 0.5 is in data coordinates, and 1 is in normalized axes coordinates. You may use an artist or transform as with a tuple. For example, \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple\_coord02.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple_coord02_0011}.png}} \caption{Annotation with Simple Coordinates 2}\label{\detokenize{tutorials/text/annotations:id17}}\end{figure} \item {} Sometimes, you want your annotation with some "offset points", not from the annotated point but from some other point. {\hyperref[\detokenize{api/text_api:matplotlib.text.OffsetFrom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{OffsetFrom}}}}} is a helper class for such cases. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/annotate\_simple\_coord03.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_annotate_simple_coord03_0011}.png}} \caption{Annotation with Simple Coordinates 3}\label{\detokenize{tutorials/text/annotations:id18}}\end{figure} You may take a look at this example \DUrole{xref,std,std-doc}{/gallery/text\_labels\_and\_annotations/annotation\_demo}. \end{enumerate} \subsubsection{Using ConnectionPatch} \label{\detokenize{tutorials/text/annotations:using-connectionpatch}} The ConnectionPatch is like an annotation without text. While the annotate function is recommended in most situations, the ConnectionPatch is useful when you want to connect points in different axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{import} \PYG{n}{ConnectionPatch} \PYG{n}{xy} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{con} \PYG{o}{=} \PYG{n}{ConnectionPatch}\PYG{p}{(}\PYG{n}{xyA}\PYG{o}{=}\PYG{n}{xy}\PYG{p}{,} \PYG{n}{xyB}\PYG{o}{=}\PYG{n}{xy}\PYG{p}{,} \PYG{n}{coordsA}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{data}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{coordsB}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{data}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{axesA}\PYG{o}{=}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{axesB}\PYG{o}{=}\PYG{n}{ax2}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{con}\PYG{p}{)} \end{sphinxVerbatim} The above code connects point xy in the data coordinates of \sphinxcode{\sphinxupquote{ax1}} to point xy in the data coordinates of \sphinxcode{\sphinxupquote{ax2}}. Here is a simple example. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/connect\_simple01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_connect_simple01_0011}.png}} \caption{Connect Simple01}\label{\detokenize{tutorials/text/annotations:id19}}\end{figure} While the ConnectionPatch instance can be added to any axes, you may want to add it to the axes that is latest in drawing order to prevent overlap by other axes. \paragraph{Advanced Topics} \label{\detokenize{tutorials/text/annotations:advanced-topics}} \subsubsection{Zoom effect between Axes} \label{\detokenize{tutorials/text/annotations:zoom-effect-between-axes}} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator}} defines some patch classes useful for interconnecting two axes. Understanding the code requires some knowledge of how mpl's transform works. But, utilizing it will be straight forward. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/subplots\_axes\_and\_figures/axes\_zoom\_effect.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_axes_zoom_effect_0011}.png}} \caption{Axes Zoom Effect}\label{\detokenize{tutorials/text/annotations:id20}}\end{figure} \subsubsection{Define Custom BoxStyle} \label{\detokenize{tutorials/text/annotations:define-custom-boxstyle}} You can use a custom box style. The value for the \sphinxcode{\sphinxupquote{boxstyle}} can be a callable object in the following forms.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{mutation\PYGZus{}size}\PYG{p}{,} \PYG{n}{aspect\PYGZus{}ratio}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZsq{}\PYGZsq{}\PYGZsq{}} \PYG{l+s+sd}{ Given the location and size of the box, return the path of} \PYG{l+s+sd}{ the box around it.} \PYG{l+s+sd}{ \PYGZhy{} *x0*, *y0*, *width*, *height* : location and size of the box} \PYG{l+s+sd}{ \PYGZhy{} *mutation\PYGZus{}size* : a reference scale for the mutation.} \PYG{l+s+sd}{ \PYGZhy{} *aspect\PYGZus{}ratio* : aspect\PYGZhy{}ratio for the mutation.} \PYG{l+s+sd}{ \PYGZsq{}\PYGZsq{}\PYGZsq{}} \PYG{n}{path} \PYG{o}{=} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{k}{return} \PYG{n}{path} \end{sphinxVerbatim} Here is a complete example. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/custom\_boxstyle01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_custom_boxstyle01_0011}.png}} \caption{Custom Boxstyle01}\label{\detokenize{tutorials/text/annotations:id21}}\end{figure} However, it is recommended that you derive from the matplotlib.patches.BoxStyle.\_Base as demonstrated below. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/custom\_boxstyle02.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_custom_boxstyle02_0011}.png}} \caption{Custom Boxstyle02}\label{\detokenize{tutorials/text/annotations:id22}}\end{figure} Similarly, you can define a custom ConnectionStyle and a custom ArrowStyle. See the source code of \sphinxcode{\sphinxupquote{lib/matplotlib/patches.py}} and check how each style class is defined. \phantomsection\label{\detokenize{tutorials/text/annotations:sphx-glr-download-tutorials-text-annotations-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/mathtext:sphx-glr-download-tutorials-text-mathtext-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Writing mathematical expressions} \label{\detokenize{tutorials/text/mathtext:writing-mathematical-expressions}}\label{\detokenize{tutorials/text/mathtext:sphx-glr-tutorials-text-mathtext-py}}\label{\detokenize{tutorials/text/mathtext::doc}} An introduction to writing mathematical expressions in Matplotlib. You can use a subset TeX markup in any matplotlib text string by placing it inside a pair of dollar signs (\$). Note that you do not need to have TeX installed, since Matplotlib ships its own TeX expression parser, layout engine, and fonts. The layout engine is a fairly direct adaptation of the layout algorithms in Donald Knuth's TeX, so the quality is quite good (matplotlib also provides a \sphinxcode{\sphinxupquote{usetex}} option for those who do want to call out to TeX to generate their text (see {\hyperref[\detokenize{tutorials/text/usetex::doc}]{\sphinxcrossref{\DUrole{doc}{Text rendering With LaTeX}}}}). Any text element can use math text. You should use raw strings (precede the quotes with an \sphinxcode{\sphinxupquote{'r'}}), and surround the math text with dollar signs (\$), as in TeX. Regular text and mathtext can be interleaved within the same string. Mathtext can use DejaVu Sans (default), DejaVu Serif, the Computer Modern fonts (from (La)TeX), \sphinxhref{http://www.stixfonts.org/}{STIX} fonts (with are designed to blend well with Times), or a Unicode font that you provide. The mathtext font can be selected with the customization variable \sphinxcode{\sphinxupquote{mathtext.fontset}} (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}) Here is a simple example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} plain text} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{alpha \PYGZgt{} beta}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} produces "alpha \textgreater{} beta". Whereas this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} math text} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{title}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{alpha \PYGZgt{} }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{beta\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} produces "$\alpha > \beta$". \begin{sphinxadmonition}{note}{Note:} Mathtext should be placed between a pair of dollar signs (\$). To make it easy to display monetary values, e.g., "\$100.00", if a single dollar sign is present in the entire string, it will be displayed verbatim as a dollar sign. This is a small change from regular TeX, where the dollar sign in non-math text would have to be escaped ('\textbackslash{}\$'). \end{sphinxadmonition} \begin{sphinxadmonition}{note}{Note:} While the syntax inside the pair of dollar signs (\$) aims to be TeX-like, the text outside does not. In particular, characters such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} \PYGZdl{} \PYGZpc{} \PYGZam{} \PYGZti{} \PYGZus{} \PYGZca{} \PYGZbs{} \PYGZob{} \PYGZcb{} \PYGZbs{}( \PYGZbs{}) \PYGZbs{}[ \PYGZbs{}]} \end{sphinxVerbatim} have special meaning outside of math mode in TeX. Therefore, these characters will behave differently depending on the rcParam \sphinxcode{\sphinxupquote{text.usetex}} flag. See the {\hyperref[\detokenize{tutorials/text/usetex::doc}]{\sphinxcrossref{\DUrole{doc}{usetex tutorial}}}} for more information. \end{sphinxadmonition} \subsubsection{Subscripts and superscripts} \label{\detokenize{tutorials/text/mathtext:subscripts-and-superscripts}} To make subscripts and superscripts, use the \sphinxcode{\sphinxupquote{'\_'}} and \sphinxcode{\sphinxupquote{'\textasciicircum{}'}} symbols: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{alpha\PYGZus{}i \PYGZgt{} }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{beta\PYGZus{}i\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\alpha_i > \beta_i\end{split} \end{equation*} Some symbols automatically put their sub/superscripts under and over the operator. For example, to write the sum of $x_i$ from $0$ to $\infty$, you could do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sum\PYGZus{}}\PYG{l+s+s1}{\PYGZob{}}\PYG{l+s+s1}{i=0\PYGZcb{}\PYGZca{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{infty x\PYGZus{}i\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\sum_{i=0}^\infty x_i\end{split} \end{equation*} \subsubsection{Fractions, binomials, and stacked numbers} \label{\detokenize{tutorials/text/mathtext:fractions-binomials-and-stacked-numbers}} Fractions, binomials, and stacked numbers can be created with the \sphinxcode{\sphinxupquote{\textbackslash{}frac\{\}\{\}}}, \sphinxcode{\sphinxupquote{\textbackslash{}binom\{\}\{\}}} and \sphinxcode{\sphinxupquote{\textbackslash{}genfrac\{\}\{\}\{\}\{\}\{\}\{\}}} commands, respectively: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+si}{\PYGZob{}3\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{binom}\PYG{l+s+si}{\PYGZob{}3\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{genfrac}\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}0\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}3\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} produces \begin{equation*} \begin{split}\frac{3}{4} \binom{3}{4} \stackrel{}{}{0}{}{3}{4}\end{split} \end{equation*} Fractions can be arbitrarily nested: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+s1}{\PYGZob{}}\PYG{l+s+s1}{5 \PYGZhy{} }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+si}{\PYGZob{}1\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}x\PYGZcb{}}\PYG{l+s+s1}{\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} produces \begin{equation*} \begin{split}\frac{5 - \frac{1}{x}}{4}\end{split} \end{equation*} Note that special care needs to be taken to place parentheses and brackets around fractions. Doing things the obvious way produces brackets that are too small: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}(}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+s1}{\PYGZob{}}\PYG{l+s+s1}{5 \PYGZhy{} }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+si}{\PYGZob{}1\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}x\PYGZcb{}}\PYG{l+s+s1}{\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{)\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}(\frac{5 - \frac{1}{x}}{4})\end{split} \end{equation*} The solution is to precede the bracket with \sphinxcode{\sphinxupquote{\textbackslash{}left}} and \sphinxcode{\sphinxupquote{\textbackslash{}right}} to inform the parser that those brackets encompass the entire object.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{left(}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+s1}{\PYGZob{}}\PYG{l+s+s1}{5 \PYGZhy{} }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{frac}\PYG{l+s+si}{\PYGZob{}1\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}x\PYGZcb{}}\PYG{l+s+s1}{\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}4\PYGZcb{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{right)\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\left(\frac{5 - \frac{1}{x}}{4}\right)\end{split} \end{equation*} \subsubsection{Radicals} \label{\detokenize{tutorials/text/mathtext:radicals}} Radicals can be produced with the \sphinxcode{\sphinxupquote{\textbackslash{}sqrt{[}{]}\{\}}} command. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sqrt}\PYG{l+s+si}{\PYGZob{}2\PYGZcb{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\sqrt{2}\end{split} \end{equation*} Any base can (optionally) be provided inside square brackets. Note that the base must be a simple expression, and can not contain layout commands such as fractions or sub/superscripts: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sqrt[3]}\PYG{l+s+si}{\PYGZob{}x\PYGZcb{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\sqrt[3]{x}\end{split} \end{equation*} \subsubsection{Fonts} \label{\detokenize{tutorials/text/mathtext:fonts}}\label{\detokenize{tutorials/text/mathtext:mathtext-fonts}} The default font is \sphinxstyleemphasis{italics} for mathematical symbols. \begin{sphinxadmonition}{note}{Note:} This default can be changed using the \sphinxcode{\sphinxupquote{mathtext.default}} rcParam. This is useful, for example, to use the same font as regular non-math text for math text, by setting it to \sphinxcode{\sphinxupquote{regular}}. \end{sphinxadmonition} To change fonts, e.g., to write "sin" in a Roman font, enclose the text in a font command: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}s(t) = }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mathcal}\PYG{l+s+si}{\PYGZob{}A\PYGZcb{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mathrm}\PYG{l+s+si}{\PYGZob{}sin\PYGZcb{}}\PYG{l+s+s1}{(2 }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{omega t)\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)\end{split} \end{equation*} More conveniently, many commonly used function names that are typeset in a Roman font have shortcuts. So the expression above could be written as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}s(t) = }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mathcal}\PYG{l+s+si}{\PYGZob{}A\PYGZcb{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sin(2 }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{omega t)\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}s(t) = \mathcal{A}\sin(2 \omega t)\end{split} \end{equation*} Here "s" and "t" are variable in italics font (default), "sin" is in Roman font, and the amplitude "A" is in calligraphy font. Note in the example above the calligraphy \sphinxcode{\sphinxupquote{A}} is squished into the \sphinxcode{\sphinxupquote{sin}}. You can use a spacing command to add a little whitespace between them: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s(t) = }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mathcal}\PYG{l+s+si}{\PYGZob{}A\PYGZcb{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{/}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sin(2 }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{omega t)}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}s(t) = \mathcal{A}\,\sin(2 \omega t)\end{split} \end{equation*} The choices available with all fonts are: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Command &\sphinxstyletheadfamily Result \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathrm\{Roman\}}} & $\mathrm{Roman}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathit\{Italic\}}} & $\mathit{Italic}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathtt\{Typewriter\}}} & $\mathtt{Typewriter}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathcal\{CALLIGRAPHY\}}} & $\mathcal{CALLIGRAPHY}$ \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} When using the \sphinxhref{http://www.stixfonts.org/}{STIX} fonts, you also have the choice of: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Command &\sphinxstyletheadfamily Result \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathbb\{blackboard\}}} & $\mathbb{blackboard}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathrm\{\textbackslash{}mathbb\{blackboard\}\}}} & $\mathrm{\mathbb{blackboard}}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathfrak\{Fraktur\}}} & $\mathfrak{Fraktur}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathsf\{sansserif\}}} & $\mathsf{sansserif}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}mathrm\{\textbackslash{}mathsf\{sansserif\}\}}} & $\mathrm{\mathsf{sansserif}}$ \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} There are also three global "font sets" to choose from, which are selected using the \sphinxcode{\sphinxupquote{mathtext.fontset}} parameter in {\hyperref[\detokenize{tutorials/introductory/customizing:matplotlibrc-sample}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlibrc}}}}. \sphinxcode{\sphinxupquote{cm}}: \sphinxstylestrong{Computer Modern (TeX)} \noindent\sphinxincludegraphics{{cm_fontset}.png} \sphinxcode{\sphinxupquote{stix}}: \sphinxstylestrong{STIX} (designed to blend well with Times) \noindent\sphinxincludegraphics{{stix_fontset}.png} \sphinxcode{\sphinxupquote{stixsans}}: \sphinxstylestrong{STIX sans-serif} \noindent\sphinxincludegraphics{{stixsans_fontset}.png} Additionally, you can use \sphinxcode{\sphinxupquote{\textbackslash{}mathdefault\{...\}}} or its alias \sphinxcode{\sphinxupquote{\textbackslash{}mathregular\{...\}}} to use the font used for regular text outside of mathtext. There are a number of limitations to this approach, most notably that far fewer symbols will be available, but it can be useful to make math expressions blend well with other text in the plot. \paragraph{Custom fonts} \label{\detokenize{tutorials/text/mathtext:custom-fonts}} mathtext also provides a way to use custom fonts for math. This method is fairly tricky to use, and should be considered an experimental feature for patient users only. By setting the rcParam \sphinxcode{\sphinxupquote{mathtext.fontset}} to \sphinxcode{\sphinxupquote{custom}}, you can then set the following parameters, which control which font file to use for a particular set of math characters. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Parameter &\sphinxstyletheadfamily Corresponds to \\ \hline \sphinxcode{\sphinxupquote{mathtext.it}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathit\{\}}} or default italic \\ \hline \sphinxcode{\sphinxupquote{mathtext.rm}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathrm\{\}}} Roman (upright) \\ \hline \sphinxcode{\sphinxupquote{mathtext.tt}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathtt\{\}}} Typewriter (monospace) \\ \hline \sphinxcode{\sphinxupquote{mathtext.bf}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathbf\{\}}} bold italic \\ \hline \sphinxcode{\sphinxupquote{mathtext.cal}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathcal\{\}}} calligraphic \\ \hline \sphinxcode{\sphinxupquote{mathtext.sf}} & \sphinxcode{\sphinxupquote{\textbackslash{}mathsf\{\}}} sans-serif \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Each parameter should be set to a fontconfig font descriptor (as defined in the yet-to-be-written font chapter). The fonts used should have a Unicode mapping in order to find any non-Latin characters, such as Greek. If you want to use a math symbol that is not contained in your custom fonts, you can set the rcParam \sphinxcode{\sphinxupquote{mathtext.fallback\_to\_cm}} to \sphinxcode{\sphinxupquote{True}} which will cause the mathtext system to use characters from the default Computer Modern fonts whenever a particular character can not be found in the custom font. Note that the math glyphs specified in Unicode have evolved over time, and many fonts may not have glyphs in the correct place for mathtext. \subsubsection{Accents} \label{\detokenize{tutorials/text/mathtext:accents}} An accent command may precede any symbol to add an accent above it. There are long and short forms for some of them. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Command &\sphinxstyletheadfamily Result \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}acute a}} or \sphinxcode{\sphinxupquote{\textbackslash{}'a}} & $\acute a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}bar a}} & $\bar a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}breve a}} & $\breve a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}ddot a}} or \sphinxcode{\sphinxupquote{\textbackslash{}'{'}a}} & $\ddot a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}dot a}} or \sphinxcode{\sphinxupquote{\textbackslash{}.a}} & $\dot a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}grave a}} or \sphinxcode{\sphinxupquote{\textbackslash{}{}`a}} & $\grave a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}hat a}} or \sphinxcode{\sphinxupquote{\textbackslash{}\textasciicircum{}a}} & $\hat a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}tilde a}} or \sphinxcode{\sphinxupquote{\textbackslash{}\textasciitilde{}a}} & $\tilde a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}vec a}} & $\vec a$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}overline\{abc\}}} & $\overline{abc}$ \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} In addition, there are two special accents that automatically adjust to the width of the symbols below: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Command &\sphinxstyletheadfamily Result \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}widehat\{xyz\}}} & $\widehat{xyz}$ \\ \hline \sphinxcode{\sphinxupquote{\textbackslash{}widetilde\{xyz\}}} & $\widetilde{xyz}$ \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Care should be taken when putting accents on lower-case i's and j's. Note that in the following \sphinxcode{\sphinxupquote{\textbackslash{}imath}} is used to avoid the extra dot over the i: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{hat i}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{ }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{ }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{hat }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{imath\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} \begin{equation*} \begin{split}\hat i\ \ \hat \imath\end{split} \end{equation*} \subsubsection{Symbols} \label{\detokenize{tutorials/text/mathtext:symbols}} You can also use a large number of the TeX symbols, as in \sphinxcode{\sphinxupquote{\textbackslash{}infty}}, \sphinxcode{\sphinxupquote{\textbackslash{}leftarrow}}, \sphinxcode{\sphinxupquote{\textbackslash{}sum}}, \sphinxcode{\sphinxupquote{\textbackslash{}int}}. \sphinxstylestrong{Lower-case Greek} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|} \hline \(\alpha\) \sphinxcode{\sphinxupquote{\textbackslash{}alpha}} & \(\beta\) \sphinxcode{\sphinxupquote{\textbackslash{}beta}} & \(\chi\) \sphinxcode{\sphinxupquote{\textbackslash{}chi}} & \(\delta\) \sphinxcode{\sphinxupquote{\textbackslash{}delta}} & ϝ \sphinxcode{\sphinxupquote{\textbackslash{}digamma}} & \(\epsilon\) \sphinxcode{\sphinxupquote{\textbackslash{}epsilon}} \\ \hline \(\eta\) \sphinxcode{\sphinxupquote{\textbackslash{}eta}} & \(\gamma\) \sphinxcode{\sphinxupquote{\textbackslash{}gamma}} & \(\iota\) \sphinxcode{\sphinxupquote{\textbackslash{}iota}} & \(\kappa\) \sphinxcode{\sphinxupquote{\textbackslash{}kappa}} & \(\lambda\) \sphinxcode{\sphinxupquote{\textbackslash{}lambda}} & \(\mu\) \sphinxcode{\sphinxupquote{\textbackslash{}mu}} \\ \hline \(\nu\) \sphinxcode{\sphinxupquote{\textbackslash{}nu}} & \(\omega\) \sphinxcode{\sphinxupquote{\textbackslash{}omega}} & ϕ \sphinxcode{\sphinxupquote{\textbackslash{}phi}} & \(\pi\) \sphinxcode{\sphinxupquote{\textbackslash{}pi}} & \(\psi\) \sphinxcode{\sphinxupquote{\textbackslash{}psi}} & \(\rho\) \sphinxcode{\sphinxupquote{\textbackslash{}rho}} \\ \hline \(\sigma\) \sphinxcode{\sphinxupquote{\textbackslash{}sigma}} & \(\tau\) \sphinxcode{\sphinxupquote{\textbackslash{}tau}} & \(\theta\) \sphinxcode{\sphinxupquote{\textbackslash{}theta}} & \(\upsilon\) \sphinxcode{\sphinxupquote{\textbackslash{}upsilon}} & \(\epsilon\) \sphinxcode{\sphinxupquote{\textbackslash{}varepsilon}} & ϰ \sphinxcode{\sphinxupquote{\textbackslash{}varkappa}} \\ \hline \(\phi\) \sphinxcode{\sphinxupquote{\textbackslash{}varphi}} & ϖ \sphinxcode{\sphinxupquote{\textbackslash{}varpi}} & ϱ \sphinxcode{\sphinxupquote{\textbackslash{}varrho}} & ς \sphinxcode{\sphinxupquote{\textbackslash{}varsigma}} & ϑ \sphinxcode{\sphinxupquote{\textbackslash{}vartheta}} & \(\xi\) \sphinxcode{\sphinxupquote{\textbackslash{}xi}} \\ \hline \(\zeta\) \sphinxcode{\sphinxupquote{\textbackslash{}zeta}} &&&&&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Upper-case Greek} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|T|T|} \hline \(\Delta\) \sphinxcode{\sphinxupquote{\textbackslash{}Delta}} & \(\Gamma\) \sphinxcode{\sphinxupquote{\textbackslash{}Gamma}} & \(\Lambda\) \sphinxcode{\sphinxupquote{\textbackslash{}Lambda}} & \(\Omega\) \sphinxcode{\sphinxupquote{\textbackslash{}Omega}} & \(\Phi\) \sphinxcode{\sphinxupquote{\textbackslash{}Phi}} & \(\Pi\) \sphinxcode{\sphinxupquote{\textbackslash{}Pi}} & \(\Psi\) \sphinxcode{\sphinxupquote{\textbackslash{}Psi}} & \(\Sigma\) \sphinxcode{\sphinxupquote{\textbackslash{}Sigma}} \\ \hline \(\Theta\) \sphinxcode{\sphinxupquote{\textbackslash{}Theta}} & \(\Upsilon\) \sphinxcode{\sphinxupquote{\textbackslash{}Upsilon}} & \(\Xi\) \sphinxcode{\sphinxupquote{\textbackslash{}Xi}} & ℧ \sphinxcode{\sphinxupquote{\textbackslash{}mho}} & ∇ \sphinxcode{\sphinxupquote{\textbackslash{}nabla}} &&&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Hebrew} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|} \hline ℵ \sphinxcode{\sphinxupquote{\textbackslash{}aleph}} & ℶ \sphinxcode{\sphinxupquote{\textbackslash{}beth}} & ℸ \sphinxcode{\sphinxupquote{\textbackslash{}daleth}} & ℷ \sphinxcode{\sphinxupquote{\textbackslash{}gimel}} &&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Delimiters} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabular}[t]{|*{6}{\X{1}{6}|}} \hline / \sphinxcode{\sphinxupquote{/}} & {[} \sphinxcode{\sphinxupquote{{[}}} & ⇓ \sphinxcode{\sphinxupquote{\textbackslash{}Downarrow}} & ⇑ \sphinxcode{\sphinxupquote{\textbackslash{}Uparrow}} & ‖ \sphinxcode{\sphinxupquote{\textbackslash{}Vert}} & \sphinxcode{\sphinxupquote{\textbackslash{}backslash}} \\ \hline ↓ \sphinxcode{\sphinxupquote{\textbackslash{}downarrow}} & ⟨ \sphinxcode{\sphinxupquote{\textbackslash{}langle}} & ⌈ \sphinxcode{\sphinxupquote{\textbackslash{}lceil}} & ⌊ \sphinxcode{\sphinxupquote{\textbackslash{}lfloor}} & ⌞ \sphinxcode{\sphinxupquote{\textbackslash{}llcorner}} & ⌟ \sphinxcode{\sphinxupquote{\textbackslash{}lrcorner}} \\ \hline ⟩ \sphinxcode{\sphinxupquote{\textbackslash{}rangle}} & ⌉ \sphinxcode{\sphinxupquote{\textbackslash{}rceil}} & ⌋ \sphinxcode{\sphinxupquote{\textbackslash{}rfloor}} & ⌜ \sphinxcode{\sphinxupquote{\textbackslash{}ulcorner}} & ↑ \sphinxcode{\sphinxupquote{\textbackslash{}uparrow}} & ⌝ \sphinxcode{\sphinxupquote{\textbackslash{}urcorner}} \\ \hline \begin{DUlineblock}{0em} \item[] \sphinxcode{\sphinxupquote{\textbackslash{}vert}} \end{DUlineblock} & \{ \sphinxcode{\sphinxupquote{\textbackslash{}\{}} & \begin{DUlineblock}{0em} \item[] \sphinxcode{\sphinxupquote{\textbackslash{}\textbar{}}} \end{DUlineblock} & \} \sphinxcode{\sphinxupquote{\textbackslash{}\}}} & {]} \sphinxcode{\sphinxupquote{{]}}} & \begin{DUlineblock}{0em} \item[] \sphinxcode{\sphinxupquote{\textbar{}}} \end{DUlineblock} \\ \hline \end{tabular} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Big symbols} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|} \hline ⋂ \sphinxcode{\sphinxupquote{\textbackslash{}bigcap}} & ⋃ \sphinxcode{\sphinxupquote{\textbackslash{}bigcup}} & ⨀ \sphinxcode{\sphinxupquote{\textbackslash{}bigodot}} & ⨁ \sphinxcode{\sphinxupquote{\textbackslash{}bigoplus}} & ⨂ \sphinxcode{\sphinxupquote{\textbackslash{}bigotimes}} & ⨄ \sphinxcode{\sphinxupquote{\textbackslash{}biguplus}} \\ \hline ⋁ \sphinxcode{\sphinxupquote{\textbackslash{}bigvee}} & ⋀ \sphinxcode{\sphinxupquote{\textbackslash{}bigwedge}} & ∐ \sphinxcode{\sphinxupquote{\textbackslash{}coprod}} & ∫ \sphinxcode{\sphinxupquote{\textbackslash{}int}} & ∮ \sphinxcode{\sphinxupquote{\textbackslash{}oint}} & ∏ \sphinxcode{\sphinxupquote{\textbackslash{}prod}} \\ \hline ∑ \sphinxcode{\sphinxupquote{\textbackslash{}sum}} &&&&&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Standard function names} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|} \hline Pr \sphinxcode{\sphinxupquote{\textbackslash{}Pr}} & arccos \sphinxcode{\sphinxupquote{\textbackslash{}arccos}} & arcsin \sphinxcode{\sphinxupquote{\textbackslash{}arcsin}} & arctan \sphinxcode{\sphinxupquote{\textbackslash{}arctan}} & arg \sphinxcode{\sphinxupquote{\textbackslash{}arg}} & cos \sphinxcode{\sphinxupquote{\textbackslash{}cos}} \\ \hline cosh \sphinxcode{\sphinxupquote{\textbackslash{}cosh}} & cot \sphinxcode{\sphinxupquote{\textbackslash{}cot}} & coth \sphinxcode{\sphinxupquote{\textbackslash{}coth}} & csc \sphinxcode{\sphinxupquote{\textbackslash{}csc}} & deg \sphinxcode{\sphinxupquote{\textbackslash{}deg}} & det \sphinxcode{\sphinxupquote{\textbackslash{}det}} \\ \hline dim \sphinxcode{\sphinxupquote{\textbackslash{}dim}} & exp \sphinxcode{\sphinxupquote{\textbackslash{}exp}} & gcd \sphinxcode{\sphinxupquote{\textbackslash{}gcd}} & hom \sphinxcode{\sphinxupquote{\textbackslash{}hom}} & inf \sphinxcode{\sphinxupquote{\textbackslash{}inf}} & ker \sphinxcode{\sphinxupquote{\textbackslash{}ker}} \\ \hline lg \sphinxcode{\sphinxupquote{\textbackslash{}lg}} & lim \sphinxcode{\sphinxupquote{\textbackslash{}lim}} & liminf \sphinxcode{\sphinxupquote{\textbackslash{}liminf}} & limsup \sphinxcode{\sphinxupquote{\textbackslash{}limsup}} & ln \sphinxcode{\sphinxupquote{\textbackslash{}ln}} & log \sphinxcode{\sphinxupquote{\textbackslash{}log}} \\ \hline max \sphinxcode{\sphinxupquote{\textbackslash{}max}} & min \sphinxcode{\sphinxupquote{\textbackslash{}min}} & sec \sphinxcode{\sphinxupquote{\textbackslash{}sec}} & sin \sphinxcode{\sphinxupquote{\textbackslash{}sin}} & sinh \sphinxcode{\sphinxupquote{\textbackslash{}sinh}} & sup \sphinxcode{\sphinxupquote{\textbackslash{}sup}} \\ \hline tan \sphinxcode{\sphinxupquote{\textbackslash{}tan}} & tanh \sphinxcode{\sphinxupquote{\textbackslash{}tanh}} &&&&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Binary operation and relation symbols} \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|l|l|} \hline \endfirsthead \multicolumn{4}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{4}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot ≎ \sphinxcode{\sphinxupquote{\textbackslash{}Bumpeq}} & ⋒ \sphinxcode{\sphinxupquote{\textbackslash{}Cap}} & ⋓ \sphinxcode{\sphinxupquote{\textbackslash{}Cup}} & ≑ \sphinxcode{\sphinxupquote{\textbackslash{}Doteq}} \\ \hline ⨝ \sphinxcode{\sphinxupquote{\textbackslash{}Join}} & ⋐ \sphinxcode{\sphinxupquote{\textbackslash{}Subset}} & ⋑ \sphinxcode{\sphinxupquote{\textbackslash{}Supset}} & ⊩ \sphinxcode{\sphinxupquote{\textbackslash{}Vdash}} \\ \hline ⊪ \sphinxcode{\sphinxupquote{\textbackslash{}Vvdash}} & ≈ \sphinxcode{\sphinxupquote{\textbackslash{}approx}} & ≊ \sphinxcode{\sphinxupquote{\textbackslash{}approxeq}} & ∗ \sphinxcode{\sphinxupquote{\textbackslash{}ast}} \\ \hline ≍ \sphinxcode{\sphinxupquote{\textbackslash{}asymp}} & ϶ \sphinxcode{\sphinxupquote{\textbackslash{}backepsilon}} & ∽ \sphinxcode{\sphinxupquote{\textbackslash{}backsim}} & ⋍ \sphinxcode{\sphinxupquote{\textbackslash{}backsimeq}} \\ \hline ⊼ \sphinxcode{\sphinxupquote{\textbackslash{}barwedge}} & ∵ \sphinxcode{\sphinxupquote{\textbackslash{}because}} & ≬ \sphinxcode{\sphinxupquote{\textbackslash{}between}} & ○ \sphinxcode{\sphinxupquote{\textbackslash{}bigcirc}} \\ \hline ▽ \sphinxcode{\sphinxupquote{\textbackslash{}bigtriangledown}} & △ \sphinxcode{\sphinxupquote{\textbackslash{}bigtriangleup}} & ◀ \sphinxcode{\sphinxupquote{\textbackslash{}blacktriangleleft}} & ▶ \sphinxcode{\sphinxupquote{\textbackslash{}blacktriangleright}} \\ \hline ⊥ \sphinxcode{\sphinxupquote{\textbackslash{}bot}} & ⋈ \sphinxcode{\sphinxupquote{\textbackslash{}bowtie}} & ⊡ \sphinxcode{\sphinxupquote{\textbackslash{}boxdot}} & ⊟ \sphinxcode{\sphinxupquote{\textbackslash{}boxminus}} \\ \hline ⊞ \sphinxcode{\sphinxupquote{\textbackslash{}boxplus}} & ⊠ \sphinxcode{\sphinxupquote{\textbackslash{}boxtimes}} & ∙ \sphinxcode{\sphinxupquote{\textbackslash{}bullet}} & ≏ \sphinxcode{\sphinxupquote{\textbackslash{}bumpeq}} \\ \hline ∩ \sphinxcode{\sphinxupquote{\textbackslash{}cap}} & ⋅ \sphinxcode{\sphinxupquote{\textbackslash{}cdot}} & ∘ \sphinxcode{\sphinxupquote{\textbackslash{}circ}} & ≗ \sphinxcode{\sphinxupquote{\textbackslash{}circeq}} \\ \hline ≔ \sphinxcode{\sphinxupquote{\textbackslash{}coloneq}} & ≅ \sphinxcode{\sphinxupquote{\textbackslash{}cong}} & ∪ \sphinxcode{\sphinxupquote{\textbackslash{}cup}} & ⋞ \sphinxcode{\sphinxupquote{\textbackslash{}curlyeqprec}} \\ \hline ⋟ \sphinxcode{\sphinxupquote{\textbackslash{}curlyeqsucc}} & ⋎ \sphinxcode{\sphinxupquote{\textbackslash{}curlyvee}} & ⋏ \sphinxcode{\sphinxupquote{\textbackslash{}curlywedge}} & † \sphinxcode{\sphinxupquote{\textbackslash{}dag}} \\ \hline ⊣ \sphinxcode{\sphinxupquote{\textbackslash{}dashv}} & ‡ \sphinxcode{\sphinxupquote{\textbackslash{}ddag}} & ⋄ \sphinxcode{\sphinxupquote{\textbackslash{}diamond}} & ÷ \sphinxcode{\sphinxupquote{\textbackslash{}div}} \\ \hline ⋇ \sphinxcode{\sphinxupquote{\textbackslash{}divideontimes}} & ≐ \sphinxcode{\sphinxupquote{\textbackslash{}doteq}} & ≑ \sphinxcode{\sphinxupquote{\textbackslash{}doteqdot}} & ∔ \sphinxcode{\sphinxupquote{\textbackslash{}dotplus}} \\ \hline ⌆ \sphinxcode{\sphinxupquote{\textbackslash{}doublebarwedge}} & ≖ \sphinxcode{\sphinxupquote{\textbackslash{}eqcirc}} & ≕ \sphinxcode{\sphinxupquote{\textbackslash{}eqcolon}} & ≂ \sphinxcode{\sphinxupquote{\textbackslash{}eqsim}} \\ \hline ⪖ \sphinxcode{\sphinxupquote{\textbackslash{}eqslantgtr}} & ⪕ \sphinxcode{\sphinxupquote{\textbackslash{}eqslantless}} & ≡ \sphinxcode{\sphinxupquote{\textbackslash{}equiv}} & ≒ \sphinxcode{\sphinxupquote{\textbackslash{}fallingdotseq}} \\ \hline ⌢ \sphinxcode{\sphinxupquote{\textbackslash{}frown}} & ≥ \sphinxcode{\sphinxupquote{\textbackslash{}geq}} & ≧ \sphinxcode{\sphinxupquote{\textbackslash{}geqq}} & ⩾ \sphinxcode{\sphinxupquote{\textbackslash{}geqslant}} \\ \hline ≫ \sphinxcode{\sphinxupquote{\textbackslash{}gg}} & ⋙ \sphinxcode{\sphinxupquote{\textbackslash{}ggg}} & ⪺ \sphinxcode{\sphinxupquote{\textbackslash{}gnapprox}} & ≩ \sphinxcode{\sphinxupquote{\textbackslash{}gneqq}} \\ \hline ⋧ \sphinxcode{\sphinxupquote{\textbackslash{}gnsim}} & ⪆ \sphinxcode{\sphinxupquote{\textbackslash{}gtrapprox}} & ⋗ \sphinxcode{\sphinxupquote{\textbackslash{}gtrdot}} & ⋛ \sphinxcode{\sphinxupquote{\textbackslash{}gtreqless}} \\ \hline ⪌ \sphinxcode{\sphinxupquote{\textbackslash{}gtreqqless}} & ≷ \sphinxcode{\sphinxupquote{\textbackslash{}gtrless}} & ≳ \sphinxcode{\sphinxupquote{\textbackslash{}gtrsim}} & ∈ \sphinxcode{\sphinxupquote{\textbackslash{}in}} \\ \hline ⊺ \sphinxcode{\sphinxupquote{\textbackslash{}intercal}} & ⋋ \sphinxcode{\sphinxupquote{\textbackslash{}leftthreetimes}} & ≤ \sphinxcode{\sphinxupquote{\textbackslash{}leq}} & ≦ \sphinxcode{\sphinxupquote{\textbackslash{}leqq}} \\ \hline ⩽ \sphinxcode{\sphinxupquote{\textbackslash{}leqslant}} & ⪅ \sphinxcode{\sphinxupquote{\textbackslash{}lessapprox}} & ⋖ \sphinxcode{\sphinxupquote{\textbackslash{}lessdot}} & ⋚ \sphinxcode{\sphinxupquote{\textbackslash{}lesseqgtr}} \\ \hline ⪋ \sphinxcode{\sphinxupquote{\textbackslash{}lesseqqgtr}} & ≶ \sphinxcode{\sphinxupquote{\textbackslash{}lessgtr}} & ≲ \sphinxcode{\sphinxupquote{\textbackslash{}lesssim}} & ≪ \sphinxcode{\sphinxupquote{\textbackslash{}ll}} \\ \hline ⋘ \sphinxcode{\sphinxupquote{\textbackslash{}lll}} & ⪹ \sphinxcode{\sphinxupquote{\textbackslash{}lnapprox}} & ≨ \sphinxcode{\sphinxupquote{\textbackslash{}lneqq}} & ⋦ \sphinxcode{\sphinxupquote{\textbackslash{}lnsim}} \\ \hline ⋉ \sphinxcode{\sphinxupquote{\textbackslash{}ltimes}} & ∣ \sphinxcode{\sphinxupquote{\textbackslash{}mid}} & ⊧ \sphinxcode{\sphinxupquote{\textbackslash{}models}} & ∓ \sphinxcode{\sphinxupquote{\textbackslash{}mp}} \\ \hline ⊯ \sphinxcode{\sphinxupquote{\textbackslash{}nVDash}} & ⊮ \sphinxcode{\sphinxupquote{\textbackslash{}nVdash}} & ≉ \sphinxcode{\sphinxupquote{\textbackslash{}napprox}} & ≇ \sphinxcode{\sphinxupquote{\textbackslash{}ncong}} \\ \hline ≠ \sphinxcode{\sphinxupquote{\textbackslash{}ne}} & ≠ \sphinxcode{\sphinxupquote{\textbackslash{}neq}} & ≠ \sphinxcode{\sphinxupquote{\textbackslash{}neq}} & ≢ \sphinxcode{\sphinxupquote{\textbackslash{}nequiv}} \\ \hline ≱ \sphinxcode{\sphinxupquote{\textbackslash{}ngeq}} & ≯ \sphinxcode{\sphinxupquote{\textbackslash{}ngtr}} & ∋ \sphinxcode{\sphinxupquote{\textbackslash{}ni}} & ≰ \sphinxcode{\sphinxupquote{\textbackslash{}nleq}} \\ \hline ≮ \sphinxcode{\sphinxupquote{\textbackslash{}nless}} & ∤ \sphinxcode{\sphinxupquote{\textbackslash{}nmid}} & ∉ \sphinxcode{\sphinxupquote{\textbackslash{}notin}} & ∦ \sphinxcode{\sphinxupquote{\textbackslash{}nparallel}} \\ \hline ⊀ \sphinxcode{\sphinxupquote{\textbackslash{}nprec}} & ≁ \sphinxcode{\sphinxupquote{\textbackslash{}nsim}} & ⊄ \sphinxcode{\sphinxupquote{\textbackslash{}nsubset}} & ⊈ \sphinxcode{\sphinxupquote{\textbackslash{}nsubseteq}} \\ \hline ⊁ \sphinxcode{\sphinxupquote{\textbackslash{}nsucc}} & ⊅ \sphinxcode{\sphinxupquote{\textbackslash{}nsupset}} & ⊉ \sphinxcode{\sphinxupquote{\textbackslash{}nsupseteq}} & ⋪ \sphinxcode{\sphinxupquote{\textbackslash{}ntriangleleft}} \\ \hline ⋬ \sphinxcode{\sphinxupquote{\textbackslash{}ntrianglelefteq}} & ⋫ \sphinxcode{\sphinxupquote{\textbackslash{}ntriangleright}} & ⋭ \sphinxcode{\sphinxupquote{\textbackslash{}ntrianglerighteq}} & ⊭ \sphinxcode{\sphinxupquote{\textbackslash{}nvDash}} \\ \hline ⊬ \sphinxcode{\sphinxupquote{\textbackslash{}nvdash}} & ⊙ \sphinxcode{\sphinxupquote{\textbackslash{}odot}} & ⊖ \sphinxcode{\sphinxupquote{\textbackslash{}ominus}} & ⊕ \sphinxcode{\sphinxupquote{\textbackslash{}oplus}} \\ \hline ⊘ \sphinxcode{\sphinxupquote{\textbackslash{}oslash}} & ⊗ \sphinxcode{\sphinxupquote{\textbackslash{}otimes}} & ∥ \sphinxcode{\sphinxupquote{\textbackslash{}parallel}} & ⟂ \sphinxcode{\sphinxupquote{\textbackslash{}perp}} \\ \hline ⋔ \sphinxcode{\sphinxupquote{\textbackslash{}pitchfork}} & \(\pm\) \sphinxcode{\sphinxupquote{\textbackslash{}pm}} & ≺ \sphinxcode{\sphinxupquote{\textbackslash{}prec}} & ⪷ \sphinxcode{\sphinxupquote{\textbackslash{}precapprox}} \\ \hline ≼ \sphinxcode{\sphinxupquote{\textbackslash{}preccurlyeq}} & ≼ \sphinxcode{\sphinxupquote{\textbackslash{}preceq}} & ⪹ \sphinxcode{\sphinxupquote{\textbackslash{}precnapprox}} & ⋨ \sphinxcode{\sphinxupquote{\textbackslash{}precnsim}} \\ \hline ≾ \sphinxcode{\sphinxupquote{\textbackslash{}precsim}} & ∝ \sphinxcode{\sphinxupquote{\textbackslash{}propto}} & ⋌ \sphinxcode{\sphinxupquote{\textbackslash{}rightthreetimes}} & ≓ \sphinxcode{\sphinxupquote{\textbackslash{}risingdotseq}} \\ \hline ⋊ \sphinxcode{\sphinxupquote{\textbackslash{}rtimes}} & ∼ \sphinxcode{\sphinxupquote{\textbackslash{}sim}} & ≃ \sphinxcode{\sphinxupquote{\textbackslash{}simeq}} & ∕ \sphinxcode{\sphinxupquote{\textbackslash{}slash}} \\ \hline ⌣ \sphinxcode{\sphinxupquote{\textbackslash{}smile}} & ⊓ \sphinxcode{\sphinxupquote{\textbackslash{}sqcap}} & ⊔ \sphinxcode{\sphinxupquote{\textbackslash{}sqcup}} & ⊏ \sphinxcode{\sphinxupquote{\textbackslash{}sqsubset}} \\ \hline ⊏ \sphinxcode{\sphinxupquote{\textbackslash{}sqsubset}} & ⊑ \sphinxcode{\sphinxupquote{\textbackslash{}sqsubseteq}} & ⊐ \sphinxcode{\sphinxupquote{\textbackslash{}sqsupset}} & ⊐ \sphinxcode{\sphinxupquote{\textbackslash{}sqsupset}} \\ \hline ⊒ \sphinxcode{\sphinxupquote{\textbackslash{}sqsupseteq}} & ⋆ \sphinxcode{\sphinxupquote{\textbackslash{}star}} & ⊂ \sphinxcode{\sphinxupquote{\textbackslash{}subset}} & ⊆ \sphinxcode{\sphinxupquote{\textbackslash{}subseteq}} \\ \hline ⫅ \sphinxcode{\sphinxupquote{\textbackslash{}subseteqq}} & ⊊ \sphinxcode{\sphinxupquote{\textbackslash{}subsetneq}} & ⫋ \sphinxcode{\sphinxupquote{\textbackslash{}subsetneqq}} & ≻ \sphinxcode{\sphinxupquote{\textbackslash{}succ}} \\ \hline ⪸ \sphinxcode{\sphinxupquote{\textbackslash{}succapprox}} & ≽ \sphinxcode{\sphinxupquote{\textbackslash{}succcurlyeq}} & ≽ \sphinxcode{\sphinxupquote{\textbackslash{}succeq}} & ⪺ \sphinxcode{\sphinxupquote{\textbackslash{}succnapprox}} \\ \hline ⋩ \sphinxcode{\sphinxupquote{\textbackslash{}succnsim}} & ≿ \sphinxcode{\sphinxupquote{\textbackslash{}succsim}} & ⊃ \sphinxcode{\sphinxupquote{\textbackslash{}supset}} & ⊇ \sphinxcode{\sphinxupquote{\textbackslash{}supseteq}} \\ \hline ⫆ \sphinxcode{\sphinxupquote{\textbackslash{}supseteqq}} & ⊋ \sphinxcode{\sphinxupquote{\textbackslash{}supsetneq}} & ⫌ \sphinxcode{\sphinxupquote{\textbackslash{}supsetneqq}} & ∴ \sphinxcode{\sphinxupquote{\textbackslash{}therefore}} \\ \hline × \sphinxcode{\sphinxupquote{\textbackslash{}times}} & ⊤ \sphinxcode{\sphinxupquote{\textbackslash{}top}} & ◁ \sphinxcode{\sphinxupquote{\textbackslash{}triangleleft}} & ⊴ \sphinxcode{\sphinxupquote{\textbackslash{}trianglelefteq}} \\ \hline ≜ \sphinxcode{\sphinxupquote{\textbackslash{}triangleq}} & ▷ \sphinxcode{\sphinxupquote{\textbackslash{}triangleright}} & ⊵ \sphinxcode{\sphinxupquote{\textbackslash{}trianglerighteq}} & ⊎ \sphinxcode{\sphinxupquote{\textbackslash{}uplus}} \\ \hline ⊨ \sphinxcode{\sphinxupquote{\textbackslash{}vDash}} & ∝ \sphinxcode{\sphinxupquote{\textbackslash{}varpropto}} & ⊲ \sphinxcode{\sphinxupquote{\textbackslash{}vartriangleleft}} & ⊳ \sphinxcode{\sphinxupquote{\textbackslash{}vartriangleright}} \\ \hline ⊢ \sphinxcode{\sphinxupquote{\textbackslash{}vdash}} & ∨ \sphinxcode{\sphinxupquote{\textbackslash{}vee}} & ⊻ \sphinxcode{\sphinxupquote{\textbackslash{}veebar}} & ∧ \sphinxcode{\sphinxupquote{\textbackslash{}wedge}} \\ \hline ≀ \sphinxcode{\sphinxupquote{\textbackslash{}wr}} &&&\\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \sphinxstylestrong{Arrow symbols} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline ⇓ \sphinxcode{\sphinxupquote{\textbackslash{}Downarrow}} & ⇐ \sphinxcode{\sphinxupquote{\textbackslash{}Leftarrow}} & ⇔ \sphinxcode{\sphinxupquote{\textbackslash{}Leftrightarrow}} & ⇚ \sphinxcode{\sphinxupquote{\textbackslash{}Lleftarrow}} \\ \hline ⟸ \sphinxcode{\sphinxupquote{\textbackslash{}Longleftarrow}} & ⟺ \sphinxcode{\sphinxupquote{\textbackslash{}Longleftrightarrow}} & ⟹ \sphinxcode{\sphinxupquote{\textbackslash{}Longrightarrow}} & ↰ \sphinxcode{\sphinxupquote{\textbackslash{}Lsh}} \\ \hline ⇗ \sphinxcode{\sphinxupquote{\textbackslash{}Nearrow}} & ⇖ \sphinxcode{\sphinxupquote{\textbackslash{}Nwarrow}} & ⇒ \sphinxcode{\sphinxupquote{\textbackslash{}Rightarrow}} & ⇛ \sphinxcode{\sphinxupquote{\textbackslash{}Rrightarrow}} \\ \hline ↱ \sphinxcode{\sphinxupquote{\textbackslash{}Rsh}} & ⇘ \sphinxcode{\sphinxupquote{\textbackslash{}Searrow}} & ⇙ \sphinxcode{\sphinxupquote{\textbackslash{}Swarrow}} & ⇑ \sphinxcode{\sphinxupquote{\textbackslash{}Uparrow}} \\ \hline ⇕ \sphinxcode{\sphinxupquote{\textbackslash{}Updownarrow}} & ↺ \sphinxcode{\sphinxupquote{\textbackslash{}circlearrowleft}} & ↻ \sphinxcode{\sphinxupquote{\textbackslash{}circlearrowright}} & ↶ \sphinxcode{\sphinxupquote{\textbackslash{}curvearrowleft}} \\ \hline ↷ \sphinxcode{\sphinxupquote{\textbackslash{}curvearrowright}} & ⤎ \sphinxcode{\sphinxupquote{\textbackslash{}dashleftarrow}} & ⤏ \sphinxcode{\sphinxupquote{\textbackslash{}dashrightarrow}} & ↓ \sphinxcode{\sphinxupquote{\textbackslash{}downarrow}} \\ \hline ⇊ \sphinxcode{\sphinxupquote{\textbackslash{}downdownarrows}} & ⇃ \sphinxcode{\sphinxupquote{\textbackslash{}downharpoonleft}} & ⇂ \sphinxcode{\sphinxupquote{\textbackslash{}downharpoonright}} & ↩ \sphinxcode{\sphinxupquote{\textbackslash{}hookleftarrow}} \\ \hline ↪ \sphinxcode{\sphinxupquote{\textbackslash{}hookrightarrow}} & ⇝ \sphinxcode{\sphinxupquote{\textbackslash{}leadsto}} & ← \sphinxcode{\sphinxupquote{\textbackslash{}leftarrow}} & ↢ \sphinxcode{\sphinxupquote{\textbackslash{}leftarrowtail}} \\ \hline ↽ \sphinxcode{\sphinxupquote{\textbackslash{}leftharpoondown}} & ↼ \sphinxcode{\sphinxupquote{\textbackslash{}leftharpoonup}} & ⇇ \sphinxcode{\sphinxupquote{\textbackslash{}leftleftarrows}} & ↔ \sphinxcode{\sphinxupquote{\textbackslash{}leftrightarrow}} \\ \hline ⇆ \sphinxcode{\sphinxupquote{\textbackslash{}leftrightarrows}} & ⇋ \sphinxcode{\sphinxupquote{\textbackslash{}leftrightharpoons}} & ↭ \sphinxcode{\sphinxupquote{\textbackslash{}leftrightsquigarrow}} & ↜ \sphinxcode{\sphinxupquote{\textbackslash{}leftsquigarrow}} \\ \hline ⟵ \sphinxcode{\sphinxupquote{\textbackslash{}longleftarrow}} & ⟷ \sphinxcode{\sphinxupquote{\textbackslash{}longleftrightarrow}} & ⟼ \sphinxcode{\sphinxupquote{\textbackslash{}longmapsto}} & ⟶ \sphinxcode{\sphinxupquote{\textbackslash{}longrightarrow}} \\ \hline ↫ \sphinxcode{\sphinxupquote{\textbackslash{}looparrowleft}} & ↬ \sphinxcode{\sphinxupquote{\textbackslash{}looparrowright}} & ↦ \sphinxcode{\sphinxupquote{\textbackslash{}mapsto}} & ⊸ \sphinxcode{\sphinxupquote{\textbackslash{}multimap}} \\ \hline ⇍ \sphinxcode{\sphinxupquote{\textbackslash{}nLeftarrow}} & ⇎ \sphinxcode{\sphinxupquote{\textbackslash{}nLeftrightarrow}} & ⇏ \sphinxcode{\sphinxupquote{\textbackslash{}nRightarrow}} & ↗ \sphinxcode{\sphinxupquote{\textbackslash{}nearrow}} \\ \hline ↚ \sphinxcode{\sphinxupquote{\textbackslash{}nleftarrow}} & ↮ \sphinxcode{\sphinxupquote{\textbackslash{}nleftrightarrow}} & ↛ \sphinxcode{\sphinxupquote{\textbackslash{}nrightarrow}} & ↖ \sphinxcode{\sphinxupquote{\textbackslash{}nwarrow}} \\ \hline \(\rightarrow\) \sphinxcode{\sphinxupquote{\textbackslash{}rightarrow}} & ↣ \sphinxcode{\sphinxupquote{\textbackslash{}rightarrowtail}} & ⇁ \sphinxcode{\sphinxupquote{\textbackslash{}rightharpoondown}} & ⇀ \sphinxcode{\sphinxupquote{\textbackslash{}rightharpoonup}} \\ \hline ⇄ \sphinxcode{\sphinxupquote{\textbackslash{}rightleftarrows}} & ⇄ \sphinxcode{\sphinxupquote{\textbackslash{}rightleftarrows}} & ⇌ \sphinxcode{\sphinxupquote{\textbackslash{}rightleftharpoons}} & ⇌ \sphinxcode{\sphinxupquote{\textbackslash{}rightleftharpoons}} \\ \hline ⇉ \sphinxcode{\sphinxupquote{\textbackslash{}rightrightarrows}} & ⇉ \sphinxcode{\sphinxupquote{\textbackslash{}rightrightarrows}} & ↝ \sphinxcode{\sphinxupquote{\textbackslash{}rightsquigarrow}} & ↘ \sphinxcode{\sphinxupquote{\textbackslash{}searrow}} \\ \hline ↙ \sphinxcode{\sphinxupquote{\textbackslash{}swarrow}} & \(\rightarrow\) \sphinxcode{\sphinxupquote{\textbackslash{}to}} & ↞ \sphinxcode{\sphinxupquote{\textbackslash{}twoheadleftarrow}} & ↠ \sphinxcode{\sphinxupquote{\textbackslash{}twoheadrightarrow}} \\ \hline ↑ \sphinxcode{\sphinxupquote{\textbackslash{}uparrow}} & ↕ \sphinxcode{\sphinxupquote{\textbackslash{}updownarrow}} & ↕ \sphinxcode{\sphinxupquote{\textbackslash{}updownarrow}} & ↿ \sphinxcode{\sphinxupquote{\textbackslash{}upharpoonleft}} \\ \hline ↾ \sphinxcode{\sphinxupquote{\textbackslash{}upharpoonright}} & ⇈ \sphinxcode{\sphinxupquote{\textbackslash{}upuparrows}} &&\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstylestrong{Miscellaneous symbols} \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline \$ \sphinxcode{\sphinxupquote{\textbackslash{}\$}} & Å \sphinxcode{\sphinxupquote{\textbackslash{}AA}} & Ⅎ \sphinxcode{\sphinxupquote{\textbackslash{}Finv}} & ⅁ \sphinxcode{\sphinxupquote{\textbackslash{}Game}} \\ \hline ℑ \sphinxcode{\sphinxupquote{\textbackslash{}Im}} & \P{} \sphinxcode{\sphinxupquote{\textbackslash{}P}} & ℜ \sphinxcode{\sphinxupquote{\textbackslash{}Re}} & \S{} \sphinxcode{\sphinxupquote{\textbackslash{}S}} \\ \hline ∠ \sphinxcode{\sphinxupquote{\textbackslash{}angle}} & ‵ \sphinxcode{\sphinxupquote{\textbackslash{}backprime}} & ★ \sphinxcode{\sphinxupquote{\textbackslash{}bigstar}} & ■ \sphinxcode{\sphinxupquote{\textbackslash{}blacksquare}} \\ \hline ▴ \sphinxcode{\sphinxupquote{\textbackslash{}blacktriangle}} & ▾ \sphinxcode{\sphinxupquote{\textbackslash{}blacktriangledown}} & ⋯ \sphinxcode{\sphinxupquote{\textbackslash{}cdots}} & \(\checkmark\) \sphinxcode{\sphinxupquote{\textbackslash{}checkmark}} \\ \hline ® \sphinxcode{\sphinxupquote{\textbackslash{}circledR}} & Ⓢ \sphinxcode{\sphinxupquote{\textbackslash{}circledS}} & ♣ \sphinxcode{\sphinxupquote{\textbackslash{}clubsuit}} & ∁ \sphinxcode{\sphinxupquote{\textbackslash{}complement}} \\ \hline © \sphinxcode{\sphinxupquote{\textbackslash{}copyright}} & ⋱ \sphinxcode{\sphinxupquote{\textbackslash{}ddots}} & ♢ \sphinxcode{\sphinxupquote{\textbackslash{}diamondsuit}} & ℓ \sphinxcode{\sphinxupquote{\textbackslash{}ell}} \\ \hline ∅ \sphinxcode{\sphinxupquote{\textbackslash{}emptyset}} & ð \sphinxcode{\sphinxupquote{\textbackslash{}eth}} & ∃ \sphinxcode{\sphinxupquote{\textbackslash{}exists}} & ♭ \sphinxcode{\sphinxupquote{\textbackslash{}flat}} \\ \hline ∀ \sphinxcode{\sphinxupquote{\textbackslash{}forall}} & ħ \sphinxcode{\sphinxupquote{\textbackslash{}hbar}} & ♡ \sphinxcode{\sphinxupquote{\textbackslash{}heartsuit}} & ℏ \sphinxcode{\sphinxupquote{\textbackslash{}hslash}} \\ \hline ∭ \sphinxcode{\sphinxupquote{\textbackslash{}iiint}} & ∬ \sphinxcode{\sphinxupquote{\textbackslash{}iint}} & ∬ \sphinxcode{\sphinxupquote{\textbackslash{}iint}} & ı \sphinxcode{\sphinxupquote{\textbackslash{}imath}} \\ \hline \(\infty\) \sphinxcode{\sphinxupquote{\textbackslash{}infty}} & ȷ \sphinxcode{\sphinxupquote{\textbackslash{}jmath}} & … \sphinxcode{\sphinxupquote{\textbackslash{}ldots}} & ∡ \sphinxcode{\sphinxupquote{\textbackslash{}measuredangle}} \\ \hline ♮ \sphinxcode{\sphinxupquote{\textbackslash{}natural}} & ¬ \sphinxcode{\sphinxupquote{\textbackslash{}neg}} & ∄ \sphinxcode{\sphinxupquote{\textbackslash{}nexists}} & ∰ \sphinxcode{\sphinxupquote{\textbackslash{}oiiint}} \\ \hline ∂ \sphinxcode{\sphinxupquote{\textbackslash{}partial}} & ′ \sphinxcode{\sphinxupquote{\textbackslash{}prime}} & ♯ \sphinxcode{\sphinxupquote{\textbackslash{}sharp}} & ♠ \sphinxcode{\sphinxupquote{\textbackslash{}spadesuit}} \\ \hline ∢ \sphinxcode{\sphinxupquote{\textbackslash{}sphericalangle}} & ß \sphinxcode{\sphinxupquote{\textbackslash{}ss}} & ▿ \sphinxcode{\sphinxupquote{\textbackslash{}triangledown}} & ∅ \sphinxcode{\sphinxupquote{\textbackslash{}varnothing}} \\ \hline ▵ \sphinxcode{\sphinxupquote{\textbackslash{}vartriangle}} & ⋮ \sphinxcode{\sphinxupquote{\textbackslash{}vdots}} & ℘ \sphinxcode{\sphinxupquote{\textbackslash{}wp}} & ¥ \sphinxcode{\sphinxupquote{\textbackslash{}yen}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} If a particular symbol does not have a name (as is true of many of the more obscure symbols in the STIX fonts), Unicode characters can also be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{ur}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{u23ce\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \subsubsection{Example} \label{\detokenize{tutorials/text/mathtext:example}} Here is an example illustrating many of these features in context. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/pyplot\_mathtext.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_pyplot_mathtext_0011}.png}} \caption{Pyplot Mathtext}\label{\detokenize{tutorials/text/mathtext:id2}}\end{figure} \phantomsection\label{\detokenize{tutorials/text/mathtext:sphx-glr-download-tutorials-text-mathtext-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/pgf:sphx-glr-download-tutorials-text-pgf-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Typesetting With XeLaTeX/LuaLaTeX} \label{\detokenize{tutorials/text/pgf:typesetting-with-xelatex-lualatex}}\label{\detokenize{tutorials/text/pgf:sphx-glr-tutorials-text-pgf-py}}\label{\detokenize{tutorials/text/pgf::doc}} How to typeset text with the \sphinxcode{\sphinxupquote{pgf}} backend in Matplotlib. Using the \sphinxcode{\sphinxupquote{pgf}} backend, matplotlib can export figures as pgf drawing commands that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX have full unicode support and can use any font that is installed in the operating system, making use of advanced typographic features of OpenType, AAT and Graphite. Pgf pictures created by \sphinxcode{\sphinxupquote{plt.savefig('figure.pgf')}} can be embedded as raw commands in LaTeX documents. Figures can also be directly compiled and saved to PDF with \sphinxcode{\sphinxupquote{plt.savefig('figure.pdf')}} by either switching to the backend \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pgf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} or registering it for handling pdf output \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib.backends.backend\PYGZus{}pgf} \PYG{k+kn}{import} \PYG{n}{FigureCanvasPgf} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backend\PYGZus{}bases}\PYG{o}{.}\PYG{n}{register\PYGZus{}backend}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{FigureCanvasPgf}\PYG{p}{)} \end{sphinxVerbatim} The second method allows you to keep using regular interactive backends and to save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface. Matplotlib's pgf support requires a recent \sphinxhref{http://www.tug.org}{LaTeX} installation that includes the TikZ/PGF packages (such as \sphinxhref{http://www.tug.org/texlive/}{TeXLive}), preferably with XeLaTeX or LuaLaTeX installed. If either pdftocairo or ghostscript is present on your system, figures can optionally be saved to PNG images as well. The executables for all applications must be located on your \index{PATH@\spxentry{PATH}}\index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PATH}}}}}. Rc parameters that control the behavior of the pgf backend: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Parameter &\sphinxstyletheadfamily Documentation \\ \hline pgf.preamble & Lines to be included in the LaTeX preamble \\ \hline pgf.rcfonts & Setup fonts from rc params using the fontspec package \\ \hline pgf.texsystem & Either "xelatex" (default), "lualatex" or "pdflatex" \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \begin{sphinxadmonition}{note}{Note:} TeX defines a set of special characters, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} \PYGZdl{} \PYGZpc{} \PYGZam{} \PYGZti{} \PYGZus{} \PYGZca{} \PYGZbs{} \PYGZob{} \PYGZcb{}} \end{sphinxVerbatim} Generally, these characters must be escaped correctly. For convenience, some characters (\_,\textasciicircum{},\%) are automatically escaped outside of math environments. \end{sphinxadmonition} \subsubsection{Multi-Page PDF Files} \label{\detokenize{tutorials/text/pgf:multi-page-pdf-files}}\label{\detokenize{tutorials/text/pgf:pgf-rcfonts}} The pgf backend also supports multipage pdf files using \sphinxcode{\sphinxupquote{PdfPages}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib.backends.backend\PYGZus{}pgf} \PYG{k+kn}{import} \PYG{n}{PdfPages} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k}{with} \PYG{n}{PdfPages}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{multipage.pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{metadata}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{author}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Me}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{pdf}\PYG{p}{:} \PYG{n}{fig1}\PYG{p}{,} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fig1}\PYG{p}{)} \PYG{n}{fig2}\PYG{p}{,} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fig2}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Font specification} \label{\detokenize{tutorials/text/pgf:font-specification}} The fonts used for obtaining the size of text elements or when compiling figures to PDF are usually defined in the matplotlib rc parameters. You can also use the LaTeX default Computer Modern fonts by clearing the lists for \sphinxcode{\sphinxupquote{font.serif}}, \sphinxcode{\sphinxupquote{font.sans-serif}} or \sphinxcode{\sphinxupquote{font.monospace}}. Please note that the glyph coverage of these fonts is very limited. If you want to keep the Computer Modern font face but require extended unicode support, consider installing the \sphinxhref{https://sourceforge.net/projects/cm-unicode/}{Computer Modern Unicode} fonts \sphinxstyleemphasis{CMU Serif}, \sphinxstyleemphasis{CMU Sans Serif}, etc. When saving to \sphinxcode{\sphinxupquote{.pgf}}, the font configuration matplotlib used for the layout of the figure is included in the header of the text file. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{=========} \PYG{l+s+sd}{Pgf Fonts} \PYG{l+s+sd}{=========} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{p}{\PYGZob{}} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{font.family}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{font.serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} use latex default serif font} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{font.sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{DejaVu Sans}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} use a specific sans\PYGZhy{}serif font} \PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{4.5}\PYG{p}{,} \PYG{l+m+mf}{2.5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{3.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{monospace}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{monospace}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{comic sans}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Comic Sans MS}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{µ is not \PYGZdl{}}\PYG{l+s+se}{\PYGZbs{}\PYGZbs{}}\PYG{l+s+s2}{mu\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Custom preamble} \label{\detokenize{tutorials/text/pgf:custom-preamble}}\label{\detokenize{tutorials/text/pgf:pgf-preamble}} Full customization is possible by adding your own commands to the preamble. Use the \sphinxcode{\sphinxupquote{pgf.preamble}} parameter if you want to configure the math fonts, using \sphinxcode{\sphinxupquote{unicode-math}} for example, or for loading additional packages. Also, if you want to do the font configuration yourself instead of using the fonts specified in the rc parameters, make sure to disable \sphinxcode{\sphinxupquote{pgf.rcfonts}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{============} \PYG{l+s+sd}{Pgf Preamble} \PYG{l+s+sd}{============} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{pgf}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Choosing the TeX system} \label{\detokenize{tutorials/text/pgf:choosing-the-tex-system}}\label{\detokenize{tutorials/text/pgf:pgf-texsystem}} The TeX system to be used by matplotlib is chosen by the \sphinxcode{\sphinxupquote{pgf.texsystem}} parameter. Possible values are \sphinxcode{\sphinxupquote{'xelatex'}} (default), \sphinxcode{\sphinxupquote{'lualatex'}} and \sphinxcode{\sphinxupquote{'pdflatex'}}. Please note that when selecting pdflatex the fonts and unicode handling must be configured in the preamble. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{=============} \PYG{l+s+sd}{Pgf Texsystem} \PYG{l+s+sd}{=============} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{p}{\PYGZob{}} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{pgf.texsystem}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{pdflatex}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{pgf.preamble}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{usepackage[utf8x]}\PYG{l+s+si}{\PYGZob{}inputenc\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{usepackage[T1]}\PYG{l+s+si}{\PYGZob{}fontenc\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{usepackage}\PYG{l+s+si}{\PYGZob{}cmbright\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{p}{]} \PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{4.5}\PYG{p}{,} \PYG{l+m+mf}{2.5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{3.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{monospace}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{monospace}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{2.5}\PYG{p}{,} \PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{µ is not \PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{mu\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Troubleshooting} \label{\detokenize{tutorials/text/pgf:troubleshooting}}\label{\detokenize{tutorials/text/pgf:pgf-troubleshooting}}\begin{itemize} \item {} Please note that the TeX packages found in some Linux distributions and MiKTeX installations are dramatically outdated. Make sure to update your package catalog and upgrade or install a recent TeX distribution. \item {} On Windows, the \index{PATH@\spxentry{PATH}}\index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PATH}}}}} environment variable may need to be modified to include the directories containing the latex, dvipng and ghostscript executables. See {\hyperref[\detokenize{faq/environment_variables_faq:environment-variables}]{\sphinxcrossref{\DUrole{std,std-ref}{Environment Variables}}}} and {\hyperref[\detokenize{faq/environment_variables_faq:setting-windows-environment-variables}]{\sphinxcrossref{\DUrole{std,std-ref}{Setting environment variables in windows}}}} for details. \item {} A limitation on Windows causes the backend to keep file handles that have been opened by your application open. As a result, it may not be possible to delete the corresponding files until the application closes (see \sphinxhref{https://github.com/matplotlib/matplotlib/issues/1324}{\#1324}). \item {} Sometimes the font rendering in figures that are saved to png images is very bad. This happens when the pdftocairo tool is not available and ghostscript is used for the pdf to png conversion. \item {} Make sure what you are trying to do is possible in a LaTeX document, that your LaTeX syntax is valid and that you are using raw strings if necessary to avoid unintended escape sequences. \item {} The \sphinxcode{\sphinxupquote{pgf.preamble}} rc setting provides lots of flexibility, and lots of ways to cause problems. When experiencing problems, try to minimalize or disable the custom preamble. \item {} Configuring an \sphinxcode{\sphinxupquote{unicode-math}} environment can be a bit tricky. The TeXLive distribution for example provides a set of math fonts which are usually not installed system-wide. XeTeX, unlike LuaLatex, cannot find these fonts by their name, which is why you might have to specify \sphinxcode{\sphinxupquote{\textbackslash{}setmathfont\{xits-math.otf\}}} instead of \sphinxcode{\sphinxupquote{\textbackslash{}setmathfont\{XITS Math\}}} or alternatively make the fonts available to your OS. See this \sphinxhref{http://tex.stackexchange.com/questions/43642}{tex.stackexchange.com question} for more details. \item {} If the font configuration used by matplotlib differs from the font setting in yout LaTeX document, the alignment of text elements in imported figures may be off. Check the header of your \sphinxcode{\sphinxupquote{.pgf}} file if you are unsure about the fonts matplotlib used for the layout. \item {} Vector images and hence \sphinxcode{\sphinxupquote{.pgf}} files can become bloated if there are a lot of objects in the graph. This can be the case for image processing or very big scatter graphs. In an extreme case this can cause TeX to run out of memory: "TeX capacity exceeded, sorry" You can configure latex to increase the amount of memory available to generate the \sphinxcode{\sphinxupquote{.pdf}} image as discussed on \sphinxhref{http://tex.stackexchange.com/questions/7953}{tex.stackexchange.com}. Another way would be to "rasterize" parts of the graph causing problems using either the \sphinxcode{\sphinxupquote{rasterized=True}} keyword, or \sphinxcode{\sphinxupquote{.set\_rasterized(True)}} as per \DUrole{xref,std,std-doc}{this example}. \item {} If you still need help, please see {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}} \end{itemize} \phantomsection\label{\detokenize{tutorials/text/pgf:sphx-glr-download-tutorials-text-pgf-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/text/usetex:sphx-glr-download-tutorials-text-usetex-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Text rendering With LaTeX} \label{\detokenize{tutorials/text/usetex:text-rendering-with-latex}}\label{\detokenize{tutorials/text/usetex:sphx-glr-tutorials-text-usetex-py}}\label{\detokenize{tutorials/text/usetex::doc}} Rendering text with LaTeX in Matplotlib. Matplotlib has the option to use LaTeX to manage all text layout. This option is available with the following backends: \begin{itemize} \item {} Agg \item {} PS \item {} PDF \end{itemize} The LaTeX option is activated by setting \sphinxcode{\sphinxupquote{text.usetex : True}} in your rc settings. Text handling with matplotlib's LaTeX support is slower than matplotlib's very capable {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{mathtext}}}}, but is more flexible, since different LaTeX packages (font packages, math packages, etc.) can be used. The results can be striking, especially when you take care to use the same fonts in your figures as in the main document. Matplotlib's LaTeX support requires a working \sphinxhref{http://www.tug.org}{LaTeX} installation, \sphinxhref{http://www.nongnu.org/dvipng/}{dvipng} (which may be included with your LaTeX installation), and \sphinxhref{https://ghostscript.com/}{Ghostscript} (GPL Ghostscript 9.0 or later is required). The executables for these external dependencies must all be located on your \index{PATH@\spxentry{PATH}}\index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PATH}}}}}. There are a couple of options to mention, which can be changed using {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{rc settings}}}}. Here is an example matplotlibrc file: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{font}\PYG{o}{.}\PYG{n}{family} \PYG{p}{:} \PYG{n}{serif} \PYG{n}{font}\PYG{o}{.}\PYG{n}{serif} \PYG{p}{:} \PYG{n}{Times}\PYG{p}{,} \PYG{n}{Palatino}\PYG{p}{,} \PYG{n}{New} \PYG{n}{Century} \PYG{n}{Schoolbook}\PYG{p}{,} \PYG{n}{Bookman}\PYG{p}{,} \PYG{n}{Computer} \PYG{n}{Modern} \PYG{n}{Roman} \PYG{n}{font}\PYG{o}{.}\PYG{n}{sans}\PYG{o}{\PYGZhy{}}\PYG{n}{serif} \PYG{p}{:} \PYG{n}{Helvetica}\PYG{p}{,} \PYG{n}{Avant} \PYG{n}{Garde}\PYG{p}{,} \PYG{n}{Computer} \PYG{n}{Modern} \PYG{n}{Sans} \PYG{n}{serif} \PYG{n}{font}\PYG{o}{.}\PYG{n}{cursive} \PYG{p}{:} \PYG{n}{Zapf} \PYG{n}{Chancery} \PYG{n}{font}\PYG{o}{.}\PYG{n}{monospace} \PYG{p}{:} \PYG{n}{Courier}\PYG{p}{,} \PYG{n}{Computer} \PYG{n}{Modern} \PYG{n}{Typewriter} \PYG{n}{text}\PYG{o}{.}\PYG{n}{usetex} \PYG{p}{:} \PYG{n}{true} \end{sphinxVerbatim} The first valid font in each family is the one that will be loaded. If the fonts are not specified, the Computer Modern fonts are used by default. All of the other fonts are Adobe fonts. Times and Palatino each have their own accompanying math fonts, while the other Adobe serif fonts make use of the Computer Modern math fonts. See the \sphinxhref{http://www.ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf}{PSNFSS} documentation for more details. To use LaTeX and select Helvetica as the default font, without editing matplotlibrc use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{rc} \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,}\PYG{o}{*}\PYG{o}{*}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{family}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{sans\PYGZhy{}serif}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{sans\PYGZhy{}serif}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Helvetica}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{} for Palatino and other serif fonts use:} \PYG{c+c1}{\PYGZsh{}rc(\PYGZsq{}font\PYGZsq{},**\PYGZob{}\PYGZsq{}family\PYGZsq{}:\PYGZsq{}serif\PYGZsq{},\PYGZsq{}serif\PYGZsq{}:[\PYGZsq{}Palatino\PYGZsq{}]\PYGZcb{})} \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{text}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{usetex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} Here is the standard example, \sphinxcode{\sphinxupquote{tex\_demo.py}}: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/tex\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tex_demo_0012}.png}} \caption{TeX Demo}\label{\detokenize{tutorials/text/usetex:id1}}\end{figure} Note that display math mode (\sphinxcode{\sphinxupquote{\$\$ e=mc\textasciicircum{}2 \$\$}}) is not supported, but adding the command \sphinxcode{\sphinxupquote{\textbackslash{}displaystyle}}, as in \sphinxcode{\sphinxupquote{tex\_demo.py}}, will produce the same results. \begin{sphinxadmonition}{note}{Note:} Certain characters require special escaping in TeX, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} \PYGZdl{} \PYGZpc{} \PYGZam{} \PYGZti{} \PYGZus{} \PYGZca{} \PYGZbs{} \PYGZob{} \PYGZcb{} \PYGZbs{}( \PYGZbs{}) \PYGZbs{}[ \PYGZbs{}]} \end{sphinxVerbatim} Therefore, these characters will behave differently depending on the rcParam \sphinxcode{\sphinxupquote{text.usetex}} flag. \end{sphinxadmonition} \subsubsection{usetex with unicode} \label{\detokenize{tutorials/text/usetex:usetex-with-unicode}}\label{\detokenize{tutorials/text/usetex:usetex-unicode}} It is also possible to use unicode strings with the LaTeX text manager, here is an example taken from \sphinxcode{\sphinxupquote{tex\_demo.py}}. The axis labels include Unicode text: \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/tex\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tex_demo_0012}.png}} \caption{TeX Unicode Demo}\label{\detokenize{tutorials/text/usetex:id2}}\end{figure} \subsubsection{Postscript options} \label{\detokenize{tutorials/text/usetex:postscript-options}}\label{\detokenize{tutorials/text/usetex:usetex-postscript}} In order to produce encapsulated postscript files that can be embedded in a new LaTeX document, the default behavior of matplotlib is to distill the output, which removes some postscript operators used by LaTeX that are illegal in an eps file. This step produces results which may be unacceptable to some users, because the text is coarsely rasterized and converted to bitmaps, which are not scalable like standard postscript, and the text is not searchable. One workaround is to set \sphinxcode{\sphinxupquote{ps.distiller.res}} to a higher value (perhaps 6000) in your rc settings, which will produce larger files but may look better and scale reasonably. A better workaround, which requires \sphinxhref{https://poppler.freedesktop.org/}{Poppler} or \sphinxhref{http://www.xpdfreader.com/}{Xpdf}, can be activated by changing the \sphinxcode{\sphinxupquote{ps.usedistiller}} rc setting to \sphinxcode{\sphinxupquote{xpdf}}. This alternative produces postscript without rasterizing text, so it scales properly, can be edited in Adobe Illustrator, and searched text in pdf documents. \subsubsection{Possible hangups} \label{\detokenize{tutorials/text/usetex:possible-hangups}}\label{\detokenize{tutorials/text/usetex:usetex-hangups}}\begin{itemize} \item {} On Windows, the \index{PATH@\spxentry{PATH}}\index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PATH}}}}} environment variable may need to be modified to include the directories containing the latex, dvipng and ghostscript executables. See {\hyperref[\detokenize{faq/environment_variables_faq:environment-variables}]{\sphinxcrossref{\DUrole{std,std-ref}{Environment Variables}}}} and {\hyperref[\detokenize{faq/environment_variables_faq:setting-windows-environment-variables}]{\sphinxcrossref{\DUrole{std,std-ref}{Setting environment variables in windows}}}} for details. \item {} Using MiKTeX with Computer Modern fonts, if you get odd *Agg and PNG results, go to MiKTeX/Options and update your format files \item {} On Ubuntu and Gentoo, the base texlive install does not ship with the type1cm package. You may need to install some of the extra packages to get all the goodies that come bundled with other latex distributions. \item {} Some progress has been made so matplotlib uses the dvi files directly for text layout. This allows latex to be used for text layout with the pdf and svg backends, as well as the *Agg and PS backends. In the future, a latex installation may be the only external dependency. \end{itemize} \subsubsection{Troubleshooting} \label{\detokenize{tutorials/text/usetex:troubleshooting}}\label{\detokenize{tutorials/text/usetex:usetex-troubleshooting}}\begin{itemize} \item {} Try deleting your \sphinxcode{\sphinxupquote{.matplotlib/tex.cache}} directory. If you don't know where to find \sphinxcode{\sphinxupquote{.matplotlib}}, see {\hyperref[\detokenize{faq/troubleshooting_faq:locating-matplotlib-config-dir}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlib configuration and cache directory locations}}}}. \item {} Make sure LaTeX, dvipng and ghostscript are each working and on your \index{PATH@\spxentry{PATH}}\index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PATH}}}}}. \item {} Make sure what you are trying to do is possible in a LaTeX document, that your LaTeX syntax is valid and that you are using raw strings if necessary to avoid unintended escape sequences. \item {} Most problems reported on the mailing list have been cleared up by upgrading \sphinxhref{https://ghostscript.com/}{Ghostscript}. If possible, please try upgrading to the latest release before reporting problems to the list. \item {} The \sphinxcode{\sphinxupquote{text.latex.preamble}} rc setting is not officially supported. This option provides lots of flexibility, and lots of ways to cause problems. Please disable this option before reporting problems to the mailing list. \item {} If you still need help, please see {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}} \end{itemize} \phantomsection\label{\detokenize{tutorials/text/usetex:sphx-glr-download-tutorials-text-usetex-py}} \section{Toolkits} \label{\detokenize{tutorials/index:toolkits}}\label{\detokenize{tutorials/index:tutorials-toolkits}}\label{\detokenize{tutorials/index:sphx-glr-tutorials-toolkits}} These tutorials cover toolkits designed to extend the functionality of Matplotlib in order to accomplish specific goals. \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/toolkits/axes_grid:sphx-glr-download-tutorials-toolkits-axes-grid-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Overview of axes\_grid1 toolkit} \label{\detokenize{tutorials/toolkits/axes_grid:overview-of-axes-grid1-toolkit}}\label{\detokenize{tutorials/toolkits/axes_grid:sphx-glr-tutorials-toolkits-axes-grid-py}}\label{\detokenize{tutorials/toolkits/axes_grid::doc}} Controlling the layout of plots with the axes\_grid toolkit. \subsubsection{What is axes\_grid1 toolkit?} \label{\detokenize{tutorials/toolkits/axes_grid:what-is-axes-grid1-toolkit}}\label{\detokenize{tutorials/toolkits/axes_grid:axes-grid1-users-guide-index}} \sphinxstyleemphasis{axes\_grid1} is a collection of helper classes to ease displaying (multiple) images with matplotlib. In matplotlib, the axes location (and size) is specified in the normalized figure coordinates, which may not be ideal for displaying images that needs to have a given aspect ratio. For example, it helps if you have a colorbar whose height always matches that of the image. {\hyperref[\detokenize{tutorials/toolkits/axes_grid:imagegrid}]{\sphinxcrossref{ImageGrid}}}, {\hyperref[\detokenize{tutorials/toolkits/axes_grid:rgb-axes}]{\sphinxcrossref{RGB Axes}}} and {\hyperref[\detokenize{tutorials/toolkits/axes_grid:axesdivider}]{\sphinxcrossref{AxesDivider}}} are helper classes that deals with adjusting the location of (multiple) Axes. They provides a framework to adjust the position of multiple axes at the drawing time. {\hyperref[\detokenize{tutorials/toolkits/axes_grid:parasiteaxes}]{\sphinxcrossref{ParasiteAxes}}} provides twinx(or twiny)-like features so that you can plot different data (e.g., different y-scale) in a same Axes. {\hyperref[\detokenize{tutorials/toolkits/axes_grid:anchoredartists}]{\sphinxcrossref{AnchoredArtists}}} includes custom artists which are placed at some anchored position, like the legend. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/demo\_axes\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_axes_grid_0012}.png}} \caption{Demo Axes Grid}\label{\detokenize{tutorials/toolkits/axes_grid:id1}}\end{figure} \subsubsection{axes\_grid1} \label{\detokenize{tutorials/toolkits/axes_grid:axes-grid1}} \paragraph{ImageGrid} \label{\detokenize{tutorials/toolkits/axes_grid:imagegrid}} A class that creates a grid of Axes. In matplotlib, the axes location (and size) is specified in the normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio. For example, displaying images of a same size with some fixed padding between them cannot be easily done in matplotlib. ImageGrid is used in such case. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_axesgrid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axesgrid_0011}.png}} \caption{Simple Axesgrid}\label{\detokenize{tutorials/toolkits/axes_grid:id2}}\end{figure} \begin{itemize} \item {} The position of each axes is determined at the drawing time (see {\hyperref[\detokenize{tutorials/toolkits/axes_grid:axesdivider}]{\sphinxcrossref{AxesDivider}}}), so that the size of the entire grid fits in the given rectangle (like the aspect of axes). Note that in this example, the paddings between axes are fixed even if you changes the figure size. \item {} axes in the same column has a same axes width (in figure coordinate), and similarly, axes in the same row has a same height. The widths (height) of the axes in the same row (column) are scaled according to their view limits (xlim or ylim). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_axesgrid2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axesgrid2_0011}.png}} \caption{Simple Axes Grid}\label{\detokenize{tutorials/toolkits/axes_grid:id3}}\end{figure} \item {} xaxis are shared among axes in a same column. Similarly, yaxis are shared among axes in a same row. Therefore, changing axis properties (view limits, tick location, etc. either by plot commands or using your mouse in interactive backends) of one axes will affect all other shared axes. \end{itemize} When initialized, ImageGrid creates given number (\sphinxstyleemphasis{ngrids} or \sphinxstyleemphasis{ncols} * \sphinxstyleemphasis{nrows} if \sphinxstyleemphasis{ngrids} is None) of Axes instances. A sequence-like interface is provided to access the individual Axes instances (e.g., grid{[}0{]} is the first Axes in the grid. See below for the order of axes). ImageGrid takes following arguments, \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Default &\sphinxstyletheadfamily Description \\ \hline fig &&\\ \hline rect &&\\ \hline nrows\_ncols && number of rows and cols. e.g., (2,2) \\ \hline ngrids & None & number of grids. nrows x ncols if None \\ \hline direction & "row" & increasing direction of axes number. {[}row\textbar{}column{]} \\ \hline axes\_pad & 0.02 & pad between axes in inches \\ \hline add\_all & True & Add axes to figures if True \\ \hline share\_all & False & xaxis \& yaxis of all axes are shared if True \\ \hline aspect & True & aspect of axes \\ \hline label\_mode & "L" & location of tick labels thaw will be displayed. "1" (only the lower left axes), "L" (left most and bottom most axes), or "all". \\ \hline cbar\_mode & None & {[}None\textbar{}single\textbar{}each{]} \\ \hline cbar\_location & "right" & {[}right\textbar{}top{]} \\ \hline cbar\_pad & None & pad between image axes and colorbar axes \\ \hline cbar\_size & "5\%" & size of the colorbar \\ \hline axes\_class & None &\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \begin{description} \item[{\sphinxstyleemphasis{rect}}] \leavevmode specifies the location of the grid. You can either specify coordinates of the rectangle to be used (e.g., (0.1, 0.1, 0.8, 0.8) as in the Axes), or the subplot-like position (e.g., "121"). \item[{\sphinxstyleemphasis{direction}}] \leavevmode means the increasing direction of the axes number. \item[{\sphinxstyleemphasis{aspect}}] \leavevmode By default (False), widths and heights of axes in the grid are scaled independently. If True, they are scaled according to their data limits (similar to aspect parameter in mpl). \item[{\sphinxstyleemphasis{share\_all}}] \leavevmode if True, xaxis and yaxis of all axes are shared. \item[{\sphinxstyleemphasis{direction}}] \leavevmode direction of increasing axes number. For "row", \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline grid{[}0{]} & grid{[}1{]} \\ \hline grid{[}2{]} & grid{[}3{]} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} For "column", \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline grid{[}0{]} & grid{[}2{]} \\ \hline grid{[}1{]} & grid{[}3{]} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \end{description} \end{quote} You can also create a colorbar (or colorbars). You can have colorbar for each axes (cbar\_mode="each"), or you can have a single colorbar for the grid (cbar\_mode="single"). The colorbar can be placed on your right, or top. The axes for each colorbar is stored as a \sphinxstyleemphasis{cbar\_axes} attribute. The examples below show what you can do with ImageGrid. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/demo\_axes\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_axes_grid_0012}.png}} \caption{Demo Axes Grid}\label{\detokenize{tutorials/toolkits/axes_grid:id4}}\end{figure} \paragraph{AxesDivider Class} \label{\detokenize{tutorials/toolkits/axes_grid:axesdivider-class}} Behind the scene, the ImageGrid class and the RGBAxes class utilize the AxesDivider class, whose role is to calculate the location of the axes at drawing time. While a more about the AxesDivider is (will be) explained in (yet to be written) AxesDividerGuide, direct use of the AxesDivider class will not be necessary for most users. The axes\_divider module provides a helper function make\_axes\_locatable, which can be useful. It takes a existing axes instance and create a divider for it. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{divider} \PYG{o}{=} \PYG{n}{make\PYGZus{}axes\PYGZus{}locatable}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{make\_axes\_locatable} returns an instance of the AxesLocator class, derived from the Locator. It provides \sphinxstyleemphasis{append\_axes} method that creates a new axes on the given side of ("top", "right", "bottom" and "left") of the original axes. \paragraph{colorbar whose height (or width) in sync with the master axes} \label{\detokenize{tutorials/toolkits/axes_grid:colorbar-whose-height-or-width-in-sync-with-the-master-axes}} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_colorbar.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_colorbar_0011}.png}} \caption{Simple Colorbar}\label{\detokenize{tutorials/toolkits/axes_grid:id5}}\end{figure} \subparagraph{scatter\_hist.py with AxesDivider} \label{\detokenize{tutorials/toolkits/axes_grid:scatter-hist-py-with-axesdivider}} The "scatter\_hist.py" example in mpl can be rewritten using \sphinxstyleemphasis{make\_axes\_locatable}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axScatter} \PYG{o}{=} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{axScatter}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{axScatter}\PYG{o}{.}\PYG{n}{set\PYGZus{}aspect}\PYG{p}{(}\PYG{l+m+mf}{1.}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} create new axes on the right and on the top of the current axes.} \PYG{n}{divider} \PYG{o}{=} \PYG{n}{make\PYGZus{}axes\PYGZus{}locatable}\PYG{p}{(}\PYG{n}{axScatter}\PYG{p}{)} \PYG{n}{axHistx} \PYG{o}{=} \PYG{n}{divider}\PYG{o}{.}\PYG{n}{append\PYGZus{}axes}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mf}{1.2}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{n}{axScatter}\PYG{p}{)} \PYG{n}{axHisty} \PYG{o}{=} \PYG{n}{divider}\PYG{o}{.}\PYG{n}{append\PYGZus{}axes}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mf}{1.2}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{n}{axScatter}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the scatter plot:} \PYG{c+c1}{\PYGZsh{} histograms} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{lim}\PYG{p}{,} \PYG{n}{lim} \PYG{o}{+} \PYG{n}{binwidth}\PYG{p}{,} \PYG{n}{binwidth}\PYG{p}{)} \PYG{n}{axHistx}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{bins}\PYG{o}{=}\PYG{n}{bins}\PYG{p}{)} \PYG{n}{axHisty}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{y}\PYG{p}{,} \PYG{n}{bins}\PYG{o}{=}\PYG{n}{bins}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} See the full source code below. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/scatter\_hist\_locatable\_axes.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_scatter_hist_locatable_axes_0011}.png}} \caption{Scatter Hist}\label{\detokenize{tutorials/toolkits/axes_grid:id6}}\end{figure} The scatter\_hist using the AxesDivider has some advantage over the original scatter\_hist.py in mpl. For example, you can set the aspect ratio of the scatter plot, even with the x-axis or y-axis is shared accordingly. \paragraph{ParasiteAxes} \label{\detokenize{tutorials/toolkits/axes_grid:parasiteaxes}} The ParasiteAxes is an axes whose location is identical to its host axes. The location is adjusted in the drawing time, thus it works even if the host change its location (e.g., images). In most cases, you first create a host axes, which provides a few method that can be used to create parasite axes. They are \sphinxstyleemphasis{twinx}, \sphinxstyleemphasis{twiny} (which are similar to twinx and twiny in the matplotlib) and \sphinxstyleemphasis{twin}. \sphinxstyleemphasis{twin} takes an arbitrary transformation that maps between the data coordinates of the host axes and the parasite axes. \sphinxstyleemphasis{draw} method of the parasite axes are never called. Instead, host axes collects artists in parasite axes and draw them as if they belong to the host axes, i.e., artists in parasite axes are merged to those of the host axes and then drawn according to their zorder. The host and parasite axes modifies some of the axes behavior. For example, color cycle for plot lines are shared between host and parasites. Also, the legend command in host, creates a legend that includes lines in the parasite axes. To create a host axes, you may use \sphinxstyleemphasis{host\_subplot} or \sphinxstyleemphasis{host\_axes} command. \subparagraph{Example 1. twinx} \label{\detokenize{tutorials/toolkits/axes_grid:example-1-twinx}} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/parasite\_simple.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_parasite_simple_0011}.png}} \caption{Parasite Simple}\label{\detokenize{tutorials/toolkits/axes_grid:id7}}\end{figure} \subparagraph{Example 2. twin} \label{\detokenize{tutorials/toolkits/axes_grid:example-2-twin}} \sphinxstyleemphasis{twin} without a transform argument assumes that the parasite axes has the same data transform as the host. This can be useful when you want the top(or right)-axis to have different tick-locations, tick-labels, or tick-formatter for bottom(or left)-axis. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{twin}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} now, ax2 is responsible for \PYGZdq{}top\PYGZdq{} axis and \PYGZdq{}right\PYGZdq{} axis} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{frac}\PYG{l+s+si}{\PYGZob{}1\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}2\PYGZcb{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{pi\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{pi\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{frac}\PYG{l+s+si}{\PYGZob{}3\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}2\PYGZcb{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{pi\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}2}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{pi\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_axisline4.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axisline4_0011}.png}} \caption{Simple Axisline4}\label{\detokenize{tutorials/toolkits/axes_grid:id8}}\end{figure} A more sophisticated example using twin. Note that if you change the x-limit in the host axes, the x-limit of the parasite axes will change accordingly. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/parasite\_simple2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_parasite_simple2_0011}.png}} \caption{Parasite Simple2}\label{\detokenize{tutorials/toolkits/axes_grid:id9}}\end{figure} \paragraph{AnchoredArtists} \label{\detokenize{tutorials/toolkits/axes_grid:anchoredartists}} It's a collection of artists whose location is anchored to the (axes) bbox, like the legend. It is derived from \sphinxstyleemphasis{OffsetBox} in mpl, and artist need to be drawn in the canvas coordinate. But, there is a limited support for an arbitrary transform. For example, the ellipse in the example below will have width and height in the data coordinate. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_anchored\_artists.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_anchored_artists_0011}.png}} \caption{Simple Anchored Artists}\label{\detokenize{tutorials/toolkits/axes_grid:id10}}\end{figure} \paragraph{InsetLocator} \label{\detokenize{tutorials/toolkits/axes_grid:insetlocator}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:module-mpl_toolkits.axes_grid1.inset_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator}}}}} provides helper classes and functions to place your (inset) axes at the anchored position of the parent axes, similarly to AnchoredArtist. Using {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:mpl_toolkits.axes_grid1.inset_locator.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.inset\_axes()}}}}}, you can have inset axes whose size is either fixed, or a fixed proportion of the parent axes. For example,: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{inset\PYGZus{}axes} \PYG{o}{=} \PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent\PYGZus{}axes}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} width = 30\PYGZpc{} of parent\PYGZus{}bbox} \PYG{n}{height}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} height : 1 inch} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} creates an inset axes whose width is 30\% of the parent axes and whose height is fixed at 1 inch. You may creates your inset whose size is determined so that the data scale of the inset axes to be that of the parent axes multiplied by some factor. For example, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{inset\PYGZus{}axes} \PYG{o}{=} \PYG{n}{zoomed\PYGZus{}inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} zoom = 0.5} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} creates an inset axes whose data scale is half of the parent axes. Here is complete examples. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/inset\_locator\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_inset_locator_demo_0011}.png}} \caption{Inset Locator Demo}\label{\detokenize{tutorials/toolkits/axes_grid:id11}}\end{figure} For example, \sphinxcode{\sphinxupquote{zoomed\_inset\_axes()}} can be used when you want the inset represents the zoom-up of the small portion in the parent axes. And \sphinxcode{\sphinxupquote{mpl\_toolkits/axes\_grid/inset\_locator}} provides a helper function \sphinxcode{\sphinxupquote{mark\_inset()}} to mark the location of the area represented by the inset axes. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/inset\_locator\_demo2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_inset_locator_demo2_0011}.png}} \caption{Inset Locator Demo2}\label{\detokenize{tutorials/toolkits/axes_grid:id12}}\end{figure} \subparagraph{RGB Axes} \label{\detokenize{tutorials/toolkits/axes_grid:rgb-axes}} RGBAxes is a helper class to conveniently show RGB composite images. Like ImageGrid, the location of axes are adjusted so that the area occupied by them fits in a given rectangle. Also, the xaxis and yaxis of each axes are shared. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}rgb} \PYG{k}{import} \PYG{n}{RGBAxes} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{RGBAxes}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{]}\PYG{p}{)} \PYG{n}{r}\PYG{p}{,} \PYG{n}{g}\PYG{p}{,} \PYG{n}{b} \PYG{o}{=} \PYG{n}{get\PYGZus{}rgb}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} r,g,b are 2\PYGZhy{}d images} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow\PYGZus{}rgb}\PYG{p}{(}\PYG{n}{r}\PYG{p}{,} \PYG{n}{g}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{origin}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{lower}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{interpolation}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{nearest}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_rgb.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_rgb_0011}.png}} \caption{Simple Rgb}\label{\detokenize{tutorials/toolkits/axes_grid:id13}}\end{figure} \subsubsection{AxesDivider} \label{\detokenize{tutorials/toolkits/axes_grid:axesdivider}} The axes\_divider module provides helper classes to adjust the axes positions of a set of images at drawing time. \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_size}}}}} provides a class of units that are used to determine the size of each axes. For example, you can specify a fixed size. \item {} \sphinxcode{\sphinxupquote{Divider}} is the class that calculates the axes position. It divides the given rectangular area into several areas. The divider is initialized by setting the lists of horizontal and vertical sizes on which the division will be based. Then use \sphinxcode{\sphinxupquote{new\_locator()}}, which returns a callable object that can be used to set the axes\_locator of the axes. \end{itemize} First, initialize the divider by specifying its grids, i.e., horizontal and vertical. for example,: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rect} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{l+m+mf}{0.6}\PYG{p}{,} \PYG{l+m+mf}{0.6}\PYG{p}{]} \PYG{n}{horiz}\PYG{o}{=}\PYG{p}{[}\PYG{n}{h0}\PYG{p}{,} \PYG{n}{h1}\PYG{p}{,} \PYG{n}{h2}\PYG{p}{,} \PYG{n}{h3}\PYG{p}{]} \PYG{n}{vert}\PYG{o}{=}\PYG{p}{[}\PYG{n}{v0}\PYG{p}{,} \PYG{n}{v1}\PYG{p}{,} \PYG{n}{v2}\PYG{p}{]} \PYG{n}{divider} \PYG{o}{=} \PYG{n}{Divider}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{rect}\PYG{p}{,} \PYG{n}{horiz}\PYG{p}{,} \PYG{n}{vert}\PYG{p}{)} \end{sphinxVerbatim} where, rect is a bounds of the box that will be divided and h0,..h3, v0,..v2 need to be an instance of classes in the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_size}}}}}. They have \sphinxstyleemphasis{get\_size} method that returns a tuple of two floats. The first float is the relative size, and the second float is the absolute size. Consider a following grid. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline v0 &&&\\ \hline v1 &&&\\ \hline h0,v2 & h1 & h2 & h3 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \begin{itemize} \item {} v0 =\textgreater{} 0, 2 \item {} v1 =\textgreater{} 2, 0 \item {} v2 =\textgreater{} 3, 0 \end{itemize} The height of the bottom row is always 2 (axes\_divider internally assumes that the unit is inches). The first and the second rows have a height ratio of 2:3. For example, if the total height of the grid is 6, then the first and second row will each occupy 2/(2+3) and 3/(2+3) of (6-1) inches. The widths of the horizontal columns will be similarly determined. When the aspect ratio is set, the total height (or width) will be adjusted accordingly. The {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size}}}}} contains several classes that can be used to set the horizontal and vertical configurations. For example, for vertical configuration one could use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}size} \PYG{k}{import} \PYG{n}{Fixed}\PYG{p}{,} \PYG{n}{Scaled} \PYG{n}{vert} \PYG{o}{=} \PYG{p}{[}\PYG{n}{Fixed}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{Scaled}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{Scaled}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{]} \end{sphinxVerbatim} After you set up the divider object, then you create a locator instance that will be given to the axes object.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{locator} \PYG{o}{=} \PYG{n}{divider}\PYG{o}{.}\PYG{n}{new\PYGZus{}locator}\PYG{p}{(}\PYG{n}{nx}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{ny}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}axes\PYGZus{}locator}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \end{sphinxVerbatim} The return value of the new\_locator method is an instance of the AxesLocator class. It is a callable object that returns the location and size of the cell at the first column and the second row. You may create a locator that spans over multiple cells.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{locator} \PYG{o}{=} \PYG{n}{divider}\PYG{o}{.}\PYG{n}{new\PYGZus{}locator}\PYG{p}{(}\PYG{n}{nx}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{nx}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{ny}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} The above locator, when called, will return the position and size of the cells spanning the first and second column and the first row. In this example, it will return {[}0:2, 1{]}. See the example, \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_axes\_divider2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axes_divider2_0011}.png}} \caption{Simple Axes Divider2}\label{\detokenize{tutorials/toolkits/axes_grid:id14}}\end{figure} You can adjust the size of each axes according to its x or y data limits (AxesX and AxesY). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axes\_grid1/simple\_axes\_divider3.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axes_divider3_0011}.png}} \caption{Simple Axes Divider3}\label{\detokenize{tutorials/toolkits/axes_grid:id15}}\end{figure} \phantomsection\label{\detokenize{tutorials/toolkits/axes_grid:sphx-glr-download-tutorials-toolkits-axes-grid-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/toolkits/axisartist:sphx-glr-download-tutorials-toolkits-axisartist-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{Overview of axisartist toolkit} \label{\detokenize{tutorials/toolkits/axisartist:overview-of-axisartist-toolkit}}\label{\detokenize{tutorials/toolkits/axisartist:sphx-glr-tutorials-toolkits-axisartist-py}}\label{\detokenize{tutorials/toolkits/axisartist::doc}} The axisartist toolkit tutorial. \begin{sphinxadmonition}{warning}{Warning:} \sphinxstyleemphasis{axisartist} uses a custom Axes class (derived from the mpl's original Axes class). As a side effect, some commands (mostly tick-related) do not work. \end{sphinxadmonition} The \sphinxstyleemphasis{axisartist} contains a custom Axes class that is meant to support curvilinear grids (e.g., the world coordinate system in astronomy). Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis to draw ticks, ticklines, etc., axisartist uses a special artist (AxisArtist) that can handle ticks, ticklines, etc. for curved coordinate systems. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_floating\_axis.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_floating_axis_0011}.png}} \caption{Demo Floating Axis}\label{\detokenize{tutorials/toolkits/axisartist:id2}}\end{figure} Since it uses special artists, some Matplotlib commands that work on Axes.xaxis and Axes.yaxis may not work. \subsubsection{axisartist} \label{\detokenize{tutorials/toolkits/axisartist:axisartist}}\label{\detokenize{tutorials/toolkits/axisartist:axisartist-users-guide-index}} The \sphinxstyleemphasis{axisartist} module provides a custom (and very experimental) Axes class, where each axis (left, right, top, and bottom) have a separate associated artist which is responsible for drawing the axis-line, ticks, ticklabels, and labels. You can also create your own axis, which can pass through a fixed position in the axes coordinate, or a fixed position in the data coordinate (i.e., the axis floats around when viewlimit changes). The axes class, by default, has its xaxis and yaxis invisible, and has 4 additional artists which are responsible for drawing the 4 axis spines in "left", "right", "bottom", and "top". They are accessed as ax.axis{[}"left"{]}, ax.axis{[}"right"{]}, and so on, i.e., ax.axis is a dictionary that contains artists (note that ax.axis is still a callable method and it behaves as an original Axes.axis method in Matplotlib). To create an axes, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axisartist} \PYG{k}{as} \PYG{n+nn}{AA} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{AA}\PYG{o}{.}\PYG{n}{Axes}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} or to create a subplot \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{AA}\PYG{o}{.}\PYG{n}{Subplot}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} For example, you can hide the right and top spines using: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/simple\_axisline3.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axisline3_0011}.png}} \caption{Simple Axisline3}\label{\detokenize{tutorials/toolkits/axisartist:id3}}\end{figure} It is also possible to add a horizontal axis. For example, you may have an horizontal axis at y=0 (in data coordinate). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{y=0}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{new\PYGZus{}floating\PYGZus{}axis}\PYG{p}{(}\PYG{n}{nth\PYGZus{}coord}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{value}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/simple\_axisartist1.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axisartist1_0011}.png}} \caption{Simple Axisartist1}\label{\detokenize{tutorials/toolkits/axisartist:id4}}\end{figure} Or a fixed axis with some offset \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} make new (right\PYGZhy{}side) yaxis, but with some offset} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{new\PYGZus{}fixed\PYGZus{}axis}\PYG{p}{(}\PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{offset}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{axisartist with ParasiteAxes} \label{\detokenize{tutorials/toolkits/axisartist:axisartist-with-parasiteaxes}} Most commands in the axes\_grid1 toolkit can take an axes\_class keyword argument, and the commands create an axes of the given class. For example, to create a host subplot with axisartist.Axes, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axisartist} \PYG{k}{as} \PYG{n+nn}{AA} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1} \PYG{k}{import} \PYG{n}{host\PYGZus{}subplot} \PYG{n}{host} \PYG{o}{=} \PYG{n}{host\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{axes\PYGZus{}class}\PYG{o}{=}\PYG{n}{AA}\PYG{o}{.}\PYG{n}{Axes}\PYG{p}{)} \end{sphinxVerbatim} Here is an example that uses ParasiteAxes. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_parasite\_axes2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_parasite_axes2_0011}.png}} \caption{Demo Parasite Axes2}\label{\detokenize{tutorials/toolkits/axisartist:id5}}\end{figure} \paragraph{Curvilinear Grid} \label{\detokenize{tutorials/toolkits/axisartist:curvilinear-grid}} The motivation behind the AxisArtist module is to support a curvilinear grid and ticks. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_curvelinear\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_curvelinear_grid_0012}.png}} \caption{Demo Curvelinear Grid}\label{\detokenize{tutorials/toolkits/axisartist:id6}}\end{figure} \paragraph{Floating Axes} \label{\detokenize{tutorials/toolkits/axisartist:floating-axes}} AxisArtist also supports a Floating Axes whose outer axes are defined as floating axis. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_floating\_axes.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_floating_axes_0011}.png}} \caption{Demo Floating Axes}\label{\detokenize{tutorials/toolkits/axisartist:id7}}\end{figure} \subsubsection{axisartist namespace} \label{\detokenize{tutorials/toolkits/axisartist:axisartist-namespace}} The \sphinxstyleemphasis{axisartist} namespace includes a derived Axes implementation. The biggest difference is that the artists responsible to draw axis line, ticks, ticklabel and axis labels are separated out from the mpl's Axis class, which are much more than artists in the original mpl. This change was strongly motivated to support curvilinear grid. Here are a few things that mpl\_toolkits.axisartist.Axes is different from original Axes from mpl. \begin{itemize} \item {} Axis elements (axis line(spine), ticks, ticklabel and axis labels) are drawn by a AxisArtist instance. Unlike Axis, left, right, top and bottom axis are drawn by separate artists. And each of them may have different tick location and different tick labels. \item {} gridlines are drawn by a Gridlines instance. The change was motivated that in curvilinear coordinate, a gridline may not cross axis-lines (i.e., no associated ticks). In the original Axes class, gridlines are tied to ticks. \item {} ticklines can be rotated if necessary (i.e, along the gridlines) \end{itemize} In summary, all these changes was to support \begin{itemize} \item {} a curvilinear grid. \item {} a floating axis \end{itemize} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_floating\_axis.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_floating_axis_0011}.png}} \caption{Demo Floating Axis}\label{\detokenize{tutorials/toolkits/axisartist:id8}}\end{figure} \sphinxstyleemphasis{mpl\_toolkits.axisartist.Axes} class defines a \sphinxstyleemphasis{axis} attribute, which is a dictionary of AxisArtist instances. By default, the dictionary has 4 AxisArtist instances, responsible for drawing of left, right, bottom and top axis. xaxis and yaxis attributes are still available, however they are set to not visible. As separate artists are used for rendering axis, some axis-related method in mpl may have no effect. In addition to AxisArtist instances, the mpl\_toolkits.axisartist.Axes will have \sphinxstyleemphasis{gridlines} attribute (Gridlines), which obviously draws grid lines. In both AxisArtist and Gridlines, the calculation of tick and grid location is delegated to an instance of GridHelper class. mpl\_toolkits.axisartist.Axes class uses GridHelperRectlinear as a grid helper. The GridHelperRectlinear class is a wrapper around the \sphinxstyleemphasis{xaxis} and \sphinxstyleemphasis{yaxis} of mpl's original Axes, and it was meant to work as the way how mpl's original axes works. For example, tick location changes using set\_ticks method and etc. should work as expected. But change in artist properties (e.g., color) will not work in general, although some effort has been made so that some often-change attributes (color, etc.) are respected. \subsubsection{AxisArtist} \label{\detokenize{tutorials/toolkits/axisartist:id1}} AxisArtist can be considered as a container artist with following attributes which will draw ticks, labels, etc. \begin{itemize} \item {} line \item {} major\_ticks, major\_ticklabels \item {} minor\_ticks, minor\_ticklabels \item {} offsetText \item {} label \end{itemize} \paragraph{line} \label{\detokenize{tutorials/toolkits/axisartist:line}} Derived from Line2d class. Responsible for drawing a spinal(?) line. \paragraph{major\_ticks, minor\_ticks} \label{\detokenize{tutorials/toolkits/axisartist:major-ticks-minor-ticks}} Derived from Line2d class. Note that ticks are markers. \paragraph{major\_ticklabels, minor\_ticklabels} \label{\detokenize{tutorials/toolkits/axisartist:major-ticklabels-minor-ticklabels}} Derived from Text. Note that it is not a list of Text artist, but a single artist (similar to a collection). \paragraph{axislabel} \label{\detokenize{tutorials/toolkits/axisartist:axislabel}} Derived from Text. \subsubsection{Default AxisArtists} \label{\detokenize{tutorials/toolkits/axisartist:default-axisartists}} By default, following for axis artists are defined.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]} \end{sphinxVerbatim} The ticklabels and axislabel of the top and the right axis are set to not visible. For example, if you want to change the color attributes of major\_ticklabels of the bottom x-axis \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} Similarly, to make ticklabels invisible \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} AxisArtist provides a helper method to control the visibility of ticks, ticklabels, and label. To make ticklabel invisible, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n}{ticklabels}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} To make all of ticks, ticklabels, and (axis) label invisible \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} To turn all off but ticks on \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{ticks}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} To turn all on but (axis) label off \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} ax.axis's \_\_getitem\_\_ method can take multiple axis names. For example, to turn ticklabels of "top" and "right" axis on, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n}{ticklabels}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Note that 'ax.axis{[}"top","right"{]}' returns a simple proxy object that translate above code to something like below. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{n} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{n}{n}\PYG{p}{]}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n}{ticklabels}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} So, any return values in the for loop are ignored. And you should not use it anything more than a simple method. Like the list indexing ":" means all items, i.e., \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticks}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} changes tick color in all axis. \subsubsection{HowTo} \label{\detokenize{tutorials/toolkits/axisartist:howto}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Changing tick locations and label. \end{enumerate} \begin{quote} Same as the original mpl's axes.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{quote} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \setcounter{enumi}{1} \item {} Changing axis properties like color, etc. \end{enumerate} \begin{quote} Change the properties of appropriate artists. For example, to change the color of the ticklabels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \end{quote} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \setcounter{enumi}{2} \item {} To change the attributes of multiple axis: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} or to change the attributes of all axis: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} \begin{description} \item[{To change the tick size (length), you need to use}] \leavevmode axis.major\_ticks.set\_ticksize method. To change the direction of the ticks (ticks are in opposite direction of ticklabels by default), use axis.major\_ticks.set\_tick\_out method. To change the pad between ticks and ticklabels, use axis.major\_ticklabels.set\_pad method. To change the pad between ticklabels and axis label, axis.label.set\_pad method. \end{description} \end{enumerate} \subsubsection{Rotation and Alignment of TickLabels} \label{\detokenize{tutorials/toolkits/axisartist:rotation-and-alignment-of-ticklabels}} This is also quite different from the original mpl and can be confusing. When you want to rotate the ticklabels, first consider using "set\_axis\_direction" method. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}direction}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}direction}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/simple\_axis\_direction01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axis_direction01_0011}.png}} \caption{Simple Axis Direction01}\label{\detokenize{tutorials/toolkits/axisartist:id9}}\end{figure} The parameter for set\_axis\_direction is one of {[}"left", "right", "bottom", "top"{]}. You must understand some underlying concept of directions. \begin{quote} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} There is a reference direction which is defined as the direction of the axis line with increasing coordinate. For example, the reference direction of the left x-axis is from bottom to top. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/axis\_direction\_demo\_step01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_axis_direction_demo_step01_0011}.png}} \caption{Axis Direction Demo - Step 01}\label{\detokenize{tutorials/toolkits/axisartist:id10}}\end{figure} \end{enumerate} \begin{quote} The direction, text angle, and alignments of the ticks, ticklabels and axis-label is determined with respect to the reference direction \end{quote} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \setcounter{enumi}{1} \item {} \sphinxstyleemphasis{ticklabel\_direction} is either the right-hand side (+) of the reference direction or the left-hand side (-). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/axis\_direction\_demo\_step02.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_axis_direction_demo_step02_0011}.png}} \caption{Axis Direction Demo - Step 02}\label{\detokenize{tutorials/toolkits/axisartist:id11}}\end{figure} \item {} same for the \sphinxstyleemphasis{label\_direction} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/axis\_direction\_demo\_step03.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_axis_direction_demo_step03_0011}.png}} \caption{Axis Direction Demo - Step 03}\label{\detokenize{tutorials/toolkits/axisartist:id12}}\end{figure} \item {} ticks are by default drawn toward the opposite direction of the ticklabels. \item {} text rotation of ticklabels and label is determined in reference to the \sphinxstyleemphasis{ticklabel\_direction} or \sphinxstyleemphasis{label\_direction}, respectively. The rotation of ticklabels and label is anchored. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/axis\_direction\_demo\_step04.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_axis_direction_demo_step04_0011}.png}} \caption{Axis Direction Demo - Step 04}\label{\detokenize{tutorials/toolkits/axisartist:id13}}\end{figure} \end{enumerate} \end{quote} On the other hand, there is a concept of "axis\_direction". This is a default setting of above properties for each, "bottom", "left", "top", and "right" axis. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|T|} \hline ? & ? & left & bottom & right & top \\ \hline axislabel & direction & '-' & '+' & '+' & '-' \\ \hline axislabel & rotation & 180 & 0 & 0 & 180 \\ \hline axislabel & va & center & top & center & bottom \\ \hline axislabel & ha & right & center & right & center \\ \hline ticklabel & direction & '-' & '+' & '+' & '-' \\ \hline ticklabels & rotation & 90 & 0 & -90 & 180 \\ \hline ticklabel & ha & right & center & right & center \\ \hline ticklabel & va & center & baseline & center & baseline \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} And, 'set\_axis\_direction("top")' means to adjust the text rotation etc, for settings suitable for "top" axis. The concept of axis direction can be more clear with curved axis. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_axis\_direction.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_axis_direction_0011}.png}} \caption{Demo Axis Direction}\label{\detokenize{tutorials/toolkits/axisartist:id14}}\end{figure} The axis\_direction can be adjusted in the AxisArtist level, or in the level of its child artists, i.e., ticks, ticklabels, and axis-label. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}direction}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} changes axis\_direction of all the associated artist with the "left" axis, while \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}direction}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{top}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} changes the axis\_direction of only the major\_ticklabels. Note that set\_axis\_direction in the AxisArtist level changes the ticklabel\_direction and label\_direction, while changing the axis\_direction of ticks, ticklabels, and axis-label does not affect them. If you want to make ticks outward and ticklabels inside the axes, use invert\_ticklabel\_direction method. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]}\PYG{o}{.}\PYG{n}{invert\PYGZus{}ticklabel\PYGZus{}direction}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} A related method is "set\_tick\_out". It makes ticks outward (as a matter of fact, it makes ticks toward the opposite direction of the default direction). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticks}\PYG{o}{.}\PYG{n}{set\PYGZus{}tick\PYGZus{}out}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/simple\_axis\_direction03.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axis_direction03_0011}.png}} \caption{Simple Axis Direction03}\label{\detokenize{tutorials/toolkits/axisartist:id15}}\end{figure} So, in summary, \begin{itemize} \item {} \begin{description} \item[{AxisArtist's methods}] \leavevmode\begin{itemize} \item {} set\_axis\_direction : "left", "right", "bottom", or "top" \item {} set\_ticklabel\_direction : "+" or "-" \item {} set\_axislabel\_direction : "+" or "-" \item {} invert\_ticklabel\_direction \end{itemize} \end{description} \item {} \begin{description} \item[{Ticks' methods (major\_ticks and minor\_ticks)}] \leavevmode\begin{itemize} \item {} set\_tick\_out : True or False \item {} set\_ticksize : size in points \end{itemize} \end{description} \item {} \begin{description} \item[{TickLabels' methods (major\_ticklabels and minor\_ticklabels)}] \leavevmode\begin{itemize} \item {} set\_axis\_direction : "left", "right", "bottom", or "top" \item {} set\_rotation : angle with respect to the reference direction \item {} set\_ha and set\_va : see below \end{itemize} \end{description} \item {} \begin{description} \item[{AxisLabels' methods (label)}] \leavevmode\begin{itemize} \item {} set\_axis\_direction : "left", "right", "bottom", or "top" \item {} set\_rotation : angle with respect to the reference direction \item {} set\_ha and set\_va \end{itemize} \end{description} \end{itemize} \paragraph{Adjusting ticklabels alignment} \label{\detokenize{tutorials/toolkits/axisartist:adjusting-ticklabels-alignment}} Alignment of TickLabels are treated specially. See below \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_ticklabel\_alignment.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_ticklabel_alignment_0011}.png}} \caption{Demo Ticklabel Alignment}\label{\detokenize{tutorials/toolkits/axisartist:id16}}\end{figure} \paragraph{Adjusting pad} \label{\detokenize{tutorials/toolkits/axisartist:adjusting-pad}} To change the pad between ticks and ticklabels \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticklabels}\PYG{o}{.}\PYG{n}{set\PYGZus{}pad}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} Or ticklabels and axis-label \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}pad}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/simple\_axis\_pad.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_simple_axis_pad_0011}.png}} \caption{Simple Axis Pad}\label{\detokenize{tutorials/toolkits/axisartist:id17}}\end{figure} \subsubsection{GridHelper} \label{\detokenize{tutorials/toolkits/axisartist:gridhelper}} To actually define a curvilinear coordinate, you have to use your own grid helper. A generalised version of grid helper class is supplied and this class should suffice in most of cases. A user may provide two functions which defines a transformation (and its inverse pair) from the curved coordinate to (rectilinear) image coordinate. Note that while ticks and grids are drawn for curved coordinate, the data transform of the axes itself (ax.transData) is still rectilinear (image) coordinate. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axisartist}\PYG{n+nn}{.}\PYG{n+nn}{grid\PYGZus{}helper\PYGZus{}curvelinear} \PYGZbs{} \PYG{k+kn}{import} \PYG{n+nn}{GridHelperCurveLinear} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axisartist} \PYG{k}{import} \PYG{n}{Subplot} \PYG{c+c1}{\PYGZsh{} from curved coordinate to rectlinear coordinate.} \PYG{k}{def} \PYG{n+nf}{tr}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{asarray}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{asarray}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{k}{return} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{o}{\PYGZhy{}}\PYG{n}{x} \PYG{c+c1}{\PYGZsh{} from rectlinear coordinate to curved coordinate.} \PYG{k}{def} \PYG{n+nf}{inv\PYGZus{}tr}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,}\PYG{n}{y}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{asarray}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{asarray}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{k}{return} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{o}{+}\PYG{n}{x} \PYG{n}{grid\PYGZus{}helper} \PYG{o}{=} \PYG{n}{GridHelperCurveLinear}\PYG{p}{(}\PYG{p}{(}\PYG{n}{tr}\PYG{p}{,} \PYG{n}{inv\PYGZus{}tr}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{Subplot}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{grid\PYGZus{}helper}\PYG{o}{=}\PYG{n}{grid\PYGZus{}helper}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{)} \end{sphinxVerbatim} You may use matplotlib's Transform instance instead (but a inverse transformation must be defined). Often, coordinate range in a curved coordinate system may have a limited range, or may have cycles. In those cases, a more customized version of grid helper is required. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axisartist}\PYG{n+nn}{.}\PYG{n+nn}{angle\PYGZus{}helper} \PYG{k}{as} \PYG{n+nn}{angle\PYGZus{}helper} \PYG{c+c1}{\PYGZsh{} PolarAxes.PolarTransform takes radian. However, we want our coordinate} \PYG{c+c1}{\PYGZsh{} system in degree} \PYG{n}{tr} \PYG{o}{=} \PYG{n}{Affine2D}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{scale}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{/}\PYG{l+m+mf}{180.}\PYG{p}{,} \PYG{l+m+mf}{1.}\PYG{p}{)} \PYG{o}{+} \PYG{n}{PolarAxes}\PYG{o}{.}\PYG{n}{PolarTransform}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} extreme finder : find a range of coordinate.} \PYG{c+c1}{\PYGZsh{} 20, 20 : number of sampling points along x, y direction} \PYG{c+c1}{\PYGZsh{} The first coordinate (longitude, but theta in polar)} \PYG{c+c1}{\PYGZsh{} has a cycle of 360 degree.} \PYG{c+c1}{\PYGZsh{} The second coordinate (latitude, but radius in polar) has a minimum of 0} \PYG{n}{extreme\PYGZus{}finder} \PYG{o}{=} \PYG{n}{angle\PYGZus{}helper}\PYG{o}{.}\PYG{n}{ExtremeFinderCycle}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{lon\PYGZus{}cycle} \PYG{o}{=} \PYG{l+m+mi}{360}\PYG{p}{,} \PYG{n}{lat\PYGZus{}cycle} \PYG{o}{=} \PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{lon\PYGZus{}minmax} \PYG{o}{=} \PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{lat\PYGZus{}minmax} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{inf}\PYG{p}{)}\PYG{p}{,} \PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Find a grid values appropriate for the coordinate (degree,} \PYG{c+c1}{\PYGZsh{} minute, second). The argument is a approximate number of grids.} \PYG{n}{grid\PYGZus{}locator1} \PYG{o}{=} \PYG{n}{angle\PYGZus{}helper}\PYG{o}{.}\PYG{n}{LocatorDMS}\PYG{p}{(}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} And also uses an appropriate formatter. Note that,the} \PYG{c+c1}{\PYGZsh{} acceptable Locator and Formatter class is a bit different than} \PYG{c+c1}{\PYGZsh{} that of mpl\PYGZsq{}s, and you cannot directly use mpl\PYGZsq{}s Locator and} \PYG{c+c1}{\PYGZsh{} Formatter here (but may be possible in the future).} \PYG{n}{tick\PYGZus{}formatter1} \PYG{o}{=} \PYG{n}{angle\PYGZus{}helper}\PYG{o}{.}\PYG{n}{FormatterDMS}\PYG{p}{(}\PYG{p}{)} \PYG{n}{grid\PYGZus{}helper} \PYG{o}{=} \PYG{n}{GridHelperCurveLinear}\PYG{p}{(}\PYG{n}{tr}\PYG{p}{,} \PYG{n}{extreme\PYGZus{}finder}\PYG{o}{=}\PYG{n}{extreme\PYGZus{}finder}\PYG{p}{,} \PYG{n}{grid\PYGZus{}locator1}\PYG{o}{=}\PYG{n}{grid\PYGZus{}locator1}\PYG{p}{,} \PYG{n}{tick\PYGZus{}formatter1}\PYG{o}{=}\PYG{n}{tick\PYGZus{}formatter1} \PYG{p}{)} \end{sphinxVerbatim} Again, the \sphinxstyleemphasis{transData} of the axes is still a rectilinear coordinate (image coordinate). You may manually do conversion between two coordinates, or you may use Parasite Axes for convenience.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{SubplotHost}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{grid\PYGZus{}helper}\PYG{o}{=}\PYG{n}{grid\PYGZus{}helper}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} A parasite axes with given transform} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{ParasiteAxesAuxTrans}\PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{tr}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{equal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} note that ax2.transData == tr + ax1.transData} \PYG{c+c1}{\PYGZsh{} Anything you draw in ax2 will match the ticks and grids of ax1.} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{parasites}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/axisartist/demo\_curvelinear\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_curvelinear_grid_0012}.png}} \caption{Demo Curvelinear Grid}\label{\detokenize{tutorials/toolkits/axisartist:id18}}\end{figure} \subsubsection{FloatingAxis} \label{\detokenize{tutorials/toolkits/axisartist:floatingaxis}} A floating axis is an axis one of whose data coordinate is fixed, i.e, its location is not fixed in Axes coordinate but changes as axes data limits changes. A floating axis can be created using \sphinxstyleemphasis{new\_floating\_axis} method. However, it is your responsibility that the resulting AxisArtist is properly added to the axes. A recommended way is to add it as an item of Axes's axis attribute.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} floating axis whose first (index starts from 0) coordinate} \PYG{c+c1}{\PYGZsh{} (theta) is fixed at 60} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{lat}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axis} \PYG{o}{=} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{new\PYGZus{}floating\PYGZus{}axis}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{60}\PYG{p}{)} \PYG{n}{axis}\PYG{o}{.}\PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}text}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{theta = 60\PYGZca{}}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{circ\PYGZcb{}\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{axis}\PYG{o}{.}\PYG{n}{label}\PYG{o}{.}\PYG{n}{set\PYGZus{}visible}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} See the first example of this page. \subsubsection{Current Limitations and TODO's} \label{\detokenize{tutorials/toolkits/axisartist:current-limitations-and-todo-s}} The code need more refinement. Here is a incomplete list of issues and TODO's \begin{itemize} \item {} No easy way to support a user customized tick location (for curvilinear grid). A new Locator class needs to be created. \item {} FloatingAxis may have coordinate limits, e.g., a floating axis of x = 0, but y only spans from 0 to 1. \item {} The location of axislabel of FloatingAxis needs to be optionally given as a coordinate value. ex, a floating axis of x=0 with label at y=1 \end{itemize} \phantomsection\label{\detokenize{tutorials/toolkits/axisartist:sphx-glr-download-tutorials-toolkits-axisartist-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{tutorials/toolkits/mplot3d:sphx-glr-download-tutorials-toolkits-mplot3d-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subsection{The mplot3d Toolkit} \label{\detokenize{tutorials/toolkits/mplot3d:the-mplot3d-toolkit}}\label{\detokenize{tutorials/toolkits/mplot3d:sphx-glr-tutorials-toolkits-mplot3d-py}}\label{\detokenize{tutorials/toolkits/mplot3d::doc}} Generating 3D plots using the mplot3d toolkit. \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id14}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:the-mplot3d-toolkit}]{\sphinxcrossref{The mplot3d Toolkit}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id15}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:getting-started}]{\sphinxcrossref{Getting started}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id16}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:line-plots}]{\sphinxcrossref{Line plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id17}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:scatter-plots}]{\sphinxcrossref{Scatter plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id18}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:wireframe-plots}]{\sphinxcrossref{Wireframe plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id19}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:surface-plots}]{\sphinxcrossref{Surface plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id20}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:tri-surface-plots}]{\sphinxcrossref{Tri-Surface plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id21}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:contour-plots}]{\sphinxcrossref{Contour plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id22}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:filled-contour-plots}]{\sphinxcrossref{Filled contour plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id23}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:polygon-plots}]{\sphinxcrossref{Polygon plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id24}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:bar-plots}]{\sphinxcrossref{Bar plots}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id25}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:quiver}]{\sphinxcrossref{Quiver}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id26}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:d-plots-in-3d}]{\sphinxcrossref{2D plots in 3D}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id27}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:text}]{\sphinxcrossref{Text}}} \item {} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:id28}}{\hyperref[\detokenize{tutorials/toolkits/mplot3d:subplotting}]{\sphinxcrossref{Subplotting}}} \end{itemize} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsubsection{Getting started} \label{\detokenize{tutorials/toolkits/mplot3d:getting-started}}\label{\detokenize{tutorials/toolkits/mplot3d:toolkit-mplot3d-tutorial}} An Axes3D object is created just like any other axes using the projection='3d' keyword. Create a new {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} and add a new axes to it of type \sphinxcode{\sphinxupquote{Axes3D}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{mplot3d} \PYG{k}{import} \PYG{n}{Axes3D} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \DUrole{versionmodified}{New in version 1.0.0: }This approach is the preferred method of creating a 3D axes. \begin{sphinxadmonition}{note}{Note:} Prior to version 1.0.0, the method of creating a 3D axes was different. For those using older versions of matplotlib, change \sphinxcode{\sphinxupquote{ax = fig.add\_subplot(111, projection='3d')}} to \sphinxcode{\sphinxupquote{ax = Axes3D(fig)}}. \end{sphinxadmonition} See the {\hyperref[\detokenize{api/toolkits/mplot3d/faq:toolkit-mplot3d-faq}]{\sphinxcrossref{\DUrole{std,std-ref}{mplot3d FAQ}}}} for more information about the mplot3d toolkit. \paragraph{Line plots} \label{\detokenize{tutorials/toolkits/mplot3d:line-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:plot3d}}\index{plot() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{plot()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.plot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{plot}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{*args}, \emph{zdir='z'}, \emph{**kwargs}}{} Plot 2D or 3D data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs}}] \leavevmode{[}1D array-like{]} x coordinates of vertices. \item[{\sphinxstylestrong{ys}}] \leavevmode{[}1D array-like{]} y coordinates of vertices. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}scalar or 1D array-like{]} z coordinates of vertices; either one for all points or one for each point. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} When plotting 2D data, the direction to use as z ('x', 'y' or 'z'); defaults to 'z'. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/lines3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_lines3d_0011}.png}} \caption{Lines3d}\label{\detokenize{tutorials/toolkits/mplot3d:id1}}\end{figure} \paragraph{Scatter plots} \label{\detokenize{tutorials/toolkits/mplot3d:scatter-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:scatter3d}}\index{scatter() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{scatter()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.scatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{scatter}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{zs=0}, \emph{zdir='z'}, \emph{s=20}, \emph{c=None}, \emph{depthshade=True}, \emph{*args}, \emph{**kwargs}}{} Create a scatter plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs, ys}}] \leavevmode{[}array-like{]} The data positions. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}float or array-like, optional, default: 0{]} The z-positions. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to place all points in the same plane. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z', '-x', '-y', '-z'\}, optional, default: 'z'{]} The axis direction for the \sphinxstyleemphasis{zs}. This is useful when plotting 2D data on a 3D Axes. The data must be passed as \sphinxstyleemphasis{xs}, \sphinxstyleemphasis{ys}. Setting \sphinxstyleemphasis{zdir} to 'y' then plots the data to the x-z-plane. See also \DUrole{xref,std,std-doc}{/gallery/mplot3d/2dcollections3d}. \item[{\sphinxstylestrong{s}}] \leavevmode{[}scalar or array-like, optional, default: 20{]} The marker size in points**2. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to make all markers the same size. \item[{\sphinxstylestrong{c}}] \leavevmode{[}color, sequence, or sequence of color, optional{]} The marker color. Possible values: \begin{itemize} \item {} A single color format string. \item {} A sequence of color specifications of length n. \item {} A sequence of n numbers to be mapped to colors using \sphinxstyleemphasis{cmap} and \sphinxstyleemphasis{norm}. \item {} A 2-D array in which the rows are RGB or RGBA. \end{itemize} For more details see the \sphinxstyleemphasis{c} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \item[{\sphinxstylestrong{depthshade}}] \leavevmode{[}bool, optional, default: True{]} Whether to shade the scatter markers to give the appearance of depth. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other arguments are passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{paths}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/scatter3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_scatter3d_0011}.png}} \caption{Scatter3d}\label{\detokenize{tutorials/toolkits/mplot3d:id2}}\end{figure} \paragraph{Wireframe plots} \label{\detokenize{tutorials/toolkits/mplot3d:wireframe-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:wireframe}}\index{plot\_wireframe() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{plot\_wireframe()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.plot_wireframe}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{plot\_wireframe}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{**kwargs}}{} Plot a 3D wireframe. \begin{sphinxadmonition}{note}{Note:} The \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount} kwargs, which both default to 50, determine the maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}2d arrays{]} Data values. \item[{\sphinxstylestrong{rcount, ccount}}] \leavevmode{[}int{]} Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Setting a count to zero causes the data to be not sampled in the corresponding direction, producing a 3D line plot rather than a wireframe plot. Defaults to 50. \DUrole{versionmodified}{New in version 2.0.} \item[{\sphinxstylestrong{rstride, cstride}}] \leavevmode{[}int{]} Downsampling stride in each direction. These arguments are mutually exclusive with \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount}. If only one of \sphinxstyleemphasis{rstride} or \sphinxstyleemphasis{cstride} is set, the other defaults to 1. Setting a stride to zero causes the data to be not sampled in the corresponding direction, producing a 3D line plot rather than a wireframe plot. 'classic' mode uses a default of \sphinxcode{\sphinxupquote{rstride = cstride = 1}} instead of the new default of \sphinxcode{\sphinxupquote{rcount = ccount = 50}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line3DCollection}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/wire3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_wire3d_0011}.png}} \caption{Wire3d}\label{\detokenize{tutorials/toolkits/mplot3d:id3}}\end{figure} \paragraph{Surface plots} \label{\detokenize{tutorials/toolkits/mplot3d:surface-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:surface}}\index{plot\_surface() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{plot\_surface()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.plot_surface}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{plot\_surface}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{lightsource=None}, \emph{**kwargs}}{} Create a surface plot. By default it will be colored in shades of a solid color, but it also supports color mapping by supplying the \sphinxstyleemphasis{cmap} argument. \begin{sphinxadmonition}{note}{Note:} The \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount} kwargs, which both default to 50, determine the maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}2d arrays{]} Data values. \item[{\sphinxstylestrong{rcount, ccount}}] \leavevmode{[}int{]} Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 50. \DUrole{versionmodified}{New in version 2.0.} \item[{\sphinxstylestrong{rstride, cstride}}] \leavevmode{[}int{]} Downsampling stride in each direction. These arguments are mutually exclusive with \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount}. If only one of \sphinxstyleemphasis{rstride} or \sphinxstyleemphasis{cstride} is set, the other defaults to 10. 'classic' mode uses a default of \sphinxcode{\sphinxupquote{rstride = cstride = 10}} instead of the new default of \sphinxcode{\sphinxupquote{rcount = ccount = 50}}. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color-like{]} Color of the surface patches. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}Colormap{]} Colormap of the surface patches. \item[{\sphinxstylestrong{facecolors}}] \leavevmode{[}array-like of colors.{]} Colors of each individual patch. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize{]} Normalization for the colormap. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float{]} Bounds for the normalization. \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool{]} Whether to shade the facecolors. Defaults to True. Shading is always disabled when \sphinxcode{\sphinxupquote{cmap}} is specified. \item[{\sphinxstylestrong{lightsource}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}{]} The lightsource to use when \sphinxcode{\sphinxupquote{shade}} is True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/surface3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_surface3d_0012}.png}} \caption{Surface3d}\label{\detokenize{tutorials/toolkits/mplot3d:id4}} \begin{sphinxlegend} Surface3d 2 Surface3d 3 \end{sphinxlegend} \end{figure} \paragraph{Tri-Surface plots} \label{\detokenize{tutorials/toolkits/mplot3d:tri-surface-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:trisurface}}\index{plot\_trisurf() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{plot\_trisurf()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.plot_trisurf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{plot\_trisurf}}}{\emph{self}, \emph{*args}, \emph{color=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{lightsource=None}, \emph{**kwargs}}{} Plot a triangulated surface. The (optional) triangulation can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object, or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The remaining arguments are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-like{]} Data values as 1D arrays. \item[{\sphinxstylestrong{color}}] \leavevmode Color of the surface patches. \item[{\sphinxstylestrong{cmap}}] \leavevmode A colormap for the surface patches. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize{]} An instance of Normalize to map values to colors. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} Minimum and maximum value to map. \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool{]} Whether to shade the facecolors. Defaults to True. Shading is always disabled when \sphinxstyleemphasis{cmap} is specified. \item[{\sphinxstylestrong{lightsource}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}{]} The lightsource to use when \sphinxstyleemphasis{shade} is True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other arguments are passed on to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}} \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{trisurf3d1}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{trisurf3d_21}.pdf} \end{figure} \DUrole{versionmodified}{New in version 1.2.0: }This plotting function was added for the v1.2.0 release. \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/trisurf3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_trisurf3d_0011}.png}} \caption{Trisurf3d}\label{\detokenize{tutorials/toolkits/mplot3d:id5}}\end{figure} \paragraph{Contour plots} \label{\detokenize{tutorials/toolkits/mplot3d:contour-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:contour3d}}\index{contour() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{contour()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.contour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{contour}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{extend3d=False}, \emph{stride=5}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{extend3d}}] \leavevmode{[}bool{]} Whether to extend contour in 3D; defaults to False. \item[{\sphinxstylestrong{stride}}] \leavevmode{[}int{]} Step size for extending contour. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contour}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/contour3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contour3d_0011}.png}} \caption{Contour3d}\label{\detokenize{tutorials/toolkits/mplot3d:id6}} \begin{sphinxlegend} Contour3d 2 Contour3d 3 \end{sphinxlegend} \end{figure} \paragraph{Filled contour plots} \label{\detokenize{tutorials/toolkits/mplot3d:filled-contour-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:contourf3d}}\index{contourf() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{contourf()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.contourf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{contourf}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D filled contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contourf}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{New in version 1.1.0: }The \sphinxstyleemphasis{zdir} and \sphinxstyleemphasis{offset} parameters. \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/contourf3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contourf3d_0011}.png}} \caption{Contourf3d}\label{\detokenize{tutorials/toolkits/mplot3d:id7}} \begin{sphinxlegend} Contourf3d 2 \end{sphinxlegend} \end{figure} \DUrole{versionmodified}{New in version 1.1.0: }The feature demoed in the second contourf3d example was enabled as a result of a bugfix for version 1.1.0. \paragraph{Polygon plots} \label{\detokenize{tutorials/toolkits/mplot3d:polygon-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:polygon3d}}\index{add\_collection3d() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{add\_collection3d()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.add_collection3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{add\_collection3d}}}{\emph{self}, \emph{col}, \emph{zs=0}, \emph{zdir='z'}}{} Add a 3D collection object to the plot. 2D collection types are converted to a 3D version by modifying the object and adding z coordinate information. \begin{description} \item[{Supported are:}] \leavevmode\begin{itemize} \item {} PolyCollection \item {} LineCollection \item {} PatchCollection \end{itemize} \end{description} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/polys3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_polys3d_0011}.png}} \caption{Polys3d}\label{\detokenize{tutorials/toolkits/mplot3d:id8}}\end{figure} \paragraph{Bar plots} \label{\detokenize{tutorials/toolkits/mplot3d:bar-plots}}\label{\detokenize{tutorials/toolkits/mplot3d:bar3d}}\index{bar() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{bar()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.bar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{bar}}}{\emph{self}, \emph{left}, \emph{height}, \emph{zs=0}, \emph{zdir='z'}, \emph{*args}, \emph{**kwargs}}{} Add 2D bar(s). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left}}] \leavevmode{[}1D array-like{]} The x coordinates of the left sides of the bars. \item[{\sphinxstylestrong{height}}] \leavevmode{[}1D array-like{]} The height of the bars. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}scalar or 1D array-like{]} Z coordinate of bars; if a single value is specified, it will be used for all bars. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} When plotting 2D data, the direction to use as z ('x', 'y' or 'z'); defaults to 'z'. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.bar}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{mpl\_toolkits.mplot3d.art3d.Patch3DCollection}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/bars3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_bars3d_0011}.png}} \caption{Bars3d}\label{\detokenize{tutorials/toolkits/mplot3d:id9}}\end{figure} \paragraph{Quiver} \label{\detokenize{tutorials/toolkits/mplot3d:quiver}}\label{\detokenize{tutorials/toolkits/mplot3d:quiver3d}}\index{quiver() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{quiver()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.quiver}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{quiver}}}{\emph{X}, \emph{Y}, \emph{Z}, \emph{U}, \emph{V}, \emph{W}, \emph{/}, \emph{length=1}, \emph{arrow\_length\_ratio=.3}, \emph{pivot='tail'}, \emph{normalize=False}, \emph{**kwargs}}{} Plot a 3D field of arrows. The arguments could be array-like or scalars, so long as they they can be broadcast together. The arguments can also be masked arrays. If an element in any of argument is masked, then that corresponding quiver element will not be plotted. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-like{]} The x, y and z coordinates of the arrow locations (default is tail of arrow; see \sphinxstyleemphasis{pivot} kwarg) \item[{\sphinxstylestrong{U, V, W}}] \leavevmode{[}array-like{]} The x, y and z components of the arrow vectors \item[{\sphinxstylestrong{length}}] \leavevmode{[}float{]} The length of each quiver, default to 1.0, the unit is the same with the axes \item[{\sphinxstylestrong{arrow\_length\_ratio}}] \leavevmode{[}float{]} The ratio of the arrow head with respect to the quiver, default to 0.3 \item[{\sphinxstylestrong{pivot}}] \leavevmode{[}\{'tail', 'middle', 'tip'\}{]} The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name \sphinxstyleemphasis{pivot}. Default is 'tail' \item[{\sphinxstylestrong{normalize}}] \leavevmode{[}bool{]} When True, all of the arrows will be the same length. This defaults to False, where the arrows will be different lengths depending on the values of u,v,w. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Any additional keyword arguments are delegated to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/quiver3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_quiver3d_0011}.png}} \caption{Quiver3d}\label{\detokenize{tutorials/toolkits/mplot3d:id10}}\end{figure} \paragraph{2D plots in 3D} \label{\detokenize{tutorials/toolkits/mplot3d:d-plots-in-3d}}\label{\detokenize{tutorials/toolkits/mplot3d:dcollections3d}} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/2dcollections3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_2dcollections3d_0011}.png}} \caption{2dcollections3d}\label{\detokenize{tutorials/toolkits/mplot3d:id11}}\end{figure} \paragraph{Text} \label{\detokenize{tutorials/toolkits/mplot3d:text}}\label{\detokenize{tutorials/toolkits/mplot3d:text3d}}\index{text() (mpl\_toolkits.mplot3d.Axes3D method)@\spxentry{text()}\spxextra{mpl\_toolkits.mplot3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes3D.}}\sphinxbfcode{\sphinxupquote{text}}}{\emph{self}, \emph{x}, \emph{y}, \emph{z}, \emph{s}, \emph{zdir=None}, \emph{**kwargs}}{} Add text to the plot. kwargs will be passed on to Axes.text, except for the \sphinxcode{\sphinxupquote{zdir}} keyword, which sets the direction to be used as the z direction. \end{fulllineitems} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/text3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_text3d_0011}.png}} \caption{Text3d}\label{\detokenize{tutorials/toolkits/mplot3d:id12}}\end{figure} \paragraph{Subplotting} \label{\detokenize{tutorials/toolkits/mplot3d:subplotting}}\label{\detokenize{tutorials/toolkits/mplot3d:dsubplots}} Having multiple 3D plots in a single figure is the same as it is for 2D plots. Also, you can have both 2D and 3D plots in the same figure. \DUrole{versionmodified}{New in version 1.0.0: }Subplotting 3D plots was added in v1.0.0. Earlier version can not do this. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/subplot3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_subplot3d_0011}.png}} \caption{Subplot3d}\label{\detokenize{tutorials/toolkits/mplot3d:id13}} \begin{sphinxlegend} Mixed Subplots \end{sphinxlegend} \end{figure} \phantomsection\label{\detokenize{tutorials/toolkits/mplot3d:sphx-glr-download-tutorials-toolkits-mplot3d-py}} \chapter{Interactive plots} \label{\detokenize{users/interactive:interactive-plots}}\label{\detokenize{users/interactive:dump-index}}\label{\detokenize{users/interactive::doc}} \section{Interactive navigation} \label{\detokenize{users/navigation_toolbar:interactive-navigation}}\label{\detokenize{users/navigation_toolbar:navigation-toolbar}}\label{\detokenize{users/navigation_toolbar::doc}} \noindent\sphinxincludegraphics{{toolbar}.png} All figure windows come with a navigation toolbar, which can be used to navigate through the data set. Here is a description of each of the buttons at the bottom of the toolbar \noindent\sphinxincludegraphics{{home_large}.png} \noindent\sphinxincludegraphics{{back_large}.png} \noindent\sphinxincludegraphics{{forward_large}.png} \begin{description} \item[{The \sphinxcode{\sphinxupquote{Home}}, \sphinxcode{\sphinxupquote{Forward}} and \sphinxcode{\sphinxupquote{Back}} buttons}] \leavevmode These are akin to a web browser's home, forward and back controls. \sphinxcode{\sphinxupquote{Forward}} and \sphinxcode{\sphinxupquote{Back}} are used to navigate back and forth between previously defined views. They have no meaning unless you have already navigated somewhere else using the pan and zoom buttons. This is analogous to trying to click \sphinxcode{\sphinxupquote{Back}} on your web browser before visiting a new page or \sphinxcode{\sphinxupquote{Forward}} before you have gone back to a page -- nothing happens. \sphinxcode{\sphinxupquote{Home}} always takes you to the first, default view of your data. Again, all of these buttons should feel very familiar to any user of a web browser. \end{description} \noindent\sphinxincludegraphics{{move_large}.png} \begin{description} \item[{The \sphinxcode{\sphinxupquote{Pan/Zoom}} button}] \leavevmode This button has two modes: pan and zoom. Click the toolbar button to activate panning and zooming, then put your mouse somewhere over an axes. Press the left mouse button and hold it to pan the figure, dragging it to a new position. When you release it, the data under the point where you pressed will be moved to the point where you released. If you press 'x' or 'y' while panning the motion will be constrained to the x or y axis, respectively. Press the right mouse button to zoom, dragging it to a new position. The x axis will be zoomed in proportionately to the rightward movement and zoomed out proportionately to the leftward movement. The same is true for the y axis and up/down motions. The point under your mouse when you begin the zoom remains stationary, allowing you to zoom in or out around that point as much as you wish. You can use the modifier keys 'x', 'y' or 'CONTROL' to constrain the zoom to the x axis, the y axis, or aspect ratio preserve, respectively. With polar plots, the pan and zoom functionality behaves differently. The radius axis labels can be dragged using the left mouse button. The radius scale can be zoomed in and out using the right mouse button. \end{description} \noindent\sphinxincludegraphics{{zoom_to_rect_large}.png} \begin{description} \item[{The \sphinxcode{\sphinxupquote{Zoom-to-rectangle}} button}] \leavevmode Click this toolbar button to activate this mode. Put your mouse somewhere over an axes and press a mouse button. Define a rectangular region by dragging the mouse while holding the button to a new location. When using the left mouse button, the axes view limits will be zoomed to the defined region. When using the right mouse button, the axes view limits will be zoomed out, placing the original axes in the defined region. \end{description} \noindent\sphinxincludegraphics{{subplots_large}.png} \begin{description} \item[{The \sphinxcode{\sphinxupquote{Subplot-configuration}} button}] \leavevmode Use this tool to configure the appearance of the subplot: you can stretch or compress the left, right, top, or bottom side of the subplot, or the space between the rows or space between the columns. \end{description} \noindent\sphinxincludegraphics{{filesave_large}.png} \begin{description} \item[{The \sphinxcode{\sphinxupquote{Save}} button}] \leavevmode Click this button to launch a file save dialog. You can save files with the following extensions: \sphinxcode{\sphinxupquote{png}}, \sphinxcode{\sphinxupquote{ps}}, \sphinxcode{\sphinxupquote{eps}}, \sphinxcode{\sphinxupquote{svg}} and \sphinxcode{\sphinxupquote{pdf}}. \end{description} \subsection{Navigation Keyboard Shortcuts} \label{\detokenize{users/navigation_toolbar:navigation-keyboard-shortcuts}}\label{\detokenize{users/navigation_toolbar:key-event-handling}} The following table holds all the default keys, which can be overwritten by use of your matplotlibrc (\#keymap.*). \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Command &\sphinxstyletheadfamily Keyboard Shortcut(s) \\ \hline Home/Reset & \sphinxstylestrong{h} or \sphinxstylestrong{r} or \sphinxstylestrong{home} \\ \hline Back & \sphinxstylestrong{c} or \sphinxstylestrong{left arrow} or \sphinxstylestrong{backspace} \\ \hline Forward & \sphinxstylestrong{v} or \sphinxstylestrong{right arrow} \\ \hline Pan/Zoom & \sphinxstylestrong{p} \\ \hline Zoom-to-rect & \sphinxstylestrong{o} \\ \hline Save & \sphinxstylestrong{ctrl} + \sphinxstylestrong{s} \\ \hline Toggle fullscreen & \sphinxstylestrong{f} or \sphinxstylestrong{ctrl} + \sphinxstylestrong{f} \\ \hline Close plot & \sphinxstylestrong{ctrl} + \sphinxstylestrong{w} \\ \hline Close all plots & \sphinxstylestrong{shift} + \sphinxstylestrong{w} \\ \hline Constrain pan/zoom to x axis & hold \sphinxstylestrong{x} when panning/zooming with mouse \\ \hline Constrain pan/zoom to y axis & hold \sphinxstylestrong{y} when panning/zooming with mouse \\ \hline Preserve aspect ratio & hold \sphinxstylestrong{CONTROL} when panning/zooming with mouse \\ \hline Toggle major grids & \sphinxstylestrong{g} when mouse is over an axes \\ \hline Toggle minor grids & \sphinxstylestrong{G} when mouse is over an axes \\ \hline Toggle x axis scale (log/linear) & \sphinxstylestrong{L} or \sphinxstylestrong{k} when mouse is over an axes \\ \hline Toggle y axis scale (log/linear) & \sphinxstylestrong{l} when mouse is over an axes \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} If you are using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} the toolbar will be created automatically for every figure. If you are writing your own user interface code, you can add the toolbar as a widget. The exact syntax depends on your UI, but we have examples for every supported UI in the \sphinxcode{\sphinxupquote{matplotlib/examples/user\_interfaces}} directory. Here is some example code for GTK+ 3: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{gi} \PYG{n}{gi}\PYG{o}{.}\PYG{n}{require\PYGZus{}version}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Gtk}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3.0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k+kn}{from} \PYG{n+nn}{gi}\PYG{n+nn}{.}\PYG{n+nn}{repository} \PYG{k}{import} \PYG{n}{Gtk} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{figure} \PYG{k}{import} \PYG{n}{Figure} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{backends}\PYG{n+nn}{.}\PYG{n+nn}{backend\PYGZus{}gtk3agg} \PYG{k}{import} \PYG{n}{FigureCanvas} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{backends}\PYG{n+nn}{.}\PYG{n+nn}{backend\PYGZus{}gtk3} \PYG{k}{import} \PYG{p}{(} \PYG{n}{NavigationToolbar2GTK3} \PYG{k}{as} \PYG{n}{NavigationToolbar}\PYG{p}{)} \PYG{n}{win} \PYG{o}{=} \PYG{n}{Gtk}\PYG{o}{.}\PYG{n}{Window}\PYG{p}{(}\PYG{p}{)} \PYG{n}{win}\PYG{o}{.}\PYG{n}{connect}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{destroy}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{k}{lambda} \PYG{n}{x}\PYG{p}{:} \PYG{n}{Gtk}\PYG{o}{.}\PYG{n}{main\PYGZus{}quit}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{win}\PYG{o}{.}\PYG{n}{set\PYGZus{}default\PYGZus{}size}\PYG{p}{(}\PYG{l+m+mi}{400}\PYG{p}{,}\PYG{l+m+mi}{300}\PYG{p}{)} \PYG{n}{win}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Embedding in GTK}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{vbox} \PYG{o}{=} \PYG{n}{Gtk}\PYG{o}{.}\PYG{n}{VBox}\PYG{p}{(}\PYG{p}{)} \PYG{n}{win}\PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{n}{vbox}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{canvas} \PYG{o}{=} \PYG{n}{FigureCanvas}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a Gtk.DrawingArea} \PYG{n}{vbox}\PYG{o}{.}\PYG{n}{pack\PYGZus{}start}\PYG{p}{(}\PYG{n}{canvas}\PYG{p}{,} \PYG{k+kc}{True}\PYG{p}{,} \PYG{k+kc}{True}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{n}{toolbar} \PYG{o}{=} \PYG{n}{NavigationToolbar}\PYG{p}{(}\PYG{n}{canvas}\PYG{p}{,} \PYG{n}{win}\PYG{p}{)} \PYG{n}{vbox}\PYG{o}{.}\PYG{n}{pack\PYGZus{}start}\PYG{p}{(}\PYG{n}{toolbar}\PYG{p}{,} \PYG{k+kc}{False}\PYG{p}{,} \PYG{k+kc}{False}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{n}{win}\PYG{o}{.}\PYG{n}{show\PYGZus{}all}\PYG{p}{(}\PYG{p}{)} \PYG{n}{Gtk}\PYG{o}{.}\PYG{n}{main}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \section{Using matplotlib in a python shell} \label{\detokenize{users/shell:using-matplotlib-in-a-python-shell}}\label{\detokenize{users/shell:mpl-shell}}\label{\detokenize{users/shell::doc}} \begin{sphinxadmonition}{warning}{Warning:} This page is significantly out of date \end{sphinxadmonition} By default, matplotlib defers drawing until the end of the script because drawing can be an expensive operation, and you may not want to update the plot every time a single property is changed, only once after all the properties have changed. But when working from the python shell, you usually do want to update the plot with every command, e.g., after changing the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel()}}}}}, or the marker style of a line. While this is simple in concept, in practice it can be tricky, because matplotlib is a graphical user interface application under the hood, and there are some tricks to make the applications work right in a python shell. \subsection{IPython to the rescue} \label{\detokenize{users/shell:ipython-to-the-rescue}}\label{\detokenize{users/shell:ipython-pylab}} \begin{sphinxadmonition}{note}{Note:} The mode described here still exists for historical reasons, but it is highly advised not to use. It pollutes namespaces with functions that will shadow python built-in and can lead to hard to track bugs. To get IPython integration without imports the use of the \sphinxcode{\sphinxupquote{\%matplotlib}} magic is preferred. See \sphinxhref{https://ipython.readthedocs.io/en/stable/interactive/reference.html\#plotting-with-matplotlib}{ipython documentation} . \end{sphinxadmonition} Fortunately, \sphinxhref{http://ipython.org/}{ipython}, an enhanced interactive python shell, has figured out all of these tricks, and is matplotlib aware, so when you start ipython in the \sphinxstyleemphasis{pylab} mode. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+go}{johnh@flag:\PYGZti{}\PYGZgt{} ipython} \PYG{g+go}{Python 2.4.5 (\PYGZsh{}4, Apr 12 2008, 09:09:16)} \PYG{g+go}{IPython 0.9.0 \PYGZhy{}\PYGZhy{} An enhanced Interactive Python.} \PYG{g+gp}{In [1]: }\PYG{o}{\PYGZpc{}}\PYG{k}{pylab} \PYG{g+go}{ Welcome to pylab, a matplotlib\PYGZhy{}based Python environment.} \PYG{g+go}{ For more information, type \PYGZsq{}help(pylab)\PYGZsq{}.} \PYG{g+gp}{In [2]: }\PYG{n}{x} \PYG{o}{=} \PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{10000}\PYG{p}{)} \PYG{g+gp}{In [3]: }\PYG{n}{hist}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \end{sphinxVerbatim} it sets everything up for you so interactive plotting works as you would expect it to. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}} and a figure window pops up, call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} and your data appears in the figure window. Note in the example above that we did not import any matplotlib names because in pylab mode, ipython will import them automatically. ipython also turns on \sphinxstyleemphasis{interactive} mode for you, which causes every pyplot command to trigger a figure update, and also provides a matplotlib aware \sphinxcode{\sphinxupquote{run}} command to run matplotlib scripts efficiently. ipython will turn off interactive mode during a \sphinxcode{\sphinxupquote{run}} command, and then restore the interactive state at the end of the run so you can continue tweaking the figure manually. There has been a lot of recent work to embed ipython, with pylab support, into various GUI applications, so check on the ipython mailing \sphinxhref{https://mail.scipy.org/mailman/listinfo/ipython-user}{list} for the latest status. \subsection{Other python interpreters} \label{\detokenize{users/shell:other-python-interpreters}}\label{\detokenize{users/shell:other-shells}} If you can't use ipython, and still want to use matplotlib/pylab from an interactive python shell, e.g., the plain-ole standard python interactive interpreter, you are going to need to understand what a matplotlib backend is {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}. With the TkAgg backend, which uses the Tkinter user interface toolkit, you can use matplotlib from an arbitrary non-gui python shell. Just set your \sphinxcode{\sphinxupquote{backend : TkAgg}} and \sphinxcode{\sphinxupquote{interactive : True}} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}) and fire up python. Then: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{pylab} \PYG{k}{import} \PYG{o}{*} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hi mom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} should work out of the box. This is also likely to work with recent versions of the qt4agg and gtk3agg backends, and with the macosx backend on the Macintosh. Note, in batch mode, i.e. when making figures from scripts, interactive mode can be slow since it redraws the figure with each command. So you may want to think carefully before making this the default behavior via the \sphinxcode{\sphinxupquote{matplotlibrc}} file instead of using the functions listed in the next section. Gui shells are at best problematic, because they have to run a mainloop, but interactive plotting also involves a mainloop. Ipython has sorted all this out for the primary matplotlib backends. There may be other shells and IDEs that also work with matplotlib in interactive mode, but one obvious candidate does not: the python IDLE IDE is a Tkinter gui app that does not support pylab interactive mode, regardless of backend. \subsection{Controlling interactive updating} \label{\detokenize{users/shell:controlling-interactive-updating}}\label{\detokenize{users/shell:controlling-interactive}} The \sphinxstyleemphasis{interactive} property of the pyplot interface controls whether a figure canvas is drawn on every pyplot command. If \sphinxstyleemphasis{interactive} is \sphinxstyleemphasis{False}, then the figure state is updated on every plot command, but will only be drawn on explicit calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}}. When \sphinxstyleemphasis{interactive} is \sphinxstyleemphasis{True}, then every pyplot command triggers a draw. The pyplot interface provides 4 commands that are useful for interactive control. \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive:matplotlib.pyplot.isinteractive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isinteractive()}}}}}}] \leavevmode returns the interactive setting \sphinxstyleemphasis{True\textbar{}False} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ion()}}}}}}] \leavevmode turns interactive mode on \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib.pyplot.ioff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ioff()}}}}}}] \leavevmode turns interactive mode off \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}}}] \leavevmode forces a figure redraw \end{description} When working with a big figure in which drawing is expensive, you may want to turn matplotlib's interactive setting off temporarily to avoid the performance hit: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{c+c1}{\PYGZsh{}create big\PYGZhy{}expensive\PYGZhy{}figure} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ioff}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} turn updates off} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{now how much would you pay?}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xticklabels}\PYG{p}{(}\PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} force a draw} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{alldone}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{300}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{close}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ion}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} turn updating back on} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)}\PYG{p}{,} \PYG{n}{mfc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{mec}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ms}\PYG{o}{=}\PYG{l+m+mi}{40}\PYG{p}{,} \PYG{n}{mew}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{ls}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \end{sphinxVerbatim} \section{Event handling and picking} \label{\detokenize{users/event_handling:event-handling-and-picking}}\label{\detokenize{users/event_handling:event-handling-tutorial}}\label{\detokenize{users/event_handling::doc}} Matplotlib works with a number of user interface toolkits (wxpython, tkinter, qt4, gtk, and macosx) and in order to support features like interactive panning and zooming of figures, it is helpful to the developers to have an API for interacting with the figure via key presses and mouse movements that is "GUI neutral" so we don't have to repeat a lot of code across the different user interfaces. Although the event handling API is GUI neutral, it is based on the GTK model, which was the first user interface matplotlib supported. The events that are triggered are also a bit richer vis-a-vis matplotlib than standard GUI events, including information like which {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} the event occurred in. The events also understand the matplotlib coordinate system, and report event locations in both pixel and data coordinates. \subsection{Event connections} \label{\detokenize{users/event_handling:event-connections}}\label{\detokenize{users/event_handling:id1}} To receive events, you need to write a callback function and then connect your function to the event manager, which is part of the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}. Here is a simple example that prints the location of the mouse click and which button was pressed: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{onclick}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+si}{\PYGZpc{}s}\PYG{l+s+s1}{ click: button=}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{, x=}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{, y=}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{, xdata=}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{, ydata=}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{double}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{dblclick} \PYG{k}{else} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{single}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{button}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{x}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{y}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{onclick}\PYG{p}{)} \end{sphinxVerbatim} The \sphinxcode{\sphinxupquote{FigureCanvas}} method {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_connect()}}}}} returns a connection id which is simply an integer. When you want to disconnect the callback, just call: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n}{cid}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxadmonition}{note}{Note:} The canvas retains only weak references to instance methods used as callbacks. Therefore, you need to retain a reference to instances owning such methods. Otherwise the instance will be garbage-collected and the callback will vanish. This does not affect free functions used as callbacks. \end{sphinxadmonition} Here are the events that you can connect to, the class instances that are sent back to you when the event occurs, and the event descriptions: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Event name &\sphinxstyletheadfamily Class and description \\ \hline 'button\_press\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} - mouse button is pressed \\ \hline 'button\_release\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} - mouse button is released \\ \hline 'draw\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.DrawEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DrawEvent}}}}} - canvas draw (but before screen update) \\ \hline 'key\_press\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} - key is pressed \\ \hline 'key\_release\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} - key is released \\ \hline 'motion\_notify\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} - mouse motion \\ \hline 'pick\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.PickEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PickEvent}}}}} - an object in the canvas is selected \\ \hline 'resize\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.ResizeEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ResizeEvent}}}}} - figure canvas is resized \\ \hline 'scroll\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} - mouse scroll wheel is rolled \\ \hline 'figure\_enter\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} - mouse enters a new figure \\ \hline 'figure\_leave\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} - mouse leaves a figure \\ \hline 'axes\_enter\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} - mouse enters a new axes \\ \hline 'axes\_leave\_event' & {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} - mouse leaves an axes \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsection{Event attributes} \label{\detokenize{users/event_handling:event-attributes}}\label{\detokenize{users/event_handling:id2}} All matplotlib events inherit from the base class {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}}, which store the attributes: \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{name}}}] \leavevmode the event name \item[{\sphinxcode{\sphinxupquote{canvas}}}] \leavevmode the FigureCanvas instance generating the event \item[{\sphinxcode{\sphinxupquote{guiEvent}}}] \leavevmode the GUI event that triggered the matplotlib event \end{description} \end{quote} The most common events that are the bread and butter of event handling are key press/release events and mouse press/release and movement events. The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} classes that handle these events are both derived from the LocationEvent, which has the following attributes \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{x}}}] \leavevmode x position - pixels from left of canvas \item[{\sphinxcode{\sphinxupquote{y}}}] \leavevmode y position - pixels from bottom of canvas \item[{\sphinxcode{\sphinxupquote{inaxes}}}] \leavevmode the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance if mouse is over axes \item[{\sphinxcode{\sphinxupquote{xdata}}}] \leavevmode x coord of mouse in data coords \item[{\sphinxcode{\sphinxupquote{ydata}}}] \leavevmode y coord of mouse in data coords \end{description} \end{quote} Let's look a simple example of a canvas, where a simple line segment is created every time a mouse is pressed: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{pyplot} \PYG{k}{as} \PYG{n}{plt} \PYG{k}{class} \PYG{n+nc}{LineBuilder}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{line}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line} \PYG{o}{=} \PYG{n}{line} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{xs} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{line}\PYG{o}{.}\PYG{n}{get\PYGZus{}xdata}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ys} \PYG{o}{=} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{line}\PYG{o}{.}\PYG{n}{get\PYGZus{}ydata}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cid} \PYG{o}{=} \PYG{n}{line}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{click}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes}\PYG{o}{!=}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{xs}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ys}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{xs}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ys}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{click to build line segments}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} empty line} \PYG{n}{linebuilder} \PYG{o}{=} \PYG{n}{LineBuilder}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} that we just used is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}}, so we have access to the data and pixel coordinates in event.x and event.xdata. In addition to the \sphinxcode{\sphinxupquote{LocationEvent}} attributes, it has \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{button}}}] \leavevmode button pressed None, 1, 2, 3, 'up', 'down' (up and down are used for scroll events) \item[{\sphinxcode{\sphinxupquote{key}}}] \leavevmode the key pressed: None, any character, 'shift', 'win', or 'control' \end{description} \end{quote} \subsubsection{Draggable rectangle exercise} \label{\detokenize{users/event_handling:draggable-rectangle-exercise}} Write draggable rectangle class that is initialized with a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} instance but will move its x,y location when dragged. Hint: you will need to store the original \sphinxcode{\sphinxupquote{xy}} location of the rectangle which is stored as rect.xy and connect to the press, motion and release mouse events. When the mouse is pressed, check to see if the click occurs over your rectangle (see \sphinxcode{\sphinxupquote{matplotlib.patches.Rectangle.contains()}}) and if it does, store the rectangle xy and the location of the mouse click in data coords. In the motion event callback, compute the deltax and deltay of the mouse movement, and add those deltas to the origin of the rectangle you stored. The redraw the figure. On the button release event, just reset all the button press data you stored as None. Here is the solution: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k}{class} \PYG{n+nc}{DraggableRectangle}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{rect}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect} \PYG{o}{=} \PYG{n}{rect} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{k+kc}{None} \PYG{k}{def} \PYG{n+nf}{connect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{connect to all the events we need}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidpress} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}press}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidrelease} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}release\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}release}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidmotion} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{motion\PYGZus{}notify\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}motion}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}press}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on button press we will see if the mouse is over us and store some data}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes} \PYG{o}{!=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{k}{return} \PYG{n}{contains}\PYG{p}{,} \PYG{n}{attrd} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{contains}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)} \PYG{k}{if} \PYG{o+ow}{not} \PYG{n}{contains}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{event contains}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{xy}\PYG{p}{)} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{xy} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}motion}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on motion we will move the rect if the mouse is over us}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{k}{return} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes} \PYG{o}{!=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{k}{return} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{xpress}\PYG{p}{,} \PYG{n}{ypress} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{n}{dx} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata} \PYG{o}{\PYGZhy{}} \PYG{n}{xpress} \PYG{n}{dy} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata} \PYG{o}{\PYGZhy{}} \PYG{n}{ypress} \PYG{c+c1}{\PYGZsh{}print(\PYGZsq{}x0=\PYGZpc{}f, xpress=\PYGZpc{}f, event.xdata=\PYGZpc{}f, dx=\PYGZpc{}f, x0+dx=\PYGZpc{}f\PYGZsq{} \PYGZpc{}} \PYG{c+c1}{\PYGZsh{} (x0, xpress, event.xdata, dx, x0+dx))} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}x}\PYG{p}{(}\PYG{n}{x0}\PYG{o}{+}\PYG{n}{dx}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}y}\PYG{p}{(}\PYG{n}{y0}\PYG{o}{+}\PYG{n}{dy}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}release}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on release we reset the press data}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{k+kc}{None} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{disconnect all the stored connection ids}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidpress}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidrelease}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidmotion}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{rects} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{bar}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{drs} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{rect} \PYG{o+ow}{in} \PYG{n}{rects}\PYG{p}{:} \PYG{n}{dr} \PYG{o}{=} \PYG{n}{DraggableRectangle}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{)} \PYG{n}{dr}\PYG{o}{.}\PYG{n}{connect}\PYG{p}{(}\PYG{p}{)} \PYG{n}{drs}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{dr}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstylestrong{Extra credit}: use the animation blit techniques discussed in the \sphinxhref{https://scipy-cookbook.readthedocs.io/items/Matplotlib\_Animations.html}{animations recipe} to make the animated drawing faster and smoother. Extra credit solution: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} draggable rectangle with the animation blit techniques; see} \PYG{c+c1}{\PYGZsh{} http://www.scipy.org/Cookbook/Matplotlib/Animations} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k}{class} \PYG{n+nc}{DraggableRectangle}\PYG{p}{:} \PYG{n}{lock} \PYG{o}{=} \PYG{k+kc}{None} \PYG{c+c1}{\PYGZsh{} only one can be animated at a time} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{rect}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect} \PYG{o}{=} \PYG{n}{rect} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{k+kc}{None} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{background} \PYG{o}{=} \PYG{k+kc}{None} \PYG{k}{def} \PYG{n+nf}{connect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{connect to all the events we need}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidpress} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}press}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidrelease} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}release\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}release}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidmotion} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{motion\PYGZus{}notify\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{on\PYGZus{}motion}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}press}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on button press we will see if the mouse is over us and store some data}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes} \PYG{o}{!=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{k}{return} \PYG{k}{if} \PYG{n}{DraggableRectangle}\PYG{o}{.}\PYG{n}{lock} \PYG{o+ow}{is} \PYG{o+ow}{not} \PYG{k+kc}{None}\PYG{p}{:} \PYG{k}{return} \PYG{n}{contains}\PYG{p}{,} \PYG{n}{attrd} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{contains}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)} \PYG{k}{if} \PYG{o+ow}{not} \PYG{n}{contains}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{event contains}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{xy}\PYG{p}{)} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{xy} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata} \PYG{n}{DraggableRectangle}\PYG{o}{.}\PYG{n}{lock} \PYG{o}{=} \PYG{n+nb+bp}{self} \PYG{c+c1}{\PYGZsh{} draw everything but the selected rectangle and store the pixel buffer} \PYG{n}{canvas} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas} \PYG{n}{axes} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}animated}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{background} \PYG{o}{=} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{copy\PYGZus{}from\PYGZus{}bbox}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} now redraw just the rectangle} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{draw\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} and blit just the redrawn area} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{blit}\PYG{p}{(}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}motion}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on motion we will move the rect if the mouse is over us}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{DraggableRectangle}\PYG{o}{.}\PYG{n}{lock} \PYG{o+ow}{is} \PYG{o+ow}{not} \PYG{n+nb+bp}{self}\PYG{p}{:} \PYG{k}{return} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes} \PYG{o}{!=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{:} \PYG{k}{return} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{xpress}\PYG{p}{,} \PYG{n}{ypress} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{n}{dx} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata} \PYG{o}{\PYGZhy{}} \PYG{n}{xpress} \PYG{n}{dy} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata} \PYG{o}{\PYGZhy{}} \PYG{n}{ypress} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}x}\PYG{p}{(}\PYG{n}{x0}\PYG{o}{+}\PYG{n}{dx}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}y}\PYG{p}{(}\PYG{n}{y0}\PYG{o}{+}\PYG{n}{dy}\PYG{p}{)} \PYG{n}{canvas} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas} \PYG{n}{axes} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{axes} \PYG{c+c1}{\PYGZsh{} restore the background region} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{restore\PYGZus{}region}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{background}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} redraw just the current rectangle} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{draw\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} blit just the redrawn area} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{blit}\PYG{p}{(}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}release}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on release we reset the press data}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{DraggableRectangle}\PYG{o}{.}\PYG{n}{lock} \PYG{o+ow}{is} \PYG{o+ow}{not} \PYG{n+nb+bp}{self}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{press} \PYG{o}{=} \PYG{k+kc}{None} \PYG{n}{DraggableRectangle}\PYG{o}{.}\PYG{n}{lock} \PYG{o}{=} \PYG{k+kc}{None} \PYG{c+c1}{\PYGZsh{} turn off the rect animation property and reset the background} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{set\PYGZus{}animated}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{background} \PYG{o}{=} \PYG{k+kc}{None} \PYG{c+c1}{\PYGZsh{} redraw the full figure} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{disconnect all the stored connection ids}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidpress}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidrelease}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{rect}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{cidmotion}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{rects} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{bar}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{drs} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{rect} \PYG{o+ow}{in} \PYG{n}{rects}\PYG{p}{:} \PYG{n}{dr} \PYG{o}{=} \PYG{n}{DraggableRectangle}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{)} \PYG{n}{dr}\PYG{o}{.}\PYG{n}{connect}\PYG{p}{(}\PYG{p}{)} \PYG{n}{drs}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{dr}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Mouse enter and leave} \label{\detokenize{users/event_handling:mouse-enter-and-leave}}\label{\detokenize{users/event_handling:enter-leave-events}} If you want to be notified when the mouse enters or leaves a figure or axes, you can connect to the figure/axes enter/leave events. Here is a simple example that changes the colors of the axes and figure background that the mouse is over: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{Illustrate the figure and axes enter and leave events by changing the} \PYG{l+s+sd}{frame colors on enter and leave} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k}{def} \PYG{n+nf}{enter\PYGZus{}axes}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{enter\PYGZus{}axes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{leave\PYGZus{}axes}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{leave\PYGZus{}axes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{inaxes}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{white}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{enter\PYGZus{}figure}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{enter\PYGZus{}figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{leave\PYGZus{}figure}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{leave\PYGZus{}figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{grey}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{event}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mouse hover over figure or axes to trigger events}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{212}\PYG{p}{)} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure\PYGZus{}enter\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{enter\PYGZus{}figure}\PYG{p}{)} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure\PYGZus{}leave\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{leave\PYGZus{}figure}\PYG{p}{)} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes\PYGZus{}enter\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{enter\PYGZus{}axes}\PYG{p}{)} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes\PYGZus{}leave\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{leave\PYGZus{}axes}\PYG{p}{)} \PYG{n}{fig2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mouse hover over figure or axes to trigger events}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{212}\PYG{p}{)} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure\PYGZus{}enter\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{enter\PYGZus{}figure}\PYG{p}{)} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure\PYGZus{}leave\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{leave\PYGZus{}figure}\PYG{p}{)} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes\PYGZus{}enter\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{enter\PYGZus{}axes}\PYG{p}{)} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes\PYGZus{}leave\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{leave\PYGZus{}axes}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Object picking} \label{\detokenize{users/event_handling:object-picking}}\label{\detokenize{users/event_handling:id3}} You can enable picking by setting the \sphinxcode{\sphinxupquote{picker}} property of an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} (e.g., a matplotlib {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}, \sphinxcode{\sphinxupquote{AxesImage}}, etc...) There are a variety of meanings of the \sphinxcode{\sphinxupquote{picker}} property: \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{None}}}] \leavevmode picking is disabled for this artist (default) \item[{\sphinxcode{\sphinxupquote{boolean}}}] \leavevmode if True then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist \item[{\sphinxcode{\sphinxupquote{float}}}] \leavevmode if picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if its data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event. \item[{\sphinxcode{\sphinxupquote{function}}}] \leavevmode if picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event. The signature is \sphinxcode{\sphinxupquote{hit, props = picker(artist, mouseevent)}} to determine the hit test. If the mouse event is over the artist, return \sphinxcode{\sphinxupquote{hit=True}} and props is a dictionary of properties you want added to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.PickEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PickEvent}}}}} attributes \end{description} \end{quote} After you have enabled an artist for picking by setting the \sphinxcode{\sphinxupquote{picker}} property, you need to connect to the figure canvas pick\_event to get pick callbacks on mouse press events. e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{pick\PYGZus{}handler}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n}{mouseevent} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{mouseevent} \PYG{n}{artist} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{artist} \PYG{c+c1}{\PYGZsh{} now do something with this...} \end{sphinxVerbatim} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.PickEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PickEvent}}}}} which is passed to your callback is always fired with two attributes: \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{mouseevent}} the mouse event that generate the pick event. The}] \leavevmode mouse event in turn has attributes like \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (the coords in display space, e.g., pixels from left, bottom) and xdata, ydata (the coords in data space). Additionally, you can get information about which buttons were pressed, which keys were pressed, which {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} the mouse is over, etc. See {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}} for details. \item[{\sphinxcode{\sphinxupquote{artist}}}] \leavevmode the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} that generated the pick event. \end{description} \end{quote} Additionally, certain artists like {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} and {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}} may attach additional meta data like the indices into the data that meet the picker criteria (e.g., all the points in the line that are within the specified epsilon tolerance) \subsubsection{Simple picking example} \label{\detokenize{users/event_handling:simple-picking-example}} In the example below, we set the line picker property to a scalar, so it represents a tolerance in points (72 points per inch). The onpick callback function will be called when the pick event it within the tolerance distance from the line, and has the indices of the data vertices that are within the pick distance tolerance. Our onpick callback function simply prints the data that are under the pick location. Different matplotlib Artists can attach different data to the PickEvent. For example, \sphinxcode{\sphinxupquote{Line2D}} attaches the ind property, which are the indices into the line data under the pick point. See \sphinxcode{\sphinxupquote{pick()}} for details on the \sphinxcode{\sphinxupquote{PickEvent}} properties of the line. Here is the code: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{click on points}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{picker}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 5 points tolerance} \PYG{k}{def} \PYG{n+nf}{onpick}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n}{thisline} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{artist} \PYG{n}{xdata} \PYG{o}{=} \PYG{n}{thisline}\PYG{o}{.}\PYG{n}{get\PYGZus{}xdata}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ydata} \PYG{o}{=} \PYG{n}{thisline}\PYG{o}{.}\PYG{n}{get\PYGZus{}ydata}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ind} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ind} \PYG{n}{points} \PYG{o}{=} \PYG{n+nb}{tuple}\PYG{p}{(}\PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{[}\PYG{n}{ind}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{[}\PYG{n}{ind}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{onpick points:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{points}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pick\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{onpick}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Picking exercise} \label{\detokenize{users/event_handling:picking-exercise}} Create a data set of 100 arrays of 1000 Gaussian random numbers and compute the sample mean and standard deviation of each of them (hint: numpy arrays have a mean and std method) and make a xy marker plot of the 100 means vs the 100 standard deviations. Connect the line created by the plot command to the pick event, and plot the original time series of the data that generated the clicked on points. If more than one point is within the tolerance of the clicked on point, you can use multiple subplots to plot the multiple time series. Exercise solution: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{compute the mean and stddev of 100 data sets and plot mean vs stddev.} \PYG{l+s+sd}{When you click on one of the mu, sigma points, plot the raw data from} \PYG{l+s+sd}{the dataset that generated the mean and stddev} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{X} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{xs} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{mean}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{axis}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ys} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{std}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{axis}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{click on point to plot time series}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{xs}\PYG{p}{,} \PYG{n}{ys}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{picker}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 5 points tolerance} \PYG{k}{def} \PYG{n+nf}{onpick}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{artist}\PYG{o}{!=}\PYG{n}{line}\PYG{p}{:} \PYG{k}{return} \PYG{k+kc}{True} \PYG{n}{N} \PYG{o}{=} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{event}\PYG{o}{.}\PYG{n}{ind}\PYG{p}{)} \PYG{k}{if} \PYG{o+ow}{not} \PYG{n}{N}\PYG{p}{:} \PYG{k}{return} \PYG{k+kc}{True} \PYG{n}{figi} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{subplotnum}\PYG{p}{,} \PYG{n}{dataind} \PYG{o+ow}{in} \PYG{n+nb}{enumerate}\PYG{p}{(}\PYG{n}{event}\PYG{o}{.}\PYG{n}{ind}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{figi}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{N}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{n}{subplotnum}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{dataind}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{l+m+mf}{0.9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mu=}\PYG{l+s+si}{\PYGZpc{}1.3f}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{sigma=}\PYG{l+s+si}{\PYGZpc{}1.3f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{\PYGZpc{}}\PYG{p}{(}\PYG{n}{xs}\PYG{p}{[}\PYG{n}{dataind}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ys}\PYG{p}{[}\PYG{n}{dataind}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.5}\PYG{p}{)} \PYG{n}{figi}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{k}{return} \PYG{k+kc}{True} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pick\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{onpick}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \chapter{Whats New} \label{\detokenize{users/whats_new:whats-new}}\label{\detokenize{users/whats_new:id1}}\label{\detokenize{users/whats_new::doc}} \section{What's new in Matplotlib 3.1} \label{\detokenize{users/whats_new:what-s-new-in-matplotlib-3-1}} For a list of all of the issues and pull requests since the last revision, see the {\hyperref[\detokenize{users/github_stats:github-stats}]{\sphinxcrossref{\DUrole{std,std-ref}{GitHub Stats}}}}. \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id2}}{\hyperref[\detokenize{users/whats_new:whats-new}]{\sphinxcrossref{Whats New}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id3}}{\hyperref[\detokenize{users/whats_new:what-s-new-in-matplotlib-3-1}]{\sphinxcrossref{What's new in Matplotlib 3.1}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id4}}{\hyperref[\detokenize{users/whats_new:new-features}]{\sphinxcrossref{New Features}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id5}}{\hyperref[\detokenize{users/whats_new:concisedateformatter}]{\sphinxcrossref{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConciseDateFormatter}}}}}}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id6}}{\hyperref[\detokenize{users/whats_new:secondary-x-y-axis-support}]{\sphinxcrossref{Secondary x/y Axis support}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id7}}{\hyperref[\detokenize{users/whats_new:funcscale-for-arbitrary-axes-scales}]{\sphinxcrossref{{\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncScale}}}}} for arbitrary axes scales}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id8}}{\hyperref[\detokenize{users/whats_new:legend-for-scatter}]{\sphinxcrossref{Legend for scatter}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id9}}{\hyperref[\detokenize{users/whats_new:matplotlib-no-longer-requires-framework-app-build-on-macosx-backend}]{\sphinxcrossref{Matplotlib no longer requires framework app build on MacOSX backend}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id10}}{\hyperref[\detokenize{users/whats_new:figure-figurecanvas-and-backends}]{\sphinxcrossref{Figure, FigureCanvas, and Backends}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id11}}{\hyperref[\detokenize{users/whats_new:figure-frameon-is-now-a-direct-proxy-for-the-figure-patch-visibility-state}]{\sphinxcrossref{Figure.frameon is now a direct proxy for the Figure patch visibility state}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id12}}{\hyperref[\detokenize{users/whats_new:pil-kwargs-argument-added-to-savefig}]{\sphinxcrossref{\sphinxstyleemphasis{pil\_kwargs} argument added to savefig}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id13}}{\hyperref[\detokenize{users/whats_new:add-inaxes-method-to-figurecanvasbase}]{\sphinxcrossref{Add \sphinxcode{\sphinxupquote{inaxes}} method to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id14}}{\hyperref[\detokenize{users/whats_new:cairo-backend-defaults-to-pycairo-instead-of-cairocffi}]{\sphinxcrossref{cairo backend defaults to pycairo instead of cairocffi}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id15}}{\hyperref[\detokenize{users/whats_new:axes-and-artists}]{\sphinxcrossref{Axes and Artists}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id16}}{\hyperref[\detokenize{users/whats_new:axes-grid1-and-axisartist-axes-no-longer-draw-spines-twice}]{\sphinxcrossref{axes\_grid1 and axisartist Axes no longer draw spines twice}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id17}}{\hyperref[\detokenize{users/whats_new:return-type-of-artistinspector-get-aliases-changed}]{\sphinxcrossref{Return type of ArtistInspector.get\_aliases changed}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id18}}{\hyperref[\detokenize{users/whats_new:connectionpatch-accepts-arbitrary-transforms}]{\sphinxcrossref{{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionPatch}}}}} accepts arbitrary transforms}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id19}}{\hyperref[\detokenize{users/whats_new:mplot3d-line3d-now-allows-set-get-data-3d}]{\sphinxcrossref{mplot3d Line3D now allows \{set,get\}\_data\_3d}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id20}}{\hyperref[\detokenize{users/whats_new:axes3d-voxels-now-shades-the-resulting-voxels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.voxels}} now shades the resulting voxels}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id21}}{\hyperref[\detokenize{users/whats_new:axis-and-ticks}]{\sphinxcrossref{Axis and Ticks}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id22}}{\hyperref[\detokenize{users/whats_new:added-axis-get-inverted-and-axis-set-inverted}]{\sphinxcrossref{Added \sphinxcode{\sphinxupquote{Axis.get\_inverted}} and \sphinxcode{\sphinxupquote{Axis.set\_inverted}}}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id23}}{\hyperref[\detokenize{users/whats_new:adjust-default-minor-tick-spacing}]{\sphinxcrossref{Adjust default minor tick spacing}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id24}}{\hyperref[\detokenize{users/whats_new:engformatter-now-accepts-usetex-usemathtext-as-keyword-only-arguments}]{\sphinxcrossref{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EngFormatter}}}}} now accepts \sphinxcode{\sphinxupquote{usetex}}, \sphinxcode{\sphinxupquote{useMathText}} as keyword only arguments}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id25}}{\hyperref[\detokenize{users/whats_new:animation-and-interactivity}]{\sphinxcrossref{Animation and Interactivity}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id26}}{\hyperref[\detokenize{users/whats_new:support-for-forward-backward-mouse-buttons}]{\sphinxcrossref{Support for forward/backward mouse buttons}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id27}}{\hyperref[\detokenize{users/whats_new:progress-callback-argument-to-save}]{\sphinxcrossref{\sphinxstyleemphasis{progress\_callback} argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save()}}}}}}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id28}}{\hyperref[\detokenize{users/whats_new:add-cache-frame-data-keyword-only-argument-into-animation-funcanimation}]{\sphinxcrossref{Add \sphinxcode{\sphinxupquote{cache\_frame\_data}} keyword-only argument into {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animation.FuncAnimation}}}}}}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id29}}{\hyperref[\detokenize{users/whats_new:endless-looping-gifs-with-pillowwriter}]{\sphinxcrossref{Endless Looping GIFs with PillowWriter}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id30}}{\hyperref[\detokenize{users/whats_new:adjusted-matplotlib-widgets-slider-to-have-vertical-orientation}]{\sphinxcrossref{Adjusted {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Slider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Slider}}}}} to have vertical orientation}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id31}}{\hyperref[\detokenize{users/whats_new:improved-formatting-of-image-values-under-cursor-when-a-colorbar-is-present}]{\sphinxcrossref{Improved formatting of image values under cursor when a colorbar is present}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id32}}{\hyperref[\detokenize{users/whats_new:mouseevent-button-attribute-is-now-an-intenum}]{\sphinxcrossref{MouseEvent button attribute is now an IntEnum}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id33}}{\hyperref[\detokenize{users/whats_new:configuration-install-and-development}]{\sphinxcrossref{Configuration, Install, and Development}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/whats_new:id34}}{\hyperref[\detokenize{users/whats_new:the-matplotlibrc-environment-variable-can-now-point-to-any-file-path}]{\sphinxcrossref{The MATPLOTLIBRC environment variable can now point to any "file" path}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id35}}{\hyperref[\detokenize{users/whats_new:allow-latex-code-pgf-preamble-and-text-latex-preamble-in-matplotlibrc-file}]{\sphinxcrossref{Allow LaTeX code \sphinxcode{\sphinxupquote{pgf.preamble}} and \sphinxcode{\sphinxupquote{text.latex.preamble}} in MATPLOTLIBRC file}}} \item {} \phantomsection\label{\detokenize{users/whats_new:id36}}{\hyperref[\detokenize{users/whats_new:new-logging-api}]{\sphinxcrossref{New logging API}}} \end{itemize} \end{itemize} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{New Features} \label{\detokenize{users/whats_new:new-features}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ConciseDateFormatter}}} \label{\detokenize{users/whats_new:concisedateformatter}} The automatic date formatter used by default can be quite verbose. A new formatter can be accessed that tries to make the tick labels appropriately concise. \begin{quote} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new-1}.pdf} \end{figure} \end{quote} \subsubsection{Secondary x/y Axis support} \label{\detokenize{users/whats_new:secondary-x-y-axis-support}} A new method provides the ability to add a second axis to an existing axes via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:matplotlib.axes.Axes.secondary_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_xaxis}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:matplotlib.axes.Axes.secondary_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_yaxis}}}}}. See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/secondary\_axis} for examples. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new-2}.pdf} \end{figure} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FuncScale}} for arbitrary axes scales} \label{\detokenize{users/whats_new:funcscale-for-arbitrary-axes-scales}} A new {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncScale}}}}} class was added (and {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncTransform}}}}}) to allow the user to have arbitrary scale transformations without having to write a new subclass of {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaleBase}}}}}. This can be accessed by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{function}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{functions}\PYG{o}{=}\PYG{p}{(}\PYG{n}{forward}\PYG{p}{,} \PYG{n}{inverse}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{forward}} and \sphinxcode{\sphinxupquote{inverse}} are callables that return the scale transform and its inverse. See the last example in \DUrole{xref,std,std-doc}{/gallery/scales/scales}. \subsubsection{Legend for scatter} \label{\detokenize{users/whats_new:legend-for-scatter}} A new method for creating legends for scatter plots has been introduced. Previously, in order to obtain a legend for a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} plot, one could either plot several scatters, each with an individual label, or create proxy artists to show in the legend manually. Now, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} provides a method {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.legend_elements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend\_elements()}}}}} to obtain the handles and labels for a scatter plot in an automated way. This makes creating a legend for a scatter plot as easy as \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new-3}.pdf} \end{figure} An example can be found in \DUrole{xref,std,std-ref}{automatedlegendcreation}. \subsubsection{Matplotlib no longer requires framework app build on MacOSX backend} \label{\detokenize{users/whats_new:matplotlib-no-longer-requires-framework-app-build-on-macosx-backend}} Previous versions of matplotlin required a Framework build of python to work. The app type was updated to no longer require this, so the MacOSX backend should work with non-framework python. This also adds support for the MacOSX backend for PyPy3. \subsection{Figure, FigureCanvas, and Backends} \label{\detokenize{users/whats_new:figure-figurecanvas-and-backends}} \subsubsection{Figure.frameon is now a direct proxy for the Figure patch visibility state} \label{\detokenize{users/whats_new:figure-frameon-is-now-a-direct-proxy-for-the-figure-patch-visibility-state}} Accessing \sphinxcode{\sphinxupquote{Figure.frameon}} (including via \sphinxcode{\sphinxupquote{get\_frameon}} and \sphinxcode{\sphinxupquote{set\_frameon}} now directly forwards to the visibility of the underlying Rectangle artist (\sphinxcode{\sphinxupquote{Figure.patch.get\_frameon}}, \sphinxcode{\sphinxupquote{Figure.patch.set\_frameon}}). \subsubsection{\sphinxstyleemphasis{pil\_kwargs} argument added to savefig} \label{\detokenize{users/whats_new:pil-kwargs-argument-added-to-savefig}} Matplotlib uses Pillow to handle saving to the JPEG and TIFF formats. The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} function gained a \sphinxstyleemphasis{pil\_kwargs} keyword argument, which can be used to forward arguments to Pillow's \sphinxcode{\sphinxupquote{pillow.Image.save()}}. The \sphinxstyleemphasis{pil\_kwargs} argument can also be used when saving to PNG. In that case, Matplotlib also uses Pillow's \sphinxcode{\sphinxupquote{pillow.Image.save()}} instead of going through its own builtin PNG support. \subsubsection{Add \sphinxstyleliteralintitle{\sphinxupquote{inaxes}} method to \sphinxstyleliteralintitle{\sphinxupquote{FigureCanvasBase}}} \label{\detokenize{users/whats_new:add-inaxes-method-to-figurecanvasbase}} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}} class has now an {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.inaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inaxes}}}}} method to check whether a point is in an axes and returns the topmost axes, else None. \subsubsection{cairo backend defaults to pycairo instead of cairocffi} \label{\detokenize{users/whats_new:cairo-backend-defaults-to-pycairo-instead-of-cairocffi}} This leads to faster import/runtime performance in some cases. The backend will fall back to cairocffi in case pycairo isn't available. \subsection{Axes and Artists} \label{\detokenize{users/whats_new:axes-and-artists}} \subsubsection{axes\_grid1 and axisartist Axes no longer draw spines twice} \label{\detokenize{users/whats_new:axes-grid1-and-axisartist-axes-no-longer-draw-spines-twice}} Previously, spines of \sphinxcode{\sphinxupquote{axes\_grid1}} and \sphinxcode{\sphinxupquote{axisartist}} Axes would be drawn twice, leading to a "bold" appearance. This is no longer the case. \subsubsection{Return type of ArtistInspector.get\_aliases changed} \label{\detokenize{users/whats_new:return-type-of-artistinspector-get-aliases-changed}} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_aliases}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector.get\_aliases}}}}} previously returned the set of aliases as \sphinxcode{\sphinxupquote{\{fullname: \{alias1: None, alias2: None, ...\}\}}}. The dict-to-None mapping was used to simulate a set in earlier versions of Python. It has now been replaced by a set, i.e. \sphinxcode{\sphinxupquote{\{fullname: \{alias1, alias2, ...\}\}}}. This value is also stored in \sphinxcode{\sphinxupquote{ArtistInspector.aliasd}}, which has likewise changed. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ConnectionPatch}} accepts arbitrary transforms} \label{\detokenize{users/whats_new:connectionpatch-accepts-arbitrary-transforms}} Alternatively to strings like \sphinxcode{\sphinxupquote{"data"}} or \sphinxcode{\sphinxupquote{"axes fraction"}} \sphinxcode{\sphinxupquote{ConnectionPatch}} now accepts any {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} as input for the \sphinxcode{\sphinxupquote{coordsA}} and \sphinxcode{\sphinxupquote{coordsB}} argument. This allows to draw lines between points defined in different user defined coordinate systems. Also see the \DUrole{xref,std,std-doc}{Connect Simple01 example}. \subsubsection{mplot3d Line3D now allows \{set,get\}\_data\_3d} \label{\detokenize{users/whats_new:mplot3d-line3d-now-allows-set-get-data-3d}} Lines created with the 3d projection in mplot3d can now access the data using {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.get_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_data\_3d()}}}}} which returns a tuple of array\_likes containing the (x, y, z) data. The equivalent {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.set_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_data\_3d}}}}} can be used to modify the data of an existing Line3D. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes3D.voxels}} now shades the resulting voxels} \label{\detokenize{users/whats_new:axes3d-voxels-now-shades-the-resulting-voxels}} The \sphinxcode{\sphinxupquote{voxels()}} method now takes a \sphinxstyleemphasis{shade} parameter that defaults to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}. This shades faces based on their orientation, behaving just like the matching parameters to \sphinxcode{\sphinxupquote{trisurf()}} and \sphinxcode{\sphinxupquote{bar3d()}}. The plot below shows how this affects the output. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new-4}.pdf} \end{figure} \subsection{Axis and Ticks} \label{\detokenize{users/whats_new:axis-and-ticks}} \subsubsection{Added \sphinxstyleliteralintitle{\sphinxupquote{Axis.get\_inverted}} and \sphinxstyleliteralintitle{\sphinxupquote{Axis.set\_inverted}}} \label{\detokenize{users/whats_new:added-axis-get-inverted-and-axis-set-inverted}} The \sphinxcode{\sphinxupquote{Axis.get\_inverted}} and \sphinxcode{\sphinxupquote{Axis.set\_inverted}} methods query and set whether the axis uses "inverted" orientation (i.e. increasing to the left for the x-axis and to the bottom for the y-axis). They perform tasks similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.xaxis\_inverted}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.yaxis\_inverted}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_xaxis}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_yaxis}}}}}, with the specific difference that \sphinxcode{\sphinxupquote{Axes..set\_inverted}} makes it easier to set the invertedness of an axis regardless of whether it had previously been inverted before. \subsubsection{Adjust default minor tick spacing} \label{\detokenize{users/whats_new:adjust-default-minor-tick-spacing}} Default minor tick spacing was changed from 0.625 to 0.5 for major ticks spaced 2.5 units apart. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{EngFormatter}} now accepts \sphinxstyleliteralintitle{\sphinxupquote{usetex}}, \sphinxstyleliteralintitle{\sphinxupquote{useMathText}} as keyword only arguments} \label{\detokenize{users/whats_new:engformatter-now-accepts-usetex-usemathtext-as-keyword-only-arguments}} A public API has been added to \sphinxcode{\sphinxupquote{EngFormatter}} to control how the numbers in the ticklabels will be rendered. By default, \sphinxcode{\sphinxupquote{useMathText}} evaluates to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.formatter.use\_mathtext'"{]}}}} and \sphinxcode{\sphinxupquote{usetex}} evaluates to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"'text.usetex'"{]}}}}. If either is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} then the numbers will be encapsulated by \sphinxcode{\sphinxupquote{\$}} signs. When using \sphinxcode{\sphinxupquote{TeX}} this implies that the numbers will be shown in TeX's math font. When using mathtext, the \sphinxcode{\sphinxupquote{\$}} signs around numbers will ensure unicode rendering (as implied by mathtext). This will make sure that the minus signs in the ticks are rendered as the unicode=minus (U+2212) when using mathtext (without relying on the \sphinxcode{\sphinxupquote{fix\_minus}} method). \subsection{Animation and Interactivity} \label{\detokenize{users/whats_new:animation-and-interactivity}} \subsubsection{Support for forward/backward mouse buttons} \label{\detokenize{users/whats_new:support-for-forward-backward-mouse-buttons}} Figure managers now support a \sphinxcode{\sphinxupquote{button\_press}} event for mouse buttons, similar to the \sphinxcode{\sphinxupquote{key\_press}} events. This allows binding actions to mouse buttons (see {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseButton}}}}}) The first application of this mechanism is support of forward/backward mouse buttons in figures created with the Qt5 backend. \subsubsection{\sphinxstyleemphasis{progress\_callback} argument to \sphinxstyleliteralintitle{\sphinxupquote{save()}}} \label{\detokenize{users/whats_new:progress-callback-argument-to-save}} The method {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save}}}}} gained an optional \sphinxstyleemphasis{progress\_callback} argument to notify the saving progress. \subsubsection{Add \sphinxstyleliteralintitle{\sphinxupquote{cache\_frame\_data}} keyword-only argument into \sphinxstyleliteralintitle{\sphinxupquote{animation.FuncAnimation}}} \label{\detokenize{users/whats_new:add-cache-frame-data-keyword-only-argument-into-animation-funcanimation}} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation.FuncAnimation}}}}} has been caching frame data by default; however, this caching is not ideal in certain cases e.g. When {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} needs to be only drawn(not saved) interactively and memory required by frame data is quite large. By adding \sphinxstyleemphasis{cache\_frame\_data} keyword-only argument, users can now disable this caching; thereby, this new argument provides a fix for issue \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8528/}{\#8528}. \subsubsection{Endless Looping GIFs with PillowWriter} \label{\detokenize{users/whats_new:endless-looping-gifs-with-pillowwriter}} We acknowledge that most people want to watch a gif more than once. Saving an animation as a gif with PillowWriter now produces an endless looping gif. \subsubsection{Adjusted \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.widgets.Slider}} to have vertical orientation} \label{\detokenize{users/whats_new:adjusted-matplotlib-widgets-slider-to-have-vertical-orientation}} The {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Slider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Slider}}}}} widget now takes an optional argument \sphinxstyleemphasis{orientation} which indicates the direction (\sphinxcode{\sphinxupquote{'horizontal'}} or \sphinxcode{\sphinxupquote{'vertical'}}) that the slider should take. \subsubsection{Improved formatting of image values under cursor when a colorbar is present} \label{\detokenize{users/whats_new:improved-formatting-of-image-values-under-cursor-when-a-colorbar-is-present}} When a colorbar is present, its formatter is now used to format the image values under the mouse cursor in the status bar. For example, for an image displaying the values 10,000 and 10,001, the statusbar will now (using default settings) display the values as \sphinxcode{\sphinxupquote{10000}} and \sphinxcode{\sphinxupquote{10001}}), whereas both values were previously displayed as \sphinxcode{\sphinxupquote{1e+04}}. \subsubsection{MouseEvent button attribute is now an IntEnum} \label{\detokenize{users/whats_new:mouseevent-button-attribute-is-now-an-intenum}} The \sphinxcode{\sphinxupquote{button}} attribute of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instances can take the values None, 1 (left button), 2 (middle button), 3 (right button), "up" (scroll), and "down" (scroll). For better legibility, the 1, 2, and 3 values are now represented using the \sphinxcode{\sphinxupquote{IntEnum}} class {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseButton}}}}}, with the values \sphinxcode{\sphinxupquote{MouseButton.LEFT}} (\sphinxcode{\sphinxupquote{== 1}}), \sphinxcode{\sphinxupquote{MouseButton.MIDDLE}} (\sphinxcode{\sphinxupquote{== 2}}), and \sphinxcode{\sphinxupquote{MouseButton.RIGHT}} (\sphinxcode{\sphinxupquote{== 3}}). \subsection{Configuration, Install, and Development} \label{\detokenize{users/whats_new:configuration-install-and-development}} \subsubsection{The MATPLOTLIBRC environment variable can now point to any "file" path} \label{\detokenize{users/whats_new:the-matplotlibrc-environment-variable-can-now-point-to-any-file-path}} This includes device files; in particular, on Unix systems, one can set \sphinxcode{\sphinxupquote{MATPLOTLIBRC}} to \sphinxcode{\sphinxupquote{/dev/null}} to ignore the user's matplotlibrc file and fall back to Matplotlib's defaults. As a reminder, if \sphinxcode{\sphinxupquote{MATPLOTLIBRC}} points to a directory, Matplotlib will try to load the matplotlibrc file from \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC/matplotlibrc}}. \subsubsection{Allow LaTeX code \sphinxstyleliteralintitle{\sphinxupquote{pgf.preamble}} and \sphinxstyleliteralintitle{\sphinxupquote{text.latex.preamble}} in MATPLOTLIBRC file} \label{\detokenize{users/whats_new:allow-latex-code-pgf-preamble-and-text-latex-preamble-in-matplotlibrc-file}} Previously, the rc file keys \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"pgf.preamble"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.latex.preamble"{]}}}} were parsed using commas as separators. This would break valid LaTeX code, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZbs{}\PYG{n}{usepackage}\PYG{p}{[}\PYG{n}{protrusion}\PYG{o}{=}\PYG{n}{true}\PYG{p}{,} \PYG{n}{expansion}\PYG{o}{=}\PYG{n}{false}\PYG{p}{]}\PYG{p}{\PYGZob{}}\PYG{n}{microtype}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The parsing has been modified to pass the complete line to the LaTeX system, keeping all commas. Passing a list of strings from within a Python script still works as it used to. \subsubsection{New logging API} \label{\detokenize{users/whats_new:new-logging-api}} {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.set_loglevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.set\_loglevel}}}}} / \sphinxcode{\sphinxupquote{pyplot.set\_loglevel}} can be called to display more (or less) detailed logging output. \chapter{History} \label{\detokenize{users/history:history}}\label{\detokenize{users/history::doc}} \begin{sphinxadmonition}{note}{Note:} The following introductory text was written in 2008 by John D. Hunter (1968-2012), the original author of Matplotlib. \end{sphinxadmonition} Matplotlib is a library for making 2D plots of arrays in \sphinxhref{https://www.python.org}{Python}. Although it has its origins in emulating the MATLAB graphics commands, it is independent of MATLAB, and can be used in a Pythonic, object oriented way. Although Matplotlib is written primarily in pure Python, it makes heavy use of \sphinxhref{http://www.numpy.org}{NumPy} and other extension code to provide good performance even for large arrays. Matplotlib is designed with the philosophy that you should be able to create simple plots with just a few commands, or just one! If you want to see a histogram of your data, you shouldn't need to instantiate objects, call methods, set properties, and so on; it should just work. For years, I used to use MATLAB exclusively for data analysis and visualization. MATLAB excels at making nice looking plots easy. When I began working with EEG data, I found that I needed to write applications to interact with my data, and developed an EEG analysis application in MATLAB. As the application grew in complexity, interacting with databases, http servers, manipulating complex data structures, I began to strain against the limitations of MATLAB as a programming language, and decided to start over in Python. Python more than makes up for all of MATLAB's deficiencies as a programming language, but I was having difficulty finding a 2D plotting package (for 3D \sphinxhref{http://www.vtk.org/}{VTK} more than exceeds all of my needs). When I went searching for a Python plotting package, I had several requirements: \begin{itemize} \item {} Plots should look great - publication quality. One important requirement for me is that the text looks good (antialiased, etc.) \item {} Postscript output for inclusion with TeX documents \item {} Embeddable in a graphical user interface for application development \item {} Code should be easy enough that I can understand it and extend it \item {} Making plots should be easy \end{itemize} Finding no package that suited me just right, I did what any self-respecting Python programmer would do: rolled up my sleeves and dived in. Not having any real experience with computer graphics, I decided to emulate MATLAB's plotting capabilities because that is something MATLAB does very well. This had the added advantage that many people have a lot of MATLAB experience, and thus they can quickly get up to steam plotting in python. From a developer's perspective, having a fixed user interface (the pylab interface) has been very useful, because the guts of the code base can be redesigned without affecting user code. The Matplotlib code is conceptually divided into three parts: the \sphinxstyleemphasis{pylab interface} is the set of functions provided by \sphinxcode{\sphinxupquote{matplotlib.pylab}} which allow the user to create plots with code quite similar to MATLAB figure generating code ({\hyperref[\detokenize{tutorials/introductory/pyplot::doc}]{\sphinxcrossref{\DUrole{doc}{Pyplot tutorial}}}}). The \sphinxstyleemphasis{Matplotlib frontend} or \sphinxstyleemphasis{Matplotlib API} is the set of classes that do the heavy lifting, creating and managing figures, text, lines, plots and so on ({\hyperref[\detokenize{tutorials/intermediate/artists::doc}]{\sphinxcrossref{\DUrole{doc}{Artist tutorial}}}}). This is an abstract interface that knows nothing about output. The \sphinxstyleemphasis{backends} are device-dependent drawing devices, aka renderers, that transform the frontend representation to hardcopy or a display device ({\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}). Example backends: PS creates \sphinxhref{http://www.adobe.com/products/postscript/}{PostScript®} hardcopy, SVG creates \sphinxhref{https://www.w3.org/Graphics/SVG/}{Scalable Vector Graphics} hardcopy, Agg creates PNG output using the high quality \sphinxhref{http://antigrain.com/}{Anti-Grain Geometry} library that ships with Matplotlib, GTK embeds Matplotlib in a \sphinxhref{https://www.gtk.org/}{Gtk+} application, GTKAgg uses the Anti-Grain renderer to create a figure and embed it in a Gtk+ application, and so on for \sphinxhref{https://acrobat.adobe.com/us/en/why-adobe/about-adobe-pdf.html}{PDF}, \sphinxhref{https://www.wxpython.org/}{WxWidgets}, \sphinxhref{https://docs.python.org/library/tkinter.html}{Tkinter}, etc. Matplotlib is used by many people in many different contexts. Some people want to automatically generate PostScript files to send to a printer or publishers. Others deploy Matplotlib on a web application server to generate PNG output for inclusion in dynamically-generated web pages. Some use Matplotlib interactively from the Python shell in Tkinter on Windows. My primary use is to embed Matplotlib in a Gtk+ EEG application that runs on Windows, Linux and Macintosh OS X. \bigskip\hrule\bigskip Matplotlib's original logo (2003 -- 2008). \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{history-1}.pdf} \end{figure} Matplotlib logo (2008 - 2015). \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{history-2}.pdf} \end{figure} \chapter{GitHub Stats} \label{\detokenize{users/github_stats:github-stats}}\label{\detokenize{users/github_stats:id1}}\label{\detokenize{users/github_stats::doc}} GitHub stats for 2018/09/18 - 2019/05/13 (tag: v3.0.0) These lists are automatically generated, and may be incomplete or contain duplicates. We closed 161 issues and merged 918 pull requests. The full list can be seen \sphinxhref{https://github.com/matplotlib/matplotlib/milestone/v3.1.0}{on GitHub} The following 151 authors contributed 3426 commits. \begin{itemize} \item {} \textless{}\sphinxhref{mailto:qi.cui@mail.utoronto.ca}{qi.cui@mail.utoronto.ca}\textgreater{} \item {} Abhinuv Nitin Pitale \item {} Adam J. Stewart \item {} Alistair Muldal \item {} Alon Hershenhorn \item {} Andras Deak \item {} Ankur Dedania \item {} Antony Lee \item {} Anubhav Shrimal \item {} Ao Liu (frankliuao) \item {} Ayappan P \item {} azure-pipelines{[}bot{]} \item {} Bas van Schaik \item {} Ben Root \item {} Benjamin Bengfort \item {} Benjamin Congdon \item {} Bharat123rox \item {} Brigitta Sipocz \item {} btang02 \item {} Carsten \item {} Carsten Schelp \item {} Cho Yin Yong \item {} Chris Zimmerman \item {} Christer Jensen \item {} Christoph Gohlke \item {} Christoph Reiter \item {} Christopher Bradshaw \item {} Colin \item {} Colin Carroll \item {} dabana \item {} Dana-Farber \item {} Daniele Nicolodi \item {} DanielMatu \item {} David Haberthür \item {} David Stansby \item {} Dietmar Schwertberger \item {} Dmitry Mottl \item {} \begin{enumerate} \def\theenumi{\Alph{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \setcounter{enumi}{4} \item {} \begin{enumerate} \def\theenumii{\Alph{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \setcounter{enumii}{6} \item {} Patrick Bos \end{enumerate} \end{enumerate} \item {} Elan Ernest \item {} Elliott Sales de Andrade \item {} Eric Firing \item {} Eric Larson \item {} Eric Wieser \item {} esvhd \item {} fredrik-1 \item {} fuzzythecat \item {} Galen Lynch \item {} Gazing \item {} gwin-zegal \item {} hannah \item {} Harshal Prakash Patankar \item {} hershen \item {} Ildar Akhmetgaleev \item {} ImportanceOfBeingErnest \item {} Isa Hassen \item {} Jae-Joon Lee \item {} James A. Bednar \item {} James Adams \item {} Jan S. (Milania1) \item {} Jarrod Millman \item {} Jessica B. Hamrick \item {} Jody Klymak \item {} Joel T. Frederico \item {} Joel Wanner \item {} Johannes H. Jensen \item {} Joseph Albert \item {} Joshua Klein \item {} Jouni K. Seppänen \item {} Jun Tan \item {} Kai Muehlbauer \item {} Katrin Leinweber \item {} Kayla Ngan \item {} Kevin Rose \item {} Kjell Le \item {} KonradAdamczyk \item {} ksunden \item {} Kyle Sunden \item {} Leon Loopik \item {} Levi Kilcher \item {} LevN0 \item {} luftek \item {} Maik Riechert \item {} Marcel Martin \item {} Mark Harfouche \item {} Marko Baštovanović \item {} Matthias Bussonnier \item {} Matthias Geier \item {} Matti Picus \item {} MeeseeksMachine \item {} Michael Droettboom \item {} Michael Jancsy \item {} Mike Frysinger \item {} Molly Rossow \item {} MortenSHUTE \item {} mromanie \item {} nathan78906 \item {} Nelle Varoquaux \item {} Nick Papior \item {} Nicolas Courtemanche \item {} Nikita Kniazev \item {} njwhite \item {} Oliver Natt \item {} Paul \item {} Paul Hobson \item {} Paul Ivanov \item {} Paul J. Koprowski \item {} pharshalp \item {} Phil Elson \item {} Pierre Thibault \item {} QiCuiHub \item {} Rasmus Diederichsen \item {} Ratin\_Kumar \item {} Rob Harrigan \item {} Roman Yurchak \item {} Ryan May \item {} Ryan Morshead \item {} Saket Choudhary \item {} saksmito \item {} SBCV \item {} Sebastian Bullinger \item {} Sebastian Hegler \item {} Seunghoon Park \item {} simon-kraeusel \item {} smheidrich \item {} Stephane Raynaud \item {} Stephen-Chilcote \item {} sxntxn \item {} Taehoon Lee \item {} Takafumi Arakaki \item {} Taras \item {} Taras Kuzyo \item {} teresy \item {} Thein Oo \item {} Thomas A Caswell \item {} Thomas Hisch \item {} Thomas Robitaille \item {} thoo \item {} Tim Hoffmann \item {} Tobia De Koninck \item {} Tobias Megies \item {} Tyler Makaro \item {} \begin{enumerate} \def\theenumi{\Alph{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \setcounter{enumi}{21} \item {} Armando Solé \end{enumerate} \item {} Viraj Mohile \item {} Will Handley \item {} woclass \item {} Yasaman-Mah \item {} yeo \item {} Yuxin Wu \item {} Yuya \item {} Zhili (Jerry) Pan \item {} zhoubecky \end{itemize} GitHub issues and pull requests: Pull Requests (918): \begin{itemize} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14209/}{PR \#14209}: Backport PR \#14197 on branch v3.1.x (Minor cleanup of acorr/xcoor docs) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14210/}{PR \#14210}: Make intro tutorial less jargony. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14197/}{PR \#14197}: Minor cleanup of acorr/xcoor docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14203/}{PR \#14203}: Backport PR \#14202 on branch v3.1.x (Fix docstring of Line2D.set\_data.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14202/}{PR \#14202}: Fix docstring of Line2D.set\_data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14196/}{PR \#14196}: Backport PR \#14188 on branch v3.1.x (Clarify scope of MouseEvent attributes) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14188/}{PR \#14188}: Clarify scope of MouseEvent attributes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14194/}{PR \#14194}: Backport PR \#14167 on branch v3.1.x (Fix backend\_pgf header.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14193/}{PR \#14193}: Backport PR \#14153 on branch v3.1.x (Update qt\_compat.py test for already imported binding.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14167/}{PR \#14167}: Fix backend\_pgf header. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14153/}{PR \#14153}: Update qt\_compat.py test for already imported binding. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14190/}{PR \#14190}: Backport PR \#14176 on branch v3.1.x (Merge doc/api/api\_overview and doc/api/index.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14192/}{PR \#14192}: Unbreak testsuite for pytest 4.5. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14189/}{PR \#14189}: Backport PR \#14186 on branch v3.1.x (Update FancyBboxPatch docs to numpydoc style) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14176/}{PR \#14176}: Merge doc/api/api\_overview and doc/api/index. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14186/}{PR \#14186}: Update FancyBboxPatch docs to numpydoc style \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14187/}{PR \#14187}: Backport PR \#13169 on branch v3.1.x (Add example code for current logo) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14165/}{PR \#14165}: Backport PR \#14156 on branch v3.1.x (Fix glyph loading in textpath.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14156/}{PR \#14156}: Fix glyph loading in textpath. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14162/}{PR \#14162}: Backport PR \#14150 on branch v3.1.x (Fix deprecation of withdash for figtext().) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14150/}{PR \#14150}: Fix deprecation of withdash for figtext(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14136/}{PR \#14136}: Backport PR \#14109 on branch v3.1.x \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14109/}{PR \#14109}: Some simple pyplot doc improvements \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14129/}{PR \#14129}: Backport PR \#14117 on branch v3.1.x (Simplify ribbon\_box example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14128/}{PR \#14128}: Backport PR \#14057 on branch v3.1.x (Improve Gradient bar example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14127/}{PR \#14127}: Backport PR \#14125 on branch v3.1.x (Remove extra keyword from pytest.skip call.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14117/}{PR \#14117}: Simplify ribbon\_box example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14057/}{PR \#14057}: Improve Gradient bar example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14125/}{PR \#14125}: Remove extra keyword from pytest.skip call. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14123/}{PR \#14123}: Backport PR \#14119 on branch v3.1.x (Add ridge\_map to third party packages documentation) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14119/}{PR \#14119}: Add ridge\_map to third party packages documentation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14103/}{PR \#14103}: Backport PR \#14088 on branch v3.1.x (Cleanup major\_minor\_demo.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14102/}{PR \#14102}: Backport PR \#14100 on branch v3.1.x (Improve docstring of axes\_zoom\_effect example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14099/}{PR \#14099}: Backport PR \#14090 on branch v3.1.x (Pep8ify some variable names in examples.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14100/}{PR \#14100}: Improve docstring of axes\_zoom\_effect example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14088/}{PR \#14088}: Cleanup major\_minor\_demo. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14090/}{PR \#14090}: Pep8ify some variable names in examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14097/}{PR \#14097}: Backport PR \#14079 on branch v3.1.x (Consistently use axs.flat instead of axs.flatten()) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14095/}{PR \#14095}: Backport PR \#14087 on branch v3.1.x (Cleanup date example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14094/}{PR \#14094}: Backport PR \#14029 on branch v3.1.x (Fix doc building with numpydoc 0.9) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14093/}{PR \#14093}: Backport PR \#14052 on branch v3.1.x (Check axes identity in image.contains.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14092/}{PR \#14092}: Backport PR \#14056 on branch v3.1.x (FIX: do not try to manage the visibility of un-drawn ticks) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14091/}{PR \#14091}: Backport PR \#14078 on branch v3.1.x (Minor fix in multiple subplots example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14079/}{PR \#14079}: Consistently use axs.flat instead of axs.flatten() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14087/}{PR \#14087}: Cleanup date example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14029/}{PR \#14029}: Fix doc building with numpydoc 0.9 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14052/}{PR \#14052}: Check axes identity in image.contains. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14056/}{PR \#14056}: FIX: do not try to manage the visibility of un-drawn ticks \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14078/}{PR \#14078}: Minor fix in multiple subplots example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14080/}{PR \#14080}: Backport PR \#14069 on branch v3.1.x (Don't try to use the colorbar formatter to format RGBA data.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14069/}{PR \#14069}: Don't try to use the colorbar formatter to format RGBA data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14074/}{PR \#14074}: Backport PR \#14019 on branch v3.1.x (Update docstring of locator\_params()) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14019/}{PR \#14019}: Update docstring of locator\_params() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14066/}{PR \#14066}: Backport PR \#14053 on branch v3.1.x (Improve fill() example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14065/}{PR \#14065}: Backport PR \#14059 on branch v3.1.x (Improve Scatter hist example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14067/}{PR \#14067}: Backport PR \#14062 on branch v3.1.x (Improve advanced quiver example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14062/}{PR \#14062}: Improve advanced quiver example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14053/}{PR \#14053}: Improve fill() example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14059/}{PR \#14059}: Improve Scatter hist example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14064/}{PR \#14064}: Backport PR \#14043 on branch v3.1.x (Ensure errorbars are always drawn on top of bars in ax.bar) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14043/}{PR \#14043}: Ensure errorbars are always drawn on top of bars in ax.bar \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14061/}{PR \#14061}: Backport PR \#14051 on branch v3.1.x (Add Yellowbrick to third party packages) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14051/}{PR \#14051}: Add Yellowbrick to third party packages \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14050/}{PR \#14050}: Backport PR \#14048 on branch v3.1.x (Fix Animation.save) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14049/}{PR \#14049}: Backport PR \#14047 on branch v3.1.x (Remove references to "Draws" in matplotlib.patches) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14048/}{PR \#14048}: Fix Animation.save \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14047/}{PR \#14047}: Remove references to "Draws" in matplotlib.patches \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14037/}{PR \#14037}: Backport PR \#14033 on branch v3.1.x (Reword add\_subplot docstring.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14036/}{PR \#14036}: Backport PR \#14001 on branch v3.1.x ({[}BUG{]} DOC: Remove broken references to vischeck) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14033/}{PR \#14033}: Reword add\_subplot docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14032/}{PR \#14032}: Backport PR \#14030 on branch v3.1.x (Update colorcet link) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14030/}{PR \#14030}: Update colorcet link \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14027/}{PR \#14027}: Backport PR \#14026 on branch v3.1.x (Fix bug in plot\_directive that caused links to plots in different formats to be missing) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14026/}{PR \#14026}: Fix bug in plot\_directive that caused links to plots in different formats to be missing \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14012/}{PR \#14012}: Backport PR \#14008 on branch v3.1.x (Don't install tests by default.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14017/}{PR \#14017}: Backport PR \#14015 on branch v3.1.x (Fix docstring of pyplot.clim()) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14015/}{PR \#14015}: Fix docstring of pyplot.clim() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14008/}{PR \#14008}: Don't install tests by default. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14006/}{PR \#14006}: Backport PR \#13998 on branch v3.1.x (Fix patch contains logic for patches that don't have any codes) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/14005/}{PR \#14005}: Backport PR \#14004 on branch v3.1.x (DOC: pin numpydoc to less than 0.9) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13998/}{PR \#13998}: Fix patch contains logic for patches that don't have any codes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13999/}{PR \#13999}: Backport PR \#13992 on branch v3.1.x (FIX: undeprecate MaxNLocator default\_params) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13997/}{PR \#13997}: Backport PR \#13995 on branch v3.1.x (DOC: explain zorder for gridlines in grid docstring) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13992/}{PR \#13992}: FIX: undeprecate MaxNLocator default\_params \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13995/}{PR \#13995}: DOC: explain zorder for gridlines in grid docstring \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13990/}{PR \#13990}: Backport PR \#13989 on branch v3.1.x (FIX: update not replace hist\_kwargs when density is passed) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13989/}{PR \#13989}: FIX: update not replace hist\_kwargs when density is passed \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13975/}{PR \#13975}: Backport PR \#13966 on branch v3.1.x (Fix colorbar setting without artist) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13976/}{PR \#13976}: Backport PR \#13973 on branch v3.1.x (BUG: Ensure docstrings are not accessed with -OO) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13856/}{PR \#13856}: Whats new page for 3.1 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13966/}{PR \#13966}: Fix colorbar setting without artist \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13973/}{PR \#13973}: BUG: Ensure docstrings are not accessed with -OO \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13969/}{PR \#13969}: Backport PR \#13950 on branch v3.1.x (confidence\_ellipse\_markup) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13950/}{PR \#13950}: confidence\_ellipse\_markup \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13965/}{PR \#13965}: Backport PR \#13962 on branch v3.1.x (Fix typo in code example in docstring.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13964/}{PR \#13964}: Backport PR \#13870 on branch v3.1.x (3.1.0 API changes page) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13962/}{PR \#13962}: Fix typo in code example in docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13870/}{PR \#13870}: 3.1.0 API changes page \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13961/}{PR \#13961}: Backport PR \#13914 on branch v3.1.x (Improve Rainbow text example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13960/}{PR \#13960}: Backport PR \#13958 on branch v3.1.x (Remove transparent fancy legend example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13914/}{PR \#13914}: Improve Rainbow text example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13958/}{PR \#13958}: Remove transparent fancy legend example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13956/}{PR \#13956}: Backport PR \#13908 on branch v3.1.x (Enh control tick deconflict2) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13955/}{PR \#13955}: Backport PR \#13941 on branch v3.1.x (Add project\_urls to setup) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13908/}{PR \#13908}: Enh control tick deconflict2 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13954/}{PR \#13954}: Backport PR \#13949 on branch v3.1.x (DOC: Add documentation to Text.set\_fontfamily) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13941/}{PR \#13941}: Add project\_urls to setup \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13949/}{PR \#13949}: DOC: Add documentation to Text.set\_fontfamily \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13951/}{PR \#13951}: Backport PR \#13939 on branch v3.1.x (Bunch of docstring cleanups.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13939/}{PR \#13939}: Bunch of docstring cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13947/}{PR \#13947}: Backport PR \#13897 on branch v3.1.x (numpydocification.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13897/}{PR \#13897}: numpydocification. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13946/}{PR \#13946}: Backport PR \#13924 on branch v3.1.x (Followup to deprecation of usetex parameter in get\_text\_path.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13924/}{PR \#13924}: Followup to deprecation of usetex parameter in get\_text\_path. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13916/}{PR \#13916}: Backport PR \#13850 on branch v3.1.x (Cleanup STIX Font Demo) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13915/}{PR \#13915}: Backport PR \#13835 on branch v3.1.x (Improve Conectionstyle Demo) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13850/}{PR \#13850}: Cleanup STIX Font Demo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13835/}{PR \#13835}: Improve Conectionstyle Demo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13846/}{PR \#13846}: Backport PR \#13836 on branch v3.1.x (MNT: account for cpython deprecations) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13898/}{PR \#13898}: Backport PR \#13896 on branch v3.1.x (Fix cbook.boxplot\_stats docstring) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13896/}{PR \#13896}: Fix cbook.boxplot\_stats docstring \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13893/}{PR \#13893}: Backport PR \#13890 on branch v3.1.x (rst seealso -\textgreater{} numpydoc "See Also".) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13890/}{PR \#13890}: rst seealso -\textgreater{} numpydoc "See Also". \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13888/}{PR \#13888}: Backport PR \#13862 on branch v3.1.x (Move 3.x API changes to prev\_api\_changes) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13862/}{PR \#13862}: Move 3.x API changes to prev\_api\_changes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13882/}{PR \#13882}: Backport PR \#13867 on branch v3.1.x (Rename "docs" to "contents" in navigation bar) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13867/}{PR \#13867}: Rename "docs" to "contents" in navigation bar \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13881/}{PR \#13881}: Backport PR \#13874 on branch v3.1.x (Remove redundant call to Formatter.set\_locs() before .format\_ticks().) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13874/}{PR \#13874}: Remove redundant call to Formatter.set\_locs() before .format\_ticks(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13871/}{PR \#13871}: Backport PR \#13868 on branch v3.1.x (Correctly handle fallout of defining PY\_SSIZE\_T\_CLEAN on Windows.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13869/}{PR \#13869}: Backport PR \#13861 on branch v3.1.x (Fix remaining links in docs) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13868/}{PR \#13868}: Correctly handle fallout of defining PY\_SSIZE\_T\_CLEAN on Windows. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13861/}{PR \#13861}: Fix remaining links in docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13849/}{PR \#13849}: Backport PR \#13845 on branch v3.1.x (Fix some broken documentation links) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13845/}{PR \#13845}: Fix some broken documentation links \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13836/}{PR \#13836}: MNT: account for cpython deprecations \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13841/}{PR \#13841}: Backport PR \#12928 on branch v3.1.x (textpath encoding) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13842/}{PR \#13842}: Backport PR \#13827 on branch v3.1.x (Better MovieWriter init error message) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13838/}{PR \#13838}: Backport PR \#13570 on branch v3.1.x (Add new example for plotting a confidence\_ellipse) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13827/}{PR \#13827}: Better MovieWriter init error message \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13839/}{PR \#13839}: Backport PR \#13815 on branch v3.1.x (Numpydocify FontManager.findfont()) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13837/}{PR \#13837}: Backport PR \#8638 on branch v3.1.x (FIX: if bins input to hist is str, treat like no bins) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12928/}{PR \#12928}: textpath encoding \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13815/}{PR \#13815}: Numpydocify FontManager.findfont() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13570/}{PR \#13570}: Add new example for plotting a confidence\_ellipse \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/8638/}{PR \#8638}: FIX: if bins input to hist is str, treat like no bins \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13831/}{PR \#13831}: Backport PR \#13780 on branch v3.1.x (numpydoc ListedColormap parameters) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13780/}{PR \#13780}: numpydoc ListedColormap parameters \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13830/}{PR \#13830}: Backport PR \#13829 on branch v3.1.x (numpydoc IndexFormatter) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13829/}{PR \#13829}: numpydoc IndexFormatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13828/}{PR \#13828}: Backport PR \#13821 on branch v3.1.x (Remove mathcircled from mathtext docs following its deprecation.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13821/}{PR \#13821}: Remove mathcircled from mathtext docs following its deprecation. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13822/}{PR \#13822}: Backport PR \#13817 on branch v3.1.x (Remove borders from barcode example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13820/}{PR \#13820}: Backport PR \#13816 on branch v3.1.x (Correct windows env variable format) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13816/}{PR \#13816}: Correct windows env variable format \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13817/}{PR \#13817}: Remove borders from barcode example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13814/}{PR \#13814}: Merge pull request \#13805 from timhoffm/pin-sphinx-1.x \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13813/}{PR \#13813}: Backport PR \#13764 on branch v3.1.x (Deprecate mathcircled.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13764/}{PR \#13764}: Deprecate mathcircled. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13805/}{PR \#13805}: Pin Sphinx to 1.x \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13807/}{PR \#13807}: Backport PR \#13800 on branch v3.1.x (Doc typos.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13800/}{PR \#13800}: Doc typos. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13806/}{PR \#13806}: Backport PR \#13771 on branch v3.1.x (patches.Arc docstring update \#13759) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13804/}{PR \#13804}: Backport PR \#13766 on branch v3.1.x (Search for fonts in XDG directory as well.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13771/}{PR \#13771}: patches.Arc docstring update \#13759 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13766/}{PR \#13766}: Search for fonts in XDG directory as well. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13794/}{PR \#13794}: Backport PR \#13695 on branch v3.1.x (numpydocify transform\_angles.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13793/}{PR \#13793}: Backport PR \#13762 on branch v3.1.x (Cleanup marker\_reference example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13792/}{PR \#13792}: Backport PR \#13789 on branch v3.1.x (BUG: Fix function signature mismatch for set\_clim) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13791/}{PR \#13791}: Backport PR \#13787 on branch v3.1.x (Fix failure to import matplotlib.animation on Windows.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13695/}{PR \#13695}: numpydocify transform\_angles. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13762/}{PR \#13762}: Cleanup marker\_reference example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13789/}{PR \#13789}: BUG: Fix function signature mismatch for set\_clim \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13787/}{PR \#13787}: Fix failure to import matplotlib.animation on Windows. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13781/}{PR \#13781}: Backport PR \#13777 on branch v3.1.x (Use class-based directive for mathmpl sphinxext.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13790/}{PR \#13790}: Backport PR \#13564 on branch v3.1.x (Add an option to log progress while saving animations) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13564/}{PR \#13564}: Add an option to log progress while saving animations \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13777/}{PR \#13777}: Use class-based directive for mathmpl sphinxext. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13765/}{PR \#13765}: Backport PR \#13761 on branch v3.1.x (Deprecate verbose-related rcParams.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13761/}{PR \#13761}: Deprecate verbose-related rcParams. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13760/}{PR \#13760}: Backport PR \#13719 on branch v3.1.x (Doc: Update timeline example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13704/}{PR \#13704}: Backport PR \#13021 on branch v3.1.x (Undesirable behaviour of MixedModeRenderer) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13758/}{PR \#13758}: Backport PR \#13674 on branch v3.1.x (Preserve whitespace in svg output.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13719/}{PR \#13719}: Doc: Update timeline example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13674/}{PR \#13674}: Preserve whitespace in svg output. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13755/}{PR \#13755}: Backport PR \#13741 on branch v3.1.x (FIX: make title move above ticklabels) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13754/}{PR \#13754}: Backport PR \#13712 on branch v3.1.x (Deprecate NavigationToolbar2QT.adj\_window (unused and always None).) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13741/}{PR \#13741}: FIX: make title move above ticklabels \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13712/}{PR \#13712}: Deprecate NavigationToolbar2QT.adj\_window (unused and always None). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13752/}{PR \#13752}: Backport PR \#13732 on branch v3.1.x (Fix doc markup.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13753/}{PR \#13753}: Backport PR \#13751 on branch v3.1.x (DOC/FIX: try merging comments) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13751/}{PR \#13751}: DOC/FIX: try merging comments \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13732/}{PR \#13732}: Fix doc markup. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13750/}{PR \#13750}: Backport PR \#13743 on branch v3.1.x (Fix doc warning) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13743/}{PR \#13743}: Fix doc warning \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13747/}{PR \#13747}: Backport PR \#13745 on branch v3.1.x (Fix stem(use\_line\_collection)) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13748/}{PR \#13748}: Backport PR \#13716 on branch v3.1.x (Kill attributes that are never used/updated.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13716/}{PR \#13716}: Kill attributes that are never used/updated. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13745/}{PR \#13745}: Fix stem(use\_line\_collection) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13710/}{PR \#13710}: TST: only test agg\_filter extensions with baseline images \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13709/}{PR \#13709}: Backport PR \#8690 on branch v3.1.x \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13707/}{PR \#13707}: Backport PR \#12760 on branch v3.1.x (Deduplicate implementation of per-backend Tools.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13706/}{PR \#13706}: Backport PR \#13689 on branch v3.1.x (BUG: fix scaling of quiverkey when quiver scale\_units='xy') \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13705/}{PR \#13705}: Backport PR \#12419 on branch v3.1.x (Add DivergingNorm (again, again, again)) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13703/}{PR \#13703}: Backport PR \#12170 on branch v3.1.x (Deprecate considering *args, **kwargs in Timer.remove\_callback.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12760/}{PR \#12760}: Deduplicate implementation of per-backend Tools. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13689/}{PR \#13689}: BUG: fix scaling of quiverkey when quiver scale\_units='xy' \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12419/}{PR \#12419}: Add DivergingNorm (again, again, again) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/8690/}{PR \#8690}: Adds support for rgba and rgb images to pcolorfast \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13021/}{PR \#13021}: Undesirable behaviour of MixedModeRenderer \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12170/}{PR \#12170}: Deprecate considering *args, **kwargs in Timer.remove\_callback. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13700/}{PR \#13700}: Backport PR \#13588 on branch v3.1.x (FIX: fallback to viewlims if no data) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13694/}{PR \#13694}: Backport PR \#13677 on branch v3.1.x (Log all failures to extract font properties.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13588/}{PR \#13588}: FIX: fallback to viewlims if no data \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13692/}{PR \#13692}: Backport PR \#13677 on branch v3.0.x (Log all failures to extract font properties.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13677/}{PR \#13677}: Log all failures to extract font properties. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13691/}{PR \#13691}: Backport PR \#13687 on branch v3.1.x (Update stem example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13687/}{PR \#13687}: Update stem example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13688/}{PR \#13688}: Backport PR \#13684 on branch v3.1.x (Use format\_data\_short to format image cursor data.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13684/}{PR \#13684}: Use format\_data\_short to format image cursor data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13686/}{PR \#13686}: Backport PR \#13363 on branch v3.1.x (Inline iter\_ticks into \_update\_ticks, and use that in mplot3d.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13363/}{PR \#13363}: Inline iter\_ticks into \_update\_ticks, and use that in mplot3d. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13681/}{PR \#13681}: Backport PR \#13678 on branch v3.1.x (Fix font deduplication logic in createFontList.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13678/}{PR \#13678}: Fix font deduplication logic in createFontList. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13669/}{PR \#13669}: Backport PR \#13667 on branch v3.1.x (Fix incorrect signature in axis() doc.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13667/}{PR \#13667}: Fix incorrect signature in axis() doc. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13664/}{PR \#13664}: Backport PR \#12637 on branch v3.1.x (Tell IPython the correct GUI event loop to use for all backends.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13665/}{PR \#13665}: Backport PR \#13601 on branch v3.1.x (Add a make-parameter-keyword-only-with-deprecation decorator.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13601/}{PR \#13601}: Add a make-parameter-keyword-only-with-deprecation decorator. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12637/}{PR \#12637}: Tell IPython the correct GUI event loop to use for all backends. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13662/}{PR \#13662}: Backport PR \#13064 on branch v3.1.x (Don't explicitly add default include paths to Extensions) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13064/}{PR \#13064}: Don't explicitly add default include paths to Extensions \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13658/}{PR \#13658}: Backport PR \#13652 on branch v3.1.x (Fix empty FancyArrow crash) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13652/}{PR \#13652}: Fix empty FancyArrow crash \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13655/}{PR \#13655}: Backport PR \#11692 on branch v3.1.x (Deprecate frameon kwarg and rcParam to savefig.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13654/}{PR \#13654}: Backport PR \#13614 on branch v3.1.x (Fix polar get window extent) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11692/}{PR \#11692}: Deprecate frameon kwarg and rcParam to savefig. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13614/}{PR \#13614}: Fix polar get window extent \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13646/}{PR \#13646}: Backport PR \#13645 on branch v3.1.x (widgets.py fix examples connect -\textgreater{} mpl\_connect) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13645/}{PR \#13645}: widgets.py fix examples connect -\textgreater{} mpl\_connect \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13644/}{PR \#13644}: Backport PR \#13612 on branch v3.1.x (Improve Demo Text Rotation Mode) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13612/}{PR \#13612}: Improve Demo Text Rotation Mode \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13636/}{PR \#13636}: Backport PR \#13621 on branch v3.1.x (Remove \sphinxcode{\sphinxupquote{asfileobj=False}} from a bunch of examples loading sample\_data.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13635/}{PR \#13635}: Backport PR \#13632 on branch v3.1.x (Clarify tick collision API change doc.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13634/}{PR \#13634}: Backport PR \#13631 on branch v3.1.x (Swicth deprecation of Tick.label to pending.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13621/}{PR \#13621}: Remove \sphinxcode{\sphinxupquote{asfileobj=False}} from a bunch of examples loading sample\_data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13632/}{PR \#13632}: Clarify tick collision API change doc. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13631/}{PR \#13631}: Swicth deprecation of Tick.label to pending. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13628/}{PR \#13628}: Backport PR \#13603 on branch v3.1.x \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13603/}{PR \#13603}: FIX: continue to bail tight layout if rect supplied \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13627/}{PR \#13627}: Backport PR \#13622 on branch v3.1.x (Change title of named colors example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13626/}{PR \#13626}: Backport PR \#13549 on branch v3.1.x (Simplify some annotation() calls in examples.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13624/}{PR \#13624}: Backport PR \#13610 on branch v3.1.x (Update centered ticklabels example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13625/}{PR \#13625}: Backport PR \#13611 on branch v3.1.x (Fix text position in Fancytextbox demo) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13622/}{PR \#13622}: Change title of named colors example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13610/}{PR \#13610}: Update centered ticklabels example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13611/}{PR \#13611}: Fix text position in Fancytextbox demo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13607/}{PR \#13607}: Backport PR \#13605 on branch v3.1.x (Warn on attempts at semi-transparent outputs in ps backend.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13608/}{PR \#13608}: Backport PR \#13602 on branch v3.1.x (Deprecate cbook.is\_hashable.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13602/}{PR \#13602}: Deprecate cbook.is\_hashable. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13605/}{PR \#13605}: Warn on attempts at semi-transparent outputs in ps backend. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13599/}{PR \#13599}: Backport PR \#13590 on branch v3.1.x (Doc event loop requirements for Figure.show) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13590/}{PR \#13590}: Doc event loop requirements for Figure.show \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13597/}{PR \#13597}: Backport PR \#12359 on branch v3.1.x (ENH: Add boolean support for axis()) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13594/}{PR \#13594}: Backport PR \#13592 on branch v3.1.x (DOC: Make canonical URLs point to versioned path.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13592/}{PR \#13592}: DOC: Make canonical URLs point to versioned path. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12359/}{PR \#12359}: ENH: Add boolean support for axis() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13587/}{PR \#13587}: Backport PR \#13573 on branch v3.1.x (Fix mplot3d transparency) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13573/}{PR \#13573}: Fix mplot3d transparency \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13585/}{PR \#13585}: Backport PR \#13578 on branch v3.1.x (Revert invalid change in Centered Ticklabels example) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13584/}{PR \#13584}: Backport PR \#13582 on branch v3.1.x (Cleanup two font-related examples.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13578/}{PR \#13578}: Revert invalid change in Centered Ticklabels example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13582/}{PR \#13582}: Cleanup two font-related examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13579/}{PR \#13579}: Backport PR \#13477 on branch v3.1.x (FIX: make EngFormatter respect axes.unicode\_minus rcParam) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13577/}{PR \#13577}: Backport PR \#12832 on branch v3.1.x (Deprecate redundant log-scale transform classes.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13477/}{PR \#13477}: FIX: make EngFormatter respect axes.unicode\_minus rcParam \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12832/}{PR \#12832}: Deprecate redundant log-scale transform classes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13574/}{PR \#13574}: Backport PR \#12856 on branch v3.1.x (added property usemathtext to EngFormatter) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12856/}{PR \#12856}: added property usemathtext to EngFormatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13572/}{PR \#13572}: Backport PR \#12899 on branch v3.1.x (Small cleanups.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13571/}{PR \#13571}: Backport PR \#11553 on branch v3.1.x (Improved Code for Segments Intersect) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12899/}{PR \#12899}: Small cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11553/}{PR \#11553}: Improved Code for Segments Intersect \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13568/}{PR \#13568}: Backport PR \#13563 on branch v3.1.x (FIX: inverted colorbar ticks) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13563/}{PR \#13563}: FIX: inverted colorbar ticks \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13530/}{PR \#13530}: BUG: keep the ticks when the colorbar axis is inverted \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13565/}{PR \#13565}: Backport PR \#13550 on branch v3.1.x (Strip out Py2-compat in setupext.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13550/}{PR \#13550}: Strip out Py2-compat in setupext. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13562/}{PR \#13562}: Backport PR \#13560 on branch v3.1.x (Improve GridSpec doc) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13560/}{PR \#13560}: Improve GridSpec doc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13558/}{PR \#13558}: Backport PR \#13546 on branch v3.1.x ( Modified docstring of the set\_ylabel and set\_xlabel) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13559/}{PR \#13559}: Backport PR \#12062 on branch v3.1.x (Separate alpha and rbg interpolation then recombine to fix issue11316) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13557/}{PR \#13557}: Backport PR \#13548 on branch v3.1.x (Deprecate TextWithDash.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12062/}{PR \#12062}: Separate alpha and rbg interpolation then recombine to fix issue11316 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13546/}{PR \#13546}: Modified docstring of the set\_ylabel and set\_xlabel \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13548/}{PR \#13548}: Deprecate TextWithDash. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13549/}{PR \#13549}: Simplify some annotation() calls in examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13552/}{PR \#13552}: Backport PR \#11241 on branch v3.1.x (Deprecate the MATPLOTLIBDATA environment variable.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11241/}{PR \#11241}: Deprecate the MATPLOTLIBDATA environment variable. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13547/}{PR \#13547}: Backport PR \#9314 on branch v3.1.x (Simplify units.Registry.get\_converter.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13545/}{PR \#13545}: Backport PR \#13541 on branch v3.1.x (DOC: Remove mention of 'complex' mode in specgram docstring) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9314/}{PR \#9314}: Simplify units.Registry.get\_converter. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13541/}{PR \#13541}: DOC: Remove mention of 'complex' mode in specgram docstring \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13539/}{PR \#13539}: Backport PR \#12950 on branch v3.1.x (Inline or simplify FooFormatter.pprint\_val.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13538/}{PR \#13538}: Backport PR \#12748 on branch v3.1.x (Use the builtin GTK3 FileChooser rather than our custom subclass.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13537/}{PR \#13537}: Backport PR \#12781 on branch v3.1.x (Lazy import of private modules) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12950/}{PR \#12950}: Inline or simplify FooFormatter.pprint\_val. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12748/}{PR \#12748}: Use the builtin GTK3 FileChooser rather than our custom subclass. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12781/}{PR \#12781}: Lazy import of private modules \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11218/}{PR \#11218}: fix pkg-config handling to make cross-compiling work \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13531/}{PR \#13531}: Backport PR \#11964 on branch v3.1.x (Simplify extension setup.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11964/}{PR \#11964}: Simplify extension setup. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13529/}{PR \#13529}: Backport PR \#13525 on branch v3.1.x (Move some links in rst out of running text.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13528/}{PR \#13528}: Backport PR \#13526 on branch v3.1.x (DOC: fix Subplot calls) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13525/}{PR \#13525}: Move some links in rst out of running text. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13526/}{PR \#13526}: DOC: fix Subplot calls \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13523/}{PR \#13523}: Backport PR \#13521 on branch v3.1.x (Small cleanup to headings of 3d examples.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13521/}{PR \#13521}: Small cleanup to headings of 3d examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13519/}{PR \#13519}: Backport PR \#12716 on branch v3.1.x (FIX: return the actual ax.get\_window\_extent) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13518/}{PR \#13518}: Backport PR \#12839 on branch v3.1.x (BUG: Prevent Tick params calls from overwriting visibility without being told to) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12716/}{PR \#12716}: FIX: return the actual ax.get\_window\_extent \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12839/}{PR \#12839}: BUG: Prevent Tick params calls from overwriting visibility without being told to \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13517/}{PR \#13517}: Fix heading hierarchy in annotation tutorial. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13516/}{PR \#13516}: Backport PR \#13514 on branch v3.1.x (Add missing show() at end of example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13514/}{PR \#13514}: Add missing show() at end of example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13512/}{PR \#13512}: Backport PR \#13511 on branch v3.1.x (Add missing plt.show() at end of example.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13511/}{PR \#13511}: Add missing plt.show() at end of example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13508/}{PR \#13508}: Backport PR \#13413 on branch v3.1.x (Simplify decade up- and down-rounding, and symmetrize expansion of degenerate log scales.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13509/}{PR \#13509}: Backport PR \#13492 on branch v3.1.x (Doc more release updates) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13492/}{PR \#13492}: Doc more release updates \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13413/}{PR \#13413}: Simplify decade up- and down-rounding, and symmetrize expansion of degenerate log scales. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13507/}{PR \#13507}: Backport PR \#13488 on branch v3.1.x (Animation: interactive zoom/pan with blitting does not work) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13488/}{PR \#13488}: Animation: interactive zoom/pan with blitting does not work \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13505/}{PR \#13505}: Backport PR \#13459 on branch v3.1.x (Document histogramming pre-binned data.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13503/}{PR \#13503}: Backport PR \#10776 on branch v3.1.x (fix FancyArrowPatch picker fails depending on arrowstyle) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13504/}{PR \#13504}: Backport PR \#13123 on branch v3.1.x (Add shading to Axes3D.voxels, and enable it by default) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13502/}{PR \#13502}: Backport PR \#13180 on branch v3.1.x (Various TextPath cleanups.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13459/}{PR \#13459}: Document histogramming pre-binned data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13501/}{PR \#13501}: Backport PR \#13209 on branch v3.1.x (Deprecate support for (n, 1)-shaped error arrays in errorbar().) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13500/}{PR \#13500}: Backport PR \#12763 on branch v3.1.x (Remove deprecated rcParams.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13123/}{PR \#13123}: Add shading to Axes3D.voxels, and enable it by default \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13499/}{PR \#13499}: Backport PR \#13303 on branch v3.1.x (Unify checking of executable info.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10776/}{PR \#10776}: fix FancyArrowPatch picker fails depending on arrowstyle \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13180/}{PR \#13180}: Various TextPath cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13498/}{PR \#13498}: Backport PR \#13314 on branch v3.1.x (Move major/minor tick overstrike logic to Axis.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13209/}{PR \#13209}: Deprecate support for (n, 1)-shaped error arrays in errorbar(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12763/}{PR \#12763}: Remove deprecated rcParams. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13303/}{PR \#13303}: Unify checking of executable info. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13497/}{PR \#13497}: Backport PR \#13057 on branch v3.1.x (Simplify callable(self.\_contains) checks) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13314/}{PR \#13314}: Move major/minor tick overstrike logic to Axis. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13057/}{PR \#13057}: Simplify callable(self.\_contains) checks \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13496/}{PR \#13496}: Backport PR \#13465 on branch v3.1.x (FIX: polar set\_rlim allow bottom-only call) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13465/}{PR \#13465}: FIX: polar set\_rlim allow bottom-only call \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13495/}{PR \#13495}: Backport PR \#12232 on branch v3.1.x (Add helper function to check that an argument is in a list of strings.) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12232/}{PR \#12232}: Add helper function to check that an argument is in a list of strings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11708/}{PR \#11708}: Revert "Skip wx interactive tests on OSX." \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13062/}{PR \#13062}: Update FAQ re: batch/webserver use. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12904/}{PR \#12904}: Support forward/backward mouse buttons \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12150/}{PR \#12150}: Deprecate stackrel. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13449/}{PR \#13449}: Let boxplot() defer rcParams application to bxp() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13425/}{PR \#13425}: API: un-deprecate keyword only args to set\_xlim, set\_ylim \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13447/}{PR \#13447}: Update axes\_grid docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13473/}{PR \#13473}: Deprecate backend\_wx.IDLE\_DELAY. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13476/}{PR \#13476}: Add font to pyplot.xkcd() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13475/}{PR \#13475}: Cleanup titles of embedding examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13468/}{PR \#13468}: Suppress chaining of cache lookup failure in color conversion. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13467/}{PR \#13467}: Add "c" shorthand for "color" for the Text class. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13398/}{PR \#13398}: FIX: let pandas IndexInt64 work for boxplot \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13375/}{PR \#13375}: Improve Axes selection in Qt figure options. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13421/}{PR \#13421}: DOC: update release guide \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13275/}{PR \#13275}: Simple logging interface. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13427/}{PR \#13427}: Simplify check for tight-bbox finiteness. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13444/}{PR \#13444}: Allow constructing boxplots over multiple calls. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13385/}{PR \#13385}: Remove/rework uses of np.where where possible. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13441/}{PR \#13441}: Make AFM parser both more compliant and less strict. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13384/}{PR \#13384}: Replace np.compress by boolean indexing. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13422/}{PR \#13422}: Clarify IndexError for out-of-bounds indexing of gridspec. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13443/}{PR \#13443}: Remove some outdated comments from rcsetup.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13357/}{PR \#13357}: Inherit some docstrings in backend code. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12380/}{PR \#12380}: Stem speedup2 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13368/}{PR \#13368}: FIX: Fix shape of hist output when input is multidimensional empty list \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/5590/}{PR \#5590}: {[}mpl\_toolkits{]} Fix picking for things drawn on parasite axes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13323/}{PR \#13323}: Move the call to Formatter.set\_locs into Formatter.format\_ticks. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13424/}{PR \#13424}: Deprecate Quiver.color in favor of Quiver.get\_facecolor(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13434/}{PR \#13434}: More smoketesting of pcolorfast. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13395/}{PR \#13395}: Cleanup demo\_curvelinear\_grid. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13411/}{PR \#13411}: Deemphasize numeric locations for legend() in docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13419/}{PR \#13419}: FIX: secondary\_axis resize \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13020/}{PR \#13020}: Deprecate proj3d.mod. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13030/}{PR \#13030}: Deprecate internal functions exposed in the public API of mplot3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13408/}{PR \#13408}: test\_figure style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11127/}{PR \#11127}: Legend for Scatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11855/}{PR \#11855}: Adding the possible to add full command line in animation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13409/}{PR \#13409}: Add nonsingular to the locator base class, and use it in set\_*lim too. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11859/}{PR \#11859}: ENH: add secondary x/y axis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13235/}{PR \#13235}: Vectorize mplot3d.art3d.zalpha. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10411/}{PR \#10411}: New "accepts units" decorator \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13403/}{PR \#13403}: FIX: remove idle\_event \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13069/}{PR \#13069}: 5 minor divisions when major ticks are 2.5 units apart \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13402/}{PR \#13402}: Fix empty reshape2d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11683/}{PR \#11683}: Reuse axes\_grid1's AxisDict in axisartist, instead of duplicating it. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12141/}{PR \#12141}: Let digits toggle axes nav only if they correspond to an existing axes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9845/}{PR \#9845}: Add inaxes method to FigureCanvas to check whether point is in an axes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13396/}{PR \#13396}: mpl\_toolkits style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11497/}{PR \#11497}: Make CI fail if interactive toolkits can't be tested \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11595/}{PR \#11595}: test doc rendering \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13393/}{PR \#13393}: Deprecate Spine.is\_frame\_like. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13391/}{PR \#13391}: Remove colour specification from some examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13386/}{PR \#13386}: Replace use of np.\textless{}ufunc\textgreater{} by operators (\textless{}/\&/\textbar{}). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13389/}{PR \#13389}: Inherit more docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13387/}{PR \#13387}: Fix regression in docstring.dedent\_interpd. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13383/}{PR \#13383}: Replace np.take by normal indexing. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13381/}{PR \#13381}: Avoid unneeded copies from flatten(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13354/}{PR \#13354}: Properly deprecate non-1D inputs to pie(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13379/}{PR \#13379}: Remove citation entry from FAQ. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13380/}{PR \#13380}: Minor simplifications to scatter3d. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13173/}{PR \#13173}: Decorator for deleting a parameter with a deprecation period. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/8205/}{PR \#8205}: {[}MRG+1{]} plot\_date() after axhline() doesn't rescale axes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11027/}{PR \#11027}: Specify custom tick space heuristic in MaxNLocator \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13262/}{PR \#13262}: Shorten setupext and remove uninformative build log entries. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13377/}{PR \#13377}: Add private helper to internally suppress deprecations. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13376/}{PR \#13376}: Undeprecate case-insensitive "long" colornames. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13373/}{PR \#13373}: Deprecate axis3d.Axis.get\_tick\_positions. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13362/}{PR \#13362}: Kill the unused, private \_get\_pixel\_distance\_along\_axis. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12772/}{PR \#12772}: Improve plot() docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13359/}{PR \#13359}: DOC: change language a bit \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13351/}{PR \#13351}: Fix: Log Colorbar minorticks\_off reverted if ticks set \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13356/}{PR \#13356}: More spelling fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13125/}{PR \#13125}: Simplify and tighten the docstring handling API. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13346/}{PR \#13346}: Simplify parsing of tuple in C extension code. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13282/}{PR \#13282}: MAINT install of pinned vers for travis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13234/}{PR \#13234}: FIX: allow colorbar mappable norm to change and do right thing \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13269/}{PR \#13269}: Rework a bit axes addition. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13330/}{PR \#13330}: Add Axis.get\_inverted and Axis.set\_inverted. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13117/}{PR \#13117}: Cleanup matplotlib.use \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13335/}{PR \#13335}: Update and factor out Axis.get\_tick\_positions. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13324/}{PR \#13324}: Cleanup ScalarFormatter; preparatory to moving it to format\_ticks. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13322/}{PR \#13322}: Update Axis docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13342/}{PR \#13342}: Update some (mostly internal) docstrings in image.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11848/}{PR \#11848}: Country specific characters in Windows user folder name when locating .tfm-file \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13309/}{PR \#13309}: bezier cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13334/}{PR \#13334}: Inherit some docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13332/}{PR \#13332}: Rewrite convert\_to\_string using std::string \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13336/}{PR \#13336}: Update imshow docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13331/}{PR \#13331}: Try forcing font cache rebuild in flaky ttc test. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12105/}{PR \#12105}: API: make MaxNLocator trim out-of-view ticks before returning \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13329/}{PR \#13329}: Pin flake8\textless{}3.7 to mitigate issues with flake8-per-file-ignores \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13319/}{PR \#13319}: Deprecate dates.\{str,bytes\}pdate2num. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13320/}{PR \#13320}: Kill some private, unused functions in dates.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12909/}{PR \#12909}: Let Formatters format all ticks at once. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13313/}{PR \#13313}: Better explanation of ticks \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13310/}{PR \#13310}: Replace *kw by *args. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13285/}{PR \#13285}: Defer checking of tex install to when it is actually used. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13128/}{PR \#13128}: Parameter-renaming decorator \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13307/}{PR \#13307}: Spelling fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13304/}{PR \#13304}: TST: deregister pandas \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13300/}{PR \#13300}: Trivial bezier cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11664/}{PR \#11664}: FIX: clean up unit conversion unpacking of data, particularly for dates and pandas series \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9639/}{PR \#9639}: Unify querying of executable versions \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13224/}{PR \#13224}: numpydocify (some of) mpl\_toolkits. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13301/}{PR \#13301}: Replace np.empty + ndarray.fill by np.full. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13229/}{PR \#13229}: Prevent exception when running animation on Agg backend. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13263/}{PR \#13263}: In imsave()'s Pillow-handled case, don't create a temporary figure. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13294/}{PR \#13294}: Simplify some calculations in polar.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13295/}{PR \#13295}: Kill some commented-out code. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13298/}{PR \#13298}: Add note about thread safety to FAQ. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13299/}{PR \#13299}: Don't emit a non-GUI warning when building the docs on Linux. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13297/}{PR \#13297}: Minor cleanup to OSX FAQ. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13283/}{PR \#13283}: Fix doc style in add\_gridspec() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13129/}{PR \#13129}: ENH: add a user-friendly verbose interface \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13279/}{PR \#13279}: Remove a useless catch\_warnings() from example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13268/}{PR \#13268}: Select RadioButtons by closest in position. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13271/}{PR \#13271}: Fix animation speed in double\_pendulum example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13265/}{PR \#13265}: Allow turning off minor ticks on Colorbar with LogNorm \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13260/}{PR \#13260}: Improve docs for format determination in savefig()/imsave(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12379/}{PR \#12379}: MAINT Use np.full when possible \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12905/}{PR \#12905}: Add optional parameter use\_default\_template to rc\_file() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13218/}{PR \#13218}: Fix checking of 'labels' argument to Sankey.add. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13256/}{PR \#13256}: DOC: reject MEP25 due to being stalled \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13255/}{PR \#13255}: TST pandas support bar \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13251/}{PR \#13251}: DEBUG-log font-matching results, and print failing logs on CI. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12818/}{PR \#12818}: Enh arbitrary scale \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13187/}{PR \#13187}: FIX: bar mixed units, allow ValueError as well \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13232/}{PR \#13232}: Fix incorrect kwarg being passed to TextPath. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13250/}{PR \#13250}: Replace safezip() by more informative error message in errorbar(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13239/}{PR \#13239}: Improve sankey logging. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13247/}{PR \#13247}: Simplify and optimize png writing in backend\_pdf. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12455/}{PR \#12455}: Warn when "best" loc of legend is used with lots of data \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13233/}{PR \#13233}: Remove warning in image\_annotated\_heatmap, and numpydocify it. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13248/}{PR \#13248}: Remove an unused local variable in backend\_gtk3. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13249/}{PR \#13249}: Deprecate an unused "internal" API. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13243/}{PR \#13243}: Rewrite subplots\_demo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13240/}{PR \#13240}: FIX: spelling error of local variable in category \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13026/}{PR \#13026}: MNT: add a logging call if a categorical string array is all convertible \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13225/}{PR \#13225}: Fix a warning in the doc build. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13227/}{PR \#13227}: Make color lowercase in example to avoid warning. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13217/}{PR \#13217}: numpydocify Sankey.add. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10209/}{PR \#10209}: Various backend cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13113/}{PR \#13113}: Globally cache single TexManager instances. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13213/}{PR \#13213}: Broadcast 'orientations' arg to Sankey.add. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13219/}{PR \#13219}: Fix some backend\_bases docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13214/}{PR \#13214}: Reformat Sankey exceptions. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13211/}{PR \#13211}: Deprecate case-insensitive colors. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13210/}{PR \#13210}: Suppress a warning in the test suite. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13189/}{PR \#13189}: Remove cairo-based backends from backend fallback. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13207/}{PR \#13207}: Allow saving PNGs through Pillow instead of the builtin \_png module. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13124/}{PR \#13124}: Simplify parsing of errorbar input. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13162/}{PR \#13162}: DOC: better argcheck bar \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/8531/}{PR \#8531}: Added compression option to save TIFF images \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13094/}{PR \#13094}: Allow passing arguments to PIL.Image.save(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13202/}{PR \#13202}: Avoid private API in some examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13197/}{PR \#13197}: Cleanup the text of two mpl\_toolkits examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13198/}{PR \#13198}: Cleanup SkewT example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11914/}{PR \#11914}: Remove the system\_monitor example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13196/}{PR \#13196}: Deemphasize comment about extremely old Matplotlib versions in example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13190/}{PR \#13190}: Show returncode when subprocess test fails \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13163/}{PR \#13163}: Add explanatory comment to annotation box example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13104/}{PR \#13104}: Remove some more 1-tuples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13105/}{PR \#13105}: Make GridSpec.update docstring match behavior. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13127/}{PR \#13127}: Deprecate add\_subplot(\textless{}no positional args\textgreater{}) silently doing nothing. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13166/}{PR \#13166}: Simplify Text.get\_usetex. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13188/}{PR \#13188}: Remove an outdated doc point regarding backend selection. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13107/}{PR \#13107}: Cleanup BboxBase docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13108/}{PR \#13108}: Capitalize some docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13115/}{PR \#13115}: Check for sphinx\_copybutton when building the docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13151/}{PR \#13151}: Update RadioButtons docs numpydoc style \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13178/}{PR \#13178}: Remove :func: markup from mlab docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/7461/}{PR \#7461}: {[}WIP{]} add matrix checking function for quiver input \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13089/}{PR \#13089}: Ensure that arguments to quiver() are not matrices. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13179/}{PR \#13179}: Avoid calling a deprecated API in axis\_artist. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13170/}{PR \#13170}: Don't try to find TeX-only fonts when layouting TeX text. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12957/}{PR \#12957}: Search also for user fonts on Windows (\#12954) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12951/}{PR \#12951}: Make Text.\_get\_layout simpler to follow. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11385/}{PR \#11385}: Add a get\_zaxis method for 3d axes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13172/}{PR \#13172}: Hyperlink DOIs to preferred resolver \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13171/}{PR \#13171}: Document how to make colorbars "without" a ScalarMappable. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12903/}{PR \#12903}: FIX: (broken)bar(h) math before units \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13167/}{PR \#13167}: Typos on subplot comments and example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13005/}{PR \#13005}: Improve error messages for unit conversion \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13147/}{PR \#13147}: Extend joinstyle example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13165/}{PR \#13165}: Change doc string for Axes.arrow() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13155/}{PR \#13155}: Let ffmpeg report errors. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13149/}{PR \#13149}: Update errorbar limits example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13074/}{PR \#13074}: Move \_windowing extension into \_tkagg. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13146/}{PR \#13146}: Remove an outdated comment in backend\_wx. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13126/}{PR \#13126}: FIX: minor log ticks overwrite \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13148/}{PR \#13148}: Update example Step Demo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13138/}{PR \#13138}: API: Use class-based directive in sphinxext \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11894/}{PR \#11894}: add \sphinxcode{\sphinxupquote{cache\_frame\_data}} kwarg into \sphinxcode{\sphinxupquote{FuncAnimation}}. fixes \#8528. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13136/}{PR \#13136}: Small cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13140/}{PR \#13140}: Remove an "cannot show figure in agg" warning in test suite. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13134/}{PR \#13134}: Simplify color conversion backcompat shim. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13141/}{PR \#13141}: Unpin pytest (pytest-cov's latest release is compatible with it). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13133/}{PR \#13133}: Simplify the polys3d example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12158/}{PR \#12158}: MNT: simplify valid tick logic \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9867/}{PR \#9867}: Factor out common code between pdf and ps backends. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10111/}{PR \#10111}: Add set\_data\_3d and get\_data\_3d to Line3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12245/}{PR \#12245}: Remove (some) features deprecated in mpl2.2 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13119/}{PR \#13119}: Deprecate TextToPath.glyph\_to\_path. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13122/}{PR \#13122}: Pin pytest\textless{}4.1 to unbreak CI tests \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13100/}{PR \#13100}: Restore the font cache on Travis. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12792/}{PR \#12792}: BUG: Ensure that distinct polygon collections are shaded identically \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13070/}{PR \#13070}: cairo backend: default to pycairo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13114/}{PR \#13114}: BUG: calculate colorbar boundaries correctly from values \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13111/}{PR \#13111}: Delete an unused private method. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10841/}{PR \#10841}: ENH: new date formatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13093/}{PR \#13093}: Remove unused fontconfig conf file. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13063/}{PR \#13063}: Use default colour cycle in more examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13103/}{PR \#13103}: Remove tight\_bbox\_test example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13097/}{PR \#13097}: Replace 1-tuples by scalars where possible. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13027/}{PR \#13027}: Qt5 reset signals after non-interactive plotting \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9787/}{PR \#9787}: Support (first font of) TTC files. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11780/}{PR \#11780}: ENH: Allow arbitrary coordinates for ConnectionPatch \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12943/}{PR \#12943}: Update the font\_table example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13091/}{PR \#13091}: Improve MouseEvent str(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13095/}{PR \#13095}: Remove a duplicate attribute setting. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13090/}{PR \#13090}: Cleanup unused non-public imports. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13060/}{PR \#13060}: Move doc-requirements from root folder \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13078/}{PR \#13078}: Convert streamplot to numpydoc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13088/}{PR \#13088}: Don't use deprecated np.random.random\_integers. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13073/}{PR \#13073}: Drop pytest version check in setupext.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12933/}{PR \#12933}: Deprecate backend\_pgf.LatexManagerFactory. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12969/}{PR \#12969}: Clarify the implementation of \_process\_plot\_var\_args. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12472/}{PR \#12472}: Make FontManager.defaultFont a property, to avoid hardcoding the prefix. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11806/}{PR \#11806}: Allow to not draw the labels on pie chart \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11983/}{PR \#11983}: Simplify version checks for freetype and libpng. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13050/}{PR \#13050}: FIX: always eraseRect in Qt widget \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13065/}{PR \#13065}: FIX: print out the correct ip address when starting webagg \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13061/}{PR \#13061}: Make examples that load msft.csv robust against locale changes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13042/}{PR \#13042}: cairo: remove the append\_path() fast path \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13058/}{PR \#13058}: pathlibify/cleanup triage\_tests.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12995/}{PR \#12995}: Don't split creation of deprecation message and choice of warning class. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12998/}{PR \#12998}: Init MaxNLocator params only once \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11691/}{PR \#11691}: Make Figure.frameon a thin wrapper for the patch visibility. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11735/}{PR \#11735}: Change \{FigureCanvasAgg,RendererAgg\}.buffer\_rgba to return a memoryview. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12831/}{PR \#12831}: Reuse scale from sharing axis when calling cla(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12962/}{PR \#12962}: Deprecate setting the same property under two different aliases. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12973/}{PR \#12973}: Fix item check for pandas Series \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13049/}{PR \#13049}: Add boxplot.flierprops.markeredgewidth rcParam \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13048/}{PR \#13048}: Fix section names for numpydoc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10928/}{PR \#10928}: Simplify (quite a bit...) \_preprocess\_data \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13039/}{PR \#13039}: Speed up Path.iter\_segments() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12992/}{PR \#12992}: Adding rcParams{[}‘scatter.edgecolors’{]} defaulting to ‘face’ \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13014/}{PR \#13014}: Drop pgi support for the GTK3 backend \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12215/}{PR \#12215}: Cleanup initialization in text() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13029/}{PR \#13029}: Fix vertical alignment of text \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12968/}{PR \#12968}: Simpler and stricter process\_plot\_format. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12989/}{PR \#12989}: Avoid spamming tests with warnings re: deprecation of pprint\_val. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13032/}{PR \#13032}: fix typo in docstring in \sphinxcode{\sphinxupquote{axis\_artist.py}} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13025/}{PR \#13025}: MNT: add one more alias for tacaswell to mailmap \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/13010/}{PR \#13010}: Fix a format error in documenting\_mpl.rst \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12997/}{PR \#12997}: Add sphinx-copybutton to docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12422/}{PR \#12422}: Scatter color: moving \#10809 forward \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12999/}{PR \#12999}: Format MaxNLocator with numpydoc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12991/}{PR \#12991}: Canonicalize weights extracted for AFM fonts. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12955/}{PR \#12955}: Cleanup cursor\_demo. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12984/}{PR \#12984}: Cleanup GTK examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12986/}{PR \#12986}: Minor cleanup to double\_pendulum example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12959/}{PR \#12959}: Update the documentation of Cursor \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12945/}{PR \#12945}: Correctly get weight \& style hints from certain newer Microsoft fonts \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12976/}{PR \#12976}: ENH: replace deprecated numpy header \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12975/}{PR \#12975}: Fail-fast when trying to run tests with too-old pytest. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12970/}{PR \#12970}: Minor simplifications. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12974/}{PR \#12974}: Remove some checks for Py\textless{}3.6 in the test suite. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12779/}{PR \#12779}: Include scatter plots in Qt figure options editor. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12459/}{PR \#12459}: Improve formatting of imshow() cursor data when a colorbar exists. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12927/}{PR \#12927}: MAINT: Correctly handle empty lists in zip unpacking in mplot3d.art3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12919/}{PR \#12919}: Suppress deprecation warning when testing drawstyle conflict \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12956/}{PR \#12956}: Misc. cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12924/}{PR \#12924}: Deprecate public use of Formatter.pprint\_val. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12947/}{PR \#12947}: Support \textasciitilde{} as nonbreaking space in mathtext. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12944/}{PR \#12944}: Fix the title of testing\_api \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12136/}{PR \#12136}: MAINT: Unify calculation of normal vectors from polygons \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12880/}{PR \#12880}: More table documentation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12940/}{PR \#12940}: Avoid pyplot in showcase examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12935/}{PR \#12935}: os.PathLike exists on all supported Pythons now. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12936/}{PR \#12936}: Minor updates following bump to Py3.6+. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12932/}{PR \#12932}: Simplify argument checking in Table.\_\_getitem\_\_. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12930/}{PR \#12930}: Shorten an argument check. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12538/}{PR \#12538}: MNT: drop 3.5 testing for 3.1 branch \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12868/}{PR \#12868}: Simplify use of Path.\_fast\_from\_codes\_and\_verts. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12300/}{PR \#12300}: API: Polar: allow flipped y/rlims.... \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12861/}{PR \#12861}: Don't use deprecated wx.NewId(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12908/}{PR \#12908}: Allow all valid hist.bins strings to be set in the rcparams \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12902/}{PR \#12902}: Kill dead code in textpath. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12885/}{PR \#12885}: Improve margins in formlayout \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12877/}{PR \#12877}: fooImage -\textgreater{} foo\_image in testing/compare.py \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12845/}{PR \#12845}: Deprecate silent dropping of unknown arguments to TextPath(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12852/}{PR \#12852}: Cleanup collections docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12888/}{PR \#12888}: Properly enable forward/backward buttons on GTK3 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12865/}{PR \#12865}: Avoid 1-tick or 0-tick log-scaled axis. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12844/}{PR \#12844}: Remove unused, private \_process\_text\_args. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12881/}{PR \#12881}: Fix string comparison \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12863/}{PR \#12863}: FIX: translate timedeltas in \_to\_ordinalf \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12640/}{PR \#12640}: Introduce MouseButton enum for MouseEvent. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12897/}{PR \#12897}: Reword a bit the contour docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12898/}{PR \#12898}: Validate rcParams{[}"image.origin"{]}. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12882/}{PR \#12882}: Write error messages to logger instead of stderr \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12889/}{PR \#12889}: Deprecate public access to the vendored formlayout module. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12891/}{PR \#12891}: Add Azure Pipelines build badge \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12883/}{PR \#12883}: MAINT Use list comprehension \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12886/}{PR \#12886}: Properly enable forward/backward buttons on Qt \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12858/}{PR \#12858}: Bump oldest supported numpy to 1.11. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12876/}{PR \#12876}: Fix a typo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12739/}{PR \#12739}: make Axes.\_parse\_scatter\_color\_args static \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12846/}{PR \#12846}: Deprecate Path.has\_nonfinite. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12829/}{PR \#12829}: Remove unused variables \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12872/}{PR \#12872}: Inline references to RendererPS in backend\_ps. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12800/}{PR \#12800}: documenting dtype of hist counts \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12842/}{PR \#12842}: Fix message in nbagg connection\_info() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12855/}{PR \#12855}: Cleanup axes/\_base.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12826/}{PR \#12826}: Minor code cleanup \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12866/}{PR \#12866}: Simplify stride calculations in loglocator. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12867/}{PR \#12867}: Drop compat code for outdated MSVC. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12218/}{PR \#12218}: Improve table docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12847/}{PR \#12847}: correctly format ticklabels when EngFormatter is used with usetex = True \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12851/}{PR \#12851}: Keep Collections and Patches property aliases in sync. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12849/}{PR \#12849}: Update docstrings in path.py, and small cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12805/}{PR \#12805}: Don't insert spurious newlines by joining tex.preamble. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12827/}{PR \#12827}: Remove unused imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12560/}{PR \#12560}: Add matplotlib.testing to the documentation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12821/}{PR \#12821}: MNT: remove debug from update\_title\_pos \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12764/}{PR \#12764}: Cleanup Renderer/GraphicsContext docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12759/}{PR \#12759}: Warn on FreeType missing glyphs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12799/}{PR \#12799}: Reword some colorbar docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12633/}{PR \#12633}: Added support for MacOSX backend for PyPy \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12798/}{PR \#12798}: Replace assignments to array.shape by calls to reshape(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11851/}{PR \#11851}: Simpler check for whether a Framework Python build is being used. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12259/}{PR \#12259}: BUG: Fix face orientations of bar3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12565/}{PR \#12565}: Make FontManager.score\_weight less lenient. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12674/}{PR \#12674}: Allow "real" LaTeX code for pgf.preamble in matplotlibrc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12770/}{PR \#12770}: Simplify implementation of FontProperties.copy(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12753/}{PR \#12753}: MNT: remove \_hold shims to support basemap + cartopy \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12450/}{PR \#12450}: Attach a FigureCanvasBase by default to Figures. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12643/}{PR \#12643}: Allow unit input to FancyArrowPatch \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12767/}{PR \#12767}: Make colorbars constructible with dataless ScalarMappables. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12526/}{PR \#12526}: Rename jquery files \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12552/}{PR \#12552}: Update docs for writing image comparison tests. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12746/}{PR \#12746}: Use skipif, not xfail, for uncomparable image formats. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12747/}{PR \#12747}: Prefer log.warning("\%s", ...) to log.warning("\%s" \% ...). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11753/}{PR \#11753}: FIX: Apply aspect before drawing starts \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12749/}{PR \#12749}: Move toolmanager warning from logging to warning. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12598/}{PR \#12598}: Support Cn colors with n\textgreater{}=10. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12727/}{PR \#12727}: Reorder API docs: separate file per module \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12738/}{PR \#12738}: Add unobtrusive depreaction note to the first line of the docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11663/}{PR \#11663}: Refactor color parsing of Axes.scatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12736/}{PR \#12736}: Move deprecation note to end of docstring \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12704/}{PR \#12704}: Rename tkinter import from Tk to tk. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12715/}{PR \#12715}: Cleanup dviread. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12717/}{PR \#12717}: Delete some \sphinxcode{\sphinxupquote{if \_\_name\_\_ == "\_\_main\_\_"}} clauses. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10575/}{PR \#10575}: FIX patch.update\_from to also copy \_original\_edge/facecolor \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12537/}{PR \#12537}: Improve error message on failing test\_pyplot\_up\_to\_date \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12721/}{PR \#12721}: Make get\_scale\_docs() internal \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12706/}{PR \#12706}: Extend sphinx Makefile to cleanup completely \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12481/}{PR \#12481}: Warn if plot\_surface Z values contain NaN \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12685/}{PR \#12685}: Make ticks in demo\_axes\_rgb.py visible \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12523/}{PR \#12523}: Run flake8 before pytest on travis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12691/}{PR \#12691}: DOC: Link to "How to make a PR" tutorials as badge and in contributing \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11974/}{PR \#11974}: Make code match comment in sankey. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12440/}{PR \#12440}: Make arguments to @deprecated/warn\_deprecated keyword-only. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12470/}{PR \#12470}: Update AutoDateFormatter with locator \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12586/}{PR \#12586}: Improve linestyles example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12006/}{PR \#12006}: Replace warnings.warn with cbook.\_warn\_external or logging.warning \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12659/}{PR \#12659}: Add note that developer discussions are private \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12543/}{PR \#12543}: Make rcsetup.py flak8 compliant \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12642/}{PR \#12642}: Don't silence TypeErrors in fmt\_\{x,y\}data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12442/}{PR \#12442}: Deprecate passing drawstyle with linestyle as single string. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12625/}{PR \#12625}: Shorten some docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12627/}{PR \#12627}: Be a bit more stringent on invalid inputs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12629/}{PR \#12629}: Fix issue with PyPy on macOS \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10933/}{PR \#10933}: Remove "experimental" fontconfig font\_manager backend. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12600/}{PR \#12600}: Minor style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12570/}{PR \#12570}: Fix mathtext tutorial for build with Sphinx 1.8. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12487/}{PR \#12487}: Update docs/tests for the deprecation of aname and label1On/label2On/etc. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12521/}{PR \#12521}: Improve docstring of draw\_idle() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12574/}{PR \#12574}: Remove some unused imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12568/}{PR \#12568}: Add note regarding builds of old Matplotlibs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12547/}{PR \#12547}: Disable sticky edge accumulation if no autoscaling. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12546/}{PR \#12546}: Avoid quadratic behavior when accumulating stickies. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11789/}{PR \#11789}: endless looping GIFs with PillowWriter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12525/}{PR \#12525}: Fix some flake8 issues \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12516/}{PR \#12516}: Don't handle impossible values for \sphinxcode{\sphinxupquote{align}} in hist() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12500/}{PR \#12500}: Adjust the widths of the messages during the build. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12492/}{PR \#12492}: Simplify radar\_chart example. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11984/}{PR \#11984}: Strip out pkg-config machinery for agg and libqhull. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12463/}{PR \#12463}: Document Artist.cursor\_data() parameter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12482/}{PR \#12482}: Test slider orientation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12317/}{PR \#12317}: Always install mpl\_toolkits. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12246/}{PR \#12246}: Be less tolerant of broken installs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12477/}{PR \#12477}: Use N\{MICRO SIGN\} instead of N\{GREEK SMALL LETTER MU\} in EngFormatter. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12483/}{PR \#12483}: Kill FontManager.update\_fonts. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12474/}{PR \#12474}: Throw ValueError when irregularly gridded data is passed to streamplot. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12466/}{PR \#12466}: np.fromstring -\textgreater{} np.frombuffer. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12369/}{PR \#12369}: Improved exception handling on animation failure \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12460/}{PR \#12460}: Deprecate RendererBase.strip\_math. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12453/}{PR \#12453}: Rollback erronous commit to whats\_new.rst from \#10746 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12452/}{PR \#12452}: Minor updates to the FAQ. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10746/}{PR \#10746}: Adjusted matplotlib.widgets.Slider to have optional vertical orientatation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12441/}{PR \#12441}: Get rid of a signed-compare warning. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12430/}{PR \#12430}: Deprecate Axes3D.plot\_surface(shade=None) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12435/}{PR \#12435}: Fix numpydoc parameter formatting \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12434/}{PR \#12434}: Clarify documentation for textprops keyword parameter of TextArea \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12427/}{PR \#12427}: Document Artist.get\_cursor\_data \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10322/}{PR \#10322}: Use np.hypot whereever possible. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10809/}{PR \#10809}: Fix for scatter not showing points with valid x/y but invalid color \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12423/}{PR \#12423}: Minor simplifications to backend\_svg. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10356/}{PR \#10356}: fix detecting which artist(s) the mouse is over \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10268/}{PR \#10268}: Dvi caching \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10238/}{PR \#10238}: Call kpsewhich with more arguments at one time \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10236/}{PR \#10236}: Cache kpsewhich results persistently \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/4675/}{PR \#4675}: Deprecate color keyword argument in scatter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/5054/}{PR \#5054}: Diverging norm \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12416/}{PR \#12416}: Move font cache rebuild out of exception handler \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/4762/}{PR \#4762}: Traitlets \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/5414/}{PR \#5414}: WIP: New FreeType wrappers \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/3875/}{PR \#3875}: ENH: passing colors (and other optional keyword arguments) to violinplot() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/1959/}{PR \#1959}: PS backend optionally jpeg-compresses the embedded images \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11891/}{PR \#11891}: Group some print()s in backend\_ps. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12165/}{PR \#12165}: Remove deprecated mlab code \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12387/}{PR \#12387}: Update HTML animation as slider is dragged \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12333/}{PR \#12333}: ENH: add colorbar method to axes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/10088/}{PR \#10088}: Deprecate Tick.\{gridOn,tick1On,label1On,...\} in favor of set\_visible. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12393/}{PR \#12393}: Deprecate to-days converters in matplotlib dates \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11232/}{PR \#11232}: FIX: fix figure.set\_dpi when pixel ratio not 1 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12247/}{PR \#12247}: Machinery for deprecating properties. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12371/}{PR \#12371}: Move check for ImageMagick Windows path to bin\_path(). \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12384/}{PR \#12384}: Cleanup axislines style. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9565/}{PR \#9565}: Stem performance boost \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12368/}{PR \#12368}: Don't use stdlib private API in animation.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12351/}{PR \#12351}: dviread: find\_tex\_file: Ensure the encoding on windows \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12372/}{PR \#12372}: Remove two examples. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12356/}{PR \#12356}: Fix stripping of CRLF on Windows. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12283/}{PR \#12283}: FIX: errorbar xywhere should return ndarray \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12304/}{PR \#12304}: TST: Merge Qt tests into one file. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12340/}{PR \#12340}: Catch test deprecation warnings for mlab.demean \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12296/}{PR \#12296}: Make FooConverter inherit from ConversionInterface in examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12309/}{PR \#12309}: Deduplicate implementations of FooNorm.autoscale\{,\_None\} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/7716/}{PR \#7716}: {[}NF{]} Add 'truncate' and 'join' methods to colormaps. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12314/}{PR \#12314}: Deprecate \sphinxcode{\sphinxupquote{axis('normal')}} in favor of \sphinxcode{\sphinxupquote{axis('auto')}}. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12307/}{PR \#12307}: Clarify missing-property error message. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12260/}{PR \#12260}: Fix docs : change from issue \#12191, remove "if 1:" blocks in examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12253/}{PR \#12253}: Handle utf-8 output by kpathsea on Windows. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12292/}{PR \#12292}: TST: Modify the bar3d test to show three more angles \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12284/}{PR \#12284}: Don't try to autoscale if no data present to autoscale to \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12255/}{PR \#12255}: Deduplicate inherited docstrings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12222/}{PR \#12222}: Remove extraneous if 1 statements in demo\_axisline\_style.py \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12137/}{PR \#12137}: MAINT: Vectorize bar3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12219/}{PR \#12219}: Merge OSXInstalledFonts into findSystemFonts. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12229/}{PR \#12229}: Less ACCEPTS, more numpydoc. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11621/}{PR \#11621}: TST: make E402 a universal flake8 ignore \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12231/}{PR \#12231}: CI: Speed up Appveyor repository cloning \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11661/}{PR \#11661}: Update blocking\_input.py \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12199/}{PR \#12199}: Allow disabling specific mouse actions in blocking\_input \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12210/}{PR \#12210}: Axes.tick\_params() argument checking \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12211/}{PR \#12211}: Fix typo \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12200/}{PR \#12200}: Slightly clarify some invalid shape exceptions for image data. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12151/}{PR \#12151}: Don't pretend @deprecated applies to classmethods. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12190/}{PR \#12190}: Remove some unused variables and imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12192/}{PR \#12192}: Exclude examples from lgtm analysis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12196/}{PR \#12196}: Give Carreau the ability to mention the backport bot. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12171/}{PR \#12171}: Remove internal warning due to zsort deprecation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12030/}{PR \#12030}: Speed up canvas redraw for GTK3Agg backend. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12156/}{PR \#12156}: Cleanup the GridSpec demos. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12144/}{PR \#12144}: Add explicit getters and setters for Annotation.anncoords. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12152/}{PR \#12152}: Use \_warn\_external for deprecations warnings. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12147/}{PR \#12147}: DOC: update the gh\_stats code \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12139/}{PR \#12139}: Unbreak build re: mplot3d style. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11367/}{PR \#11367}: Raise TypeError on unsupported kwargs of spy() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/9990/}{PR \#9990}: Fix and document lightsource argument in mplot3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12124/}{PR \#12124}: Correctly infer units from emtpy arrays \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11994/}{PR \#11994}: Cleanup unused variables and imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12122/}{PR \#12122}: MNT: re-add cbook import art3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12086/}{PR \#12086}: FIX: make MaxNLocator only follow visible ticks for order of magnitude \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12032/}{PR \#12032}: Remove unused imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12093/}{PR \#12093}: Correct the removal of -Wstrict-prototypes from compiler flags. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12069/}{PR \#12069}: Style fixes for mplot3d. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11997/}{PR \#11997}: Cleanup some axes\_grid1 examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12098/}{PR \#12098}: Improve layout of HTML animation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12094/}{PR \#12094}: Fine-tune logging notes in contributing.rst. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12079/}{PR \#12079}: Clarifications to \sphinxstylestrong{im\_show()} doc regarding \sphinxstyleemphasis{interpolation='none'}. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12068/}{PR \#12068}: More style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11499/}{PR \#11499}: FIX: layout for mixed descent multiline text objects \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11921/}{PR \#11921}: FIX: allow reshape 2-D to return a bare 1-d list \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12070/}{PR \#12070}: Avoid some uses of np.isscalar. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12067/}{PR \#12067}: DOC: make Line2D docstring definition easier to find \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12054/}{PR \#12054}: More style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12066/}{PR \#12066}: fix indentation in docstring interpolation for spy. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11931/}{PR \#11931}: Remove separate autosummary\_inher template. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12049/}{PR \#12049}: Make Poly3DCollection.set\_zsort less lenient. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12050/}{PR \#12050}: Various cleanups. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12038/}{PR \#12038}: Modernize ArtistInspector a bit... \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12033/}{PR \#12033}: DOC: formatting fixes to mplot3d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12051/}{PR \#12051}: Is bool \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12045/}{PR \#12045}: Fix 999.9... edge case in ticker.EngFormatter for negative numbers \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12044/}{PR \#12044}: Update doc on the \sphinxstyleemphasis{progressive} and \sphinxstyleemphasis{optimize} keywords in savefig \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12061/}{PR \#12061}: Small refactor/simplification. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12060/}{PR \#12060}: INSTALL.rst fixes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12055/}{PR \#12055}: Fix invalid escape in docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12026/}{PR \#12026}: whitespace(-mostly) style cleanup. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12043/}{PR \#12043}: Deprecate get\_py2exe\_datafiles. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12046/}{PR \#12046}: Make HTMLWriter constructor a bit more strict. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12034/}{PR \#12034}: Doc markup fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11972/}{PR \#11972}: FIX: close mem leak for repeated draw \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12024/}{PR \#12024}: Fix typos \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11996/}{PR \#11996}: Minor javascript cleanup \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11989/}{PR \#11989}: Remove support for ghostscript 8.60. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12004/}{PR \#12004}: Update acorr and xcorr docs to match numpy docs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11998/}{PR \#11998}: No clf() needed after creating a figure \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/12001/}{PR \#12001}: Do not use an explicit figum in plt.figure(1, ...) in simple cases \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11999/}{PR \#11999}: Do not use an explicit fignum plt.figure(1) in simple cases \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11995/}{PR \#11995}: Don't use bare except statements \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11993/}{PR \#11993}: DOC: fixed typos \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11992/}{PR \#11992}: Use pytest.warns instead of home-baked warnings capture. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11975/}{PR \#11975}: Derive plt.figlegend.\_\_doc\_\_ from Figure.legend.\_\_doc\_\_. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11980/}{PR \#11980}: Remove \_\_version\_\_numpy\_\_; simplify dependencies check. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11982/}{PR \#11982}: Remove and old keyword documentation. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11981/}{PR \#11981}: Some extra typos \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11979/}{PR \#11979}: Fix a couple of typoes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11959/}{PR \#11959}: cbook.iterable -\textgreater{} np.iterable. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11965/}{PR \#11965}: Move the removal of the -Wstrict-prototypes flag to setup.py. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11958/}{PR \#11958}: Remove unused code \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11960/}{PR \#11960}: Make jpl\_units a bit less painful to read. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11951/}{PR \#11951}: Improve Artist docstrings \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11954/}{PR \#11954}: No need to define \_log twice in matplotlib.dates. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11948/}{PR \#11948}: Minor fixes to docs and gitignore. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11777/}{PR \#11777}: Avoid incorrect warning in savefig \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11942/}{PR \#11942}: Deprecate Artist.aname and Axes.aname \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11935/}{PR \#11935}: Remove ginput demo example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11939/}{PR \#11939}: Improve alias signatures \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11940/}{PR \#11940}: Do not use aliases of properties in internal code \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11941/}{PR \#11941}: Fix test\_large\_subscript\_title() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11938/}{PR \#11938}: More docstring cleanup of Line2D. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11920/}{PR \#11920}: Add LGTM.com code quality badge \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11922/}{PR \#11922}: Improve docstrings of Line2D \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11924/}{PR \#11924}: Minor formatting update on alias docstrings \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11926/}{PR \#11926}: Minor fix to ginput\_demo. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11912/}{PR \#11912}: BLD: update PR template for flake8 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11909/}{PR \#11909}: Simplify linestyle and fillstyle reference docs. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11502/}{PR \#11502}: FIX: move title(s) up if subscripts hang too low. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11906/}{PR \#11906}: fix format of bar\_of\_pie example \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11741/}{PR \#11741}: Factor out common code between Patch.draw and FancyArrowPatch.draw. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11784/}{PR \#11784}: Argument checking for grid() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11888/}{PR \#11888}: Factor out a subprocess log-and-check helper. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11740/}{PR \#11740}: Deprecate support for 3rd-party backends without set\_hatch\_color. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11884/}{PR \#11884}: Deprecate the tk\_window\_focus function. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11689/}{PR \#11689}: Don't cache the renderer on the Axes instance. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11698/}{PR \#11698}: For property, use decorator or lambdas. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11872/}{PR \#11872}: Make all builtin cmaps picklable. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11870/}{PR \#11870}: More style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11873/}{PR \#11873}: Remove mention of deprecated/removed methods from mlab's docstring. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11869/}{PR \#11869}: Style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11874/}{PR \#11874}: Remove some remnants of Py2-handling in test\_rcparams. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11865/}{PR \#11865}: example file for making a bar of pie chart \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11868/}{PR \#11868}: mathtext.py style fixes. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11854/}{PR \#11854}: Accept anything that's not a directory for \$MATPLOTLIBRC. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11589/}{PR \#11589}: WIP ENH secondary axes: \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/8449/}{PR \#8449}: Including Additional Metadata using the SVG Backend \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/pull/11465/}{PR \#11465}: ENH: optimize Collection non-affine transform to call transform once \end{itemize} Issues (161): \begin{itemize} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/4001/}{\#4001}: Qt5 Backend: dblclick is always False on 'mouse\_release\_event' \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14152/}{\#14152}: qt\_compat.py performing wrong test for PyQt5 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10875/}{\#10875}: Annotation.contains and FancyArrow.contains return incorrect values \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/458/}{\#458}: JPG quality keyword in savefig \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/4354/}{\#4354}: scatter not showing valid x/y points with invalid color \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14113/}{\#14113}: scatter could not raise when colors are provided but position data are empty \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14003/}{\#14003}: numpydoc 0.9 breaks doc build \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14054/}{\#14054}: ticks sometimes disappear when zooming interactively \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10189/}{\#10189}: The data decorator does not integrate well with numpydoc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14034/}{\#14034}: pyplot plot raises ValueError when plotting NaN against datetime dates \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14039/}{\#14039}: bar plot yerr lines/caps should respect zorder \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14042/}{\#14042}: dynamic\_image.py + saving animation broken \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/14013/}{\#14013}: osx backend not usable with ipython/jupyter from conda? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13993/}{\#13993}: Tests files installed by default? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13991/}{\#13991}: MaxNLocator.default\_params deprecation may break Cartopy \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/5045/}{\#5045}: Axes.grid() not honoring specified "zorder" kwarg \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/4371/}{\#4371}: LaTeX and PGF preambles do not allow commas \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13982/}{\#13982}: hist() no longer respects range=... when density=True \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13963/}{\#13963}: Dataless colorbars break when updated \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10381/}{\#10381}: Issue when setting scatter color in separate method call \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13618/}{\#13618}: Minor ticklabels are missing at positions of major ticks. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13880/}{\#13880}: Adding documentation for Text.fontfamily default, set\_fontfamily(None)? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13865/}{\#13865}: Appveyor broken \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8636/}{\#8636}: plt.hist chooses improper range when using string-based bin options \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/7300/}{\#7300}: weird mathtext doc markup \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8862/}{\#8862}: Replace mathcircled by textcircled \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13759/}{\#13759}: DOC: matplotlib.patches.Arc \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13785/}{\#13785}: Imshow gives values out of the extent \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13786/}{\#13786}: Cannot import matplotlib.animation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13561/}{\#13561}: Progress of animation.save (for long animations) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13735/}{\#13735}: title doesn't move for ticklables.... \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12175/}{\#12175}: Example link near markevery in the "What's new in 3.0" page is malformed/broken \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13713/}{\#13713}: Boxplot xlim not correctly calculated \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11070/}{\#11070}: Add a "density" kwarg to hist2d \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11337/}{\#11337}: Cannot plot fully masked array against datetimes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10165/}{\#10165}: Adapt stem plot \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10976/}{\#10976}: ENH: secondary axis for a x or y scale. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10763/}{\#10763}: Cairo in 2.2.0 not working for new backends \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/9737/}{\#9737}: setupext should not explicitly add /usr/\{,local/\}include to the include path \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11217/}{\#11217}: Crash on zero-length FancyArrow \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13623/}{\#13623}: do not cause warning in seaborn \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13480/}{\#13480}: Segfault on help('modules') command when matplotlib is installed \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13604/}{\#13604}: legend's framealpha kwarg does not apply when writing to an eps file \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12311/}{\#12311}: 'off' vs. False bug \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10237/}{\#10237}: Setting an alpha value to a Poly3DCollection \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11781/}{\#11781}: fill\_between interpolation \& nan issue \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/1077/}{\#1077}: 3d plots with aspect='equal' \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11761/}{\#11761}: Still naming inconsistency in API on axes limits \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11623/}{\#11623}: Regression: "TypeError: Period('2000-12-31', 'D') is not a string" when a Series with date index was plotted \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12655/}{\#12655}: auto-ticks do not handle values near bounds gracefully \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13487/}{\#13487}: labelpad is not the spacing between the axis and the label \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13540/}{\#13540}: Docs for matplotlib.pyplot.specgram() reference an unsupported mode setting \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8997/}{\#8997}: Proposal: Grid arrangement by number of plots \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/6928/}{\#6928}: Cannot run \sphinxcode{\sphinxupquote{setup.py build}} with numpy master \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12697/}{\#12697}: Axes are drawn at wrong positions \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13478/}{\#13478}: FuncAnimation: interactive zoom/pan with blitting does not work \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11575/}{\#11575}: Setting axis ticks in log scale produces duplicate tick labels. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13464/}{\#13464}: set\_rlim(bottom=...) no longer works \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12628/}{\#12628}: Write canonical example of how to use Matplotlib inside a webserver \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10022/}{\#10022}: boxplot: positions used to take Int64Index \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11647/}{\#11647}: Disable buttons in ginput \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12987/}{\#12987}: issues parsing AFM fonts \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12667/}{\#12667}: Colorbar ticks.... \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13137/}{\#13137}: Travis for Python 3.7 sometimes fails due to missing font \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/7969/}{\#7969}: Stem is slow and will crash if I try to close the window \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13002/}{\#13002}: Hist color kwarg broken for multiple empty datasets \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/5581/}{\#5581}: {[}mpl\_toolkits{]} Things drawn on parasite axes don't fire pick events \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13417/}{\#13417}: Secondary axis doesn't resize properly \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8120/}{\#8120}: Inconsistent inset\_axes position between show(), savefig(format='png') and savefig(format='pdf') \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8947/}{\#8947}: Different result, slower runtime of heatmap between 2.0.0 and 2.0.1 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13264/}{\#13264}: Use of logging in matplotlib \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11602/}{\#11602}: animation error \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12925/}{\#12925}: Python pandas datetime plot xticks in unexpected location \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11025/}{\#11025}: AxesGrid ticks missing on x-axis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10974/}{\#10974}: Examples not shown in API docs for many methods. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13392/}{\#13392}: boxplot broken for empty inputs \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12345/}{\#12345}: Need more tests for units and errorbar \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10361/}{\#10361}: FigureCanvas.draw() with tight\_layout () needs to be called twice with Matplotlib 2.1.0 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11376/}{\#11376}: Temporary styling ignores color cycle \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11546/}{\#11546}: import time \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13286/}{\#13286}: AttributeError: 'float' object has no attribute 'deg2rad' \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11508/}{\#11508}: bi-directional perceptually flat colormaps in matplotlib? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12918/}{\#12918}: Mac shows an icon in the dock when using matplotlib.pyplot. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13339/}{\#13339}: Log Colorbar minorticks\_off reverted if ticks set... \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13228/}{\#13228}: MPL 3 + Colorbar + PowerNorm bug \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13096/}{\#13096}: Matplotlib.get\_backend()/matplotlib.use() cause NSException with Anaconda \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/7712/}{\#7712}: Number of ticks for dates still gives overlapping labels \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/9978/}{\#9978}: General poor default formatting of datetimes on plot x-axis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13253/}{\#13253}: imsave outputs JPEG with wrong dimension \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11391/}{\#11391}: Use data argument for scatter plotting timestamps from pandas \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13145/}{\#13145}: widgets.RadioButtons: select by closest in position \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13267/}{\#13267}: "double-pendulum" example's speed not correct / varying \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13257/}{\#13257}: Allow turning off minorticks for Colorbar with LogNorm? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13237/}{\#13237}: Sankey basic gallery example is not rendered properly. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12836/}{\#12836}: matplotlib.rc\_file resets to default template before updating rcparams \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13186/}{\#13186}: ax.bar throws when x axis is pandas datetime \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/5397/}{\#5397}: Expose compression and filter PNG options through savefig \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13142/}{\#13142}: Cannot plot bar graph with dates: "TypeError: ufunc subtract cannot use operands with types dtype('\textless{}M8{[}ns{]}') and dtype('float64')" \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8530/}{\#8530}: Feature request: TIFF LZW compression support in savefig() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13139/}{\#13139}: font family {[}'serif'{]} not found. Falling back to DejaVu Sans \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/1558/}{\#1558}: Graceful handling of a numpy matrix \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12954/}{\#12954}: Fonts installed in the user directory are not detected (Windows 1809) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/3644/}{\#3644}: Feature Request: manually set colorbar without mappable \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12862/}{\#12862}: broken\_barh appears not to work with datetime/timedelta objects \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11290/}{\#11290}: ax.bar doesn't work correctly when width is a timedelta64 object \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13156/}{\#13156}: DOC: matplotlib.pyplot.arrow \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12990/}{\#12990}: Unclear error message for \sphinxcode{\sphinxupquote{plt.xticks(names)}} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12769/}{\#12769}: Failing to save an animated graph with matplotlib.animation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13112/}{\#13112}: LogNorm colorbar prints double tick labels after set\_ticks() \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13132/}{\#13132}: BUG: matplotlib.sphinxext.plot\_directive uses old function-based API \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8528/}{\#8528}: Funcanimation memory leak? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8914/}{\#8914}: line3D set\_data only takes in x and y data \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8768/}{\#8768}: One one tick in a log-scale axis \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13121/}{\#13121}: Tests fail with pytest 4.1 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13098/}{\#13098}: Likely incorrect code(?) in colorbar.py \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12562/}{\#12562}: Clean up unused imports \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12106/}{\#12106}: plt.plot does not plot anything with named arguments \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/5145/}{\#5145}: Python {[}Error 17{]}No usable Temporary file name found \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13012/}{\#13012}: qt5agg image quality changes when window is out of focus \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13055/}{\#13055}: 127.0.0.1 hardcoded in webagg backend server \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12971/}{\#12971}: Pandas Series not supported as data kwarg \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13022/}{\#13022}: boxplot not showing symbols with seaborn style sheet \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/13028/}{\#13028}: Bad rotation\_mode/center\_baseline combination even if rotation=0 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12745/}{\#12745}: Sphinx copy button for code block \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12801/}{\#12801}: scatter() should not drop data points at nonfinite coordinates \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12358/}{\#12358}: Dropping support for Py3.5 and numpy 1.10 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12994/}{\#12994}: Axes range with set\_xticks with categoricals \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12993/}{\#12993}: Semantics of set\_xticks for categoricals \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12946/}{\#12946}: \textasciitilde{} in mathrm leads to Unknown symbol: mathrm \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10704/}{\#10704}: Add documentation for set\_rlim \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11202/}{\#11202}: Using of ax.set\_ylim() for polar plot leads to "posx and posy should be finite values" error \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12859/}{\#12859}: DeprecationWarning: NewId() is deprecated in wxPython. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12817/}{\#12817}: Multiple places where Type Errors on cbook.warn\_deprecated will happen \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12308/}{\#12308}: \#12253 FIX: Handle utf-8 output by kpathsea on Windows -- possibly causing issues \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12804/}{\#12804}: Usetex produces preamble with one character per line \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12808/}{\#12808}: Issue with minor tick spacing in colorbar with custom Normalize class \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12138/}{\#12138}: Faces of Axes3d.bar3d are not oriented correctly \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12591/}{\#12591}: Adding FancyArrowPatch with datetime coordinates fails \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11139/}{\#11139}: "make clean" doesn't remove all the build doc files \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11908/}{\#11908}: Improve linestyle documentation \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10643/}{\#10643}: Most warnings calls do not set the stacklevel \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12532/}{\#12532}: Incorrect rendering of math symbols \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11787/}{\#11787}: Looping gifs with PillowWriter \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/9205/}{\#9205}: after the animation encoder (e.g. ffmpeg) fails, the animation framework itself fails internally in various ways while trying to report the error \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11154/}{\#11154}: Unexpected behavior for Axes3D.plot\_surface(shade=None) \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12121/}{\#12121}: Documentation of TextArea's fontprops keyword argument is misleading \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12191/}{\#12191}: "if 1:" blocks in examples \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12107/}{\#12107}: warnings re: deprecated pytest API with pytest 3.8 \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12010/}{\#12010}: Popover over plot is very slow \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12118/}{\#12118}: Scatter: empty np.arrays with non-numeric dtypes cause TypeError \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12072/}{\#12072}: \sphinxcode{\sphinxupquote{MaxNLocator}} changes the scientific notation exponent with different number of tick labels \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11795/}{\#11795}: Un-align animations created with to\_jshtml()? \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/10201/}{\#10201}: Available fonts are ignored by font\_manager \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/12065/}{\#12065}: Keyword \sphinxstyleemphasis{interpolation} behaving improperly while saving to SVG with \sphinxstylestrong{savefig()} \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11498/}{\#11498}: Test layout with big descenders and multiple lines inconsistent. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11468/}{\#11468}: Layout managers have problems with titles containing MathText \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11899/}{\#11899}: Histogram of list of datetimes \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11956/}{\#11956}: apparent memory leak with live plotting \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11587/}{\#11587}: Missing filled contours when using contourf \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11716/}{\#11716}: errorbar pickling fails when specifying y error bars \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11557/}{\#11557}: Hoping add a drawing function 'patch' in matplotlib \end{itemize} \chapter{Previous What's New} \label{\detokenize{users/whats_new_old:previous-what-s-new}}\label{\detokenize{users/whats_new_old::doc}} \section{List of changes to Matplotlib prior to 2015} \label{\detokenize{users/prev_whats_new/changelog:list-of-changes-to-matplotlib-prior-to-2015}}\label{\detokenize{users/prev_whats_new/changelog:old-changelog}}\label{\detokenize{users/prev_whats_new/changelog::doc}} This is a list of the changes made to Matplotlib from 2003 to 2015. For more recent changes, please refer to the \sphinxhref{../whats\_new.html}{what's new} or the \sphinxhref{../../api/api\_changes.html}{API changes}. \begin{description} \item[{2015-11-16 Levels passed to contour(f) and tricontour(f) must be in increasing}] \leavevmode order. \end{description} 2015-10-21 Added TextBox widget 2015-10-21 Added get\_ticks\_direction() \begin{description} \item[{2015-02-27 Added the rcParam 'image.composite\_image' to permit users}] \leavevmode to decide whether they want the vector graphics backends to combine all images within a set of axes into a single composite image. (If images do not get combined, users can open vector graphics files in Adobe Illustrator or Inkscape and edit each image individually.) \item[{2015-02-19 Rewrite of C++ code that calculates contours to add support for}] \leavevmode corner masking. This is controlled by the 'corner\_mask' keyword in plotting commands 'contour' and 'contourf'. - IMT \item[{2015-01-23 Text bounding boxes are now computed with advance width rather than}] \leavevmode ink area. This may result in slightly different placement of text. \item[{2014-10-27 Allowed selection of the backend using the \sphinxcode{\sphinxupquote{MPLBACKEND}} environment}] \leavevmode variable. Added documentation on backend selection methods. \item[{2014-09-27 Overhauled \sphinxcode{\sphinxupquote{colors.LightSource}}. Added \sphinxcode{\sphinxupquote{LightSource.hillshade}} to}] \leavevmode allow the independent generation of illumination maps. Added new types of blending for creating more visually appealing shaded relief plots (e.g. \sphinxcode{\sphinxupquote{blend\_mode="overlay"}}, etc, in addition to the legacy "hsv" mode). \end{description} 2014-06-10 Added Colorbar.remove() 2014-06-07 Fixed bug so radial plots can be saved as ps in py3k. \begin{description} \item[{2014-06-01 Changed the fmt kwarg of errorbar to support the}] \leavevmode the mpl convention that "none" means "don't draw it", and to default to the empty string, so that plotting of data points is done with the plot() function defaults. Deprecated use of the None object in place "none". \item[{2014-05-22 Allow the linscale keyword parameter of symlog scale to be}] \leavevmode smaller than one. \item[{2014-05-20 Added logic to in FontManager to invalidate font-cache if}] \leavevmode if font-family rcparams have changed. \end{description} 2014-05-16 Fixed the positioning of multi-line text in the PGF backend. \begin{description} \item[{2014-05-14 Added Axes.add\_image() as the standard way to add AxesImage}] \leavevmode instances to Axes. This improves the consistency with add\_artist(), add\_collection(), add\_container(), add\_line(), add\_patch(), and add\_table(). \end{description} 2014-05-02 Added colorblind-friendly colormap, named 'Wistia'. \begin{description} \item[{2014-04-27 Improved input clean up in Axes.\{h\textbar{}v\}lines}] \leavevmode Coerce input into a 1D ndarrays (after dealing with units). \end{description} 2014-04-27 removed un-needed cast to float in stem \begin{description} \item[{2014-04-23 Updated references to "ipython -pylab"}] \leavevmode The preferred method for invoking pylab is now using the "\%pylab" magic. -Chris G. \item[{2014-04-22 Added (re-)generate a simple automatic legend to "Figure Options"}] \leavevmode dialog of the Qt4Agg backend. \item[{2014-04-22 Added an example showing the difference between}] \leavevmode interpolation = 'none' and interpolation = 'nearest' in \sphinxcode{\sphinxupquote{imshow()}} when saving vector graphics files. \item[{2014-04-22 Added violin plotting functions. See \sphinxcode{\sphinxupquote{Axes.violinplot}},}] \leavevmode \sphinxcode{\sphinxupquote{Axes.violin}}, \sphinxcode{\sphinxupquote{cbook.violin\_stats}} and \sphinxcode{\sphinxupquote{mlab.GaussianKDE}} for details. \item[{2014-04-10 Fixed the triangular marker rendering error. The "Up" triangle was}] \leavevmode rendered instead of "Right" triangle and vice-versa. \item[{2014-04-08 Fixed a bug in parasite\_axes.py by making a list out}] \leavevmode of a generator at line 263. \item[{2014-04-02 Added \sphinxcode{\sphinxupquote{clipon=False}} to patch creation of wedges and shadows}] \leavevmode in \sphinxcode{\sphinxupquote{pie}}. \item[{2014-02-25 In backend\_qt4agg changed from using update -\textgreater{} repaint under}] \leavevmode windows. See comment in source near \sphinxcode{\sphinxupquote{self.\_priv\_update}} for longer explaination. \item[{2014-03-27 Added tests for pie ccw parameter. Removed pdf and svg images}] \leavevmode from tests for pie linewidth parameter. \item[{2014-03-24 Changed the behaviour of axes to not ignore leading or trailing}] \leavevmode patches of height 0 (or width 0) while calculating the x and y axis limits. Patches having both height == 0 and width == 0 are ignored. \item[{2014-03-24 Added bool kwarg (manage\_xticks) to boxplot to enable/disable}] \leavevmode the managemnet of the xlimits and ticks when making a boxplot. Default in True which maintains current behavior by default. \item[{2014-03-23 Fixed a bug in projections/polar.py by making sure that the theta}] \leavevmode value being calculated when given the mouse coordinates stays within the range of 0 and 2 * pi. \item[{2014-03-22 Added the keyword arguments wedgeprops and textprops to pie.}] \leavevmode Users can control the wedge and text properties of the pie in more detail, if they choose. \item[{2014-03-17 Bug was fixed in append\_axes from the AxesDivider class would not}] \leavevmode append axes in the right location with respect to the reference locator axes \end{description} 2014-03-13 Add parameter 'clockwise' to function pie, True by default. 2014-02-28 Added 'origin' kwarg to \sphinxcode{\sphinxupquote{spy}} \begin{description} \item[{2014-02-27 Implemented separate horizontal/vertical axes padding to the}] \leavevmode ImageGrid in the AxesGrid toolkit \item[{2014-02-27 Allowed markevery property of matplotlib.lines.Line2D to be, an int}] \leavevmode numpy fancy index, slice object, or float. The float behaviour turns on markers at approximately equal display-coordinate-distances along the line. \item[{2014-02-25 In backend\_qt4agg changed from using update -\textgreater{} repaint under}] \leavevmode windows. See comment in source near \sphinxcode{\sphinxupquote{self.\_priv\_update}} for longer explaination. \item[{2014-01-02 \sphinxcode{\sphinxupquote{triplot}} now returns the artist it adds and support of line and}] \leavevmode marker kwargs has been improved. GBY \item[{2013-12-30 Made streamplot grid size consistent for different types of density}] \leavevmode argument. A 30x30 grid is now used for both density=1 and density=(1, 1). \item[{2013-12-03 Added a pure boxplot-drawing method that allow a more complete}] \leavevmode customization of boxplots. It takes a list of dicts contains stats. Also created a function (\sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}) that generates the stats needed. \item[{2013-11-28 Added qhull extension module to perform Delaunay triangulation more}] \leavevmode robustly than before. It is used by tri.Triangulation (and hence all pyplot.tri* methods) and mlab.griddata. Deprecated matplotlib.delaunay module. - IMT \item[{2013-11-05 Add power-law normalization method. This is useful for,}] \leavevmode e.g., showing small populations in a "hist2d" histogram. \item[{2013-10-27 Added get\_rlabel\_position and set\_rlabel\_position methods to}] \leavevmode PolarAxes to control angular position of radial tick labels. \item[{2013-10-06 Add stride-based functions to mlab for easy creation of 2D arrays}] \leavevmode with less memory. \item[{2013-10-06 Improve window and detrend functions in mlab, particulart support for}] \leavevmode 2D arrays. \end{description} 2013-10-06 Improve performance of all spectrum-related mlab functions and plots. \begin{description} \item[{2013-10-06 Added support for magnitude, phase, and angle spectrums to}] \leavevmode axes.specgram, and support for magnitude, phase, angle, and complex spectrums to mlab-specgram. \item[{2013-10-06 Added magnitude\_spectrum, angle\_spectrum, and phase\_spectrum plots,}] \leavevmode as well as magnitude\_spectrum, angle\_spectrum, phase\_spectrum, and complex\_spectrum functions to mlab \item[{2013-07-12 Added support for datetime axes to 2d plots. Axis values are passed}] \leavevmode through Axes.convert\_xunits/Axes.convert\_yunits before being used by contour/contourf, pcolormesh and pcolor. \item[{2013-07-12 Allowed matplotlib.dates.date2num, matplotlib.dates.num2date,}] \leavevmode and matplotlib.dates.datestr2num to accept n-d inputs. Also factored in support for n-d arrays to matplotlib.dates.DateConverter and matplotlib.units.Registry. \item[{2013-06-26 Refactored the axes module: the axes module is now a folder,}] \leavevmode\begin{description} \item[{containing the following submodule:}] \leavevmode\begin{itemize} \item {} \_subplots.py, containing all the subplots helper methods \item {} \_base.py, containing several private methods and a new \_AxesBase class. This \_AxesBase class contains all the methods that are not directly linked to plots of the "old" Axes \item {} \_axes.py contains the Axes class. This class now inherits from \_AxesBase: it contains all "plotting" methods and labelling methods. \end{itemize} \end{description} This refactoring should not affect the API. Only private methods are not importable from the axes module anymore. \item[{2013-05-18 Added support for arbitrary rasterization resolutions to the}] \leavevmode SVG backend. Previously the resolution was hard coded to 72 dpi. Now the backend class takes a image\_dpi argument for its constructor, adjusts the image bounding box accordingly and forwards a magnification factor to the image renderer. The code and results now resemble those of the PDF backend. - MW \item[{2013-05-08 Changed behavior of hist when given stacked=True and normed=True.}] \leavevmode Histograms are now stacked first, then the sum is normalized. Previously, each histogram was normalized, then they were stacked. \end{description} 2013-04-25 Changed all instances of: \begin{quote} from matplotlib import MatplotlibDeprecationWarning as mplDeprecation to: from cbook import mplDeprecation and removed the import into the matplotlib namespace in \_\_init\_\_.py Thomas Caswell \end{quote} \begin{description} \item[{2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default}] \leavevmode margins on auto-scaleing. - TAC \end{description} 2013-04-16 Added patheffect support for Line2D objects. -JJL \begin{description} \item[{2013-03-31 Added support for arbitrary unstructured user-specified}] \leavevmode triangulations to Axes3D.tricontour{[}f{]} - Damon McDougall \item[{2013-03-19 Added support for passing \sphinxcode{\sphinxupquote{linestyle}} kwarg to \sphinxcode{\sphinxupquote{step}} so all \sphinxcode{\sphinxupquote{plot}}}] \leavevmode kwargs are passed to the underlying \sphinxcode{\sphinxupquote{plot}} call. -TAC \item[{2013-02-25 Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer}] \leavevmode to matplotlib.tri module. - GBy \item[{2013-01-23 Add 'savefig.directory' to rcParams to remember and fill in the last}] \leavevmode directory saved to for figure save dialogs - Martin Spacek \item[{2013-01-13 Add eventplot method to axes and pyplot and EventCollection class}] \leavevmode to collections. \item[{2013-01-08 Added two extra titles to axes which are flush with the left and}] \leavevmode right edges of the plot respectively. Andrew Dawson \end{description} 2013-01-07 Add framealpha keyword argument to legend - PO 2013-01-16 Till Stensitzki added a baseline feature to stackplot \begin{description} \item[{2012-12-22 Added classes for interpolation within triangular grids}] \leavevmode (LinearTriInterpolator) and to find the triangles in which points lie (TrapezoidMapTriFinder) to matplotlib.tri module. - IMT \item[{2012-12-05 Added MatplotlibDeprecationWarning class for signaling deprecation.}] \leavevmode Matplotlib developers can use this class as follows: from matplotlib import MatplotlibDeprecationWarning as mplDeprecation In light of the fact that Python builtin DeprecationWarnings are ignored by default as of Python 2.7, this class was put in to allow for the signaling of deprecation, but via UserWarnings which are not ignored by default. - PI \item[{2012-11-27 Added the \sphinxstyleemphasis{mtext} parameter for supplying matplotlib.text.Text}] \leavevmode instances to RendererBase.draw\_tex and RendererBase.draw\_text. This allows backends to utilize additional text attributes, like the alignment of text elements. - pwuertz \item[{2012-11-26 deprecate matplotlib/mpl.py, which was used only in pylab.py and is}] \leavevmode now replaced by the more suitable \sphinxcode{\sphinxupquote{import matplotlib as mpl}}. - PI \end{description} 2012-11-25 Make rc\_context available via pyplot interface - PI \begin{description} \item[{2012-11-16 plt.set\_cmap no longer throws errors if there is not already}] \leavevmode an active colorable artist, such as an image, and just sets up the colormap to use from that point forward. - PI \item[{2012-11-16 Added the funcction \_get\_rbga\_face, which is identical to}] \leavevmode \_get\_rbg\_face except it return a (r,g,b,a) tuble, to line2D. Modified Line2D.draw to use \_get\_rbga\_face to get the markerface color so that any alpha set by markerfacecolor will respected. - Thomas Caswell \item[{2012-11-13 Add a symmetric log normalization class to colors.py.}] \leavevmode Also added some tests for the normalization class. Till Stensitzki \item[{2012-11-12 Make axes.stem take at least one argument.}] \leavevmode Uses a default range(n) when the first arg not provided. Damon McDougall \end{description} 2012-11-09 Make plt.subplot() without arguments act as subplot(111) - PI \begin{description} \item[{2012-11-08 Replaced plt.figure and plt.subplot calls by the newer, more}] \leavevmode convenient single call to plt.subplots() in the documentation examples - PI \end{description} 2012-10-05 Add support for saving animations as animated GIFs. - JVDP \begin{description} \item[{2012-08-11 Fix path-closing bug in patches.Polygon, so that regardless}] \leavevmode of whether the path is the initial one or was subsequently set by set\_xy(), get\_xy() will return a closed path if and only if get\_closed() is True. Thanks to Jacob Vanderplas. - EF \item[{2012-08-05 When a norm is passed to contourf, either or both of the}] \leavevmode vmin, vmax attributes of that norm are now respected. Formerly they were respected only if both were specified. In addition, vmin and/or vmax can now be passed to contourf directly as kwargs. - EF \item[{2012-07-24 Contourf handles the extend kwarg by mapping the extended}] \leavevmode ranges outside the normed 0-1 range so that they are handled by colormap colors determined by the set\_under and set\_over methods. Previously the extended ranges were mapped to 0 or 1 so that the "under" and "over" colormap colors were ignored. This change also increases slightly the color contrast for a given set of contour levels. - EF \end{description} 2012-06-24 Make use of mathtext in tick labels configurable - DSD 2012-06-05 Images loaded through PIL are now ordered correctly - CG 2012-06-02 Add new Axes method and pyplot function, hist2d. - PO \begin{description} \item[{2012-05-31 Remove support for 'cairo.\textless{}format\textgreater{}' style of backend specification.}] \leavevmode Deprecate 'cairo.format' and 'savefig.extension' rcParams and replace with 'savefig.format'. - Martin Spacek \item[{2012-05-29 pcolormesh now obeys the passed in "edgecolor" kwarg.}] \leavevmode To support this, the "shading" argument to pcolormesh now only takes "flat" or "gouraud". To achieve the old "faceted" behavior, pass "edgecolors='k'". - MGD \end{description} 2012-05-22 Added radius kwarg to pie charts. - HH \begin{description} \item[{2012-05-22 Collections now have a setting "offset\_position" to select whether}] \leavevmode the offsets are given in "screen" coordinates (default, following the old behavior) or "data" coordinates. This is currently used internally to improve the performance of hexbin. As a result, the "draw\_path\_collection" backend methods have grown a new argument "offset\_position". - MGD \item[{2012-05-04 Add a new argument to pie charts - startingangle - that}] \leavevmode allows one to specify the angle offset for the first wedge of the chart. - EP \item[{2012-05-03 symlog scale now obeys the logarithmic base. Previously, it was}] \leavevmode completely ignored and always treated as base e. - MGD \item[{2012-05-03 Allow linscalex/y keyword to symlog scale that allows the size of}] \leavevmode the linear portion relative to the logarithmic portion to be adjusted. - MGD \item[{2012-04-14 Added new plot style: stackplot. This new feature supports stacked}] \leavevmode area plots. - Damon McDougall \item[{2012-04-06 When path clipping changes a LINETO to a MOVETO, it also}] \leavevmode changes any CLOSEPOLY command to a LINETO to the initial point. This fixes a problem with pdf and svg where the CLOSEPOLY would then draw a line to the latest MOVETO position instead of the intended initial position. - JKS \item[{2012-03-27 Add support to ImageGrid for placing colorbars only at}] \leavevmode one edge of each column/row. - RMM \item[{2012-03-07 Refactor movie writing into useful classes that make use}] \leavevmode of pipes to write image data to ffmpeg or mencoder. Also improve settings for these and the ability to pass custom options. - RMM \item[{2012-02-29 errorevery keyword added to errorbar to enable errorbar}] \leavevmode subsampling. fixes issue \#600. \item[{2012-02-28 Added plot\_trisurf to the mplot3d toolkit. This supports plotting}] \leavevmode three dimensional surfaces on an irregular grid. - Damon McDougall \item[{2012-01-23 The radius labels in polar plots no longer use a fixed}] \leavevmode padding, but use a different alignment depending on the quadrant they are in. This fixes numerical problems when (rmax - rmin) gets too small. - MGD \item[{2012-01-08 Add axes.streamplot to plot streamlines of a velocity field.}] \leavevmode Adapted from Tom Flannaghan streamplot implementation. -TSY \item[{2011-12-29 ps and pdf markers are now stroked only if the line width}] \leavevmode is nonzero for consistency with agg, fixes issue \#621. - JKS \end{description} 2011-12-27 Work around an EINTR bug in some versions of subprocess. - JKS \begin{description} \item[{2011-10-25 added support for operatorname to mathtext,}] \leavevmode including the ability to insert spaces, such as \$operatorname\{arg,max\}\$ - PI \item[{2011-08-18 Change api of Axes.get\_tightbbox and add an optional}] \leavevmode keyword parameter \sphinxstyleemphasis{call\_axes\_locator}. - JJL \item[{2011-07-29 A new rcParam "axes.formatter.use\_locale" was added, that,}] \leavevmode when True, will use the current locale to format tick labels. This means that, for example, in the fr\_FR locale, ',' will be used as a decimal separator. - MGD \item[{2011-07-15 The set of markers available in the plot() and scatter()}] \leavevmode commands has been unified. In general, this gives more options to both than were previously available, however, there is one backward-incompatible change to the markers in scatter: \begin{quote} "d" used to mean "diamond", it now means "narrow diamond". "D" can be used for a "diamond". \end{quote} -MGD \item[{2011-07-13 Fix numerical problems in symlog scale, particularly when}] \leavevmode linthresh \textless{}= 1.0. Symlog plots may look different if one was depending on the old broken behavior - MGD \item[{2011-07-10 Fixed argument handling error in tripcolor/triplot/tricontour,}] \leavevmode issue \#203. - IMT \item[{2011-07-08 Many functions added to mplot3d.axes3d to bring Axes3D}] \leavevmode objects more feature-parity with regular Axes objects. Significant revisions to the documentation as well. - BVR \item[{2011-07-07 Added compatibility with IPython strategy for picking}] \leavevmode a version of Qt4 support, and an rcParam for making the choice explicitly: backend.qt4. - EF \item[{2011-07-07 Modified AutoMinorLocator to improve automatic choice of}] \leavevmode the number of minor intervals per major interval, and to allow one to specify this number via a kwarg. - EF \item[{2011-06-28 3D versions of scatter, plot, plot\_wireframe, plot\_surface,}] \leavevmode bar3d, and some other functions now support empty inputs. - BVR \item[{2011-06-22 Add set\_theta\_offset, set\_theta\_direction and}] \leavevmode set\_theta\_zero\_location to polar axes to control the location of 0 and directionality of theta. - MGD \item[{2011-06-22 Add axes.labelweight parameter to set font weight to axis}] \leavevmode labels - MGD. \end{description} 2011-06-20 Add pause function to pyplot. - EF \begin{description} \item[{2011-06-16 Added \sphinxstyleemphasis{bottom} keyword parameter for the stem command.}] \leavevmode Also, implemented a legend handler for the stem plot. - JJL \end{description} 2011-06-16 Added legend.frameon rcParams. - Mike Kaufman 2011-05-31 Made backend\_qt4 compatible with PySide . - Gerald Storer \begin{description} \item[{2011-04-17 Disable keyboard auto-repeat in qt4 backend by ignoring}] \leavevmode key events resulting from auto-repeat. This makes constrained zoom/pan work. - EF \item[{2011-04-14 interpolation="nearest" always interpolate images. A new}] \leavevmode mode "none" is introduced for no interpolation - JJL \item[{2011-04-03 Fixed broken pick interface to AsteriskCollection objects}] \leavevmode used by scatter. - EF \item[{2011-04-01 The plot directive Sphinx extension now supports all of the}] \leavevmode features in the Numpy fork of that extension. These include doctest formatting, an 'include-source' option, and a number of new configuration options. - MGD \item[{2011-03-29 Wrapped ViewVCCachedServer definition in a factory function.}] \leavevmode This class now inherits from urllib2.HTTPSHandler in order to fetch data from github, but HTTPSHandler is not defined if python was built without SSL support. - DSD \end{description} 2011-03-10 Update pytz version to 2011c, thanks to Simon Cross. - JKS 2011-03-06 Add standalone tests.py test runner script. - JKS \begin{description} \item[{2011-03-06 Set edgecolor to 'face' for scatter asterisk-type}] \leavevmode symbols; this fixes a bug in which these symbols were not responding to the c kwarg. The symbols have no face area, so only the edgecolor is visible. - EF \item[{2011-02-27 Support libpng version 1.5.x; suggestion by Michael}] \leavevmode Albert. Changed installation specification to a minimum of libpng version 1.2. - EF \item[{2011-02-20 clabel accepts a callable as an fmt kwarg; modified}] \leavevmode patch by Daniel Hyams. - EF \item[{2011-02-18 scatter({[}{]}, {[}{]}) is now valid. Also fixed issues}] \leavevmode with empty collections - BVR \end{description} 2011-02-07 Quick workaround for dviread bug \#3175113 - JKS \begin{description} \item[{2011-02-05 Add cbook memory monitoring for Windows, using}] \leavevmode tasklist. - EF \item[{2011-02-05 Speed up Normalize and LogNorm by using in-place}] \leavevmode operations and by using float32 for float32 inputs and for ints of 2 bytes or shorter; based on patch by Christoph Gohlke. - EF \item[{2011-02-04 Changed imshow to use rgba as uint8 from start to}] \leavevmode finish, instead of going through an intermediate step as double precision; thanks to Christoph Gohlke. - EF \item[{2011-01-13 Added zdir and offset arguments to contourf3d to}] \leavevmode bring contourf3d in feature parity with contour3d. - BVR \end{description} 2011-01-04 Tag 1.0.1 for release at r8896 2011-01-03 Added display of ticker offset to 3d plots. - BVR \begin{description} \item[{2011-01-03 Turn off tick labeling on interior subplots for}] \leavevmode pyplots.subplots when sharex/sharey is True. - JDH \end{description} 2010-12-29 Implement axes\_divider.HBox and VBox. -JJL 2010-11-22 Fixed error with Hammer projection. - BVR 2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR \begin{description} \item[{2010-11-07 New rc parameters examples.download and examples.directory}] \leavevmode allow bypassing the download mechanism in get\_sample\_data. - JKS \item[{2010-10-04 Fix JPEG saving bug: only accept the kwargs documented}] \leavevmode by PIL for JPEG files. - JKS \end{description} 2010-09-15 Remove unused \_wxagg extension and numerix.h. - EF 2010-08-25 Add new framework for doing animations with examples.- RM \begin{description} \item[{2010-08-21 Remove unused and inappropriate methods from Tick classes:}] \leavevmode set\_view\_interval, get\_minpos, and get\_data\_interval are properly found in the Axis class and don't need to be duplicated in XTick and YTick. - EF \item[{2010-08-21 Change Axis.set\_view\_interval() so that when updating an}] \leavevmode existing interval, it respects the orientation of that interval, and can enlarge but not reduce the interval. This fixes a bug in which Axis.set\_ticks would change the view limits of an inverted axis. Whether set\_ticks should be affecting the viewLim at all remains an open question. - EF \item[{2010-08-16 Handle NaN's correctly in path analysis routines. Fixes a}] \leavevmode bug where the best location for a legend was not calculated correctly when the line contains NaNs. - MGD \end{description} 2010-08-14 Fix bug in patch alpha handling, and in bar color kwarg - EF \begin{description} \item[{2010-08-12 Removed all traces of numerix module after 17 months of}] \leavevmode deprecation warnings. - EF \item[{2010-08-05 Added keyword arguments 'thetaunits' and 'runits' for polar}] \leavevmode plots. Fixed PolarAxes so that when it set default Formatters, it marked them as such. Fixed semilogx and semilogy to no longer blindly reset the ticker information on the non-log axis. Axes.arrow can now accept unitized data. - JRE \item[{2010-08-03 Add support for MPLSETUPCFG variable for custom setup.cfg}] \leavevmode filename. Used by sage buildbot to build an mpl w/ no gui support - JDH \item[{2010-08-01 Create directory specified by MPLCONFIGDIR if it does}] \leavevmode not exist. - ADS \end{description} 2010-07-20 Return Qt4's default cursor when leaving the canvas - DSD 2010-07-06 Tagging for mpl 1.0 at r8502 \begin{description} \item[{2010-07-05 Added Ben Root's patch to put 3D plots in arbitrary axes,}] \leavevmode allowing you to mix 3d and 2d in different axes/subplots or to have multiple 3D plots in one figure. See examples/mplot3d/subplot3d\_demo.py - JDH \item[{2010-07-05 Preferred kwarg names in set\_xlim are now 'left' and}] \leavevmode 'right'; in set\_ylim, 'bottom' and 'top'; original kwargs are still accepted without complaint. - EF \item[{2010-07-05 TkAgg and FltkAgg backends are now consistent with other}] \leavevmode interactive backends: when used in scripts from the command line (not from ipython -pylab), show blocks, and can be called more than once. - EF \item[{2010-07-02 Modified CXX/WrapPython.h to fix "swab bug" on solaris so}] \leavevmode mpl can compile on Solaris with CXX6 in the trunk. Closes tracker bug 3022815 - JDH \item[{2010-06-30 Added autoscale convenience method and corresponding}] \leavevmode pyplot function for simplified control of autoscaling; and changed axis, set\_xlim, and set\_ylim so that by default, they turn off the autoscaling on the relevant axis or axes. Therefore one can call set\_xlim before plotting a line, for example, and the limits will be retained. - EF \item[{2010-06-20 Added Axes.tick\_params and corresponding pyplot function}] \leavevmode to control tick and tick label appearance after an Axes has been created. - EF \item[{2010-06-09 Allow Axes.grid to control minor gridlines; allow}] \leavevmode Axes.grid and Axis.grid to control major and minor gridlines in the same method call. - EF \item[{2010-06-06 Change the way we do split/dividend adjustments in}] \leavevmode finance.py to handle dividends and fix the zero division bug reported in sf bug 2949906 and 2123566. Note that volume is not adjusted because the Yahoo CSV does not distinguish between share split and dividend adjustments making it near impossible to get volume adjustement right (unless we want to guess based on the size of the adjustment or scrape the html tables, which we don't) - JDH \end{description} 2010-06-06 Updated dateutil to 1.5 and pytz to 2010h. 2010-06-02 Add error\_kw kwarg to Axes.bar(). - EF \begin{description} \item[{2010-06-01 Fix pcolormesh() and QuadMesh to pass on kwargs as}] \leavevmode appropriate. - RM \end{description} 2010-05-18 Merge mpl\_toolkits.gridspec into the main tree. - JJL \begin{description} \item[{2010-05-04 Improve backend\_qt4 so it displays figures with the}] \leavevmode correct size - DSD \item[{2010-04-20 Added generic support for connecting to a timer for events. This}] \leavevmode adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to the backends and a new\_timer() method to each backend's canvas to allow ease of creating a new timer. - RM \end{description} 2010-04-20 Added margins() Axes method and pyplot function. - EF 2010-04-18 update the axes\_grid documentation. -JJL \begin{description} \item[{2010-04-18 Control MaxNLocator parameters after instantiation,}] \leavevmode and via Axes.locator\_params method, with corresponding pyplot function. -EF \item[{2010-04-18 Control ScalarFormatter offsets directly and via the}] \leavevmode Axes.ticklabel\_format() method, and add that to pyplot. -EF \end{description} 2010-04-16 Add a close\_event to the backends. -RM 2010-04-06 modify axes\_grid examples to use axes\_grid1 and axisartist. -JJL 2010-04-06 rebase axes\_grid using axes\_grid1 and axisartist modules. -JJL \begin{description} \item[{2010-04-06 axes\_grid toolkit is splitted into two separate modules,}] \leavevmode axes\_grid1 and axisartist. -JJL \item[{2010-04-05 Speed up import: import pytz only if and when it is}] \leavevmode needed. It is not needed if the rc timezone is UTC. - EF \item[{2010-04-03 Added color kwarg to Axes.hist(), based on work by}] \leavevmode Jeff Klukas. - EF \item[{2010-03-24 refactor colorbar code so that no cla() is necessary when}] \leavevmode mappable is changed. -JJL \item[{2010-03-22 fix incorrect rubber band during the zoom mode when mouse}] \leavevmode leaves the axes. -JJL \end{description} 2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL 2010-03-20 Added pyplot.sca() function suggested by JJL. - EF 2010-03-20 Added conditional support for new Tooltip API in gtk backend. - EF \begin{description} \item[{2010-03-20 Changed plt.fig\_subplot() to plt.subplots() after discussion on}] \leavevmode list, and changed its API to return axes as a numpy object array (with control of dimensions via squeeze keyword). FP. \end{description} 2010-03-13 Manually brought in commits from branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8191} \PYG{o}{\textbar{}} \PYG{n}{leejjoon} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{13} \PYG{l+m+mi}{17}\PYG{p}{:}\PYG{l+m+mi}{27}\PYG{p}{:}\PYG{l+m+mi}{57} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0500} \PYG{p}{(}\PYG{n}{Sat}\PYG{p}{,} \PYG{l+m+mi}{13} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \PYG{n}{fix} \PYG{n}{the} \PYG{n}{bug} \PYG{n}{that} \PYG{n}{handles} \PYG{k}{for} \PYG{n}{scatter} \PYG{n}{are} \PYG{n}{incorrectly} \PYG{n+nb}{set} \PYG{n}{when} \PYG{n}{dpi}\PYG{o}{!=}\PYG{l+m+mf}{72.} \PYG{n}{Thanks} \PYG{n}{to} \PYG{n}{Ray} \PYG{n}{Speth} \PYG{k}{for} \PYG{n}{the} \PYG{n}{bug} \PYG{n}{report}\PYG{o}{.} \end{sphinxVerbatim} 2010-03-03 Manually brought in commits from branch via diff/patch (svnmerge is broken): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8175} \PYG{o}{\textbar{}} \PYG{n}{leejjoon} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03} \PYG{l+m+mi}{10}\PYG{p}{:}\PYG{l+m+mi}{03}\PYG{p}{:}\PYG{l+m+mi}{30} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0800} \PYG{p}{(}\PYG{n}{Wed}\PYG{p}{,} \PYG{l+m+mi}{03} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \PYG{n}{fix} \PYG{n}{arguments} \PYG{n}{of} \PYG{n}{allow\PYGZus{}rasterization}\PYG{o}{.}\PYG{n}{draw\PYGZus{}wrapper} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8174} \PYG{o}{\textbar{}} \PYG{n}{jdh2358} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03} \PYG{l+m+mi}{09}\PYG{p}{:}\PYG{l+m+mi}{15}\PYG{p}{:}\PYG{l+m+mi}{58} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0800} \PYG{p}{(}\PYG{n}{Wed}\PYG{p}{,} \PYG{l+m+mi}{03} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \PYG{n}{added} \PYG{n}{support} \PYG{k}{for} \PYG{n}{favicon} \PYG{o+ow}{in} \PYG{n}{docs} \PYG{n}{build} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8173} \PYG{o}{\textbar{}} \PYG{n}{jdh2358} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03} \PYG{l+m+mi}{08}\PYG{p}{:}\PYG{l+m+mi}{56}\PYG{p}{:}\PYG{l+m+mi}{16} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0800} \PYG{p}{(}\PYG{n}{Wed}\PYG{p}{,} \PYG{l+m+mi}{03} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \PYG{n}{applied} \PYG{n}{Mattias} \PYG{n}{get\PYGZus{}bounds} \PYG{n}{patch} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8172} \PYG{o}{\textbar{}} \PYG{n}{jdh2358} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03} \PYG{l+m+mi}{08}\PYG{p}{:}\PYG{l+m+mi}{31}\PYG{p}{:}\PYG{l+m+mi}{42} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0800} \PYG{p}{(}\PYG{n}{Wed}\PYG{p}{,} \PYG{l+m+mi}{03} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \PYG{n}{fix} \PYG{n}{svnmerge} \PYG{n}{download} \PYG{n}{instructions} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{r8171} \PYG{o}{\textbar{}} \PYG{n}{jdh2358} \PYG{o}{\textbar{}} \PYG{l+m+mi}{2010}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{03} \PYG{l+m+mi}{07}\PYG{p}{:}\PYG{l+m+mi}{47}\PYG{p}{:}\PYG{l+m+mi}{48} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{0800} \PYG{p}{(}\PYG{n}{Wed}\PYG{p}{,} \PYG{l+m+mi}{03} \PYG{n}{Mar} \PYG{l+m+mi}{2010}\PYG{p}{)} \PYG{o}{\textbar{}} \PYG{l+m+mi}{1} \PYG{n}{line} \end{sphinxVerbatim} 2010-02-25 add annotation\_demo3.py that demonstrates new functionality. -JJL \begin{description} \item[{2010-02-25 refactor Annotation to support arbitrary Transform as xycoords}] \leavevmode or textcoords. Also, if a tuple of two coordinates is provided, they are interpreted as coordinates for each x and y position. -JJL \item[{2010-02-24 Added pyplot.fig\_subplot(), to create a figure and a group of}] \leavevmode subplots in a single call. This offers an easier pattern than manually making figures and calling add\_subplot() multiple times. FP \item[{2010-02-17 Added Gokhan's and Mattias' customizable keybindings patch}] \leavevmode for the toolbar. You can now set the keymap.* properties in the matplotlibrc file. Newbindings were added for toggling log scaling on the x-axis. JDH \item[{2010-02-16 Committed TJ's filled marker patch for}] \leavevmode left\textbar{}right\textbar{}bottom\textbar{}top\textbar{}full filled markers. See examples/pylab\_examples/filledmarker\_demo.py. JDH \item[{2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap}] \leavevmode estimates of median confidence intervals. Based on an initial patch by Paul Hobson. - ADS \item[{2010-02-06 Added setup.cfg "basedirlist" option to override setting}] \leavevmode in setupext.py "basedir" dictionary; added "gnu0" platform requested by Benjamin Drung. - EF \end{description} 2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF \begin{description} \item[{2010-02-03 Made plot\_directive use a custom PlotWarning category, so that}] \leavevmode warnings can be turned into fatal errors easily if desired. - FP \item[{2010-01-29 Added draggable method to Legend to allow mouse drag}] \leavevmode placement. Thanks Adam Fraser. JDH \item[{2010-01-25 Fixed a bug reported by Olle Engdegard, when using}] \leavevmode histograms with stepfilled and log=True - MM \end{description} 2010-01-16 Upgraded CXX to 6.1.1 - JDH \begin{description} \item[{2009-01-16 Don't create minor ticks on top of existing major}] \leavevmode ticks. Patch by Neil Crighton. -ADS \item[{2009-01-16 Ensure three minor ticks always drawn (SF\# 2924245). Patch}] \leavevmode by Neil Crighton. -ADS \item[{2010-01-16 Applied patch by Ian Thomas to fix two contouring}] \leavevmode problems: now contourf handles interior masked regions, and the boundaries of line and filled contours coincide. - EF \item[{2009-01-11 The color of legend patch follows the rc parameters}] \leavevmode axes.facecolor and axes.edgecolor. -JJL \item[{2009-01-11 adjustable of Axes can be "box-forced" which allow}] \leavevmode sharing axes. -JJL \item[{2009-01-11 Add add\_click and pop\_click methods in}] \leavevmode BlockingContourLabeler. -JJL \end{description} 2010-01-03 Added rcParams{[}'axes.color\_cycle'{]} - EF 2010-01-03 Added Pierre's qt4 formlayout editor and toolbar button - JDH \begin{description} \item[{2009-12-31 Add support for using math text as marker symbols (Thanks to tcb)}] \leavevmode\begin{itemize} \item {} MGD \end{itemize} \end{description} 2009-12-31 Commit a workaround for a regression in PyQt4-4.6.\{0,1\} - DSD 2009-12-22 Fix cmap data for gist\_earth\_r, etc. -JJL \begin{description} \item[{2009-12-20 spines: put spines in data coordinates, add set\_bounds()}] \leavevmode call. -ADS \item[{2009-12-18 Don't limit notch size in boxplot to q1-q3 range, as this}] \leavevmode is effectively making the data look better than it is. - ADS \item[{2009-12-18 mlab.prctile handles even-length data, such that the median}] \leavevmode is the mean of the two middle values. - ADS \end{description} 2009-12-15 Add raw-image (unsampled) support for the ps backend. - JJL \begin{description} \item[{2009-12-14 Add patch\_artist kwarg to boxplot, but keep old default.}] \leavevmode Convert boxplot\_demo2.py to use the new patch\_artist. - ADS \item[{2009-12-06 axes\_grid: reimplemented AxisArtist with FloatingAxes support.}] \leavevmode Added new examples. - JJL \item[{2009-12-01 Applied Laurent Dufrechou's patch to improve blitting with}] \leavevmode the qt4 backend - DSD \item[{2009-11-13 The pdf backend now allows changing the contents of}] \leavevmode a pdf file's information dictionary via PdfPages.infodict. - JKS \item[{2009-11-12 font\_manager.py should no longer cause EINTR on Python 2.6}] \leavevmode (but will on the 2.5 version of subprocess). Also the fc-list command in that file was fixed so now it should actually find the list of fontconfig fonts. - JKS \item[{2009-11-10 Single images, and all images in renderers with}] \leavevmode option\_image\_nocomposite (i.e. agg, macosx and the svg backend when rcParams{[}'svg.image\_noscale'{]} is True), are now drawn respecting the zorder relative to other artists. (Note that there may now be inconsistencies across backends when more than one image is drawn at varying zorders, but this change introduces correct behavior for the backends in which it's easy to do so.) \item[{2009-10-21 Make AutoDateLocator more configurable by adding options}] \leavevmode to control the maximum and minimum number of ticks. Also add control of the intervals to be used for ticking. This does not change behavior but opens previously hard-coded behavior to runtime modification{}`. - RMM \item[{2009-10-19 Add "path\_effects" support for Text and Patch. See}] \leavevmode examples/pylab\_examples/patheffect\_demo.py -JJL \item[{2009-10-19 Add "use\_clabeltext" option to clabel. If True, clabels}] \leavevmode will be created with ClabelText class, which recalculates rotation angle of the label during the drawing time. -JJL \item[{2009-10-16 Make AutoDateFormatter actually use any specified}] \leavevmode timezone setting.This was only working correctly when no timezone was specified. - RMM \end{description} 2009-09-27 Beginnings of a capability to test the pdf backend. - JKS \begin{description} \item[{2009-09-27 Add a savefig.extension rcparam to control the default}] \leavevmode filename extension used by savefig. - JKS \end{description} \bigskip\hrule\bigskip 2009-09-21 Tagged for release 0.99.1 2009-09-20 Fix usetex spacing errors in pdf backend. - JKS \begin{description} \item[{2009-09-20 Add Sphinx extension to highlight IPython console sessions,}] \leavevmode originally authored (I think) by Michael Droetboom. - FP \item[{2009-09-20 Fix off-by-one error in dviread.Tfm, and additionally protect}] \leavevmode against exceptions in case a dvi font is missing some metrics. - JKS \item[{2009-09-15 Implement draw\_text and draw\_tex method of backend\_base using}] \leavevmode the textpath module. Implement draw\_tex method of the svg backend. - JJL \end{description} 2009-09-15 Don't fail on AFM files containing floating-point bounding boxes - JKS \begin{description} \item[{2009-09-13 AxesGrid}] \leavevmode{[}add modified version of colorbar. Add colorbar{]} location howto. - JJL \item[{2009-09-07 AxesGrid}] \leavevmode{[}implemented axisline style.{]} Added a demo examples/axes\_grid/demo\_axisline\_style.py- JJL \item[{2009-09-04 Make the textpath class as a separate moduel}] \leavevmode (textpath.py). Add support for mathtext and tex.- JJL \item[{2009-09-01 Added support for Gouraud interpolated triangles.}] \leavevmode pcolormesh now accepts shading='gouraud' as an option. - MGD \item[{2009-08-29 Added matplotlib.testing package, which contains a Nose}] \leavevmode plugin and a decorator that lets tests be marked as KnownFailures - ADS \item[{2009-08-20 Added scaled dict to AutoDateFormatter for customized}] \leavevmode scales - JDH \item[{2009-08-15 Pyplot interface: the current image is now tracked at the}] \leavevmode figure and axes level, addressing tracker item 1656374. - EF \item[{2009-08-15 Docstrings are now manipulated with decorators defined}] \leavevmode in a new module, docstring.py, thanks to Jason Coombs. - EF \item[{2009-08-14 Add support for image filtering for agg back end. See the example}] \leavevmode demo\_agg\_filter.py. -JJL \item[{2009-08-09 AnnotationBbox added. Similar to Annotation, but works with}] \leavevmode OffsetBox instead of Text. See the example demo\_annotation\_box.py. -JJL \item[{2009-08-07 BboxImage implemented. Two examples, demo\_bboximage.py and}] \leavevmode demo\_ribbon\_box.py added. - JJL \item[{2009-08-07 In an effort to simplify the backend API, all clipping rectangles}] \leavevmode and paths are now passed in using GraphicsContext objects, even on collections and images. Therefore: \begin{quote} \begin{description} \item[{draw\_path\_collection(self, master\_transform, cliprect, clippath,}] \leavevmode clippath\_trans, paths, all\_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) \begin{quote} becomes: \end{quote} \item[{draw\_path\_collection(self, gc, master\_transform, paths, all\_transforms,}] \leavevmode offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls) \item[{draw\_quad\_mesh(self, master\_transform, cliprect, clippath,}] \leavevmode clippath\_trans, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) \begin{quote} becomes: \end{quote} \item[{draw\_quad\_mesh(self, gc, master\_transform, meshWidth, meshHeight,}] \leavevmode coordinates, offsets, offsetTrans, facecolors, antialiased, showedges) \end{description} draw\_image(self, x, y, im, bbox, clippath=None, clippath\_trans=None) \begin{quote} becomes: \end{quote} draw\_image(self, gc, x, y, im) \end{quote} \begin{itemize} \item {} MGD \end{itemize} \end{description} 2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH \begin{itemize} \item {} fixed an alpha colormapping bug posted on sf 2832575 \item {} fix typo in axes\_divider.py. use nanmin, nanmax in angle\_helper.py (patch by Christoph Gohlke) \item {} remove dup gui event in enter/leave events in gtk \item {} lots of fixes for os x binaries (Thanks Russell Owen) \item {} attach gtk events to mpl events -- fixes sf bug 2816580 \item {} applied sf patch 2815064 (middle button events for wx) and patch 2818092 (resize events for wx) \item {} fixed boilerplate.py so it doesn't break the ReST docs. \item {} removed a couple of cases of mlab.load \item {} fixed rec2csv win32 file handle bug from sf patch 2831018 \item {} added two examples from Josh Hemann: examples/pylab\_examples/barchart\_demo2.py and examples/pylab\_examples/boxplot\_demo2.py \item {} handled sf bugs 2831556 and 2830525; better bar error messages and backend driver configs \item {} added miktex win32 patch from sf patch 2820194 \item {} apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel \end{itemize} \begin{description} \item[{2009-08-04 Made cbook.get\_sample\_data make use of the ETag and Last-Modified}] \leavevmode headers of mod\_dav\_svn. - JKS \item[{2009-08-03 Add PathCollection; modify contourf to use complex}] \leavevmode paths instead of simple paths with cuts. - EF \end{description} 2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS \begin{description} \item[{2009-08-03 pylab no longer provides a load and save function. These}] \leavevmode are available in matplotlib.mlab, or you can use numpy.loadtxt and numpy.savetxt for text files, or np.save and np.load for binary numpy arrays. - JDH \item[{2009-07-31 Added cbook.get\_sample\_data for urllib enabled fetching and}] \leavevmode cacheing of data needed for examples. See examples/misc/sample\_data\_demo.py - JDH \end{description} 2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD \begin{description} \item[{2009-07-30 Add set\_cmap and register\_cmap, and improve get\_cmap,}] \leavevmode to provide convenient handling of user-generated colormaps. Reorganized \_cm and cm modules. - EF \end{description} 2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF 2009-07-27 Simplify argument handling code for plot method. -EF 2009-07-25 Allow "plot(1, 2, 'r*')" to work. - EF \begin{description} \item[{2009-07-22 Added an 'interp' keyword to griddata so the faster linear}] \leavevmode interpolation method can be chosen. Default is 'nn', so default behavior (using natural neighbor method) is unchanged (JSW) \item[{2009-07-22 Improved boilerplate.py so that it generates the correct}] \leavevmode signatures for pyplot functions. - JKS \item[{2009-07-19 Fixed the docstring of Axes.step to reflect the correct}] \leavevmode meaning of the kwargs "pre" and "post" - See SF bug \sphinxurl{https://sourceforge.net/tracker/index.php?func=detail\&aid=2823304\&group\_id=80706\&atid=560720} - JDH \item[{2009-07-18 Fix support for hatches without color fills to pdf and svg}] \leavevmode backends. Add an example of that to hatch\_demo.py. - JKS \end{description} 2009-07-17 Removed fossils from swig version of agg backend. - EF 2009-07-14 initial submission of the annotation guide. -JJL \begin{description} \item[{2009-07-14 axes\_grid}] \leavevmode{[}minor improvements in anchored\_artists and{]} inset\_locator. -JJL \item[{2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add}] \leavevmode ConnectionPatch class. -JJL \item[{2009-07-11 Added a fillstyle Line2D property for half filled markers}] \leavevmode -- see examples/pylab\_examples/fillstyle\_demo.py JDH \item[{2009-07-08 Attempt to improve performance of qt4 backend, do not call}] \leavevmode qApp.processEvents while processing an event. Thanks Ole Streicher for tracking this down - DSD \item[{2009-06-24 Add withheader option to mlab.rec2csv and changed}] \leavevmode use\_mrecords default to False in mlab.csv2rec since this is partially broken - JDH \item[{2009-06-24 backend\_agg.draw\_marker quantizes the main path (as in the}] \leavevmode draw\_path). - JJL \end{description} 2009-06-24 axes\_grid: floating axis support added. - JJL \begin{description} \item[{2009-06-14 Add new command line options to backend\_driver.py to support}] \leavevmode running only some directories of tests - JKS \end{description} 2009-06-13 partial cleanup of mlab and its importation in pylab - EF \begin{description} \item[{2009-06-13 Introduce a rotation\_mode property for the Text artist. See}] \leavevmode examples/pylab\_examples/demo\_text\_rotation\_mode.py -JJL \item[{2009-06-07 add support for bz2 files per sf support request 2794556 -}] \leavevmode JDH \item[{2009-06-06 added a properties method to the artist and inspector to}] \leavevmode return a dict mapping property name -\textgreater{} value; see sf feature request 2792183 - JDH \end{description} 2009-06-06 added Neil's auto minor tick patch; sf patch \#2789713 - JDH \begin{description} \item[{2009-06-06 do not apply alpha to rgba color conversion if input is}] \leavevmode already rgba - JDH \item[{2009-06-03 axes\_grid}] \leavevmode{[}Initial check-in of curvelinear grid support. See{]} examples/axes\_grid/demo\_curvelinear\_grid.py - JJL \end{description} 2009-06-01 Add set\_color method to Patch - EF 2009-06-01 Spine is now derived from Patch - ADS 2009-06-01 use cbook.is\_string\_like() instead of isinstance() for spines - ADS 2009-06-01 cla() support for spines - ADS 2009-06-01 Removed support for gtk \textless{} 2.4. - EF \begin{description} \item[{2009-05-29 Improved the animation\_blit\_qt4 example, which was a mix}] \leavevmode of the object-oriented and pylab interfaces. It is now strictly object-oriented - DSD \end{description} 2009-05-28 Fix axes\_grid toolkit to work with spine patch by ADS. - JJL \begin{description} \item[{2009-05-28 Applied fbianco's patch to handle scroll wheel events in}] \leavevmode the qt4 backend - DSD \end{description} 2009-05-26 Add support for "axis spines" to have arbitrary location. -ADS \begin{description} \item[{2009-05-20 Add an empty matplotlibrc to the tests/ directory so that running}] \leavevmode tests will use the default set of rcparams rather than the user's config. - RMM \item[{2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid}] \leavevmode on major and minor ticks. -ADS \item[{2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided}] \leavevmode versions, like specgram() (SF \#2791686) - RMM \item[{2009-05-18 Fix the linespacing bug of multiline text (\#1239682). See}] \leavevmode examples/pylab\_examples/multiline.py -JJL \item[{2009-05-18 Add \sphinxstyleemphasis{annotation\_clip} attr. for text.Annotation class.}] \leavevmode If True, annotation is only drawn when the annotated point is inside the axes area. -JJL \item[{2009-05-17 Fix bug(\#2749174) that some properties of minor ticks are}] \leavevmode not conserved -JJL \item[{2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event}] \leavevmode loop in setupext for pygtk\textgreater{}=2.15.10 - JDH \item[{2009-05-17 applied Michiel's sf patch 2792742 to speed up Cairo and}] \leavevmode macosx collections; speedups can be 20x. Also fixes some bugs in which gc got into inconsistent state \end{description} \bigskip\hrule\bigskip 2008-05-17 Release 0.98.5.3 at r7107 from the branch - JDH \begin{description} \item[{2009-05-13 An optional offset and bbox support in restore\_bbox.}] \leavevmode Add animation\_blit\_gtk2.py. -JJL \item[{2009-05-13 psfrag in backend\_ps now uses baseline-alignment}] \leavevmode when preview.sty is used ((default is bottom-alignment). Also, a small api imporvement in OffsetBox-JJL \item[{2009-05-13 When the x-coordinate of a line is monotonically}] \leavevmode increasing, it is now automatically clipped at the stage of generating the transformed path in the draw method; this greatly speeds up zooming and panning when one is looking at a short segment of a long time series, for example. - EF \end{description} 2009-05-11 aspect=1 in log-log plot gives square decades. -JJL \begin{description} \item[{2009-05-08 clabel takes new kwarg, rightside\_up; if False, labels}] \leavevmode will not be flipped to keep them rightside-up. This allows the use of clabel to make streamfunction arrows, as requested by Evan Mason. - EF \item[{2009-05-07 'labelpad' can now be passed when setting x/y labels. This}] \leavevmode allows controlling the spacing between the label and its axis. - RMM \item[{2009-05-06 print\_ps now uses mixed-mode renderer. Axes.draw rasterize}] \leavevmode artists whose zorder smaller than rasterization\_zorder. -JJL \end{description} 2009-05-06 Per-artist Rasterization, originally by Eric Bruning. -JJ \begin{description} \item[{2009-05-05 Add an example that shows how to make a plot that updates}] \leavevmode using data from another process. Thanks to Robert Cimrman - RMM \end{description} 2009-05-05 Add Axes.get\_legend\_handles\_labels method. - JJL \begin{description} \item[{2009-05-04 Fix bug that Text.Annotation is still drawn while set to}] \leavevmode not visible. - JJL \end{description} 2009-05-04 Added TJ's fill\_betweenx patch - JDH \begin{description} \item[{2009-05-02 Added options to plotfile based on question from}] \leavevmode Joseph Smidt and patch by Matthias Michler. - EF \item[{2009-05-01 Changed add\_artist and similar Axes methods to}] \leavevmode return their argument. - EF \end{description} 2009-04-30 Incorrect eps bbox for landscape mode fixed - JJL 2009-04-28 Fixed incorrect bbox of eps output when usetex=True. - JJL \begin{description} \item[{2009-04-24 Changed use of os.open* to instead use subprocess.Popen.}] \leavevmode os.popen* are deprecated in 2.6 and are removed in 3.0. - RMM \item[{2009-04-20 Worked on axes\_grid documentation. Added}] \leavevmode axes\_grid.inset\_locator. - JJL \end{description} 2009-04-17 Initial check-in of the axes\_grid toolkit. - JJL \begin{description} \item[{2009-04-17 Added a support for bbox\_to\_anchor in}] \leavevmode offsetbox.AnchoredOffsetbox. Improved a documentation. - JJL \item[{2009-04-16 Fixed a offsetbox bug that multiline texts are not}] \leavevmode correctly aligned. - JJL \item[{2009-04-16 Fixed a bug in mixed mode renderer that images produced by}] \leavevmode an rasterizing backend are placed with incorrect size. - JJL \item[{2009-04-14 Added Jonathan Taylor's Reinier Heeres' port of John}] \leavevmode Porters' mplot3d to svn trunk. Package in mpl\_toolkits.mplot3d and demo is examples/mplot3d/demo.py. Thanks Reiner \item[{2009-04-06 The pdf backend now escapes newlines and linefeeds in strings.}] \leavevmode Fixes sf bug \#2708559; thanks to Tiago Pereira for the report. \item[{2009-04-06 texmanager.make\_dvi now raises an error if LaTeX failed to}] \leavevmode create an output file. Thanks to Joao Luis Silva for reporting this. - JKS \item[{2009-04-05 \_png.read\_png() reads 12 bit PNGs (patch from}] \leavevmode Tobias Wood) - ADS \item[{2009-04-04 Allow log axis scale to clip non-positive values to}] \leavevmode small positive value; this is useful for errorbars. - EF \item[{2009-03-28 Make images handle nan in their array argument.}] \leavevmode A helper, cbook.safe\_masked\_invalid() was added. - EF \end{description} 2009-03-25 Make contour and contourf handle nan in their Z argument. - EF \begin{description} \item[{2009-03-20 Add AuxTransformBox in offsetbox.py to support some transformation.}] \leavevmode anchored\_text.py example is enhanced and renamed (anchored\_artists.py). - JJL \end{description} 2009-03-20 Add "bar" connection style for annotation - JJL \begin{description} \item[{2009-03-17 Fix bugs in edge color handling by contourf, found}] \leavevmode by Jae-Joon Lee. - EF \item[{2009-03-14 Added 'LightSource' class to colors module for}] \leavevmode creating shaded relief maps. shading\_example.py added to illustrate usage. - JSW \item[{2009-03-11 Ensure wx version \textgreater{}= 2.8; thanks to Sandro Tosi and}] \leavevmode Chris Barker. - EF \end{description} 2009-03-10 Fix join style bug in pdf. - JKS 2009-03-07 Add pyplot access to figure number list - EF 2009-02-28 hashing of FontProperties accounts current rcParams - JJL 2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF 2009-02-26 Add optional bbox\_to\_anchor argument for legend class - JJL 2009-02-26 Support image clipping in pdf backend. - JKS 2009-02-25 Improve tick location subset choice in FixedLocator. - EF \begin{description} \item[{2009-02-24 Deprecate numerix, and strip out all but the numpy}] \leavevmode part of the code. - EF \item[{2009-02-21 Improve scatter argument handling; add an early error}] \leavevmode message, allow inputs to have more than one dimension. - EF \item[{2009-02-16 Move plot\_directive.py to the installed source tree. Add}] \leavevmode support for inline code content - MGD \item[{2009-02-16 Move mathmpl.py to the installed source tree so it is}] \leavevmode available to other projects. - MGD \end{description} 2009-02-14 Added the legend title support - JJL \begin{description} \item[{2009-02-10 Fixed a bug in backend\_pdf so it doesn't break when the setting}] \leavevmode pdf.use14corefonts=True is used. Added test case in unit/test\_pdf\_use14corefonts.py. - NGR \item[{2009-02-08 Added a new imsave function to image.py and exposed it in}] \leavevmode the pyplot interface - GR \item[{2009-02-04 Some reorgnization of the legend code. anchored\_text.py}] \leavevmode added as an example. - JJL \end{description} 2009-02-04 Add extent keyword arg to hexbin - ADS 2009-02-04 Fix bug in mathtext related to dots and ldots - MGD 2009-02-03 Change default joinstyle to round - MGD 2009-02-02 Reduce number of marker XObjects in pdf output - JKS 2009-02-02 Change default resolution on polar plot to 1 - MGD \begin{description} \item[{2009-02-02 Avoid malloc errors in ttconv for fonts that don't have}] \leavevmode e.g., PostName (a version of Tahoma triggered this) - JKS \item[{2009-01-30 Remove support for pyExcelerator in exceltools -- use xlwt}] \leavevmode instead - JDH \item[{2009-01-29 Document 'resolution' kwarg for polar plots. Support it}] \leavevmode when using pyplot.polar, not just Figure.add\_axes. - MGD \item[{2009-01-29 Rework the nan-handling/clipping/quantizing/simplification}] \leavevmode framework so each is an independent part of a pipeline. Expose the C++-implementation of all of this so it can be used from all Python backends. Add rcParam "path.simplify\_threshold" to control the threshold of similarity below which vertices will be removed. \end{description} 2009-01-26 Improved tight bbox option of the savefig. - JJL 2009-01-26 Make curves and NaNs play nice together - MGD \begin{description} \item[{2009-01-21 Changed the defaults of acorr and xcorr to use}] \leavevmode usevlines=True, maxlags=10 and normed=True since these are the best defaults \end{description} 2009-01-19 Fix bug in quiver argument handling. - EF 2009-01-19 Fix bug in backend\_gtk: don't delete nonexistent toolbar. - EF \begin{description} \item[{2009-01-16 Implement bbox\_inches option for savefig. If bbox\_inches is}] \leavevmode "tight", try to determine the tight bounding box. - JJL \item[{2009-01-16 Fix bug in is\_string\_like so it doesn't raise an}] \leavevmode unnecessary exception. - EF \item[{2009-01-16 Fix an infinite recursion in the unit registry when searching}] \leavevmode for a converter for a sequence of strings. Add a corresponding test. - RM \item[{2009-01-16 Bugfix of C typedef of MPL\_Int64 that was failing on}] \leavevmode Windows XP 64 bit, as reported by George Goussard on numpy mailing list. - ADS \item[{2009-01-16 Added helper function LinearSegmentedColormap.from\_list to}] \leavevmode facilitate building simple custom colomaps. See examples/pylab\_examples/custom\_cmap\_fromlist.py - JDH \item[{2009-01-16 Applied Michiel's patch for macosx backend to fix rounding}] \leavevmode bug. Closed sf bug 2508440 - JSW \item[{2009-01-10 Applied Michiel's hatch patch for macosx backend and}] \leavevmode draw\_idle patch for qt. Closes sf patched 2497785 and 2468809 - JDH \end{description} 2009-01-10 Fix bug in pan/zoom with log coordinates. - EF 2009-01-06 Fix bug in setting of dashed negative contours. - EF 2009-01-06 Be fault tolerant when len(linestyles)\textgreater{}NLev in contour. - MM \begin{description} \item[{2009-01-06 Added marginals kwarg to hexbin to plot marginal densities}] \leavevmode JDH \item[{2009-01-06 Change user-visible multipage pdf object to PdfPages to}] \leavevmode avoid accidents with the file-like PdfFile. - JKS \end{description} 2009-01-05 Fix a bug in pdf usetex: allow using non-embedded fonts. - JKS 2009-01-05 optional use of preview.sty in usetex mode. - JJL 2009-01-02 Allow multipage pdf files. - JKS \begin{description} \item[{2008-12-31 Improve pdf usetex by adding support for font effects}] \leavevmode (slanting and extending). - JKS \item[{2008-12-29 Fix a bug in pdf usetex support, which occurred if the same}] \leavevmode Type-1 font was used with different encodings, e.g., with Minion Pro and MnSymbol. - JKS \end{description} 2008-12-20 fix the dpi-dependent offset of Shadow. - JJL \begin{description} \item[{2008-12-20 fix the hatch bug in the pdf backend. minor update}] \leavevmode in docs and example - JJL \item[{2008-12-19 Add axes\_locator attribute in Axes. Two examples are added.}] \leavevmode\begin{itemize} \item {} JJL \end{itemize} \item[{2008-12-19 Update Axes.legend documnetation. /api/api\_changes.rst is also}] \leavevmode updated to describe chages in keyword parameters. Issue a warning if old keyword parameters are used. - JJL \end{description} 2008-12-18 add new arrow style, a line + filled triangles. -JJL \bigskip\hrule\bigskip \begin{description} \item[{2008-12-18 Re-Released 0.98.5.2 from v0\_98\_5\_maint at r6679}] \leavevmode Released 0.98.5.2 from v0\_98\_5\_maint at r6667 \end{description} 2008-12-18 Removed configobj, experimental traits and doc/mpl\_data link - JDH \begin{description} \item[{2008-12-18 Fix bug where a line with NULL data limits prevents}] \leavevmode subsequent data limits from calculating correctly - MGD \end{description} 2008-12-17 Major documentation generator changes - MGD \begin{description} \item[{2008-12-17 Applied macosx backend patch with support for path}] \leavevmode collections, quadmesh, etc... - JDH \item[{2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate}] \leavevmode -JJL \item[{2008-12-17 Add group id support in artist. Two examples which}] \leavevmode demostrate svg filter are added. -JJL \end{description} 2008-12-16 Another attempt to fix dpi-dependent behavior of Legend. -JJL 2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text. \begin{description} \item[{2008-12-16 Added markevery property to Line2D to support subsampling}] \leavevmode of markers - JDH \item[{2008-12-15 Removed mpl\_data symlink in docs. On platforms that do not}] \leavevmode support symlinks, these become copies, and the font files are large, so the distro becomes unneccessarily bloaded. Keeping the mpl\_examples dir because relative links are harder for the plot directive and the *.py files are not so large. - JDH \item[{2008-12-15 Fix \$ in non-math text with usetex off. Document}] \leavevmode differences between usetex on/off - MGD \end{description} 2008-12-15 Fix anti-aliasing when auto-snapping - MGD 2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD \begin{description} \item[{2008-12-12 Preparations to eliminate maskedarray rcParams key: its}] \leavevmode use will now generate a warning. Similarly, importing the obsolote numerix.npyma will generate a warning. - EF \item[{2008-12-12 Added support for the numpy.histogram() weights parameter}] \leavevmode to the axes hist() method. Docs taken from numpy - MM \end{description} 2008-12-12 Fixed warning in hist() with numpy 1.2 - MM \begin{description} \item[{2008-12-12 Removed external packages: configobj and enthought.traits}] \leavevmode which are only required by the experimental traited config and are somewhat out of date. If needed, install them independently, see: \sphinxurl{http://code.enthought.com/pages/traits.html} and: \sphinxurl{http://www.voidspace.org.uk/python/configobj.html} \item[{2008-12-12 Added support to asign labels to histograms of multiple}] \leavevmode data. - MM \end{description} \bigskip\hrule\bigskip 2008-12-11 Released 0.98.5 at svn r6573 \begin{description} \item[{2008-12-11 Use subprocess.Popen instead of os.popen in dviread}] \leavevmode (Windows problem reported by Jorgen Stenarson) - JKS \item[{2008-12-10 Added Michael's font\_manager fix and Jae-Joon's}] \leavevmode figure/subplot fix. Bumped version number to 0.98.5 - JDH \end{description} \bigskip\hrule\bigskip 2008-12-09 Released 0.98.4 at svn r6536 2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH \begin{description} \item[{2008-12-08 Removed the prints in the set\_*style commands. Return the}] \leavevmode list of pprinted strings instead - JDH \item[{2008-12-08 Some of the changes Michael made to improve the output of}] \leavevmode the property tables in the rest docs broke of made difficult to use some of the interactive doc helpers, e.g., setp and getp. Having all the rest markup in the ipython shell also confused the docstrings. I added a new rc param docstring.harcopy, to format the docstrings differently for hardcopy and other use. Ther ArtistInspector could use a little refactoring now since there is duplication of effort between the rest out put and the non-rest output - JDH \item[{2008-12-08 Updated spectral methods (psd, csd, etc.) to scale one-sided}] \leavevmode densities by a factor of 2 and, optionally, scale all densities by the sampling frequency. This gives better MatLab compatibility. -RM \end{description} 2008-12-08 Fixed alignment of ticks in colorbars. -MGD \begin{description} \item[{2008-12-07 drop the deprecated "new" keyword of np.histogram() for}] \leavevmode numpy 1.2 or later. -JJL \item[{2008-12-06 Fixed a bug in svg backend that new\_figure\_manager()}] \leavevmode ignores keywords arguments such as figsize, etc. -JJL \item[{2008-12-05 Fixed a bug that the handlelength of the new legend class}] \leavevmode set too short when numpoints=1 -JJL \item[{2008-12-04 Added support for data with units (e.g., dates) to}] \leavevmode Axes.fill\_between. -RM \item[{2008-12-04 Added fancybox keyword to legend. Also applied some changes}] \leavevmode for better look, including baseline adjustment of the multiline texts so that it is center aligned. -JJL \item[{2008-12-02 The transmuter classes in the patches.py are reorganized as}] \leavevmode subclasses of the Style classes. A few more box and arrow styles are added. -JJL \item[{2008-12-02 Fixed a bug in the new legend class that didn't allowed}] \leavevmode a tuple of coordinate vlaues as loc. -JJL \item[{2008-12-02 Improve checks for external dependencies, using subprocess}] \leavevmode (instead of deprecated popen*) and distutils (for version checking) - DSD \item[{2008-11-30 Reimplementation of the legend which supports baseline alignement,}] \leavevmode multi-column, and expand mode. - JJL \item[{2008-12-01 Fixed histogram autoscaling bug when bins or range are given}] \leavevmode explicitly (fixes Debian bug 503148) - MM \item[{2008-11-25 Added rcParam axes.unicode\_minus which allows plain hypen}] \leavevmode for minus when False - JDH \item[{2008-11-25 Added scatterpoints support in Legend. patch by Erik}] \leavevmode Tollerud - JJL \end{description} 2008-11-24 Fix crash in log ticking. - MGD \begin{description} \item[{2008-11-20 Added static helper method BrokenHBarCollection.span\_where}] \leavevmode and Axes/pyplot method fill\_between. See examples/pylab/fill\_between.py - JDH \item[{2008-11-12 Add x\_isdata and y\_isdata attributes to Artist instances,}] \leavevmode and use them to determine whether either or both coordinates are used when updating dataLim. This is used to fix autoscaling problems that had been triggered by axhline, axhspan, axvline, axvspan. - EF \item[{2008-11-11 Update the psd(), csd(), cohere(), and specgram() methods}] \leavevmode of Axes and the csd() cohere(), and specgram() functions in mlab to be in sync with the changes to psd(). In fact, under the hood, these all call the same core to do computations. - RM \item[{2008-11-11 Add 'pad\_to' and 'sides' parameters to mlab.psd() to}] \leavevmode allow controlling of zero padding and returning of negative frequency components, respecitively. These are added in a way that does not change the API. - RM \item[{2008-11-10 Fix handling of c kwarg by scatter; generalize}] \leavevmode is\_string\_like to accept numpy and numpy.ma string array scalars. - RM and EF \item[{2008-11-09 Fix a possible EINTR problem in dviread, which might help}] \leavevmode when saving pdf files from the qt backend. - JKS \end{description} 2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD \begin{description} \item[{2008-10-24 Added Jae Joon's fancy arrow, box and annotation}] \leavevmode enhancements -- see examples/pylab\_examples/annotation\_demo2.py \end{description} 2008-10-23 Autoscaling is now supported with shared axes - EF 2008-10-23 Fixed exception in dviread that happened with Minion - JKS \begin{description} \item[{2008-10-21 set\_xlim, ylim now return a copy of the viewlim array to}] \leavevmode avoid modify inplace surprises \item[{2008-10-20 Added image thumbnail generating function}] \leavevmode matplotlib.image.thumbnail. See examples/misc/image\_thumbnail.py - JDH \item[{2008-10-20 Applied scatleg patch based on ideas and work by Erik}] \leavevmode Tollerud and Jae-Joon Lee. - MM \item[{2008-10-11 Fixed bug in pdf backend: if you pass a file object for}] \leavevmode output instead of a filename, e.g., in a wep app, we now flush the object at the end. - JKS \end{description} 2008-10-08 Add path simplification support to paths with gaps. - EF \begin{description} \item[{2008-10-05 Fix problem with AFM files that don't specify the font's}] \leavevmode full name or family name. - JKS \item[{2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel\_format() method,}] \leavevmode for easy access to the set\_powerlimits method of the major ScalarFormatter. - EF \item[{2008-10-04 Experimental new kwarg borderpad to replace pad in legend,}] \leavevmode based on suggestion by Jae-Joon Lee. - EF \item[{2008-09-27 Allow spy to ignore zero values in sparse arrays, based}] \leavevmode on patch by Tony Yu. Also fixed plot to handle empty data arrays, and fixed handling of markers in figlegend. - EF \item[{2008-09-24 Introduce drawstyles for lines. Transparently split linestyles}] \leavevmode like 'steps--' into drawstyle 'steps' and linestyle '--'. Legends always use drawstyle 'default'. - MM \item[{2008-09-18 Fixed quiver and quiverkey bugs (failure to scale properly}] \leavevmode when resizing) and added additional methods for determining the arrow angles - EF \end{description} 2008-09-18 Fix polar interpolation to handle negative values of theta - MGD \begin{description} \item[{2008-09-14 Reorganized cbook and mlab methods related to numerical}] \leavevmode calculations that have little to do with the goals of those two modules into a separate module numerical\_methods.py Also, added ability to select points and stop point selection with keyboard in ginput and manual contour labeling code. Finally, fixed contour labeling bug. - DMK \end{description} 2008-09-11 Fix backtick in Postscript output. - MGD \begin{description} \item[{2008-09-10 {[} 2089958 {]} Path simplification for vector output backends}] \leavevmode Leverage the simplification code exposed through path\_to\_polygons to simplify certain well-behaved paths in the vector backends (PDF, PS and SVG). "path.simplify" must be set to True in matplotlibrc for this to work. - MGD \item[{2008-09-10 Add "filled" kwarg to Path.intersects\_path and}] \leavevmode Path.intersects\_bbox. - MGD \item[{2008-09-07 Changed full arrows slightly to avoid an xpdf rendering}] \leavevmode problem reported by Friedrich Hagedorn. - JKS \item[{2008-09-07 Fix conversion of quadratic to cubic Bezier curves in PDF}] \leavevmode and PS backends. Patch by Jae-Joon Lee. - JKS \end{description} 2008-09-06 Added 5-point star marker to plot command - EF 2008-09-05 Fix hatching in PS backend - MGD 2008-09-03 Fix log with base 2 - MGD \begin{description} \item[{2008-09-01 Added support for bilinear interpolation in}] \leavevmode NonUniformImage; patch by Gregory Lielens. - EF \item[{2008-08-28 Added support for multiple histograms with data of}] \leavevmode different length - MM \end{description} 2008-08-28 Fix step plots with log scale - MGD 2008-08-28 Fix masked arrays with markers in non-Agg backends - MGD 2008-08-28 Fix clip\_on kwarg so it actually works correctly - MGD 2008-08-25 Fix locale problems in SVG backend - MGD 2008-08-22 fix quiver so masked values are not plotted - JSW 2008-08-18 improve interactive pan/zoom in qt4 backend on windows - DSD \begin{description} \item[{2008-08-11 Fix more bugs in NaN/inf handling. In particular, path simplification}] \leavevmode (which does not handle NaNs or infs) will be turned off automatically when infs or NaNs are present. Also masked arrays are now converted to arrays with NaNs for consistent handling of masks and NaNs - MGD and EF \end{description} \bigskip\hrule\bigskip 2008-08-03 Released 0.98.3 at svn r5947 2008-08-01 Backported memory leak fixes in \_ttconv.cpp - MGD 2008-07-31 Added masked array support to griddata. - JSW \begin{description} \item[{2008-07-26 Added optional C and reduce\_C\_function arguments to}] \leavevmode axes.hexbin(). This allows hexbin to accumulate the values of C based on the x,y coordinates and display in hexagonal bins. - ADS \item[{2008-07-24 Deprecated (raise NotImplementedError) all the mlab2}] \leavevmode functions from matplotlib.mlab out of concern that some of them were not clean room implementations. JDH \item[{2008-07-24 Rewrite of a significant portion of the clabel code (class}] \leavevmode ContourLabeler) to improve inlining. - DMK \item[{2008-07-22 Added Barbs polygon collection (similar to Quiver) for plotting}] \leavevmode wind barbs. Added corresponding helpers to Axes and pyplot as well. (examples/pylab\_examples/barb\_demo.py shows it off.) - RMM \item[{2008-07-21 Added scikits.delaunay as matplotlib.delaunay. Added griddata}] \leavevmode function in matplotlib.mlab, with example (griddata\_demo.py) in pylab\_examples. griddata function will use mpl\_toolkits.\_natgrid if installed. - JSW \item[{2008-07-21 Re-introduced offset\_copy that works in the context of the}] \leavevmode new transforms. - MGD \item[{2008-07-21 Committed patch by Ryan May to add get\_offsets and}] \leavevmode set\_offsets to Collections base class - EF \item[{2008-07-21 Changed the "asarray" strategy in image.py so that}] \leavevmode colormapping of masked input should work for all image types (thanks Klaus Zimmerman) - EF \item[{2008-07-20 Rewrote cbook.delete\_masked\_points and corresponding}] \leavevmode unit test to support rgb color array inputs, datetime inputs, etc. - EF \item[{2008-07-20 Renamed unit/axes\_unit.py to cbook\_unit.py and modified}] \leavevmode in accord with Ryan's move of delete\_masked\_points from axes to cbook. - EF \item[{2008-07-18 Check for nan and inf in axes.delete\_masked\_points().}] \leavevmode This should help hexbin and scatter deal with nans. - ADS \item[{2008-07-17 Added ability to manually select contour label locations.}] \leavevmode Also added a waitforbuttonpress function. - DMK \item[{2008-07-17 Fix bug with NaNs at end of path (thanks, Andrew Straw for}] \leavevmode the report) - MGD \item[{2008-07-16 Improve error handling in texmanager, thanks to Ian Henry}] \leavevmode for reporting - DSD \item[{2008-07-12 Added support for external backends with the}] \leavevmode "module://my\_backend" syntax - JDH \item[{2008-07-11 Fix memory leak related to shared axes. Grouper should}] \leavevmode store weak references. - MGD \end{description} 2008-07-10 Bugfix: crash displaying fontconfig pattern - MGD 2008-07-10 Bugfix: {[} 2013963 {]} update\_datalim\_bounds in Axes not works - MGD 2008-07-10 Bugfix: {[} 2014183 {]} multiple imshow() causes gray edges - MGD 2008-07-09 Fix rectangular axes patch on polar plots bug - MGD 2008-07-09 Improve mathtext radical rendering - MGD 2008-07-08 Improve mathtext superscript placement - MGD 2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD \begin{description} \item[{2008-07-03 Implemented findobj method for artist and pyplot - see}] \leavevmode examples/pylab\_examples/findobj\_demo.py - JDH \end{description} 2008-06-30 Another attempt to fix TextWithDash - DSD \begin{description} \item[{2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to}] \leavevmode have been unnecessary and caused a bug reported by P. Raybaut - DSD \end{description} 2008-06-27 Fixed tick positioning bug - MM \begin{description} \item[{2008-06-27 Fix dashed text bug where text was at the wrong end of the}] \leavevmode dash - MGD \end{description} 2008-06-26 Fix mathtext bug for expressions like \$x\_\{leftarrow\}\$ - MGD 2008-06-26 Fix direction of horizontal/vertical hatches - MGD \begin{description} \item[{2008-06-25 Figure.figurePatch renamed Figure.patch, Axes.axesPatch}] \leavevmode renamed Axes.patch, Axes.axesFrame renamed Axes.frame, Axes.get\_frame, which returns Axes.patch, is deprecated. Examples and users guide updated - JDH \end{description} 2008-06-25 Fix rendering quality of pcolor - MGD \bigskip\hrule\bigskip 2008-06-24 Released 0.98.2 at svn r5667 - (source only for debian) JDH 2008-06-24 Added "transparent" kwarg to savefig. - MGD \begin{description} \item[{2008-06-24 Applied Stefan's patch to draw a single centered marker over}] \leavevmode a line with numpoints==1 - JDH \end{description} 2008-06-23 Use splines to render circles in scatter plots - MGD \bigskip\hrule\bigskip 2008-06-22 Released 0.98.1 at revision 5637 \begin{description} \item[{2008-06-22 Removed axes3d support and replaced it with a}] \leavevmode NotImplementedError for one release cycle \end{description} 2008-06-21 fix marker placement bug in backend\_ps - DSD 2008-06-20 {[} 1978629 {]} scale documentation missing/incorrect for log - MGD \begin{description} \item[{2008-06-20 Added closed kwarg to PolyCollection. Fixes bug {[} 1994535}] \leavevmode {]} still missing lines on graph with svn (r 5548). - MGD \item[{2008-06-20 Added set/get\_closed method to Polygon; fixes error}] \leavevmode in hist - MM \item[{2008-06-19 Use relative font sizes (e.g., 'medium' and 'large') in}] \leavevmode rcsetup.py and matplotlibrc.template so that text will be scaled by default when changing rcParams{[}'font.size'{]} - EF \item[{2008-06-17 Add a generic PatchCollection class that can contain any}] \leavevmode kind of patch. - MGD \item[{2008-06-13 Change pie chart label alignment to avoid having labels}] \leavevmode overwrite the pie - MGD \item[{2008-06-12 Added some helper functions to the mathtext parser to}] \leavevmode return bitmap arrays or write pngs to make it easier to use mathtext outside the context of an mpl figure. modified the mathpng sphinxext to use the mathtext png save functionality - see examples/api/mathtext\_asarray.py - JDH \item[{2008-06-11 Use matplotlib.mathtext to render math expressions in}] \leavevmode online docs - MGD \item[{2008-06-11 Move PNG loading/saving to its own extension module, and}] \leavevmode remove duplicate code in \_backend\_agg.cpp and \_image.cpp that does the same thing - MGD \item[{2008-06-11 Numerous mathtext bugfixes, primarily related to}] \leavevmode dpi-independence - MGD \item[{2008-06-10 Bar now applies the label only to the first patch only, and}] \leavevmode sets '\_nolegend\_' for the other patch labels. This lets autolegend work as expected for hist and bar - see \sphinxurl{https://sourceforge.net/tracker/index.php?func=detail\&aid=1986597\&group\_id=80706\&atid=560720} JDH \item[{2008-06-10 Fix text baseline alignment bug. {[} 1985420 {]} Repair of}] \leavevmode baseline alignment in Text.\_get\_layout. Thanks Stan West - MGD \item[{2008-06-09 Committed Gregor's image resample patch to downsampling}] \leavevmode images with new rcparam image.resample - JDH \item[{2008-06-09 Don't install Enthought.Traits along with matplotlib. For}] \leavevmode matplotlib developers convenience, it can still be installed by setting an option in setup.cfg while we figure decide if there is a future for the traited config - DSD \end{description} 2008-06-09 Added range keyword arg to hist() - MM \begin{description} \item[{2008-06-07 Moved list of backends to rcsetup.py; made use of lower}] \leavevmode case for backend names consistent; use validate\_backend when importing backends subpackage - EF \item[{2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and}] \leavevmode Olle Engdegard: make histtype='step' unfilled by default and introduce histtype='stepfilled'; use default color cycle; introduce reverse cumulative histogram; new align keyword - MM \item[{2008-06-06 Fix closed polygon patch and also provide the option to}] \leavevmode not close the polygon - MGD \item[{2008-06-05 Fix some dpi-changing-related problems with PolyCollection,}] \leavevmode as called by Axes.scatter() - MGD \item[{2008-06-05 Fix image drawing so there is no extra space to the right}] \leavevmode or bottom - MGD \item[{2006-06-04 Added a figure title command suptitle as a Figure method}] \leavevmode and pyplot command -- see examples/figure\_title.py - JDH \item[{2008-06-02 Added support for log to hist with histtype='step' and fixed}] \leavevmode a bug for log-scale stacked histograms - MM \end{description} \bigskip\hrule\bigskip 2008-05-29 Released 0.98.0 at revision 5314 \begin{description} \item[{2008-05-29 matplotlib.image.imread now no longer always returns RGBA}] \leavevmode -- if the image is luminance or RGB, it will return a MxN or MxNx3 array if possible. Also uint8 is no longer always forced to float. \end{description} 2008-05-29 Implement path clipping in PS backend - JDH \begin{description} \item[{2008-05-29 Fixed two bugs in texmanager.py:}] \leavevmode improved comparison of dvipng versions fixed a bug introduced when get\_grey method was added - DSD \item[{2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte}] \leavevmode characters are used with Type 3 fonts - MGD \item[{2008-05-28 Allow keyword args to configure widget properties as}] \leavevmode requested in \sphinxurl{http://sourceforge.net/tracker/index.php?func=detail\&aid=1866207\&group\_id=80706\&atid=560722} - JDH \item[{2008-05-28 Replaced '-' with u'u2212' for minus sign as requested in}] \leavevmode \sphinxurl{http://sourceforge.net/tracker/index.php?func=detail\&aid=1962574\&group\_id=80706\&atid=560720} \item[{2008-05-28 zero width/height Rectangles no longer influence the}] \leavevmode autoscaler. Useful for log histograms with empty bins - JDH \item[{2008-05-28 Fix rendering of composite glyphs in Type 3 conversion}] \leavevmode (particularly as evidenced in the Eunjin.ttf Korean font) Thanks Jae-Joon Lee for finding this! \item[{2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to}] \leavevmode use cbook.CallbackRegistry rather than custom callback handling. Amy users of add\_observer/notify of the cm.ScalarMappable should uae the cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH \item[{2008-05-27 Fix TkAgg build on Ubuntu 8.04 (and hopefully a more}] \leavevmode general solution for other platforms, too.) \item[{2008-05-24 Added PIL support for loading images to imread (if PIL is}] \leavevmode available) - JDH \item[{2008-05-23 Provided a function and a method for controlling the}] \leavevmode plot color cycle. - EF \item[{2008-05-23 Major revision of hist(). Can handle 2D arrays and create}] \leavevmode stacked histogram plots; keyword 'width' deprecated and rwidth (relative width) introduced; align='edge' changed to center of bin - MM \item[{2008-05-22 Added support for ReST-based doumentation using Sphinx.}] \leavevmode Documents are located in doc/, and are broken up into a users guide and an API reference. To build, run the make.py files. Sphinx-0.4 is needed to build generate xml, which will be useful for rendering equations with mathml, use sphinx from svn until 0.4 is released - DSD \end{description} 2008-05-21 Fix segfault in TkAgg backend - MGD 2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM \begin{description} \item[{2008-05-19 Fix crash when Windows can not access the registry to}] \leavevmode determine font path {[}Bug 1966974, thanks Patrik Simons{]} - MGD \item[{2008-05-16 removed some unneeded code w/ the python 2.4 requirement.}] \leavevmode cbook no longer provides compatibility for reversed, enumerate, set or izip. removed lib/subprocess, mpl1, sandbox/units, and the swig code. This stuff should remain on the maintenance branch for archival purposes. JDH \end{description} 2008-05-16 Reorganized examples dir - JDH \begin{description} \item[{2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch}] \leavevmode by Christopher Brown - MM \item[{2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative}] \leavevmode histograms. For normed hists, this is normalized to one - MM \end{description} 2008-05-15 Fix Tk backend segfault on some machines - MGD 2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD 2008-05-09 Fix /singlequote (') in Postscript backend - MGD 2008-05-08 Fix kerning in SVG when embedding character outlines - MGD 2008-05-07 Switched to future numpy histogram semantic in hist - MM 2008-05-06 Fix strange colors when blitting in QtAgg and Qt4Agg - MGD \begin{description} \item[{2008-05-05 pass notify\_axes\_change to the figure's add\_axobserver}] \leavevmode in the qt backends, like we do for the other backends. Thanks Glenn Jones for the report - DSD \end{description} 2008-05-02 Added step histograms, based on patch by Erik Tollerud. - MM \begin{description} \item[{2008-05-02 On PyQt \textless{}= 3.14 there is no way to determine the underlying}] \leavevmode Qt version. {[}1851364{]} - MGD \item[{2008-05-02 Don't call sys.exit() when pyemf is not found {[}1924199{]} -}] \leavevmode MGD \item[{2008-05-02 Update \_subprocess.c from upstream Python 2.5.2 to get a}] \leavevmode few memory and reference-counting-related bugfixes. See bug 1949978. - MGD \item[{2008-04-30 Added some record array editing widgets for gtk -- see}] \leavevmode examples/rec\_edit*.py - JDH \end{description} 2008-04-29 Fix bug in mlab.sqrtm - MM \begin{description} \item[{2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol}] \leavevmode tag is not supported) - MGD \item[{2008-04-27 Applied patch by Michiel de Hoon to add hexbin}] \leavevmode axes method and pyplot function - EF \end{description} 2008-04-25 Enforce python \textgreater{}= 2.4; remove subprocess build - EF 2008-04-25 Enforce the numpy requirement at build time - JDH \begin{description} \item[{2008-04-24 Make numpy 1.1 and python 2.3 required when importing}] \leavevmode matplotlib - EF \item[{2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for}] \leavevmode all the help) - MGD \item[{2008-04-24 Fix sub/superscripts when the size of the font has been}] \leavevmode changed - MGD \end{description} 2008-04-22 Use "svg.embed\_char\_paths" consistently everywhere - MGD 2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF 2008-04-20 Fix double-zoom bug. - MM 2008-04-15 Speed up color mapping. - EF 2008-04-12 Speed up zooming and panning of dense images. - EF \begin{description} \item[{2008-04-11 Fix global font rcParam setting after initialization}] \leavevmode time. - MGD \item[{2008-04-11 Revert commits 5002 and 5031, which were intended to}] \leavevmode avoid an unnecessary call to draw(). 5002 broke saving figures before show(). 5031 fixed the problem created in 5002, but broke interactive plotting. Unnecessary call to draw still needs resolution - DSD \item[{2008-04-07 Improve color validation in rc handling, suggested}] \leavevmode by Lev Givon - EF \item[{2008-04-02 Allow to use both linestyle definition arguments, '-' and}] \leavevmode 'solid' etc. in plots/collections - MM \item[{2008-03-27 Fix saving to Unicode filenames with Agg backend}] \leavevmode (other backends appear to already work...) (Thanks, Christopher Barker) - MGD \item[{2008-03-26 Fix SVG backend bug that prevents copying and pasting in}] \leavevmode Inkscape (thanks Kaushik Ghose) - MGD \item[{2008-03-24 Removed an unnecessary call to draw() in the backend\_qt*}] \leavevmode mouseReleaseEvent. Thanks to Ted Drain - DSD \item[{2008-03-23 Fix a pdf backend bug which sometimes caused the outermost}] \leavevmode gsave to not be balanced with a grestore. - JKS \item[{2008-03-20 Fixed a minor bug in ContourSet.\_process\_linestyles when}] \leavevmode len(linestyles)==Nlev - MM \item[{2008-03-19 Changed ma import statements to "from numpy import ma";}] \leavevmode this should work with past and future versions of numpy, whereas "import numpy.ma as ma" will work only with numpy \textgreater{}= 1.05, and "import numerix.npyma as ma" is obsolete now that maskedarray is replacing the earlier implementation, as of numpy 1.05. \item[{2008-03-14 Removed an apparently unnecessary call to}] \leavevmode FigureCanvasAgg.draw in backend\_qt*agg. Thanks to Ted Drain - DSD \item[{2008-03-10 Workaround a bug in backend\_qt4agg's blitting due to a}] \leavevmode buffer width/bbox width mismatch in \_backend\_agg's copy\_from\_bbox - DSD \item[{2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff}] \leavevmode Peery) - MGD \item[{2008-02-16 Added some new rec array functionality to mlab}] \leavevmode (rec\_summarize, rec2txt and rec\_groupby). See examples/rec\_groupby\_demo.py. Thanks to Tim M for rec2txt. \end{description} 2008-02-12 Applied Erik Tollerud's span selector patch - JDH 2008-02-11 Update plotting() doc string to refer to getp/setp. - JKS \begin{description} \item[{2008-02-10 Fixed a problem with square roots in the pdf backend with}] \leavevmode usetex. - JKS \end{description} 2008-02-08 Fixed minor \_\_str\_\_ bugs so getp(gca()) works. - JKS \begin{description} \item[{2008-02-05 Added getters for title, xlabel, ylabel, as requested}] \leavevmode by Brandon Kieth - EF \item[{2008-02-05 Applied Gael's ginput patch and created}] \leavevmode examples/ginput\_demo.py - JDH \item[{2008-02-03 Expose interpnames, a list of valid interpolation}] \leavevmode methods, as an AxesImage class attribute. - EF \item[{2008-02-03 Added BoundaryNorm, with examples in colorbar\_only.py}] \leavevmode and image\_masked.py. - EF \end{description} 2008-02-03 Force dpi=72 in pdf backend to fix picture size bug. - JKS 2008-02-01 Fix doubly-included font problem in Postscript backend - MGD 2008-02-01 Fix reference leak in ft2font Glyph objects. - MGD 2008-01-31 Don't use unicode strings with usetex by default - DSD \begin{description} \item[{2008-01-31 Fix text spacing problems in PDF backend with \sphinxstyleemphasis{some} fonts,}] \leavevmode such as STIXGeneral. \item[{2008-01-31 Fix sqrt with radical number (broken by making {[} and {]}}] \leavevmode work below) - MGD \item[{2008-01-27 Applied Martin Teichmann's patch to improve the Qt4}] \leavevmode backend. Uses Qt's builtin toolbars and statusbars. See bug 1828848 - DSD \item[{2008-01-10 Moved toolkits to mpl\_toolkits, made mpl\_toolkits}] \leavevmode a namespace package - JSWHIT \item[{2008-01-10 Use setup.cfg to set the default parameters (tkagg,}] \leavevmode numpy) when building windows installers - DSD \end{description} 2008-01-10 Fix bug displaying {[} and {]} in mathtext - MGD \begin{description} \item[{2008-01-10 Fix bug when displaying a tick value offset with scientific}] \leavevmode notation. (Manifests itself as a warning that the times symbol can not be found). - MGD \item[{2008-01-10 Use setup.cfg to set the default parameters (tkagg,}] \leavevmode numpy) when building windows installers - DSD \end{description} \bigskip\hrule\bigskip 2008-01-06 Released 0.91.2 at revision 4802 \begin{description} \item[{2007-12-26 Reduce too-late use of matplotlib.use() to a warning}] \leavevmode instead of an exception, for backwards compatibility - EF \end{description} 2007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF \begin{description} \item[{2007-12-25 Changed masked array importing to work with the upcoming}] \leavevmode numpy 1.05 (now the maskedarray branch) as well as with earlier versions. - EF \item[{2007-12-16 rec2csv saves doubles without losing precision. Also, it}] \leavevmode does not close filehandles passed in open. - JDH,ADS \item[{2007-12-13 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel}] \leavevmode to matplotlib.toolkits.exceltools - JDH \item[{2007-12-12 Support alpha-blended text in the Agg and Svg backends -}] \leavevmode MGD \end{description} 2007-12-10 Fix SVG text rendering bug. - MGD \begin{description} \item[{2007-12-10 Increase accuracy of circle and ellipse drawing by using an}] \leavevmode 8-piece bezier approximation, rather than a 4-piece one. Fix PDF, SVG and Cairo backends so they can draw paths (meaning ellipses as well). - MGD \end{description} 2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD \begin{description} \item[{2007-12-06 let widgets.Cursor initialize to the lower x and y bounds}] \leavevmode rather than 0,0, which can cause havoc for dates and other transforms - DSD \end{description} 2007-12-06 updated references to mpl data directories for py2exe - DSD 2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD \begin{description} \item[{2007-12-05 Fix how fonts are cached to avoid loading the same one multiple times.}] \leavevmode (This was a regression since 0.90 caused by the refactoring of font\_manager.py) - MGD \end{description} 2007-12-05 Support arbitrary rotation of usetex text in Agg backend. - MGD 2007-12-04 Support '\textbar{}' as a character in mathtext - MGD \bigskip\hrule\bigskip 2007-11-27 Released 0.91.1 at revision 4517 \bigskip\hrule\bigskip 2007-11-27 Released 0.91.0 at revision 4478 \begin{description} \item[{2007-11-13 All backends now support writing to a file-like object, not}] \leavevmode just a regular file. savefig() can be passed a file-like object in place of a file path. - MGD \item[{2007-11-13 Improved the default backend selection at build time:}] \leavevmode SVG -\textgreater{} Agg -\textgreater{} TkAgg -\textgreater{} WXAgg -\textgreater{} GTK -\textgreater{} GTKAgg. The last usable backend in this progression will be chosen in the default config file. If a backend is defined in setup.cfg, that will be the default backend - DSD \item[{2007-11-13 Improved creation of default config files at build time for}] \leavevmode traited config package - DSD \item[{2007-11-12 Exposed all the build options in setup.cfg. These options are}] \leavevmode read into a dict called "options" by setupext.py. Also, added "-mpl" tags to the version strings for packages provided by matplotlib. Versions provided by mpl will be identified and updated on subsequent installs - DSD \item[{2007-11-12 Added support for STIX fonts. A new rcParam,}] \leavevmode mathtext.fontset, can be used to choose between: \begin{description} \item[{'cm':}] \leavevmode The TeX/LaTeX Computer Modern fonts \item[{'stix':}] \leavevmode The STIX fonts (see stixfonts.org) \item[{'stixsans':}] \leavevmode The STIX fonts, using sans-serif glyphs by default \item[{'custom':}] \leavevmode A generic Unicode font, in which case the mathtext font must be specified using mathtext.bf, mathtext.it, mathtext.sf etc. \end{description} Added a new example, stix\_fonts\_demo.py to show how to access different fonts and unusual symbols. \begin{itemize} \item {} MGD \end{itemize} \item[{2007-11-12 Options to disable building backend extension modules moved}] \leavevmode from setup.py to setup.cfg - DSD \item[{2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in}] \leavevmode paintEvent, which has to be destroyed using the method end(). If matplotlib raises an exception before the call to end - and it does if you feed it with bad data - this method end() is never called and Qt4 will start spitting error messages \item[{2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use}] \leavevmode system pyparsing, API is too variable from one release to the next - DSD \item[{2007-11-08 Made pylab use straight numpy instead of oldnumeric}] \leavevmode by default - EF \item[{2007-11-08 Added additional record array utilites to mlab (rec2excel,}] \leavevmode rec2gtk, rec\_join, rec\_append\_field, rec\_drop\_field) - JDH \end{description} 2007-11-08 Updated pytz to version 2007g - DSD 2007-11-08 Updated pyparsing to version 1.4.8 - DSD \begin{description} \item[{2007-11-08 Moved csv2rec to recutils and added other record array}] \leavevmode utilities - JDH \end{description} 2007-11-08 If available, use existing pyparsing installation - DSD \begin{description} \item[{2007-11-07 Removed old enthought.traits from lib/matplotlib, added}] \leavevmode Gael Varoquaux's enthought.traits-2.6b1, which is stripped of setuptools. The package is installed to site-packages if not already available - DSD \item[{2007-11-05 Added easy access to minor tick properties; slight mod}] \leavevmode of patch by Pierre G-M - EF \item[{2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg}] \leavevmode backend and qt4 blitting demo - DSD \item[{2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg}] \leavevmode backend and qt4 blitting demo - DSD \item[{2007-10-31 Made log color scale easier to use with contourf;}] \leavevmode automatic level generation now works. - EF \end{description} 2007-10-29 TRANSFORMS REFACTORING \begin{quote} The primary goal of this refactoring was to make it easier to extend matplotlib to support new kinds of projections. This is primarily an internal improvement, and the possible user-visible changes it allows are yet to come. The transformation framework was completely rewritten in Python (with Numpy). This will make it easier to add news kinds of transformations without writing C/C++ code. Transforms are composed into a 'transform tree', made of transforms whose value depends on other transforms (their children). When the contents of children change, their parents are automatically updated to reflect those changes. To do this an "invalidation" method is used: when children change, all of their ancestors are marked as "invalid". When the value of a transform is accessed at a later time, its value is recomputed only if it is invalid, otherwise a cached value may be used. This prevents unnecessary recomputations of transforms, and contributes to better interactive performance. The framework can be used for both affine and non-affine transformations. However, for speed, we want use the backend renderers to perform affine transformations whenever possible. Therefore, it is possible to perform just the affine or non-affine part of a transformation on a set of data. The affine is always assumed to occur after the non-affine. For any transform: \begin{quote} full transform == non-affine + affine \end{quote} Much of the drawing has been refactored in terms of compound paths. Therefore, many methods have been removed from the backend interface and replaced with a a handful to draw compound paths. This will make updating the backends easier, since there is less to update. It also should make the backends more consistent in terms of functionality. User visible changes: \begin{itemize} \item {} POLAR PLOTS: Polar plots are now interactively zoomable, and the r-axis labels can be interactively rotated. Straight line segments are now interpolated to follow the curve of the r-axis. \item {} Non-rectangular clipping works in more backends and with more types of objects. \item {} Sharing an axis across figures is now done in exactly the same way as sharing an axis between two axes in the same figure: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig1} \PYG{o}{=} \PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig2} \PYG{o}{=} \PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{n}{ax1}\PYG{p}{)} \end{sphinxVerbatim} \item {} linestyles now include steps-pre, steps-post and steps-mid. The old step still works and is equivalent to step-pre. \item {} Multiple line styles may be provided to a collection. \end{itemize} See API\_CHANGES for more low-level information about this refactoring. \end{quote} 2007-10-24 Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF \begin{description} \item[{2007-10-19 Removed a gsave/grestore pair surrounding \_draw\_ps, which}] \leavevmode was causing a loss graphics state info (see "EPS output problem - scatter \& edgecolors" on mpl-dev, 2007-10-29) - DSD \item[{2007-10-15 Fixed a bug in patches.Ellipse that was broken for}] \leavevmode aspect='auto'. Scale free ellipses now work properly for equal and auto on Agg and PS, and they fall back on a polygonal approximation for nonlinear transformations until we convince oursleves that the spline approximation holds for nonlinear transformations. Added unit/ellipse\_compare.py to compare spline with vertex approx for both aspects. JDH \item[{2007-10-05 remove generator expressions from texmanager and mpltraits.}] \leavevmode generator expressions are not supported by python-2.3 - DSD \item[{2007-10-01 Made matplotlib.use() raise an exception if called after}] \leavevmode backends has been imported. - EF \item[{2007-09-30 Modified update* methods of Bbox and Interval so they}] \leavevmode work with reversed axes. Prior to this, trying to set the ticks on a reversed axis failed with an uninformative error message. - EF \end{description} 2007-09-30 Applied patches to axes3d to fix index error problem - EF \begin{description} \item[{2007-09-24 Applied Eike Welk's patch reported on mpl-dev on 2007-09-22}] \leavevmode Fixes a bug with multiple plot windows in the qt backend, ported the changes to backend\_qt4 as well - DSD \item[{2007-09-21 Changed cbook.reversed to yield the same result as the}] \leavevmode python reversed builtin - DSD \item[{2007-09-13 The usetex support in the pdf backend is more usable now,}] \leavevmode so I am enabling it. - JKS \end{description} 2007-09-12 Fixed a Axes.bar unit bug - JDH 2007-09-10 Made skiprows=1 the default on csv2rec - JDH \begin{description} \item[{2007-09-09 Split out the plotting part of pylab and put it in}] \leavevmode pyplot.py; removed numerix from the remaining pylab.py, which imports everything from pyplot.py. The intention is that apart from cleanups, the result of importing from pylab is nearly unchanged, but there is the new alternative of importing from pyplot to get the state-engine graphics without all the numeric functions. Numpified examples; deleted two that were obsolete; modified some to use pyplot. - EF \end{description} 2007-09-08 Eliminated gd and paint backends - EF 2007-09-06 .bmp file format is now longer an alias for .raw 2007-09-07 Added clip path support to pdf backend. - JKS \begin{description} \item[{2007-09-06 Fixed a bug in the embedding of Type 1 fonts in PDF.}] \leavevmode Now it doesn't crash Preview.app. - JKS \item[{2007-09-06 Refactored image saving code so that all GUI backends can}] \leavevmode save most image types. See FILETYPES for a matrix of backends and their supported file types. Backend canvases should no longer write their own print\_figure() method -- instead they should write a print\_xxx method for each filetype they can output and add an entry to their class-scoped filetypes dictionary. - MGD \end{description} 2007-09-05 Fixed Qt version reporting in setupext.py - DSD \begin{description} \item[{2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support}] \leavevmode via dviread, sort of works. To test, enable it by renaming \_draw\_tex to draw\_tex. - JKS \item[{2007-09-03 Added ability of errorbar show limits via caret or}] \leavevmode arrowhead ends on the bars; patch by Manual Metz. - EF \item[{2007-09-03 Created type1font.py, added features to AFM and FT2Font}] \leavevmode (see API\_CHANGES), started work on embedding Type 1 fonts in pdf files. - JKS \end{description} 2007-09-02 Continued work on dviread.py. - JKS \begin{description} \item[{2007-08-16 Added a set\_extent method to AxesImage, allow data extent}] \leavevmode to be modified after initial call to imshow - DSD \item[{2007-08-14 Fixed a bug in pyqt4 subplots-adjust. Thanks to}] \leavevmode Xavier Gnata for the report and suggested fix - DSD \item[{2007-08-13 Use pickle to cache entire fontManager; change to using}] \leavevmode font\_manager module-level function findfont wrapper for the fontManager.findfont method - EF \end{description} 2007-08-11 Numpification and cleanup of mlab.py and some examples - EF 2007-08-06 Removed mathtext2 \begin{description} \item[{2007-07-31 Refactoring of distutils scripts.}] \leavevmode\begin{itemize} \item {} Will not fail on the entire build if an optional Python package (e.g., Tkinter) is installed but its development headers are not (e.g., tk-devel). Instead, it will continue to build all other extensions. \item {} Provide an overview at the top of the output to display what dependencies and their versions were found, and (by extension) what will be built. \item {} Use pkg-config, when available, to find freetype2, since this was broken on Mac OS-X when using MacPorts in a non- standard location. \end{itemize} \item[{2007-07-30 Reorganized configuration code to work with traited config}] \leavevmode objects. The new config system is located in the matplotlib.config package, but it is disabled by default. To enable it, set NEWCONFIG=True in matplotlib.\_\_init\_\_.py. The new configuration system will still use the old matplotlibrc files by default. To switch to the experimental, traited configuration, set USE\_TRAITED\_CONFIG=True in config.\_\_init\_\_.py. \item[{2007-07-29 Changed default pcolor shading to flat; added aliases}] \leavevmode to make collection kwargs agree with setter names, so updating works; related minor cleanups. Removed quiver\_classic, scatter\_classic, pcolor\_classic. - EF \end{description} 2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model. \begin{quote} There is one (known) backward incompatible change. The font commands (cal, rm, it, tt) now behave as TeX does: they are in effect until the next font change command or the end of the grouping. Therefore uses of \$cal\{R\}\$ should be changed to \$\{cal R\}\$. Alternatively, you may use the new LaTeX-style font commands (mathcal, mathrm, mathit, mathtt) which do affect the following group, e.g., \$mathcal\{R\}\$. Other new features include: \begin{itemize} \item {} Math may be interspersed with non-math text. Any text with an even number of \$'s (non-escaped) will be sent to the mathtext parser for layout. \item {} Sub/superscripts are less likely to accidentally overlap. \item {} Support for sub/superscripts in either order, e.g., \$x\textasciicircum{}i\_j\$ and \$x\_j\textasciicircum{}i\$ are equivalent. \item {} Double sub/superscripts (e.g., \$x\_i\_j\$) are considered ambiguous and raise an exception. Use braces to disambiguate. \item {} \$frac\{x\}\{y\}\$ can be used for displaying fractions. \item {} \$sqrt{[}3{]}\{x\}\$ can be used to display the radical symbol with a root number and body. \item {} \$left(frac\{x\}\{y\}right)\$ may be used to create parentheses and other delimiters that automatically resize to the height of their contents. \item {} Spacing around operators etc. is now generally more like TeX. \item {} Added support (and fonts) for boldface (bf) and sans-serif (sf) symbols. \item {} Log-like function name shortcuts are supported. For example, \$sin(x)\$ may be used instead of \$\{rm sin\}(x)\$ \item {} Limited use of kerning for the easy case (same font) \end{itemize} Behind the scenes, the pyparsing.py module used for doing the math parsing was updated to the latest stable version (1.4.6). A lot of duplicate code was refactored out of the Font classes. \begin{itemize} \item {} MGD \end{itemize} \end{quote} 2007-07-19 completed numpification of most trivial cases - NN 2007-07-19 converted non-numpy relicts throughout the code - NN \begin{description} \item[{2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around}] \leavevmode numpy that explicitly mentions all symbols that need to be addressed for further numpification - NN \item[{2007-07-18 make usetex respect changes to rcParams. texmanager used to}] \leavevmode only configure itself when it was created, now it reconfigures when rcParams are changed. Thank you Alexander Schmolck for contributing a patch - DSD \end{description} 2007-07-17 added validation to setting and changing rcParams - DSD \begin{description} \item[{2007-07-17 bugfix segfault in transforms module. Thanks Ben North for}] \leavevmode the patch. - ADS \item[{2007-07-16 clean up some code in ticker.ScalarFormatter, use unicode to}] \leavevmode render multiplication sign in offset ticklabel - DSD \item[{2007-07-16 fixed a formatting bug in ticker.ScalarFormatter's scientific}] \leavevmode notation (10\textasciicircum{}0 was being rendered as 10 in some cases) - DSD \item[{2007-07-13 Add MPL\_isfinite64() and MPL\_isinf64() for testing}] \leavevmode doubles in (the now misnamed) MPL\_isnan.h. - ADS \end{description} 2007-07-13 The matplotlib.\_isnan module removed (use numpy.isnan) - ADS 2007-07-13 Some minor cleanups in \_transforms.cpp - ADS \begin{description} \item[{2007-07-13 Removed the rest of the numerix extension code detritus,}] \leavevmode numpified axes.py, and cleaned up the imports in axes.py - JDH \item[{2007-07-13 Added legend.loc as configurable option that could in}] \leavevmode future default to 'best'. - NN \end{description} 2007-07-12 Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS 2007-07-11 Added linespacing kwarg to text.Text - EF 2007-07-11 Added code to store font paths in SVG files. - MGD 2007-07-10 Store subset of TTF font as a Type 3 font in PDF files. - MGD 2007-07-09 Store subset of TTF font as a Type 3 font in PS files. - MGD \begin{description} \item[{2007-07-09 Applied Paul's pick restructure pick and add pickers,}] \leavevmode sourceforge patch 1749829 - JDH \end{description} 2007-07-09 Applied Allan's draw\_lines agg optimization. JDH 2007-07-08 Applied Carl Worth's patch to fix cairo draw\_arc - SC 2007-07-07 fixed bug 1712099: xpdf distiller on windows - DSD \begin{description} \item[{2007-06-30 Applied patches to tkagg, gtk, and wx backends to reduce}] \leavevmode memory leakage. Patches supplied by Mike Droettboom; see tracker numbers 1745400, 1745406, 1745408. Also made unit/memleak\_gui.py more flexible with command-line options. - EF \item[{2007-06-30 Split defaultParams into separate file rcdefaults (together with}] \leavevmode validation code). Some heavy refactoring was necessary to do so, but the overall behavior should be the same as before. - NN \item[{2007-06-27 Added MPLCONFIGDIR for the default location for mpl data}] \leavevmode and configuration. useful for some apache installs where HOME is not writable. Tried to clean up the logic in \_get\_config\_dir to support non-writable HOME where are writable HOME/.matplotlib already exists - JDH \item[{2007-06-27 Fixed locale bug reported at}] \leavevmode \sphinxurl{http://sourceforge.net/tracker/index.php?func=detail\&aid=1744154\&group\_id=80706\&atid=560720} by adding a cbook.unicode\_safe function - JDH \item[{2007-06-27 Applied Micheal's tk savefig bugfix described at}] \leavevmode \sphinxurl{http://sourceforge.net/tracker/index.php?func=detail\&aid=1716732\&group\_id=80706\&atid=560720} Thanks Michael! \item[{2007-06-27 Patch for get\_py2exe\_datafiles() to work with new directory}] \leavevmode layout. (Thanks Tocer and also Werner Bruhin.) -ADS \item[{2007-06-27 Added a scroll event to the mpl event handling system and}] \leavevmode implemented it for backends GTK* -- other backend users/developers/maintainers, please add support for your backend. - JDH \item[{2007-06-25 Changed default to clip=False in colors.Normalize;}] \leavevmode modified ColorbarBase for easier colormap display - EF \end{description} 2007-06-13 Added maskedarray option to rc, numerix - EF 2007-06-11 Python 2.5 compatibility fix for mlab.py - EF \begin{description} \item[{2007-06-10 In matplotlibrc file, use 'dashed' \textbar{} 'solid' instead}] \leavevmode of a pair of floats for contour.negative\_linestyle - EF \item[{2007-06-08 Allow plot and fill fmt string to be any mpl string}] \leavevmode colorspec - EF \item[{2007-06-08 Added gnuplot file plotfile function to pylab -- see}] \leavevmode examples/plotfile\_demo.py - JDH \item[{2007-06-07 Disable build of numarray and Numeric extensions for}] \leavevmode internal MPL use and the numerix layer. - ADS \item[{2007-06-07 Added csv2rec to matplotlib.mlab to support automatically}] \leavevmode converting csv files to record arrays using type introspection, and turned on native datetime support using the new units support in matplotlib.dates. See examples/loadrec.py ! JDH \end{description} 2007-06-07 Simplified internal code of \_auto\_legend\_data - NN \begin{description} \item[{2007-06-04 Added labeldistance arg to Axes.pie to control the raidal}] \leavevmode distance of the wedge labels - JDH \item[{2007-06-03 Turned mathtext in SVG into single \textless{}text\textgreater{} with multiple \textless{}tspan\textgreater{}}] \leavevmode objects (easier to edit in inkscape). - NN \end{description} \bigskip\hrule\bigskip 2007-06-02 Released 0.90.1 at revision 3352 \begin{description} \item[{2007-06-02 Display only meaningful labels when calling legend()}] \leavevmode without args. - NN \item[{2007-06-02 Have errorbar follow the color cycle even if line is not plotted.}] \leavevmode Suppress plotting of errorbar caps for capsize=0. - NN \end{description} 2007-06-02 Set markers to same alpha value as line. - NN 2007-06-02 Fix mathtext position in svg backend. - NN \begin{description} \item[{2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to}] \leavevmode Travis -- job well done. - ADS \item[{2007-05-18 Added LaTeX unicode support. Enable with the}] \leavevmode 'text.latex.unicode' rcParam. This requires the ucs and inputenc LaTeX packages. - ADS \item[{2007-04-23 Fixed some problems with polar -- added general polygon}] \leavevmode clipping to clip the lines a nd grids to the polar axes. Added support for set\_rmax to easily change the maximum radial grid. Added support for polar legend - JDH \item[{2007-04-16 Added Figure.autofmt\_xdate to handle adjusting the bottom}] \leavevmode and rotating the tick labels for date plots when the ticks often overlap - JDH \end{description} 2007-04-09 Beginnings of usetex support for pdf backend. -JKS \begin{description} \item[{2007-04-07 Fixed legend/LineCollection bug. Added label support}] \leavevmode to collections. - EF \item[{2007-04-06 Removed deprecated support for a float value as a gray-scale;}] \leavevmode now it must be a string, like '0.5'. Added alpha kwarg to ColorConverter.to\_rgba\_list. - EF \item[{2007-04-06 Fixed rotation of ellipses in pdf backend}] \leavevmode (sf bug \#1690559) -JKS \item[{2007-04-04 More matshow tweaks; documentation updates; new method}] \leavevmode set\_bounds() for formatters and locators. - EF \item[{2007-04-02 Fixed problem with imshow and matshow of integer arrays;}] \leavevmode fixed problems with changes to color autoscaling. - EF \item[{2007-04-01 Made image color autoscaling work correctly with}] \leavevmode a tracking colorbar; norm.autoscale now scales unconditionally, while norm.autoscale\_None changes only None-valued vmin, vmax. - EF \end{description} 2007-03-31 Added a qt-based subplot-adjustment dialog - DSD 2007-03-30 Fixed a bug in backend\_qt4, reported on mpl-dev - DSD \begin{description} \item[{2007-03-26 Removed colorbar\_classic from figure.py; fixed bug in}] \leavevmode Figure.clf() in which \_axobservers was not getting cleared. Modernization and cleanups. - EF \item[{2007-03-26 Refactored some of the units support -- units now live in}] \leavevmode the respective x and y Axis instances. See also API\_CHANGES for some alterations to the conversion interface. JDH \item[{2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric}] \leavevmode and numarray support for masked arrays is broken in other ways when using quiver. I didn't pursue that.) - ADS \end{description} 2007-03-23 Made font\_manager.py close opened files. - JKS 2007-03-22 Made imshow default extent match matshow - EF \begin{description} \item[{2007-03-22 Some more niceties for xcorr -- a maxlags option, normed}] \leavevmode now works for xcorr as well as axorr, usevlines is supported, and a zero correlation hline is added. See examples/xcorr\_demo.py. Thanks Sameer for the patch. - JDH \item[{2007-03-21 Axes.vlines and Axes.hlines now create and returns a}] \leavevmode LineCollection, not a list of lines. This is much faster. The kwarg signature has changed, so consult the docs. Modified Axes.errorbar which uses vlines and hlines. See API\_CHANGES; the return signature for these three functions is now different \end{description} 2007-03-20 Refactored units support and added new examples - JDH 2007-03-19 Added Mike's units patch - JDH \begin{description} \item[{2007-03-18 Matshow as an Axes method; test version matshow1() in}] \leavevmode pylab; added 'integer' Boolean kwarg to MaxNLocator initializer to force ticks at integer locations. - EF \end{description} 2007-03-17 Preliminary support for clipping to paths agg - JDH 2007-03-17 Text.set\_text() accepts anything convertible with '\%s' - EF 2007-03-14 Add masked-array support to hist. - EF \begin{description} \item[{2007-03-03 Change barh to take a kwargs dict and pass it to bar.}] \leavevmode Fixes sf bug \#1669506. \item[{2007-03-02 Add rc parameter pdf.inheritcolor, which disables all}] \leavevmode color-setting operations in the pdf backend. The idea is that you include the resulting file in another program and set the colors (both stroke and fill color) there, so you can use the same pdf file for e.g., a paper and a presentation and have them in the surrounding color. You will probably not want to draw figure and axis frames in that case, since they would be filled in the same color. - JKS \end{description} 2007-02-26 Prevent building \_wxagg.so with broken Mac OS X wxPython. - ADS 2007-02-23 Require setuptools for Python 2.3 - ADS \begin{description} \item[{2007-02-22 WXAgg accelerator updates - KM}] \leavevmode WXAgg's C++ accelerator has been fixed to use the correct wxBitmap constructor. The backend has been updated to use new wxPython functionality to provide fast blit() animation without the C++ accelerator. This requires wxPython 2.8 or later. Previous versions of wxPython can use the C++ acclerator or the old pure Python routines. setup.py no longer builds the C++ accelerator when wxPython \textgreater{}= 2.8 is present. The blit() method is now faster regardless of which agg/wxPython conversion routines are used. \item[{2007-02-21 Applied the PDF backend patch by Nicolas Grilly.}] \leavevmode This impacts several files and directories in matplotlib: \begin{itemize} \item {} Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts, holding AFM files for the 14 PDF core fonts. These fonts are embedded in every PDF viewing application. \item {} setup.py: Added the directory pdfcorefonts to package\_data. \item {} lib/matplotlib/\_\_init\_\_.py: Added the default parameter 'pdf.use14corefonts'. When True, the PDF backend uses only the 14 PDF core fonts. \item {} lib/matplotlib/afm.py: Added some keywords found in recent AFM files. Added a little workaround to handle Euro symbol. \item {} lib/matplotlib/fontmanager.py: Added support for the 14 PDF core fonts. These fonts have a dedicated cache (file pdfcorefont.cache), not the same as for other AFM files (file .afmfont.cache). Also cleaned comments to conform to CODING\_GUIDE. \item {} lib/matplotlib/backends/backend\_pdf.py: Added support for 14 PDF core fonts. Fixed some issues with incorrect character widths and encodings (works only for the most common encoding, WinAnsiEncoding, defined by the official PDF Reference). Removed parameter 'dpi' because it causes alignment issues. \end{itemize} -JKS (patch by Nicolas Grilly) \item[{2007-02-17 Changed ft2font.get\_charmap, and updated all the files where}] \leavevmode get\_charmap is mentioned - ES \end{description} 2007-02-13 Added barcode demo- JDH 2007-02-13 Added binary colormap to cm - JDH 2007-02-13 Added twiny to pylab - JDH \begin{description} \item[{2007-02-12 Moved data files into lib/matplotlib so that setuptools'}] \leavevmode develop mode works. Re-organized the mpl-data layout so that this source structure is maintained in the installation. (i.e., the 'fonts' and 'images' sub-directories are maintained in site-packages.) Suggest removing site-packages/matplotlib/mpl-data and \textasciitilde{}/.matplotlib/ttffont.cache before installing - ADS \item[{2007-02-07 Committed Rob Hetland's patch for qt4: remove}] \leavevmode references to text()/latin1(), plus some improvements to the toolbar layout - DSD \end{description} \bigskip\hrule\bigskip 2007-02-06 Released 0.90.0 at revision 3003 \begin{description} \item[{2007-01-22 Extended the new picker API to text, patches and patch}] \leavevmode collections. Added support for user customizable pick hit testing and attribute tagging of the PickEvent - Details and examples in examples/pick\_event\_demo.py - JDH \item[{2007-01-16 Begun work on a new pick API using the mpl event handling}] \leavevmode frameowrk. Artists will define their own pick method with a configurable epsilon tolerance and return pick attrs. All artists that meet the tolerance threshold will fire a PickEvent with artist dependent attrs; e.g., a Line2D can set the indices attribute that shows the indices into the line that are within epsilon of the pick point. See examples/pick\_event\_demo.py. The implementation of pick for the remaining Artists remains to be done, but the core infrastructure at the level of event handling is in place with a proof-of-concept implementation for Line2D - JDH \item[{2007-01-16 src/\_image.cpp: update to use Py\_ssize\_t (for 64-bit systems).}] \leavevmode Use return value of fread() to prevent warning messages - SC. \item[{2007-01-15 src/\_image.cpp: combine buffer\_argb32() and buffer\_bgra32() into}] \leavevmode a new method color\_conv(format) - SC \item[{2007-01-14 backend\_cairo.py: update draw\_arc() so that}] \leavevmode examples/arctest.py looks correct - SC \item[{2007-01-12 backend\_cairo.py: enable clipping. Update draw\_image() so that}] \leavevmode examples/contour\_demo.py looks correct - SC \item[{2007-01-12 backend\_cairo.py: fix draw\_image() so that examples/image\_demo.py}] \leavevmode now looks correct - SC \item[{2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross}] \leavevmode correlation of x vs y or the autocorrelation of x. pylab wrappers also provided. See examples/xcorr\_demo.py - JDH \item[{2007-01-10 Added "Subplot.label\_outer" method. It will set the}] \leavevmode visibility of the ticklabels so that yticklabels are only visible in the first column and xticklabels are only visible in the last row - JDH \end{description} 2007-01-02 Added additional kwarg documentation - JDH \begin{description} \item[{2006-12-28 Improved error message for nonpositive input to log}] \leavevmode transform; added log kwarg to bar, barh, and hist, and modified bar method to behave sensibly by default when the ordinate has a log scale. (This only works if the log scale is set before or by the call to bar, hence the utility of the log kwarg.) - EF \item[{2006-12-27 backend\_cairo.py: update draw\_image() and \_draw\_mathtext() to work}] \leavevmode with numpy - SC \item[{2006-12-20 Fixed xpdf dependency check, which was failing on windows.}] \leavevmode Removed ps2eps dependency check. - DSD \end{description} 2006-12-19 Added Tim Leslie's spectral patch - JDH \begin{description} \item[{2006-12-17 Added rc param 'axes.formatter.limits' to control}] \leavevmode the default threshold for switching to scientific notation. Added convenience method Axes.ticklabel\_format() for turning scientific notation on or off on either or both axes. - EF \item[{2006-12-16 Added ability to turn control scientific notation}] \leavevmode in ScalarFormatter - EF \end{description} 2006-12-16 Enhanced boxplot to handle more flexible inputs - EF \begin{description} \item[{2006-12-13 Replaced calls to where() in colors.py with much faster}] \leavevmode clip() and putmask() calls; removed inappropriate uses of getmaskorNone (which should be needed only very rarely); all in response to profiling by David Cournapeau. Also fixed bugs in my 2-D array support from 12-09. - EF \item[{2006-12-09 Replaced spy and spy2 with the new spy that combines}] \leavevmode marker and image capabilities - EF \item[{2006-12-09 Added support for plotting 2-D arrays with plot:}] \leavevmode columns are plotted as in Matlab - EF \item[{2006-12-09 Added linewidth kwarg to bar and barh; fixed arg}] \leavevmode checking bugs - EF \item[{2006-12-07 Made pcolormesh argument handling match pcolor;}] \leavevmode fixed kwarg handling problem noted by Pierre GM - EF \item[{2006-12-06 Made pcolor support vector X and/or Y instead of}] \leavevmode requiring 2-D arrays - EF \item[{2006-12-05 Made the default Artist.\_transform None (rather than}] \leavevmode invoking identity\_transform for each artist only to have it overridden later). Use artist.get\_transform() rather than artist.\_transform, even in derived classes, so that the default transform will be created lazily as needed - JDH \item[{2006-12-03 Added LogNorm to colors.py as illustrated by}] \leavevmode examples/pcolor\_log.py, based on suggestion by Jim McDonald. Colorbar modified to handle LogNorm. Norms have additional "inverse" method. - EF \item[{2006-12-02 Changed class names in colors.py to match convention:}] \leavevmode normalize -\textgreater{} Normalize, no\_norm -\textgreater{} NoNorm. Old names are still available. Changed \_\_init\_\_.py rc defaults to match those in matplotlibrc - EF \end{description} 2006-11-22 Fixed bug in set\_*lim that I had introduced on 11-15 - EF \begin{description} \item[{2006-11-22 Added examples/clippedline.py, which shows how to clip line}] \leavevmode data based on view limits -- it also changes the marker style when zoomed in - JDH \item[{2006-11-21 Some spy bug-fixes and added precision arg per Robert C's}] \leavevmode suggestion - JDH \item[{2006-11-19 Added semi-automatic docstring generation detailing all the}] \leavevmode kwargs that functions take using the artist introspection tools; e.g., 'help text now details the scatter kwargs that control the Text properties - JDH \item[{2006-11-17 Removed obsolete scatter\_classic, leaving a stub to}] \leavevmode raise NotImplementedError; same for pcolor\_classic - EF \end{description} 2006-11-15 Removed obsolete pcolor\_classic - EF \begin{description} \item[{2006-11-15 Fixed 1588908 reported by Russel Owen; factored}] \leavevmode nonsingular method out of ticker.py, put it into transforms.py as a function, and used it in set\_xlim and set\_ylim. - EF \item[{2006-11-14 Applied patch 1591716 by Ulf Larssen to fix a bug in}] \leavevmode apply\_aspect. Modified and applied patch 1594894 by mdehoon to fix bugs and improve formatting in lines.py. Applied patch 1573008 by Greg Willden to make psd etc. plot full frequency range for complex inputs. - EF \item[{2006-11-14 Improved the ability of the colorbar to track}] \leavevmode changes in corresponding image, pcolor, or contourf. - EF \item[{2006-11-11 Fixed bug that broke Numeric compatibility;}] \leavevmode added support for alpha to colorbar. The alpha information is taken from the mappable object, not specified as a kwarg. - EF \item[{2006-11-05 Added broken\_barh function for makring a sequence of}] \leavevmode horizontal bars broken by gaps -- see examples/broken\_barh.py \item[{2006-11-05 Removed lineprops and markerprops from the Annotation code}] \leavevmode and replaced them with an arrow configurable with kwarg arrowprops. See examples/annotation\_demo.py - JDH \item[{2006-11-02 Fixed a pylab subplot bug that was causing axes to be}] \leavevmode deleted with hspace or wspace equals zero in subplots\_adjust - JDH \item[{2006-10-31 Applied axes3d patch 1587359}] \leavevmode \sphinxurl{http://sourceforge.net/tracker/index.php?func=detail\&aid=1587359\&group\_id=80706\&atid=560722} JDH \end{description} \bigskip\hrule\bigskip 2006-10-26 Released 0.87.7 at revision 2835 2006-10-25 Made "tiny" kwarg in Locator.nonsingular much smaller - EF \begin{description} \item[{2006-10-17 Closed sf bug 1562496 update line props dash/solid/cap/join}] \leavevmode styles - JDH \item[{2006-10-17 Complete overhaul of the annotations API and example code -}] \leavevmode See matplotlib.text.Annotation and examples/annotation\_demo.py JDH \item[{2006-10-12 Committed Manuel Metz's StarPolygon code and}] \leavevmode examples/scatter\_star\_poly.py - JDH \item[{2006-10-11 commented out all default values in matplotlibrc.template}] \leavevmode Default values should generally be taken from defaultParam in \_\_init\_\_.py - the file matplotlib should only contain those values that the user wants to explicitly change from the default. (see thread "marker color handling" on matplotlib-devel) \end{description} 2006-10-10 Changed default comment character for load to '\#' - JDH \begin{description} \item[{2006-10-10 deactivated rcfile-configurability of markerfacecolor}] \leavevmode and markeredgecolor. Both are now hardcoded to the special value 'auto' to follow the line color. Configurability at run-time (using function arguments) remains functional. - NN \item[{2006-10-07 introduced dummy argument magnification=1.0 to}] \leavevmode FigImage.make\_image to satisfy unit test figimage\_demo.py The argument is not yet handled correctly, which should only show up when using non-standard DPI settings in PS backend, introduced by patch \#1562394. - NN \end{description} 2006-10-06 add backend-agnostic example: simple3d.py - NN 2006-09-29 fix line-breaking for SVG-inline images (purely cosmetic) - NN \begin{description} \item[{2006-09-29 reworked set\_linestyle and set\_marker}] \leavevmode markeredgecolor and markerfacecolor now default to a special value "auto" that keeps the color in sync with the line color further, the intelligence of axes.plot is cleaned up, improved and simplified. Complete compatibility cannot be guaranteed, but the new behavior should be much more predictable (see patch \#1104615 for details) - NN \item[{2006-09-29 changed implementation of clip-path in SVG to work around a}] \leavevmode limitation in inkscape - NN \item[{2006-09-29 added two options to matplotlibrc:}] \leavevmode svg.image\_inline svg.image\_noscale see patch \#1533010 for details - NN \end{description} 2006-09-29 axes.py: cleaned up kwargs checking - NN 2006-09-29 setup.py: cleaned up setup logic - NN 2006-09-29 setup.py: check for required pygtk versions, fixes bug \#1460783 - SC \bigskip\hrule\bigskip 2006-09-27 Released 0.87.6 at revision 2783 \begin{description} \item[{2006-09-24 Added line pointers to the Annotation code, and a pylab}] \leavevmode interface. See matplotlib.text.Annotation, examples/annotation\_demo.py and examples/annotation\_demo\_pylab.py - JDH \item[{2006-09-18 mathtext2.py: The SVG backend now supports the same things that}] \leavevmode the AGG backend does. Fixed some bugs with rendering, and out of bounds errors in the AGG backend - ES. Changed the return values of math\_parse\_s\_ft2font\_svg to support lines (fractions etc.) \item[{2006-09-17 Added an Annotation class to facilitate annotating objects}] \leavevmode and an examples file examples/annotation\_demo.py. I want to add dash support as in TextWithDash, but haven't decided yet whether inheriting from TextWithDash is the right base class or if another approach is needed - JDH \end{description} \bigskip\hrule\bigskip 2006-09-05 Released 0.87.5 at revision 2761 \begin{description} \item[{2006-09-04 Added nxutils for some numeric add-on extension code --}] \leavevmode specifically a better/more efficient inside polygon tester (see unit/inside\_poly\_*.py) - JDH \end{description} 2006-09-04 Made bitstream fonts the rc default - JDH \begin{description} \item[{2006-08-31 Fixed alpha-handling bug in ColorConverter, affecting}] \leavevmode collections in general and contour/contourf in particular. - EF \item[{2006-08-30 ft2font.cpp: Added draw\_rect\_filled method (now used by mathtext2}] \leavevmode to draw the fraction bar) to FT2Font - ES \item[{2006-08-29 setupext.py: wrap calls to tk.getvar() with str(). On some}] \leavevmode systems, getvar returns a Tcl\_Obj instead of a string - DSD \item[{2006-08-28 mathtext2.py: Sub/superscripts can now be complex (i.e.}] \leavevmode fractions etc.). The demo is also updated - ES \item[{2006-08-28 font\_manager.py: Added /usr/local/share/fonts to list of}] \leavevmode X11 font directories - DSD \item[{2006-08-28 mahtext2.py: Initial support for complex fractions. Also,}] \leavevmode rendering is now completely separated from parsing. The sub/superscripts now work better. Updated the mathtext2\_demo.py - ES \item[{2006-08-27 qt backends: don't create a QApplication when backend is}] \leavevmode imported, do it when the FigureCanvasQt is created. Simplifies applications where mpl is embedded in qt. Updated embedding\_in\_qt* examples - DSD \item[{2006-08-27 mahtext2.py: Now the fonts are searched in the OS font dir and}] \leavevmode in the mpl-data dir. Also env is not a dict anymore. - ES \item[{2006-08-26 minor changes to \_\_init\_\_.py, mathtex2\_demo.py. Added matplotlibrc}] \leavevmode key "mathtext.mathtext2" (removed the key "mathtext2") - ES \item[{2006-08-21 mathtext2.py: Initial support for fractions}] \leavevmode Updated the mathtext2\_demo.py \_mathtext\_data.py: removed "" from the unicode dicts mathtext.py: Minor modification (because of \_mathtext\_data.py)- ES \item[{2006-08-20 Added mathtext2.py: Replacement for mathtext.py. Supports \_ \textasciicircum{},}] \leavevmode rm, cal etc., sin, cos etc., unicode, recursive nestings, inline math mode. The only backend currently supported is Agg \_\_init\_\_.py: added new rc params for mathtext2 added mathtext2\_demo.py example - ES \end{description} 2006-08-19 Added embedding\_in\_qt4.py example - DSD 2006-08-11 Added scale free Ellipse patch for Agg - CM \begin{description} \item[{2006-08-10 Added converters to and from julian dates to matplotlib.dates}] \leavevmode (num2julian and julian2num) - JDH \item[{2006-08-08 Fixed widget locking so multiple widgets could share the}] \leavevmode event handling - JDH \end{description} 2006-08-07 Added scale free Ellipse patch to SVG and PS - CM 2006-08-05 Re-organized imports in numerix for numpy 1.0b2 -- TEO 2006-08-04 Added draw\_markers to PDF backend. - JKS 2006-08-01 Fixed a bug in postscript's rendering of dashed lines - DSD \begin{description} \item[{2006-08-01 figure.py: savefig() update docstring to add support for 'format'}] \leavevmode argument. backend\_cairo.py: print\_figure() add support 'format' argument. - SC \end{description} 2006-07-31 Don't let postscript's xpdf distiller compress images - DSD \begin{description} \item[{2006-07-31 Added shallowcopy() methods to all Transformations;}] \leavevmode removed copy\_bbox\_transform and copy\_bbox\_transform\_shallow from transforms.py; added offset\_copy() function to transforms.py to facilitate positioning artists with offsets. See examples/transoffset.py. - EF \end{description} 2006-07-31 Don't let postscript's xpdf distiller compress images - DSD \begin{description} \item[{2006-07-29 Fixed numerix polygon bug reported by Nick Fotopoulos.}] \leavevmode Added inverse\_numerix\_xy() transform method. Made autoscale\_view() preserve axis direction (e.g., increasing down).- EF \item[{2006-07-28 Added shallow bbox copy routine for transforms -- mainly}] \leavevmode useful for copying transforms to apply offset to. - JDH \item[{2006-07-28 Added resize method to FigureManager class}] \leavevmode for Qt and Gtk backend - CM \end{description} 2006-07-28 Added subplots\_adjust button to Qt backend - CM \begin{description} \item[{2006-07-26 Use numerix more in collections.}] \leavevmode Quiver now handles masked arrays. - EF \end{description} 2006-07-22 Fixed bug \#1209354 - DSD \begin{description} \item[{2006-07-22 make scatter() work with the kwarg "color". Closes bug}] \leavevmode 1285750 - DSD \item[{2006-07-20 backend\_cairo.py: require pycairo 1.2.0.}] \leavevmode print\_figure() update to output SVG using cairo. \end{description} 2006-07-19 Added blitting for Qt4Agg - CM 2006-07-19 Added lasso widget and example examples/lasso\_demo.py - JDH 2006-07-18 Added blitting for QtAgg backend - CM 2006-07-17 Fixed bug \#1523585: skip nans in semilog plots - DSD \begin{description} \item[{2006-07-12 Add support to render the scientific notation label}] \leavevmode over the right-side y-axis - DSD \end{description} \bigskip\hrule\bigskip 2006-07-11 Released 0.87.4 at revision 2558 2006-07-07 Fixed a usetex bug with older versions of latex - DSD 2006-07-07 Add compatibility for NumPy 1.0 - TEO 2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD \begin{description} \item[{2006-06-26 Fixed a usetex bug. On windows, usetex will prcess}] \leavevmode postscript output in the current directory rather than in a temp directory. This is due to the use of spaces and tildes in windows paths, which cause problems with latex. The subprocess module is no longer used. - DSD \item[{2006-06-22 Various changes to bar(), barh(), and hist().}] \leavevmode Added 'edgecolor' keyword arg to bar() and barh(). The x and y args in barh() have been renamed to width and bottom respectively, and their order has been swapped to maintain a (position, value) order ala matlab. left, height, width and bottom args can now all be scalars or sequences. barh() now defaults to edge alignment instead of center alignment. Added a keyword arg 'align' to bar(), barh() and hist() that controls between edge or center bar alignment. Fixed ignoring the rcParams{[}'patch.facecolor'{]} for bar color in bar() and barh(). Fixed ignoring the rcParams{[}'lines.color'{]} for error bar color in bar() and barh(). Fixed a bug where patches would be cleared when error bars were plotted if rcParams{[}'axes.hold'{]} was False. - MAS \item[{2006-06-22 Added support for numerix 2-D arrays as alternatives to}] \leavevmode a sequence of (x,y) tuples for specifying paths in collections, quiver, contour, pcolor, transforms. Fixed contour bug involving setting limits for color mapping. Added numpy-style all() to numerix. - EF \item[{2006-06-20 Added custom FigureClass hook to pylab interface - see}] \leavevmode examples/custom\_figure\_class.py \item[{2006-06-16 Added colormaps from gist (gist\_earth, gist\_stern,}] \leavevmode gist\_rainbow, gist\_gray, gist\_yarg, gist\_heat, gist\_ncar) - JW \item[{2006-06-16 Added a pointer to parent in figure canvas so you can}] \leavevmode access the container with fig.canvas.manager. Useful if you want to set the window title, e.g., in gtk fig.canvas.manager.window.set\_title, though a GUI neutral method would be preferable JDH \item[{2006-06-16 Fixed colorbar.py to handle indexed colors (i.e.,}] \leavevmode norm = no\_norm()) by centering each colored region on its index. - EF \item[{2006-06-15 Added scalex and scaley to Axes.autoscale\_view to support}] \leavevmode selective autoscaling just the x or y axis, and supported these command in plot so you can say plot(something, scaley=False) and just the x axis will be autoscaled. Modified axvline and axhline to support this, so for example axvline will no longer autoscale the y axis. JDH \end{description} 2006-06-13 Fix so numpy updates are backward compatible - TEO \begin{description} \item[{2006-06-12 Updated numerix to handle numpy restructuring of}] \leavevmode oldnumeric - TEO \item[{2006-06-12 Updated numerix.fft to handle numpy restructuring}] \leavevmode Added ImportError to numerix.linear\_algebra for numpy -TEO \item[{2006-06-11 Added quiverkey command to pylab and Axes, using}] \leavevmode QuiverKey class in quiver.py. Changed pylab and Axes to use quiver2 if possible, but drop back to the newly-renamed quiver\_classic if necessary. Modified examples/quiver\_demo.py to illustrate the new quiver and quiverkey. Changed LineCollection implementation slightly to improve compatibility with PolyCollection. - EF \item[{2006-06-11 Fixed a usetex bug for windows, running latex on files}] \leavevmode with spaces in their names or paths was failing - DSD \item[{2006-06-09 Made additions to numerix, changes to quiver to make it}] \leavevmode work with all numeric flavors. - EF \item[{2006-06-09 Added quiver2 function to pylab and method to axes,}] \leavevmode with implementation via a Quiver class in quiver.py. quiver2 will replace quiver before the next release; it is placed alongside it initially to facilitate testing and transition. See also examples/quiver2\_demo.py. - EF \item[{2006-06-08 Minor bug fix to make ticker.py draw proper minus signs}] \leavevmode with usetex - DSD \end{description} \bigskip\hrule\bigskip 2006-06-06 Released 0.87.3 at revision 2432 \begin{description} \item[{2006-05-30 More partial support for polygons with outline or fill,}] \leavevmode but not both. Made LineCollection inherit from ScalarMappable. - EF \end{description} 2006-05-29 Yet another revision of aspect-ratio handling. - EF \begin{description} \item[{2006-05-27 Committed a patch to prevent stroking zero-width lines in}] \leavevmode the svg backend - DSD \item[{2006-05-24 Fixed colorbar positioning bug identified by Helge}] \leavevmode Avlesen, and improved the algorithm; added a 'pad' kwarg to control the spacing between colorbar and parent axes. - EF \item[{2006-05-23 Changed color handling so that collection initializers}] \leavevmode can take any mpl color arg or sequence of args; deprecated float as grayscale, replaced by string representation of float. - EF \end{description} 2006-05-19 Fixed bug: plot failed if all points were masked - EF 2006-05-19 Added custom symbol option to scatter - JDH \begin{description} \item[{2006-05-18 New example, multi\_image.py; colorbar fixed to show}] \leavevmode offset text when the ScalarFormatter is used; FixedFormatter augmented to accept and display offset text. - EF \item[{2006-05-14 New colorbar; old one is renamed to colorbar\_classic.}] \leavevmode New colorbar code is in colorbar.py, with wrappers in figure.py and pylab.py. Fixed aspect-handling bug reported by Michael Mossey. Made backend\_bases.draw\_quad\_mesh() run.- EF \item[{2006-05-08 Changed handling of end ranges in contourf: replaced}] \leavevmode "clip-ends" kwarg with "extend". See docstring for details. -EF \end{description} 2006-05-08 Added axisbelow to rc - JDH 2006-05-08 If using PyGTK require version 2.2+ - SC \begin{description} \item[{2006-04-19 Added compression support to PDF backend, controlled by}] \leavevmode new pdf.compression rc setting. - JKS \end{description} 2006-04-19 Added Jouni's PDF backend 2006-04-18 Fixed a bug that caused agg to not render long lines \begin{description} \item[{2006-04-16 Masked array support for pcolormesh; made pcolormesh support the}] \leavevmode same combinations of X,Y,C dimensions as pcolor does; improved (I hope) description of grid used in pcolor, pcolormesh. - EF \end{description} 2006-04-14 Reorganized axes.py - EF \begin{description} \item[{2006-04-13 Fixed a bug Ryan found using usetex with sans-serif fonts and}] \leavevmode exponential tick labels - DSD \item[{2006-04-11 Refactored backend\_ps and backend\_agg to prevent module-level}] \leavevmode texmanager imports. Now these imports only occur if text.usetex rc setting is true - DSD \item[{2006-04-10 Committed changes required for building mpl on win32}] \leavevmode platforms with visual studio. This allows wxpython blitting for fast animations. - CM \end{description} 2006-04-10 Fixed an off-by-one bug in Axes.change\_geometry. \begin{description} \item[{2006-04-10 Fixed bug in pie charts where wedge wouldn't have label in}] \leavevmode legend. Submitted by Simon Hildebrandt. - ADS \item[{2006-05-06 Usetex makes temporary latex and dvi files in a temporary}] \leavevmode directory, rather than in the user's current working directory - DSD \item[{2006-04-05 Apllied Ken's wx deprecation warning patch closing sf patch}] \leavevmode \#1465371 - JDH \item[{2006-04-05 Added support for the new API in the postscript backend.}] \leavevmode Allows values to be masked using nan's, and faster file creation - DSD \item[{2006-04-05 Use python's subprocess module for usetex calls to}] \leavevmode external programs. subprocess catches when they exit abnormally so an error can be raised. - DSD \item[{2006-04-03 Fixed the bug in which widgets would not respond to}] \leavevmode events. This regressed the twinx functionality, so I also updated subplots\_adjust to update axes that share an x or y with a subplot instance. - CM \item[{2006-04-02 Moved PBox class to transforms and deleted pbox.py;}] \leavevmode made pylab axis command a thin wrapper for Axes.axis; more tweaks to aspect-ratio handling; fixed Axes.specgram to account for the new imshow default of unit aspect ratio; made contour set the Axes.dataLim. - EF \end{description} 2006-03-31 Fixed the Qt "Underlying C/C++ object deleted" bug. - JRE 2006-03-31 Applied Vasily Sulatskov's Qt Navigation Toolbar enhancement. - JRE \begin{description} \item[{2006-03-31 Ported Norbert's rewriting of Halldor's stineman\_interp}] \leavevmode algorithm to make it numerix compatible and added code to matplotlib.mlab. See examples/interp\_demo.py - JDH \item[{2006-03-30 Fixed a bug in aspect ratio handling; blocked potential}] \leavevmode crashes when panning with button 3; added axis('image') support. - EF \item[{2006-03-28 More changes to aspect ratio handling; new PBox class}] \leavevmode in new file pbox.py to facilitate resizing and repositioning axes; made PolarAxes maintain unit aspect ratio. - EF \item[{2006-03-23 Refactored TextWithDash class to inherit from, rather than}] \leavevmode delegate to, the Text class. Improves object inspection and closes bug \# 1357969 - DSD \item[{2006-03-22 Improved aspect ratio handling, including pylab interface.}] \leavevmode Interactive resizing, pan, zoom of images and plots (including panels with a shared axis) should work. Additions and possible refactoring are still likely. - EF \end{description} 2006-03-21 Added another colorbrewer colormap (RdYlBu) - JSWHIT \begin{description} \item[{2006-03-21 Fixed tickmarks for logscale plots over very large ranges.}] \leavevmode Closes bug \# 1232920 - DSD \end{description} 2006-03-21 Added Rob Knight's arrow code; see examples/arrow\_demo.py - JDH \begin{description} \item[{2006-03-20 Added support for masking values with nan's, using ADS's}] \leavevmode isnan module and the new API. Works for *Agg backends - DSD \end{description} 2006-03-20 Added contour.negative\_linestyle rcParam - ADS \begin{description} \item[{2006-03-20 Added \_isnan extension module to test for nan with Numeric}] \leavevmode\begin{itemize} \item {} ADS \end{itemize} \item[{2006-03-17 Added Paul and Alex's support for faceting with quadmesh}] \leavevmode in sf patch 1411223 - JDH \item[{2006-03-17 Added Charle Twardy's pie patch to support colors=None.}] \leavevmode Closes sf patch 1387861 - JDH \item[{2006-03-17 Applied sophana's patch to support overlapping axes with}] \leavevmode toolbar navigation by toggling activation with the 'a' key. Closes sf patch 1432252 - JDH \item[{2006-03-17 Applied Aarre's linestyle patch for backend EMF; closes sf}] \leavevmode patch 1449279 - JDH \item[{2006-03-17 Applied Jordan Dawe's patch to support kwarg properties}] \leavevmode for grid lines in the grid command. Closes sf patch 1451661 - JDH \end{description} 2006-03-17 Center postscript output on page when using usetex - DSD \begin{description} \item[{2006-03-17 subprocess module built if Python \textless{}2.4 even if subprocess}] \leavevmode can be imported from an egg - ADS \item[{2006-03-17 Added \_subprocess.c from Python upstream and hopefully}] \leavevmode enabled building (without breaking) on Windows, although not tested. - ADS \item[{2006-03-17 Updated subprocess.py to latest Python upstream and}] \leavevmode reverted name back to subprocess.py - ADS \end{description} 2006-03-16 Added John Porter's 3D handling code \bigskip\hrule\bigskip 2006-03-16 Released 0.87.2 at revision 2150 \begin{description} \item[{2006-03-15 Fixed bug in MaxNLocator revealed by \sphinxhref{mailto:daigos@infinito.it}{daigos@infinito.it}.}] \leavevmode The main change is that Locator.nonsingular now adjusts vmin and vmax if they are nearly the same, not just if they are equal. A new kwarg, "tiny", sets the threshold. - EF \item[{2006-03-14 Added import of compatibility library for newer numpy}] \leavevmode linear\_algebra - TEO \item[{2006-03-12 Extended "load" function to support individual columns and}] \leavevmode moved "load" and "save" into matplotlib.mlab so they can be used outside of pylab -- see examples/load\_converter.py - JDH \item[{2006-03-12 Added AutoDateFormatter and AutoDateLocator submitted}] \leavevmode by James Evans. Try the load\_converter.py example for a demo. - ADS \end{description} 2006-03-11 Added subprocess module from python-2.4 - DSD \begin{description} \item[{2006-03-11 Fixed landscape orientation support with the usetex}] \leavevmode option. The backend\_ps print\_figure method was getting complicated, I added a \_print\_figure\_tex method to maintain some degree of sanity - DSD \item[{2006-03-11 Added "papertype" savefig kwarg for setting}] \leavevmode postscript papersizes. papertype and ps.papersize rc setting can also be set to "auto" to autoscale pagesizes - DSD \item[{2006-03-09 Apply P-J's patch to make pstoeps work on windows}] \leavevmode patch report \# 1445612 - DSD \end{description} 2006-03-09 Make backend rc parameter case-insensitive - DSD \begin{description} \item[{2006-03-07 Fixed bug in backend\_ps related to C0-C6 papersizes,}] \leavevmode which were causing problems with postscript viewers. Supported page sizes include letter, legal, ledger, A0-A10, and B0-B10 - DSD \end{description} \bigskip\hrule\bigskip 2006-03-07 Released 0.87.1 \begin{description} \item[{2006-03-04 backend\_cairo.py:}] \leavevmode fix get\_rgb() bug reported by Keith Briggs. Require pycairo 1.0.2. Support saving png to file-like objects. - SC \end{description} 2006-03-03 Fixed pcolor handling of vmin, vmax - EF \begin{description} \item[{2006-03-02 improve page sizing with usetex with the latex}] \leavevmode geometry package. Closes bug \# 1441629 - DSD \item[{2006-03-02 Fixed dpi problem with usetex png output. Accepted a}] \leavevmode modified version of patch \# 1441809 - DSD \end{description} 2006-03-01 Fixed axis('scaled') to deal with case xmax \textless{} xmin - JSWHIT 2006-03-01 Added reversed colormaps (with '\_r' appended to name) - JSWHIT 2006-02-27 Improved eps bounding boxes with usetex - DSD 2006-02-27 Test svn commit, again! \begin{description} \item[{2006-02-27 Fixed two dependency checking bugs related to usetex}] \leavevmode on Windows - DSD \item[{2006-02-27 Made the rc deprecation warnings a little more human}] \leavevmode readable. \item[{2006-02-26 Update the previous gtk.main\_quit() bug fix to use gtk.main\_level()}] \leavevmode\begin{itemize} \item {} SC \end{itemize} \end{description} 2006-02-24 Implemented alpha support in contour and contourf - EF \begin{description} \item[{2006-02-22 Fixed gtk main quit bug when quit was called before}] \leavevmode mainloop. - JDH \item[{2006-02-22 Small change to colors.py to workaround apparent}] \leavevmode bug in numpy masked array module - JSWHIT \item[{2006-02-22 Fixed bug in ScalarMappable.to\_rgba() reported by}] \leavevmode Ray Jones, and fixed incorrect fix found by Jeff Whitaker - EF \end{description} \bigskip\hrule\bigskip 2006-02-22 Released 0.87 2006-02-21 Fixed portrait/landscape orientation in postscript backend - DSD 2006-02-21 Fix bug introduced in yesterday's bug fix - SC \begin{description} \item[{2006-02-20 backend\_gtk.py FigureCanvasGTK.draw(): fix bug reported by}] \leavevmode David Tremouilles - SC \item[{2006-02-20 Remove the "pygtk.require('2.4')" error from}] \leavevmode examples/embedding\_in\_gtk2.py - SC \item[{2006-02-18 backend\_gtk.py FigureCanvasGTK.draw(): simplify to use (rather than}] \leavevmode duplicate) the expose\_event() drawing code - SC \item[{2006-02-12 Added stagger or waterfall plot capability to LineCollection;}] \leavevmode illustrated in examples/collections.py. - EF \item[{2006-02-11 Massive cleanup of the usetex code in the postscript backend. Possibly}] \leavevmode fixed the clipping issue users were reporting with older versions of ghostscript - DSD \item[{2006-02-11 Added autolim kwarg to axes.add\_collection. Changed}] \leavevmode collection get\_verts() methods accordingly. - EF \item[{2006-02-09 added a temporary rc parameter text.dvipnghack, to allow Mac users to get nice}] \leavevmode results with the usetex option. - DSD \end{description} 2006-02-09 Fixed a bug related to setting font sizes with the usetex option. - DSD 2006-02-09 Fixed a bug related to usetex's latex code. - DSD \begin{description} \item[{2006-02-09 Modified behavior of font.size rc setting. You should define font.size in pts,}] \leavevmode which will set the "medium" or default fontsize. Special text sizes like axis labels or tick labels can be given relative font sizes like small, large, x-large, etc. and will scale accordingly. - DSD \item[{2006-02-08 Added py2exe specific datapath check again. Also added new}] \leavevmode py2exe helper function get\_py2exe\_datafiles for use in py2exe setup.py scripts. - CM \end{description} 2006-02-02 Added box function to pylab \begin{description} \item[{2006-02-02 Fixed a problem in setupext.py, tk library formatted in unicode}] \leavevmode caused build problems - DSD \end{description} 2006-02-01 Dropped TeX engine support in usetex to focus on LaTeX. - DSD \begin{description} \item[{2006-01-29 Improved usetex option to respect the serif, sans-serif, monospace,}] \leavevmode and cursive rc settings. Removed the font.latex.package rc setting, it is no longer required - DSD \end{description} 2006-01-29 Fixed tex's caching to include font.family rc information - DSD \begin{description} \item[{2006-01-29 Fixed subpixel rendering bug in *Agg that was causing}] \leavevmode uneven gridlines - JDH \item[{2006-01-28 Added fontcmd to backend\_ps's RendererPS.draw\_tex, to support other}] \leavevmode font families in eps output - DSD \item[{2006-01-28 Added MaxNLocator to ticker.py, and changed contour.py to}] \leavevmode use it by default. - EF \item[{2006-01-28 Added fontcmd to backend\_ps's RendererPS.draw\_tex, to support other}] \leavevmode font families in eps output - DSD \item[{2006-01-27 Buffered reading of matplotlibrc parameters in order to allow}] \leavevmode 'verbose' settings to be processed first (allows verbose.report during rc validation process) - DSD \item[{2006-01-27 Removed setuptools support from setup.py and created a}] \leavevmode separate setupegg.py file to replace it. - CM \item[{2006-01-26 Replaced the ugly datapath logic with a cleaner approach from}] \leavevmode \sphinxurl{http://wiki.python.org/moin/DistutilsInstallDataScattered}. Overrides the install\_data command. - CM \item[{2006-01-24 Don't use character typecodes in cntr.c --- changed to use}] \leavevmode defined typenumbers instead. - TEO \end{description} 2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency 2006-01-24 Added masked array support to scatter - EF \begin{description} \item[{2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency}] \leavevmode checking - DSD \end{description} \bigskip\hrule\bigskip 2006-01-24 Released 0.86.2 \begin{description} \item[{2006-01-20 Added a converters dict to pylab load to convert selected}] \leavevmode coloumns to float -- especially useful for files with date strings, uses a datestr2num converter - JDH \item[{2006-01-20 Added datestr2num to matplotlib dates to convert a string}] \leavevmode or sequence of strings to a matplotlib datenum \item[{2006-01-18 Added quadrilateral pcolormesh patch 1409190 by Alex Mont}] \leavevmode and Paul Kienzle -- this is *Agg only for now. See examples/quadmesh\_demo.py - JDH \end{description} 2006-01-18 Added Jouni's boxplot patch - JDH 2006-01-18 Added comma delimiter for pylab save - JDH 2006-01-12 Added Ryan's legend patch - JDH 2006-1-12 Fixed numpy / numeric to use .dtype.char to keep in SYNC with numpy SVN \bigskip\hrule\bigskip 2006-1-11 Released 0.86.1 2006-1-11 Fixed setup.py for win32 build and added rc template to the MANIFEST.in \begin{description} \item[{2006-1-10 Added xpdf distiller option. matplotlibrc ps.usedistiller can now be}] \leavevmode none, false, ghostscript, or xpdf. Validation checks for dependencies. This needs testing, but the xpdf option should produce the highest-quality output and small file sizes - DSD \item[{2006-01-10 For the usetex option, backend\_ps now does all the LaTeX work in the}] \leavevmode os's temp directory - DSD \end{description} 2006-1-10 Added checks for usetex dependencies. - DSD \bigskip\hrule\bigskip 2006-1-9 Released 0.86 2006-1-4 Changed to support numpy (new name for scipy\_core) - TEO 2006-1-4 Added Mark's scaled axes patch for shared axis 2005-12-28 Added Chris Barker's build\_wxagg patch - JDH \begin{description} \item[{2005-12-27 Altered numerix/scipy to support new scipy package}] \leavevmode structure - TEO \end{description} 2005-12-20 Fixed Jame's Boyles date tick reversal problem - JDH \begin{description} \item[{2005-12-20 Added Jouni's rc patch to support lists of keys to set on -}] \leavevmode JDH \item[{2005-12-12 Updated pyparsing and mathtext for some speed enhancements}] \leavevmode (Thanks Paul McGuire) and minor fixes to scipy numerix and setuptools \item[{2005-12-12 Matplotlib data is now installed as package\_data in}] \leavevmode the matplotlib module. This gets rid of checking the many possibilities in matplotlib.\_get\_data\_path() - CM \item[{2005-12-11 Support for setuptools/pkg\_resources to build and use}] \leavevmode matplotlib as an egg. Still allows matplotlib to exist using a traditional distutils install. - ADS \item[{2005-12-03 Modified setup to build matplotlibrc based on compile time}] \leavevmode findings. It will set numerix in the order of scipy, numarray, Numeric depending on which are founds, and backend as in preference order GTKAgg, WXAgg, TkAgg, GTK, Agg, PS \item[{2005-12-03 Modified scipy patch to support Numeric, scipy and numarray}] \leavevmode Some work remains to be done because some of the scipy imports are broken if only the core is installed. e.g., apparently we need from scipy.basic.fftpack import * rather than from scipy.fftpack import * \item[{2005-12-03 Applied some fixes to Nicholas Young's nonuniform image}] \leavevmode patch \end{description} 2005-12-01 Applied Alex Gontmakher hatch patch - PS only for now 2005-11-30 Added Rob McMullen's EMF patch 2005-11-30 Added Daishi's patch for scipy 2005-11-30 Fixed out of bounds draw markers segfault in agg 2005-11-28 Got TkAgg blitting working 100\% (cross fingers) correctly. - CM \begin{description} \item[{2005-11-27 Multiple changes in cm.py, colors.py, figure.py, image.py,}] \leavevmode contour.py, contour\_demo.py; new \_cm.py, examples/image\_masked.py. 1) Separated the color table data from cm.py out into a new file, \_cm.py, to make it easier to find the actual code in cm.py and to add new colormaps. Also added some line breaks to the color data dictionaries. Everything from \_cm.py is imported by cm.py, so the split should be transparent. 2) Enabled automatic generation of a colormap from a list of colors in contour; see modified examples/contour\_demo.py. 3) Support for imshow of a masked array, with the ability to specify colors (or no color at all) for masked regions, and for regions that are above or below the normally mapped region. See examples/image\_masked.py. 4) In support of the above, added two new classes, ListedColormap, and no\_norm, to colors.py, and modified the Colormap class to include common functionality. Added a clip kwarg to the normalize class. Reworked color handling in contour.py, especially in the ContourLabeller mixin. - EF \end{description} 2005-11-25 Changed text.py to ensure color is hashable. EF \bigskip\hrule\bigskip 2005-11-16 Released 0.85 2005-11-16 Changed the default default linewidth in rc to 1.0 \begin{description} \item[{2005-11-16 Replaced agg\_to\_gtk\_drawable with pure pygtk pixbuf code in}] \leavevmode backend\_gtkagg. When the equivalent is doe for blit, the agg extension code will no longer be needed \item[{2005-11-16 Added a maxdict item to cbook to prevent caches from}] \leavevmode growing w/o bounds \item[{2005-11-15 Fixed a colorup/colordown reversal bug in finance.py --}] \leavevmode Thanks Gilles \item[{2005-11-15 Applied Jouni K Steppanen's boxplot patch SF patch\#1349997}] \leavevmode\begin{itemize} \item {} JDH \end{itemize} \item[{2005-11-09 added axisbelow attr for Axes to determine whether ticks and such}] \leavevmode are above or below the actors \end{description} 2005-11-08 Added Nicolas' irregularly spaced image patch \begin{description} \item[{2005-11-08 Deprecated HorizontalSpanSelector and replaced with}] \leavevmode SpanSelection that takes a third arg, direction. The new SpanSelector supports horizontal and vertical span selection, and the appropriate min/max is returned. - CM \end{description} 2005-11-08 Added lineprops dialog for gtk \begin{description} \item[{2005-11-03 Added FIFOBuffer class to mlab to support real time feeds}] \leavevmode and examples/fifo\_buffer.py \item[{2005-11-01 Contributed Nickolas Young's patch for afm mathtext to}] \leavevmode support mathtext based upon the standard postscript Symbol font when ps.usetex = True. \end{description} 2005-10-26 Added support for scatter legends - thanks John Gill \begin{description} \item[{2005-10-20 Fixed image clipping bug that made some tex labels}] \leavevmode disappear. JDH \end{description} 2005-10-14 Removed sqrt from dvipng 1.6 alpha channel mask. 2005-10-14 Added width kwarg to hist function 2005-10-10 Replaced all instances of os.rename with shutil.move 2005-10-05 Added Michael Brady's ydate patch 2005-10-04 Added rkern's texmanager patch \begin{description} \item[{2005-09-25 contour.py modified to use a single ContourSet class}] \leavevmode that handles filled contours, line contours, and labels; added keyword arg (clip\_ends) to contourf. Colorbar modified to work with new ContourSet object; if the ContourSet has lines rather than polygons, the colorbar will follow suit. Fixed a bug introduced in 0.84, in which contourf(...,colors=...) was broken - EF \end{description} \bigskip\hrule\bigskip 2005-09-19 Released 0.84 \begin{description} \item[{2005-09-14 Added a new 'resize\_event' which triggers a callback with a}] \leavevmode backend\_bases.ResizeEvent object - JDH \end{description} 2005-09-14 font\_manager.py: removed chkfontpath from x11FontDirectory() - SC \begin{description} \item[{2005-09-14 Factored out auto date locator/formatter factory code into}] \leavevmode matplotlib.date.date\_ticker\_factory; applies John Bryne's quiver patch. \end{description} 2005-09-13 Added Mark's axes positions history patch \#1286915 \begin{description} \item[{2005-09-09 Added support for auto canvas resizing with}] \leavevmode fig.set\_figsize\_inches(9,5,forward=True) \# inches OR fig.resize(400,300) \# pixels \item[{2005-09-07 figure.py: update Figure.draw() to use the updated}] \leavevmode renderer.draw\_image() so that examples/figimage\_demo.py works again. examples/stock\_demo.py: remove data\_clipping (which no longer exists) - SC \end{description} 2005-09-06 Added Eric's tick.direction patch: in or out in rc 2005-09-06 Added Martin's rectangle selector widget \begin{description} \item[{2005-09-04 Fixed a logic err in text.py that was preventing rgxsuper}] \leavevmode from matching - JDH \end{description} 2005-08-29 Committed Ken's wx blit patch \#1275002 \begin{description} \item[{2005-08-26 colorbar modifications - now uses contourf instead of imshow}] \leavevmode so that colors used by contourf are displayed correctly. Added two new keyword args (cspacing and clabels) that are only relevant for ContourMappable images - JSWHIT \end{description} 2005-08-24 Fixed a PS image bug reported by Darren - JDH \begin{description} \item[{2005-08-23 colors.py: change hex2color() to accept unicode strings as well as}] \leavevmode normal strings. Use isinstance() instead of types.IntType etc - SC \end{description} 2005-08-16 removed data\_clipping line and rc property - JDH \begin{description} \item[{2005-08-22 backend\_svg.py: Remove redundant "x=0.0 y=0.0" from svg element.}] \leavevmode Increase svg version from 1.0 to 1.1. Add viewBox attribute to svg element to allow SVG documents to scale-to-fit into an arbitrary viewport - SC \end{description} 2005-08-16 Added Eric's dot marker patch - JDH 2005-08-08 Added blitting/animation for TkAgg - CM 2005-08-05 Fixed duplicate tickline bug - JDH \begin{description} \item[{2005-08-05 Fixed a GTK animation bug that cropped up when doing}] \leavevmode animations in gtk//gtkagg canvases that had widgets packed above them \end{description} 2005-08-05 Added Clovis Goldemberg patch to the tk save dialog \begin{description} \item[{2005-08-04 Removed origin kwarg from backend.draw\_image. origin is}] \leavevmode handled entirely by the frontend now. \end{description} 2005-07-03 Fixed a bug related to TeX commands in backend\_ps 2005-08-03 Fixed SVG images to respect upper and lower origins. 2005-08-03 Added flipud method to image and removed it from to\_str. \begin{description} \item[{2005-07-29 Modified figure.figaspect to take an array or number;}] \leavevmode modified backend\_svg to write utf-8 - JDH \item[{2005-07-30 backend\_svg.py: embed png image files in svg rather than linking}] \leavevmode to a separate png file, fixes bug \#1245306 (thanks to Norbert Nemec for the patch) - SC \end{description} \bigskip\hrule\bigskip 2005-07-29 Released 0.83.2 \begin{description} \item[{2005-07-27 Applied SF patch 1242648: minor rounding error in}] \leavevmode IndexDateFormatter in dates.py \item[{2005-07-27 Applied sf patch 1244732: Scale axis such that circle}] \leavevmode looks like circle - JDH \end{description} 2005-07-29 Improved message reporting in texmanager and backend\_ps - DSD \begin{description} \item[{2005-07-28 backend\_gtk.py: update FigureCanvasGTK.draw() (needed due to the}] \leavevmode recent expose\_event() change) so that examples/anim.py works in the usual way - SC \item[{2005-07-26 Added new widgets Cursor and HorizontalSpanSelector to}] \leavevmode matplotlib.widgets. See examples/widgets/cursor.py and examples/widgets/span\_selector.py - JDH \item[{2005-07-26 added draw event to mpl event hierarchy -- triggered on}] \leavevmode figure.draw \end{description} 2005-07-26 backend\_gtk.py: allow 'f' key to toggle window fullscreen mode \begin{description} \item[{2005-07-26 backend\_svg.py: write "\textless{}.../\textgreater{}" elements all on one line and remove}] \leavevmode surplus spaces - SC \item[{2005-07-25 backend\_svg.py: simplify code by deleting GraphicsContextSVG and}] \leavevmode RendererSVG.new\_gc(), and moving the gc.get\_capstyle() code into RendererSVG.\_get\_gc\_props\_svg() - SC \item[{2005-07-24 backend\_gtk.py: call FigureCanvasBase.motion\_notify\_event() on}] \leavevmode all motion-notify-events, not just ones where a modifier key or button has been pressed (fixes bug report from Niklas Volbers) - SC \item[{2005-07-24 backend\_gtk.py: modify print\_figure() use own pixmap, fixing}] \leavevmode problems where print\_figure() overwrites the display pixmap. return False from all button/key etc events - to allow the event to propagate further - SC \item[{2005-07-23 backend\_gtk.py: change expose\_event from using set\_back\_pixmap();}] \leavevmode clear() to draw\_drawable() - SC \item[{2005-07-23 backend\_gtk.py: removed pygtk.require()}] \leavevmode matplotlib/\_\_init\_\_.py: delete 'FROZEN' and 'McPLError' which are no longer used - SC \end{description} 2005-07-22 backend\_gdk.py: removed pygtk.require() - SC \begin{description} \item[{2005-07-21 backend\_svg.py: Remove unused imports. Remove methods doc strings}] \leavevmode which just duplicate the docs from backend\_bases.py. Rename draw\_mathtext to \_draw\_mathtext. - SC \item[{2005-07-17 examples/embedding\_in\_gtk3.py: new example demonstrating placing}] \leavevmode a FigureCanvas in a gtk.ScrolledWindow - SC \end{description} 2005-07-14 Fixed a Windows related bug (\#1238412) in texmanager - DSD \begin{description} \item[{2005-07-11 Fixed color kwarg bug, setting color=1 or 0 caused an}] \leavevmode exception - DSD \end{description} 2005-07-07 Added Eric's MA set\_xdata Line2D fix - JDH \begin{description} \item[{2005-07-06 Made HOME/.matplotlib the new config dir where the}] \leavevmode matplotlibrc file, the ttf.cache, and the tex.cache live. The new default filenames in .matplotlib have no leading dot and are not hidden. e.g., the new names are matplotlibrc tex.cache ttffont.cache. This is how ipython does it so it must be right. If old files are found, a warning is issued and they are moved to the new location. Also fixed texmanager to put all files, including temp files in \textasciitilde{}/.matplotlib/tex.cache, which allows you to usetex in non-writable dirs. \item[{2005-07-05 Fixed bug \#1231611 in subplots adjust layout. The problem}] \leavevmode was that the text cacheing mechanism was not using the transformation affine in the key. - JDH \item[{2005-07-05 Fixed default backend import problem when using API (SF bug}] \leavevmode \# 1209354 - see API\_CHANGES for more info - JDH \end{description} 2005-07-04 backend\_gtk.py: require PyGTK version 2.0.0 or higher - SC \begin{description} \item[{2005-06-30 setupext.py: added numarray\_inc\_dirs for building against}] \leavevmode numarray when not installed in standard location - ADS \item[{2005-06-27 backend\_svg.py: write figure width, height as int, not float.}] \leavevmode Update to fix some of the pychecker warnings - SC \item[{2005-06-23 Updated examples/agg\_test.py to demonstrate curved paths}] \leavevmode and fills - JDH \item[{2005-06-21 Moved some texmanager and backend\_agg tex caching to class}] \leavevmode level rather than instance level - JDH \item[{2005-06-20 setupext.py: fix problem where \_nc\_backend\_gdk is installed to the}] \leavevmode wrong directory - SC \end{description} 2005-06-19 Added 10.4 support for CocoaAgg. - CM \begin{description} \item[{2005-06-18 Move Figure.get\_width\_height() to FigureCanvasBase and return}] \leavevmode int instead of float. - SC \item[{2005-06-18 Applied Ted Drain's QtAgg patch: 1) Changed the toolbar to}] \leavevmode be a horizontal bar of push buttons instead of a QToolbar and updated the layout algorithms in the main window accordingly. This eliminates the ability to drag and drop the toolbar and detach it from the window. 2) Updated the resize algorithm in the main window to show the correct size for the plot widget as requested. This works almost correctly right now. It looks to me like the final size of the widget is off by the border of the main window but I haven't figured out a way to get that information yet. We could just add a small margin to the new size but that seems a little hacky. 3) Changed the x/y location label to be in the toolbar like the Tk backend instead of as a status line at the bottom of the widget. 4) Changed the toolbar pixmaps to use the ppm files instead of the png files. I noticed that the Tk backend buttons looked much nicer and it uses the ppm files so I switched them. \item[{2005-06-17 Modified the gtk backend to not queue mouse motion events.}] \leavevmode This allows for live updates when dragging a slider. - CM \item[{2005-06-17 Added starter CocoaAgg backend. Only works on OS 10.3 for}] \leavevmode now and requires PyObjC. (10.4 is high priority) - CM \item[{2005-06-17 Upgraded pyparsing and applied Paul McGuire's suggestions}] \leavevmode for speeding things up. This more than doubles the speed of mathtext in my simple tests. JDH \end{description} 2005-06-16 Applied David Cooke's subplot make\_key patch \bigskip\hrule\bigskip 2005-06-15 0.82 released \begin{description} \item[{2005-06-15 Added subplot config tool to GTK* backends -- note you must}] \leavevmode now import the NavigationToolbar2 from your backend of choice rather than from backend\_gtk because it needs to know about the backend specific canvas -- see examples/embedding\_in\_gtk2.py. Ditto for wx backend -- see examples/embedding\_in\_wxagg.py \end{description} 2005-06-15 backend\_cairo.py: updated to use pycairo 0.5.0 - SC \begin{description} \item[{2005-06-14 Wrote some GUI neutral widgets (Button, Slider,}] \leavevmode RadioButtons, CheckButtons) in matplotlib.widgets. See examples/widgets/*.py - JDH \item[{2005-06-14 Exposed subplot parameters as rc vars and as the fig}] \leavevmode SubplotParams instance subplotpars. See figure.SubplotParams, figure.Figure.subplots\_adjust and the pylab method subplots\_adjust and examples/subplots\_adjust.py . Also added a GUI neutral widget for adjusting subplots, see examples/subplot\_toolbar.py - JDH \item[{2005-06-13 Exposed cap and join style for lines with new rc params and}] \leavevmode\begin{quote} line properties \end{quote} lines.dash\_joinstyle : miter \# miter\textbar{}round\textbar{}bevel lines.dash\_capstyle : butt \# butt\textbar{}round\textbar{}projecting lines.solid\_joinstyle : miter \# miter\textbar{}round\textbar{}bevel lines.solid\_capstyle : projecting \# butt\textbar{}round\textbar{}projecting \end{description} 2005-06-13 Added kwargs to Axes init 2005-06-13 Applied Baptiste's tick patch - JDH \begin{description} \item[{2005-06-13 Fixed rc alias 'l' bug reported by Fernando by removing}] \leavevmode aliases for mainlevel rc options. - JDH \end{description} 2005-06-10 Fixed bug \#1217637 in ticker.py - DSD 2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - DSD 2005-06-08 Added Sean Richard's hist binning fix -- see API\_CHANGES - JDH \begin{description} \item[{2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed}] \leavevmode\begin{itemize} \item {} DSD \end{itemize} \end{description} \bigskip\hrule\bigskip 2005-06-07 matplotlib-0.81 released 2005-06-06 Added autoscale\_on prop to axes 2005-06-06 Added Nick's picker "among" patch - JDH 2005-06-05 Fixed a TeX/LaTeX font discrepency in backend\_ps. - DSD \begin{description} \item[{2005-06-05 Added a ps.distill option in rc settings. If True, postscript}] \leavevmode output will be distilled using ghostscript, which should trim the file size and allow it to load more quickly. Hopefully this will address the issue of large ps files due to font definitions. Tested with gnu-ghostscript-8.16. - DSD \end{description} 2005-06-03 Improved support for tex handling of text in backend\_ps. - DSD \begin{description} \item[{2005-06-03 Added rc options to render text with tex or latex, and to select}] \leavevmode the latex font package. - DSD \end{description} 2005-06-03 Fixed a bug in ticker.py causing a ZeroDivisionError \begin{description} \item[{2005-06-02 backend\_gtk.py remove DBL\_BUFFER, add line to expose\_event to}] \leavevmode try to fix pygtk 2.6 redraw problem - SC \item[{2005-06-01 The default behavior of ScalarFormatter now renders scientific}] \leavevmode notation and large numerical offsets in a label at the end of the axis. - DSD \end{description} 2005-06-01 Added Nicholas' frombyte image patch - JDH 2005-05-31 Added vertical TeX support for agg - JDH 2005-05-31 Applied Eric's cntr patch - JDH \begin{description} \item[{2005-05-27 Finally found the pesky agg bug (which Maxim was kind}] \leavevmode enough to fix within hours) that was causing a segfault in the win32 cached marker drawing. Now windows users can get the enormouse performance benefits of caced markers w/o those occasional pesy screenshots. - JDH \item[{2005-05-27 Got win32 build system working again, using a more recent}] \leavevmode version of gtk and pygtk in the win32 build, gtk 2.6 from \sphinxurl{http://www.gimp.org/~tml/gimp/win32/downloads.html} (you will also need libpng12.dll to use these). I haven't tested whether this binary build of mpl for win32 will work with older gtk runtimes, so you may need to upgrade. \item[{2005-05-27 Fixed bug where 2nd wxapp could be started if using wxagg}] \leavevmode backend. - ADS \end{description} 2005-05-26 Added Daishi text with dash patch -- see examples/dashtick.py \begin{description} \item[{2005-05-26 Moved backend\_latex functionality into backend\_ps. If}] \leavevmode text.usetex=True, the PostScript backend will use LaTeX to generate the .ps or .eps file. Ghostscript is required for eps output. - DSD \end{description} 2005-05-24 Fixed alignment and color issues in latex backend. - DSD \begin{description} \item[{2005-05-21 Fixed raster problem for small rasters with dvipng -- looks}] \leavevmode like it was a premultipled alpha problem - JDH \item[{2005-05-20 Added linewidth and faceted kwarg to scatter to control}] \leavevmode edgewidth and color. Also added autolegend patch to inspect line segments. \end{description} 2005-05-18 Added Orsay and JPL qt fixes - JDH \begin{description} \item[{2005-05-17 Added a psfrag latex backend -- some alignment issues need}] \leavevmode to be worked out. Run with -dLaTeX and a \sphinxstyleemphasis{.tex file and *.eps file are generated. latex and dvips the generated latex file to get ps output. Note xdvi *does} not work, you must generate ps.- JDH \item[{2005-05-13 Added Florent Rougon's Axis set\_label1}] \leavevmode patch \end{description} 2005-05-17 pcolor optimization, fixed bug in previous pcolor patch - JSWHIT 2005-05-16 Added support for masked arrays in pcolor - JSWHIT \begin{description} \item[{2005-05-12 Started work on TeX text for antigrain using pngdvi -- see}] \leavevmode examples/tex\_demo.py and the new module matplotlib.texmanager. Rotated text not supported and rendering small glyps is not working right yet. BUt large fontsizes and/or high dpi saved figs work great. \item[{2005-05-10 New image resize options interpolation options. New values}] \leavevmode for the interp kwarg are 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos', 'blackman' See help(imshow) for details, particularly the interpolation, filternorm and filterrad kwargs \end{description} 2005-05-10 Applied Eric's contour mem leak fixes - JDH \begin{description} \item[{2005-05-10 Extended python agg wrapper and started implementing}] \leavevmode backend\_agg2, an agg renderer based on the python wrapper. This will be more flexible and easier to extend than the current backend\_agg. See also examples/agg\_test.py - JDH \item[{2005-05-09 Added Marcin's no legend patch to exclude lines from the}] \leavevmode autolegend builder plot(x, y, label='nolegend') \end{description} 2005-05-05 Upgraded to agg23 2005-05-05 Added newscalarformatter\_demo.py to examples. -DSD \begin{description} \item[{2005-05-04 Added NewScalarFormatter. Improved formatting of ticklabels,}] \leavevmode scientific notation, and the ability to plot large large numbers with small ranges, by determining a numerical offset. See ticker.NewScalarFormatter for more details. -DSD \end{description} 2005-05-03 Added the option to specify a delimiter in pylab.load -DSD 2005-04-28 Added Darren's line collection example 2005-04-28 Fixed aa property in agg - JDH 2005-04-27 Set postscript page size in .matplotlibrc - DSD 2005-04-26 Added embedding in qt example. - JDH \begin{description} \item[{2005-04-14 Applied Michael Brady's qt backend patch: 1) fix a bug}] \leavevmode where keyboard input was grabbed by the figure and not released 2) turn on cursor changes 3) clean up a typo and commented-out print statement. - JDH \item[{2005-04-14 Applied Eric Firing's masked data lines patch and contour}] \leavevmode patch. Support for masked arrays has been added to the plot command and to the Line2D object. Only the valid points are plotted. A "valid\_only" kwarg was added to the get\_xdata() and get\_ydata() methods of Line2D; by default it is False, so that the original data arrays are returned. Setting it to True returns the plottable points. - see examples/masked\_demo.py - JDH \end{description} 2005-04-13 Applied Tim Leslie's arrow key event handling patch - JDH \bigskip\hrule\bigskip 0.80 released \begin{description} \item[{2005-04-11 Applied a variant of rick's xlim/ylim/axis patch. These}] \leavevmode functions now take kwargs to let you selectively alter only the min or max if desired. e.g., xlim(xmin=2) or axis(ymax=3). They always return the new lim. - JDH \item[{2005-04-11 Incorporated Werner's wx patch -- wx backend should be}] \leavevmode compatible with wxpython2.4 and recent versions of 2.5. Some early versions of wxpython 2.5 will not work because there was a temporary change in the dc API that was rolled back to make it 2.4 compliant \item[{2005-04-11 modified tkagg show so that new figure window pops up on}] \leavevmode call to figure \end{description} 2005-04-11 fixed wxapp init bug \begin{description} \item[{2005-04-02 updated backend\_ps.draw\_lines, draw\_markers for use with the}] \leavevmode new API - DSD \end{description} 2005-04-01 Added editable polygon example \bigskip\hrule\bigskip 2005-03-31 0.74 released \begin{description} \item[{2005-03-30 Fixed and added checks for floating point inaccuracy in}] \leavevmode ticker.Base - DSD \item[{2005-03-30 updated /ellipse definition in backend\_ps.py to address bug}] \leavevmode \#1122041 - DSD \end{description} 2005-03-29 Added unicode support for Agg and PS - JDH 2005-03-28 Added Jarrod's svg patch for text - JDH 2005-03-28 Added Ludal's arrow and quiver patch - JDH \begin{description} \item[{2005-03-28 Added label kwarg to Axes to facilitate forcing the}] \leavevmode creation of new Axes with otherwise identical attributes \end{description} 2005-03-28 Applied boxplot and OSX font search patches 2005-03-27 Added ft2font NULL check to fix Japanase font bug - JDH \begin{description} \item[{2005-03-27 Added sprint legend patch plus John Gill's tests and fix --}] \leavevmode see examples/legend\_auto.py - JDH \end{description} \bigskip\hrule\bigskip 2005-03-19 0.73.1 released 2005-03-19 Reverted wxapp handling because it crashed win32 - JDH 2005-03-18 Add .number attribute to figure objects returned by figure() - FP \bigskip\hrule\bigskip 2005-03-18 0.73 released 2005-03-16 Fixed labelsep bug 2005-03-16 Applied Darren's ticker fix for small ranges - JDH 2005-03-16 Fixed tick on horiz colorbar - JDH 2005-03-16 Added Japanses winreg patch - JDH \begin{description} \item[{2005-03-15 backend\_gtkagg.py: changed to use double buffering, this fixes}] \leavevmode the problem reported Joachim Berdal Haga - "Parts of plot lagging from previous frame in animation". Tested with anim.py and it makes no noticable difference to performance (23.7 before, 23.6 after) - SC \item[{2005-03-14 add src/\_backend\_gdk.c extension to provide a substitute function}] \leavevmode for pixbuf.get\_pixels\_array(). Currently pixbuf.get\_pixels\_array() only works with Numeric, and then only works if pygtk has been compiled with Numeric support. The change provides a function pixbuf\_get\_pixels\_array() which works with Numeric and numarray and is always available. It means that backend\_gtk should be able to display images and mathtext in all circumstances. - SC \end{description} 2005-03-11 Upgraded CXX to 5.3.1 \begin{description} \item[{2005-03-10 remove GraphicsContextPS.set\_linestyle()}] \leavevmode and GraphicsContextSVG.set\_linestyle() since they do no more than the base class GraphicsContext.set\_linestyle() - SC \end{description} 2005-03-09 Refactored contour functionality into dedicated module 2005-03-09 Added Eric's contourf updates and Nadia's clabel functionality \begin{description} \item[{2005-03-09 Moved colorbar to figure.Figure to expose it for API developers}] \leavevmode\begin{itemize} \item {} JDH \end{itemize} \end{description} 2005-03-09 backend\_cairo.py: implemented draw\_markers() - SC \begin{description} \item[{2005-03-09 cbook.py: only use enumerate() (the python version) if the builtin}] \leavevmode\begin{description} \item[{version is not available.}] \leavevmode Add new function 'izip' which is set to itertools.izip if available and the python equivalent if not available. - SC \end{description} \item[{2005-03-07 backend\_gdk.py: remove PIXELS\_PER\_INCH from points\_to\_pixels(), but}] \leavevmode\begin{description} \item[{still use it to adjust font sizes. This allows the GTK version of}] \leavevmode line\_styles.py to more closely match GTKAgg, previously the markers were being drawn too large. - SC \end{description} \end{description} 2005-03-01 Added Eric's contourf routines \begin{description} \item[{2005-03-01 Added start of proper agg SWIG wrapper. I would like to}] \leavevmode expose agg functionality directly a the user level and this module will serve that purpose eventually, and will hopefully take over most of the functionality of the current \_image and \_backend\_agg modules. - JDH \item[{2005-02-28 Fixed polyfit / polyval to convert input args to float}] \leavevmode arrays - JDH \item[{2005-02-25 Add experimental feature to backend\_gtk.py to enable/disable}] \leavevmode double buffering (DBL\_BUFFER=True/False) - SC \item[{2005-02-24 colors.py change ColorConverter.to\_rgb() so it always returns rgb}] \leavevmode (and not rgba), allow cnames keys to be cached, change the exception raised from RuntimeError to ValueError (like hex2color()) hex2color() use a regular expression to check the color string is valid - SC \item[{2005-02-23 Added rc param ps.useafm so backend ps can use native afm}] \leavevmode fonts or truetype. afme breaks mathtext but causes much smaller font sizes and may result in images that display better in some contexts (e.g., pdfs incorporated into latex docs viewed in acrobat reader). I would like to extend this approach to allow the user to use truetype only for mathtext, which should be easy. \item[{2005-02-23 Used sequence protocol rather than tuple in agg collection}] \leavevmode drawing routines for greater flexibility - JDH \end{description} \bigskip\hrule\bigskip 2005-02-22 0.72.1 released \begin{description} \item[{2005-02-21 fixed linestyles for collections -- contour now dashes for}] \leavevmode levels \textless{}0 \end{description} 2005-02-21 fixed ps color bug - JDH 2005-02-15 fixed missing qt file \begin{description} \item[{2005-02-15 banished error\_msg and report\_error. Internal backend}] \leavevmode methods like error\_msg\_gtk are preserved. backend writers, check your backends, and diff against 0.72 to make sure I did the right thing! - JDH \end{description} 2005-02-14 Added enthought traits to matplotlib tree - JDH \bigskip\hrule\bigskip 2005-02-14 0.72 released 2005-02-14 fix bug in cbook alltrue() and onetrue() - SC 2005-02-11 updated qtagg backend from Ted - JDH 2005-02-11 matshow fixes for figure numbering, return value and docs - FP 2005-02-09 new zorder example for fine control in zorder\_demo.py - FP \begin{description} \item[{2005-02-09 backend renderer draw\_lines now has transform in backend,}] \leavevmode as in draw\_markers; use numerix in \_backend\_agg, aded small line optimization to agg \end{description} 2005-02-09 subplot now deletes axes that it overlaps \begin{description} \item[{2005-02-08 Added transparent support for gzipped files in load/save - Fernando}] \leavevmode Perez (FP from now on). \item[{2005-02-08 Small optimizations in PS backend. They may have a big impact for}] \leavevmode large plots, otherwise they don't hurt - FP \item[{2005-02-08 Added transparent support for gzipped files in load/save - Fernando}] \leavevmode Perez (FP from now on). \item[{2005-02-07 Added newstyle path drawing for markers - only implemented}] \leavevmode in agg currently - JDH \end{description} 2005-02-05 Some superscript text optimizations for ticking log plots \begin{description} \item[{2005-02-05 Added some default key press events to pylab figures: 'g'}] \leavevmode toggles grid - JDH \item[{2005-02-05 Added some support for handling log switching for lines}] \leavevmode that have nonpos data - JDH \item[{2005-02-04 Added Nadia's contour patch - contour now has matlab}] \leavevmode compatible syntax; this also fixed an unequal sized contour array bug- JDH \item[{2005-02-04 Modified GTK backends to allow the FigureCanvas to be resized}] \leavevmode smaller than its original size - SC \end{description} 2005-02-02 Fixed a bug in dates mx2num - JDH 2005-02-02 Incorporated Fernando's matshow - JDH \begin{description} \item[{2005-02-01 Added Fernando's figure num patch, including experemental}] \leavevmode support for pylab backend switching, LineCOllection.color warns, savefig now a figure method, fixed a close(fig) bug - JDH \end{description} 2005-01-31 updated datalim in contour - JDH 2005-01-30 Added backend\_qtagg.py provided by Sigve Tjora - SC \begin{description} \item[{2005-01-28 Added tk.inspect rc param to .matplotlibrc. IDLE users}] \leavevmode should set tk.pythoninspect:True and interactive:True and backend:TkAgg \item[{2005-01-28 Replaced examples/interactive.py with an updated script from}] \leavevmode Fernando Perez - SC \item[{2005-01-27 Added support for shared x or y axes. See}] \leavevmode examples/shared\_axis\_demo.py and examples/ganged\_plots.py \item[{2005-01-27 Added Lee's patch for missing symbols leq and LEFTbracket}] \leavevmode to \_mathtext\_data - JDH \item[{2005-01-26 Added Baptiste's two scales patch -- see help(twinx) in the}] \leavevmode pylab interface for more info. See also examples/two\_scales.py \item[{2005-01-24 Fixed a mathtext parser bug that prevented font changes in}] \leavevmode sub/superscripts - JDH \item[{2005-01-24 Fixed contour to work w/ interactive changes in colormaps,}] \leavevmode clim, etc - JDH \end{description} \bigskip\hrule\bigskip 2005-01-21 matplotlib-0.71 released 2005-01-21 Refactored numerix to solve vexing namespace issues - JDH 2005-01-21 Applied Nadia's contour bug fix - JDH \begin{description} \item[{2005-01-20 Made some changes to the contour routine - particularly}] \leavevmode region=1 seems t fix a lot of the zigzag strangeness. Added colormaps as default for contour - JDH \item[{2005-01-19 Restored builtin names which were overridden (min, max,}] \leavevmode abs, round, and sum) in pylab. This is a potentially significant change for those who were relying on an array version of those functions that previously overrode builtin function names. - ADS \item[{2005-01-18 Added accents to mathtext: hat, breve, grave, bar,}] \leavevmode acute, tilde, vec, dot, ddot. All of them have the same syntax, e.g., to make an overbar you do bar\{o\} or to make an o umlaut you do ddot\{o\}. The shortcuts are also provided, e.g., "o 'e {}`e \textasciitilde{}n .x \textasciicircum{}y - JDH \end{description} 2005-01-18 Plugged image resize memory leaks - JDH 2005-01-18 Fixed some mathtext parser problems relating to superscripts \begin{description} \item[{2005-01-17 Fixed a yticklabel problem for colorbars under change of}] \leavevmode clim - JDH \item[{2005-01-17 Cleaned up Destroy handling in wx reducing memleak/fig from}] \leavevmode approx 800k to approx 6k- JDH \end{description} 2005-01-17 Added kappa to latex\_to\_bakoma - JDH 2005-01-15 Support arbitrary colorbar axes and horizontal colorbars - JDH \begin{description} \item[{2005-01-15 Fixed colormap number of colors bug so that the colorbar}] \leavevmode has the same discretization as the image - JDH \end{description} 2005-01-15 Added Nadia's x,y contour fix - JDH \begin{description} \item[{2005-01-15 backend\_cairo: added PDF support which requires pycairo 0.1.4.}] \leavevmode Its not usable yet, but is ready for when the Cairo PDF backend matures - SC \end{description} 2005-01-15 Added Nadia's x,y contour fix 2005-01-12 Fixed set clip\_on bug in artist - JDH 2005-01-11 Reverted pythoninspect in tkagg - JDH \begin{description} \item[{2005-01-09 Fixed a backend\_bases event bug caused when an event is}] \leavevmode triggered when location is None - JDH \item[{2005-01-07 Add patch from Stephen Walton to fix bug in pylab.load()}] \leavevmode when the \% character is included in a comment. - ADS \item[{2005-01-07 Added markerscale attribute to Legend class. This allows}] \leavevmode the marker size in the legend to be adjusted relative to that in the plot. - ADS \item[{2005-01-06 Add patch from Ben Vanhaeren to make the FigureManagerGTK vbox a}] \leavevmode public attribute - SC \end{description} \bigskip\hrule\bigskip 2004-12-30 Release 0.70 \begin{description} \item[{2004-12-28 Added coord location to key press and added a}] \leavevmode examples/picker\_demo.py \end{description} 2004-12-28 Fixed coords notification in wx toolbar - JDH \begin{description} \item[{2004-12-28 Moved connection and disconnection event handling to the}] \leavevmode FigureCanvasBase. Backends now only need to connect one time for each of the button press, button release and key press/release functions. The base class deals with callbacks and multiple connections. This fixes flakiness on some backends (tk, wx) in the presence of multiple connections and/or disconnect - JDH \item[{2004-12-27 Fixed PS mathtext bug where color was not set - Jochen}] \leavevmode please verify correct - JDH \item[{2004-12-27 Added Shadow class and added shadow kwarg to legend and pie}] \leavevmode for shadow effect - JDH \end{description} 2004-12-27 Added pie charts and new example/pie\_demo.py \begin{description} \item[{2004-12-23 Fixed an agg text rotation alignment bug, fixed some text}] \leavevmode kwarg processing bugs, and added examples/text\_rotation.py to explain and demonstrate how text rotations and alignment work in matplotlib. - JDH \end{description} \bigskip\hrule\bigskip 2004-12-22 0.65.1 released - JDH \begin{description} \item[{2004-12-22 Fixed colorbar bug which caused colorbar not to respond to}] \leavevmode changes in colormap in some instances - JDH \item[{2004-12-22 Refactored NavigationToolbar in tkagg to support app}] \leavevmode embedding , init now takes (canvas, window) rather than (canvas, figman) - JDH \item[{2004-12-21 Refactored axes and subplot management - removed}] \leavevmode add\_subplot and add\_axes from the FigureManager. classic toolbar updates are done via an observer pattern on the figure using add\_axobserver. Figure now maintains the axes stack (for gca) and supports axes deletion. Ported changes to GTK, Tk, Wx, and FLTK. Please test! Added delaxes - JDH \item[{2004-12-21 Lots of image optimizations - 4x performance boost over}] \leavevmode 0.65 JDH \item[{2004-12-20 Fixed a figimage bug where the axes is shown and modified}] \leavevmode tkagg to move the destroy binding into the show method. \item[{2004-12-18 Minor refactoring of NavigationToolbar2 to support}] \leavevmode embedding in an application - JDH \end{description} 2004-12-14 Added linestyle to collections (currently broken) - JDH \begin{description} \item[{2004-12-14 Applied Nadia's setupext patch to fix libstdc++ link}] \leavevmode problem with contour and solaris -JDH \item[{2004-12-14 A number of pychecker inspired fixes, including removal of}] \leavevmode True and False from cbook which I erroneously thought was needed for python2.2 - JDH \item[{2004-12-14 Finished porting doc strings for set introspection.}] \leavevmode Used silent\_list for many get funcs that return lists. JDH \end{description} 2004-12-13 dates.py: removed all timezone() calls, except for UTC - SC \bigskip\hrule\bigskip 2004-12-13 0.65 released - JDH \begin{description} \item[{2004-12-13 colors.py: rgb2hex(), hex2color() made simpler (and faster), also}] \leavevmode rgb2hex() - added round() instead of integer truncation hex2color() - changed 256.0 divisor to 255.0, so now '\#ffffff' becomes (1.0,1.0,1.0) not (0.996,0.996,0.996) - SC \end{description} 2004-12-11 Added ion and ioff to pylab interface - JDH \begin{description} \item[{2004-12-11 backend\_template.py: delete FigureCanvasTemplate.realize() - most}] \leavevmode backends don't use it and its no longer needed backend\_ps.py, backend\_svg.py: delete show() and draw\_if\_interactive() - they are not needed for image backends backend\_svg.py: write direct to file instead of StringIO - SC \item[{2004-12-10 Added zorder to artists to control drawing order of lines,}] \leavevmode patches and text in axes. See examples/zoder\_demo.py - JDH \end{description} 2004-12-10 Fixed colorbar bug with scatter - JDH 2004-12-10 Added Nadia Dencheva \textless{}\sphinxhref{mailto:dencheva@stsci.edu}{dencheva@stsci.edu}\textgreater{} contour code - JDH 2004-12-10 backend\_cairo.py: got mathtext working - SC 2004-12-09 Added Norm Peterson's svg clipping patch 2004-12-09 Added Matthew Newville's wx printing patch 2004-12-09 Migrated matlab to pylab - JDH \begin{description} \item[{2004-12-09 backend\_gtk.py: split into two parts}] \leavevmode\begin{itemize} \item {} backend\_gdk.py - an image backend \item {} backend\_gtk.py - A GUI backend that uses GDK - SC \end{itemize} \item[{2004-12-08 backend\_gtk.py: remove quit\_after\_print\_xvfb(*args), show\_xvfb(),}] \leavevmode Dialog\_MeasureTool(gtk.Dialog) one month after sending mail to matplotlib-users asking if anyone still uses these functions - SC \item[{2004-12-02 backend\_bases.py, backend\_template.py: updated some of the method}] \leavevmode documentation to make them consistent with each other - SC \item[{2004-12-04 Fixed multiple bindings per event for TkAgg mpl\_connect and}] \leavevmode mpl\_disconnect. Added a "test\_disconnect" command line parameter to coords\_demo.py JTM \end{description} 2004-12-04 Fixed some legend bugs JDH \begin{description} \item[{2004-11-30 Added over command for oneoff over plots. e.g., over(plot, x,}] \leavevmode y, lw=2). Works with any plot function. \end{description} 2004-11-30 Added bbox property to text - JDH \begin{description} \item[{2004-11-29 Zoom to rect now respect reversed axes limits (for both}] \leavevmode linear and log axes). - GL \item[{2004-11-29 Added the over command to the matlab interface. over}] \leavevmode allows you to add an overlay plot regardless of hold state. - JDH \item[{2004-11-25 Added Printf to mplutils for printf style format string}] \leavevmode formatting in C++ (should help write better exceptions) \item[{2004-11-24 IMAGE\_FORMAT: remove from agg and gtkagg backends as its no longer}] \leavevmode used - SC \item[{2004-11-23 Added matplotlib compatible set and get introspection. See}] \leavevmode set\_and\_get.py \item[{2004-11-23 applied Norbert's patched and exposed legend configuration}] \leavevmode to kwargs - JDH \end{description} 2004-11-23 backend\_gtk.py: added a default exception handler - SC \begin{description} \item[{2004-11-18 backend\_gtk.py: change so that the backend knows about all image}] \leavevmode formats and does not need to use IMAGE\_FORMAT in other backends - SC \item[{2004-11-18 Fixed some report\_error bugs in string interpolation as}] \leavevmode reported on SF bug tracker- JDH \item[{2004-11-17 backend\_gtkcairo.py: change so all print\_figure() calls render using}] \leavevmode Cairo and get saved using backend\_gtk.print\_figure() - SC \item[{2004-11-13 backend\_cairo.py: Discovered the magic number (96) required for}] \leavevmode Cairo PS plots to come out the right size. Restored Cairo PS output and added support for landscape mode - SC \end{description} 2004-11-13 Added ishold - JDH \begin{description} \item[{2004-11-12 Added many new matlab colormaps - autumn bone cool copper}] \leavevmode flag gray hot hsv jet pink prism spring summer winter - PG \end{description} 2004-11-11 greatly simplify the emitted postscript code - JV \begin{description} \item[{2004-11-12 Added new plotting functions spy, spy2 for sparse matrix}] \leavevmode visualization - JDH \item[{2004-11-11 Added rgrids, thetragrids for customizing the grid}] \leavevmode locations and labels for polar plots - JDH \end{description} 2004-11-11 make the Gtk backends build without an X-server connection - JV \begin{description} \item[{2004-11-10 matplotlib/\_\_init\_\_.py: Added FROZEN to signal we are running under}] \leavevmode py2exe (or similar) - is used by backend\_gtk.py - SC \item[{2004-11-09 backend\_gtk.py: Made fix suggested by \sphinxhref{mailto:maffew@cat.org.au}{maffew@cat.org.au}}] \leavevmode to prevent problems when py2exe calls pygtk.require(). - SC \item[{2004-11-09 backend\_cairo.py: Added support for printing to a fileobject.}] \leavevmode Disabled cairo PS output which is not working correctly. - SC \end{description} \bigskip\hrule\bigskip 2004-11-08 matplotlib-0.64 released \begin{description} \item[{2004-11-04 Changed -dbackend processing to only use known backends, so}] \leavevmode we don't clobber other non-matplotlib uses of -d, like -debug. \item[{2004-11-04 backend\_agg.py: added IMAGE\_FORMAT to list the formats that the}] \leavevmode backend can save to. backend\_gtkagg.py: added support for saving JPG files by using the GTK backend - SC \item[{2004-10-31 backend\_cairo.py: now produces png and ps files (although the figure}] \leavevmode sizing needs some work). pycairo did not wrap all the necessary functions, so I wrapped them myself, they are included in the backend\_cairo.py doc string. - SC \item[{2004-10-31 backend\_ps.py: clean up the generated PostScript code, use}] \leavevmode the PostScript stack to hold itermediate values instead of storing them in the dictionary. - JV \item[{2004-10-30 backend\_ps.py, ft2font.cpp, ft2font.h: fix the position of}] \leavevmode text in the PostScript output. The new FT2Font method get\_descent gives the distance between the lower edge of the bounding box and the baseline of a string. In backend\_ps the text is shifted upwards by this amount. - JV \item[{2004-10-30 backend\_ps.py: clean up the code a lot. Change the}] \leavevmode PostScript output to be more DSC compliant. All definitions for the generated PostScript are now in a PostScript dictionary 'mpldict'. Moved the long comment about drawing ellipses from the PostScript output into a Python comment. - JV \item[{2004-10-30 backend\_gtk.py: removed FigureCanvasGTK.realize() as its no longer}] \leavevmode needed. Merged ColorManager into GraphicsContext backend\_bases.py: For set\_capstyle/joinstyle() only set cap or joinstyle if there is no error. - SC \item[{2004-10-30 backend\_gtk.py: tidied up print\_figure() and removed some of the}] \leavevmode dependency on widget events - SC \item[{2004-10-28 backend\_cairo.py: The renderer is complete except for mathtext,}] \leavevmode draw\_image() and clipping. gtkcairo works reasonably well. cairo does not yet create any files since I can't figure how to set the 'target surface', I don't think pycairo wraps the required functions - SC \item[{2004-10-28 backend\_gtk.py: Improved the save dialog (GTK 2.4 only) so it}] \leavevmode presents the user with a menu of supported image formats - SC \item[{2004-10-28 backend\_svg.py: change print\_figure() to restore original face/edge}] \leavevmode color backend\_ps.py : change print\_figure() to ensure original face/edge colors are restored even if there's an IOError - SC \end{description} 2004-10-27 Applied Norbert's errorbar patch to support barsabove kwarg 2004-10-27 Applied Norbert's legend patch to support None handles \begin{description} \item[{2004-10-27 Added two more backends: backend\_cairo.py, backend\_gtkcairo.py}] \leavevmode They are not complete yet, currently backend\_gtkcairo just renders polygons, rectangles and lines - SC \end{description} 2004-10-21 Added polar axes and plots - JDH \begin{description} \item[{2004-10-20 Fixed corrcoef bug exposed by corrcoef(X) where X is matrix}] \leavevmode\begin{itemize} \item {} JDH \end{itemize} \item[{2004-10-19 Added kwarg support to xticks and yticks to set ticklabel}] \leavevmode text properties -- thanks to T. Edward Whalen for the suggestion \end{description} 2004-10-19 Added support for PIL images in imshow(), image.py - ADS \begin{description} \item[{2004-10-19 Re-worked exception handling in \_image.py and \_transforms.py}] \leavevmode to avoid masking problems with shared libraries. - JTM \item[{2004-10-16 Streamlined the matlab interface wrapper, removed the}] \leavevmode noplot option to hist - just use mlab.hist instead. \item[{2004-09-30 Added Andrew Dalke's strftime code to extend the range of}] \leavevmode dates supported by the DateFormatter - JDH \end{description} 2004-09-30 Added barh - JDH \begin{description} \item[{2004-09-30 Removed fallback to alternate array package from numerix}] \leavevmode so that ImportErrors are easier to debug. JTM \end{description} 2004-09-30 Add GTK+ 2.4 support for the message in the toolbar. SC \begin{description} \item[{2004-09-30 Made some changes to support python22 - lots of doc}] \leavevmode fixes. - JDH \end{description} 2004-09-29 Added a Verbose class for reporting - JDH \bigskip\hrule\bigskip 2004-09-28 Released 0.63.0 \begin{description} \item[{2004-09-28 Added save to file object for agg - see}] \leavevmode examples/print\_stdout.py \end{description} 2004-09-24 Reorganized all py code to lib subdir \begin{description} \item[{2004-09-24 Fixed axes resize image edge effects on interpolation -}] \leavevmode required upgrade to agg22 which fixed an agg bug related to this problem \end{description} 2004-09-20 Added toolbar2 message display for backend\_tkagg. JTM \begin{description} \item[{2004-09-17 Added coords formatter attributes. These must be callable,}] \leavevmode\begin{quote} and return a string for the x or y data. These will be used to format the x and y data for the coords box. Default is the axis major formatter. e.g.: \end{quote} \# format the coords message box def price(x): return '\$\%1.2f'\%x ax.format\_xdata = DateFormatter('\%Y-\%m-\%d') ax.format\_ydata = price \item[{2004-09-17 Total rewrite of dates handling to use python datetime with}] \leavevmode num2date, date2num and drange. pytz for timezone handling, dateutils for spohisticated ticking. date ranges from 0001-9999 are supported. rrules allow arbitrary date ticking. examples/date\_demo*.py converted to show new usage. new example examples/date\_demo\_rrule.py shows how to use rrules in date plots. The date locators are much more general and almost all of them have different constructors. See matplotlib.dates for more info. \item[{2004-09-15 Applied Fernando's backend \_\_init\_\_ patch to support easier}] \leavevmode backend maintenance. Added his numutils to mlab. JDH \item[{2004-09-16 Re-designated all files in matplotlib/images as binary and}] \leavevmode w/o keyword substitution using "cvs admin -kb *.svg ...". See binary files in "info cvs" under Linux. This was messing up builds from CVS on windows since CVS was doing lf -\textgreater{} cr/lf and keyword substitution on the bitmaps. - JTM \item[{2004-09-15 Modified setup to build array-package-specific extensions}] \leavevmode for those extensions which are array-aware. Setup builds extensions automatically for either Numeric, numarray, or both, depending on what you have installed. Python proxy modules for the array-aware extensions import the version optimized for numarray or Numeric determined by numerix. - JTM \item[{2004-09-15 Moved definitions of infinity from mlab to numerix to avoid}] \leavevmode divide by zero warnings for numarray - JTM \end{description} 2004-09-09 Added axhline, axvline, axhspan and axvspan \bigskip\hrule\bigskip 2004-08-30 matplotlib 0.62.4 released \begin{description} \item[{2004-08-30 Fixed a multiple images with different extent bug,}] \leavevmode Fixed markerfacecolor as RGB tuple \item[{2004-08-27 Mathtext now more than 5x faster. Thanks to Paul Mcguire}] \leavevmode for fixes both to pyparsing and to the matplotlib grammar! mathtext broken on python2.2 \item[{2004-08-25 Exposed Darren's and Greg's log ticking and formatting}] \leavevmode options to semilogx and friends \end{description} 2004-08-23 Fixed grid w/o args to toggle grid state - JDH 2004-08-11 Added Gregory's log patches for major and minor ticking 2004-08-18 Some pixel edge effects fixes for images 2004-08-18 Fixed TTF files reads in backend\_ps on win32. \begin{description} \item[{2004-08-18 Added base and subs properties for logscale plots, user}] \leavevmode modifiable using set\_{[}x,y{]}scale('log',base=b,subs={[}mt1,mt2,...{]}) - GL \item[{2004-08-18 fixed a bug exposed by trying to find the HOME dir on win32}] \leavevmode thanks to Alan Issac for pointing to the light - JDH \end{description} 2004-08-18 fixed errorbar bug in setting ecolor - JDH 2004-08-12 Added Darren Dale's exponential ticking patch 2004-08-11 Added Gregory's fltkagg backend \bigskip\hrule\bigskip 2004-08-09 matplotlib-0.61.0 released \begin{description} \item[{2004-08-08 backend\_gtk.py: get rid of the final PyGTK deprecation warning by}] \leavevmode replacing gtkOptionMenu with gtkMenu in the 2.4 version of the classic toolbar. \item[{2004-08-06 Added Tk zoom to rect rectangle, proper idle drawing, and}] \leavevmode keybinding - JDH \end{description} 2004-08-05 Updated installing.html and INSTALL - JDH 2004-08-01 backend\_gtk.py: move all drawing code into the expose\_event() 2004-07-28 Added Greg's toolbar2 and backend\_*agg patches - JDH \begin{description} \item[{2004-07-28 Added image.imread with support for loading png into}] \leavevmode numerix arrays \item[{2004-07-28 Added key modifiers to events - implemented dynamic updates}] \leavevmode and rubber banding for interactive pan/zoom - JDH \item[{2004-07-27 did a readthrough of SVG, replacing all the string}] \leavevmode additions with string interps for efficiency, fixed some layout problems, added font and image support (through external pngs) - JDH \item[{2004-07-25 backend\_gtk.py: modify toolbar2 to make it easier to support GTK+}] \leavevmode 2.4. Add GTK+ 2.4 toolbar support. - SC \end{description} 2004-07-24 backend\_gtk.py: Simplified classic toolbar creation - SC \begin{description} \item[{2004-07-24 Added images/matplotlib.svg to be used when GTK+ windows are}] \leavevmode minimised - SC \item[{2004-07-22 Added right mouse click zoom for NavigationToolbar2 panning}] \leavevmode mode. - JTM \item[{2004-07-22 Added NavigationToolbar2 support to backend\_tkagg.}] \leavevmode Minor tweak to backend\_bases. - JTM \item[{2004-07-22 Incorporated Gergory's renderer cache and buffer object}] \leavevmode cache - JDH \item[{2004-07-22 Backend\_gtk.py: Added support for GtkFileChooser, changed}] \leavevmode FileSelection/FileChooser so that only one instance pops up, and made them both modal. - SC \item[{2004-07-21 Applied backend\_agg memory leak patch from hayden -}] \leavevmode \sphinxhref{mailto:jocallo@online.no}{jocallo@online.no}. Found and fixed a leak in binary operations on transforms. Moral of the story: never incref where you meant to decref! Fixed several leaks in ft2font: moral of story: almost always return Py::asObject over Py::Object - JDH \item[{2004-07-21 Fixed a to string memory allocation bug in agg and image}] \leavevmode modules - JDH \item[{2004-07-21 Added mpl\_connect and mpl\_disconnect to matlab interface -}] \leavevmode JDH \end{description} 2004-07-21 Added beginnings of users\_guide to CVS - JDH 2004-07-20 ported toolbar2 to wx 2004-07-20 upgraded to agg21 - JDH 2004-07-20 Added new icons for toolbar2 - JDH \begin{description} \item[{2004-07-19 Added vertical mathtext for *Agg and GTK - thanks Jim}] \leavevmode Benson! - JDH \end{description} 2004-07-16 Added ps/eps/svg savefig options to wx and gtk JDH 2004-07-15 Fixed python framework tk finder in setupext.py - JDH \begin{description} \item[{2004-07-14 Fixed layer images demo which was broken by the 07/12 image}] \leavevmode extent fixes - JDH \item[{2004-07-13 Modified line collections to handle arbitrary length}] \leavevmode segments for each line segment. - JDH \item[{2004-07-13 Fixed problems with image extent and origin -}] \leavevmode set\_image\_extent deprecated. Use imshow(blah, blah, extent=(xmin, xmax, ymin, ymax) instead - JDH \item[{2004-07-12 Added prototype for new nav bar with codifed event}] \leavevmode handling. Use mpl\_connect rather than connect for matplotlib event handling. toolbar style determined by rc toolbar param. backend status: gtk: prototype, wx: in progress, tk: not started - JDH \item[{2004-07-11 backend\_gtk.py: use builtin round() instead of redefining it.}] \leavevmode\begin{itemize} \item {} SC \end{itemize} \end{description} 2004-07-10 Added embedding\_in\_wx3 example - ADS 2004-07-09 Added dynamic\_image\_wxagg to examples - ADS 2004-07-09 added support for embedding TrueType fonts in PS files - PEB 2004-07-09 fixed a sfnt bug exposed if font cache is not built \begin{description} \item[{2004-07-09 added default arg None to matplotlib.matlab grid command to}] \leavevmode toggle current grid state \end{description} \bigskip\hrule\bigskip 2004-07-08 0.60.2 released 2004-07-08 fixed a mathtext bug for '6' 2004-07-08 added some numarray bug workarounds \bigskip\hrule\bigskip 2004-07-07 0.60 released 2004-07-07 Fixed a bug in dynamic\_demo\_wx \begin{description} \item[{2004-07-07 backend\_gtk.py: raise SystemExit immediately if}] \leavevmode 'import pygtk' fails - SC \item[{2004-07-05 Added new mathtext commands over\{sym1\}\{sym2\} and}] \leavevmode under\{sym1\}\{sym2\} \item[{2004-07-05 Unified image and patch collections colormapping and}] \leavevmode scaling args. Updated docstrings for all - JDH \item[{2004-07-05 Fixed a figure legend bug and added}] \leavevmode examples/figlegend\_demo.py - JDH \end{description} 2004-07-01 Fixed a memory leak in image and agg to string methods \begin{description} \item[{2004-06-25 Fixed fonts\_demo spacing problems and added a kwargs}] \leavevmode version of the fonts\_demo fonts\_demo\_kw.py - JDH \end{description} 2004-06-25 finance.py: handle case when urlopen() fails - SC \begin{description} \item[{2004-06-24 Support for multiple images on axes and figure, with}] \leavevmode blending. Support for upper and lower image origins. clim, jet and gray functions in matlab interface operate on current image - JDH \item[{2004-06-23 ported code to Perry's new colormap and norm scheme. Added}] \leavevmode new rc attributes image.aspect, image.interpolation, image.cmap, image.lut, image.origin \item[{2004-06-20 backend\_gtk.py: replace gtk.TRUE/FALSE with True/False.}] \leavevmode simplified \_make\_axis\_menu(). - SC \item[{2004-06-19 anim\_tk.py: Updated to use TkAgg by default (not GTK)}] \leavevmode backend\_gtk\_py: Added '\_' in front of private widget creation functions - SC \item[{2004-06-17 backend\_gtk.py: Create a GC once in realise(), not every}] \leavevmode time draw() is called. - SC \item[{2004-06-16 Added new py2exe FAQ entry and added frozen support in}] \leavevmode get\_data\_path for py2exe - JDH \item[{2004-06-16 Removed GTKGD, which was always just a proof-of-concept}] \leavevmode backend - JDH \item[{2004-06-16 backend\_gtk.py updates to replace deprecated functions}] \leavevmode\begin{description} \item[{gtk.mainquit(), gtk.mainloop().}] \leavevmode Update NavigationToolbar to use the new GtkToolbar API - SC \end{description} \item[{2004-06-15 removed set\_default\_font from font\_manager to unify font}] \leavevmode customization using the new function rc. See API\_CHANGES for more info. The examples fonts\_demo.py and fonts\_demo\_kw.py are ported to the new API - JDH \item[{2004-06-15 Improved (yet again!) axis scaling to properly handle}] \leavevmode singleton plots - JDH \end{description} 2004-06-15 Restored the old FigureCanvasGTK.draw() - SC 2004-06-11 More memory leak fixes in transforms and ft2font - JDH \begin{description} \item[{2004-06-11 Eliminated numerix .numerix file and environment variable}] \leavevmode NUMERIX. Fixed bug which prevented command line overrides: --numarray or --numeric. - JTM \item[{2004-06-10 Added rc configuration function rc; deferred all rc param}] \leavevmode setting until object creation time; added new rc attrs: lines.markerfacecolor, lines.markeredgecolor, lines.markeredgewidth, patch.linewidth, patch.facecolor, patch.edgecolor, patch.antialiased; see examples/customize\_rc.py for usage - JDH \end{description} \bigskip\hrule\bigskip 2004-06-09 0.54.2 released \begin{description} \item[{2004-06-08 Rewrote ft2font using CXX as part of general memory leak}] \leavevmode fixes; also fixed transform memory leaks - JDH \end{description} 2004-06-07 Fixed several problems with log ticks and scaling - JDH 2004-06-07 Fixed width/height issues for images - JDH 2004-06-03 Fixed draw\_if\_interactive bug for semilogx; 2004-06-02 Fixed text clipping to clip to axes - JDH 2004-06-02 Fixed leading newline text and multiple newline text - JDH 2004-06-02 Fixed plot\_date to return lines - JDH 2004-06-01 Fixed plot to work with x or y having shape N,1 or 1,N - JDH 2004-05-31 Added renderer markeredgewidth attribute of Line2D. - ADS 2004-05-29 Fixed tick label clipping to work with navigation. \begin{description} \item[{2004-05-28 Added renderer grouping commands to support groups in}] \leavevmode SVG/PS. - JDH \item[{2004-05-28 Fixed, this time I really mean it, the singleton plot}] \leavevmode plot({[}0{]}) scaling bug; Fixed Flavio's shape = N,1 bug - JDH \end{description} 2004-05-28 added colorbar - JDH \begin{description} \item[{2004-05-28 Made some changes to the matplotlib.colors.Colormap to}] \leavevmode propertly support clim - JDH \end{description} \bigskip\hrule\bigskip 2004-05-27 0.54.1 released \begin{description} \item[{2004-05-27 Lots of small bug fixes: rotated text at negative angles,}] \leavevmode errorbar capsize and autoscaling, right tick label position, gtkagg on win98, alpha of figure background, singleton plots - JDH \item[{2004-05-26 Added Gary's errorbar stuff and made some fixes for length}] \leavevmode one plots and constant data plots - JDH \item[{2004-05-25 Tweaked TkAgg backend so that canvas.draw() works}] \leavevmode more like the other backends. Fixed a bug resulting in 2 draws per figure mangager show(). - JTM \end{description} \bigskip\hrule\bigskip 2004-05-19 0.54 released \begin{description} \item[{2004-05-18 Added newline separated text with rotations to text.Text}] \leavevmode layout - JDH \end{description} 2004-05-16 Added fast pcolor using PolyCollections. - JDH \begin{description} \item[{2004-05-14 Added fast polygon collections - changed scatter to use}] \leavevmode them. Added multiple symbols to scatter. 10x speedup on large scatters using *Agg and 5X speedup for ps. - JDH \item[{2004-05-14 On second thought... created an "nx" namespace in}] \leavevmode in numerix which maps type names onto typecodes the same way for both numarray and Numeric. This undoes my previous change immediately below. To get a typename for Int16 useable in a Numeric extension: say nx.Int16. - JTM \item[{2004-05-15 Rewrote transformation class in extension code, simplified}] \leavevmode all the artist constructors - JDH \item[{2004-05-14 Modified the type definitions in the numarray side of}] \leavevmode numerix so that they are Numeric typecodes and can be used with Numeric compilex extensions. The original numarray types were renamed to type\textless{}old\_name\textgreater{}. - JTM \item[{2004-05-06 Gary Ruben sent me a bevy of new plot symbols and markers.}] \leavevmode See matplotlib.matlab.plot - JDH \item[{2004-05-06 Total rewrite of mathtext - factored ft2font stuff out of}] \leavevmode layout engine and defined abstract class for font handling to lay groundwork for ps mathtext. Rewrote parser and made layout engine much more precise. Fixed all the layout hacks. Added spacing commands / and hspace. Added composite chars and defined angstrom. - JDH \item[{2004-05-05 Refactored text instances out of backend; aligned}] \leavevmode text with arbitrary rotations is now supported - JDH \end{description} 2004-05-05 Added a Matrix capability for numarray to numerix. JTM \begin{description} \item[{2004-05-04 Updated whats\_new.html.template to use dictionary and}] \leavevmode template loop, added anchors for all versions and items; updated goals.txt to use those for links. PG \item[{2004-05-04 Added fonts\_demo.py to backend\_driver, and AFM and TTF font}] \leavevmode caches to font\_manager.py - PEB \item[{2004-05-03 Redid goals.html.template to use a goals.txt file that}] \leavevmode has a pseudo restructured text organization. PG \item[{2004-05-03 Removed the close buttons on all GUIs and added the python}] \leavevmode \#! bang line to the examples following Steve Chaplin's advice on matplotlib dev \item[{2004-04-29 Added CXX and rewrote backend\_agg using it; tracked down}] \leavevmode and fixed agg memory leak - JDH \end{description} 2004-04-29 Added stem plot command - JDH 2004-04-28 Fixed PS scaling and centering bug - JDH 2004-04-26 Fixed errorbar autoscale problem - JDH \begin{description} \item[{2004-04-22 Fixed copy tick attribute bug, fixed singular datalim}] \leavevmode ticker bug; fixed mathtext fontsize interactive bug. - JDH \item[{2004-04-21 Added calls to draw\_if\_interactive to axes(), legend(),}] \leavevmode and pcolor(). Deleted duplicate pcolor(). - JTM \end{description} \bigskip\hrule\bigskip 2004-04-21 matplotlib 0.53 release 2004-04-19 Fixed vertical alignment bug in PS backend - JDH \begin{description} \item[{2004-04-17 Added support for two scales on the "same axes" with tick}] \leavevmode different ticking and labeling left right or top bottom. See examples/two\_scales.py - JDH \item[{2004-04-17 Added default dirs as list rather than single dir in}] \leavevmode setupext.py - JDH \item[{2004-04-16 Fixed wx exception swallowing bug (and there was much}] \leavevmode rejoicing!) - JDH \item[{2004-04-16 Added new ticker locator a formatter, fixed default font}] \leavevmode return - JDH \item[{2004-04-16 Added get\_name method to FontProperties class. Fixed font lookup}] \leavevmode in GTK and WX backends. - PEB \end{description} 2004-04-16 Added get- and set\_fontstyle msethods. - PEB 2004-04-10 Mathtext fixes: scaling with dpi, - JDH 2004-04-09 Improved font detection algorithm. - PEB 2004-04-09 Move deprecation warnings from text.py to \_\_init\_\_.py - PEB 2004-04-09 Added default font customization - JDH 2004-04-08 Fixed viewlim set problem on axes and axis. - JDH \begin{description} \item[{2004-04-07 Added validate\_comma\_sep\_str and font properties paramaters to}] \leavevmode \_\_init\_\_. Removed font families and added rcParams to FontProperties \_\_init\_\_ arguments in font\_manager. Added default font property parameters to .matplotlibrc file with descriptions. Added deprecation warnings to the get\_ - and set\_fontXXX methods of the Text object. - PEB \end{description} 2004-04-06 Added load and save commands for ASCII data - JDH \begin{description} \item[{2004-04-05 Improved font caching by not reading AFM fonts until needed.}] \leavevmode Added better documentation. Changed the behaviour of the get\_family, set\_family, and set\_name methods of FontProperties. - PEB \end{description} 2004-04-05 Added WXAgg backend - JDH \begin{description} \item[{2004-04-04 Improved font caching in backend\_agg with changes to}] \leavevmode font\_manager - JDH \item[{2004-03-29 Fixed fontdicts and kwargs to work with new font manager -}] \leavevmode JDH \end{description} \bigskip\hrule\bigskip This is the Old, stale, never used changelog \begin{description} \item[{2002-12-10 - Added a TODO file and CHANGELOG. Lots to do -- get}] \leavevmode\begin{quote} crackin'! \end{quote} \begin{itemize} \item {} Fixed y zoom tool bug \item {} Adopted a compromise fix for the y data clipping problem. The problem was that for solid lines, the y data clipping (as opposed to the gc clipping) caused artifactual horizontal solid lines near the ylim boundaries. I did a 5\% offset hack in Axes set\_ylim functions which helped, but didn't cure the problem for very high gain y zooms. So I disabled y data clipping for connected lines . If you need extensive y clipping, either plot(y,x) because x data clipping is always enabled, or change the \_set\_clip code to 'if 1' as indicated in the lines.py src. See \_set\_clip in lines.py and set\_ylim in figure.py for more information. \end{itemize} \item[{2002-12-11 - Added a measurement dialog to the figure window to}] \leavevmode\begin{quote} measure axes position and the delta x delta y with a left mouse drag. These defaults can be overridden by deriving from Figure and overrriding button\_press\_event, button\_release\_event, and motion\_notify\_event, and \_dialog\_measure\_tool. \end{quote} \begin{itemize} \item {} fixed the navigation dialog so you can check the axes the navigation buttons apply to. \end{itemize} \end{description} 2003-04-23 Released matplotlib v0.1 \begin{description} \item[{2003-04-24 Added a new line style PixelLine2D which is the plots the}] \leavevmode markers as pixels (as small as possible) with format symbol ',' Added a new class Patch with derived classes Rectangle, RegularPolygon and Circle \end{description} 2003-04-25 Implemented new functions errorbar, scatter and hist \begin{quote} Added a new line type '\textbar{}' which is a vline. syntax is plot(x, Y, '\textbar{}') where y.shape = len(x),2 and each row gives the ymin,ymax for the respective values of x. Previously I had implemented vlines as a list of lines, but I needed the efficientcy of the numeric clipping for large numbers of vlines outside the viewport, so I wrote a dedicated class Vline2D which derives from Line2D \end{quote} 2003-05-01 \begin{quote} Fixed ytick bug where grid and tick show outside axis viewport with gc clip \end{quote} 2003-05-14 \begin{quote} Added new ways to specify colors 1) matlab format string 2) html-style hex string, 3) rgb tuple. See examples/color\_demo.py \end{quote} 2003-05-28 \begin{quote} Changed figure rendering to draw form a pixmap to reduce flicker. See examples/system\_monitor.py for an example where the plot is continusouly updated w/o flicker. This example is meant to simulate a system monitor that shows free CPU, RAM, etc... \end{quote} 2003-08-04 \begin{quote} Added Jon Anderson's GTK shell, which doesn't require pygtk to have threading built-in and looks nice! \end{quote} 2003-08-25 \begin{quote} Fixed deprecation warnings for python2.3 and pygtk-1.99.18 \end{quote} 2003-08-26 \begin{quote} Added figure text with new example examples/figtext.py \end{quote} 2003-08-27 \begin{quote} Fixed bugs i figure text with font override dictionairies and fig text that was placed outside the window bounding box \end{quote} 2003-09-1 thru 2003-09-15 \begin{quote} Added a postscript and a GD module backend \end{quote} 2003-09-16 \begin{quote} Fixed font scaling and point scaling so circles, squares, etc on lines will scale with DPI as will fonts. Font scaling is not fully implemented on the gtk backend because I have not figured out how to scale fonts to arbitrary sizes with GTK \end{quote} 2003-09-17 \begin{quote} Fixed figure text bug which crashed X windows on long figure text extending beyond display area. This was, I believe, due to the vestigial erase functionality that was no longer needed since I began rendering to a pixmap \end{quote} 2003-09-30 Added legend \begin{description} \item[{2003-10-01 Fixed bug when colors are specified with rgb tuple or hex}] \leavevmode string. \item[{2003-10-21 Andrew Straw provided some legend code which I modified}] \leavevmode and incorporated. Thanks Andrew! \item[{2003-10-27 Fixed a bug in axis.get\_view\_distance that affected zoom in}] \leavevmode versus out with interactive scrolling, and a bug in the axis text reset system that prevented the text from being redrawn on a interactive gtk view lim set with the widget Fixed a bug in that prevented the manual setting of ticklabel strings from working properly \item[{2003-11-02 - Do a nearest neighbor color pick on GD when}] \leavevmode allocate fails \item[{2003-11-02}] \leavevmode\begin{itemize} \item {} Added pcolor plot \item {} Added MRI example \item {} Fixed bug that screwed up label position if xticks or yticks were empty \item {} added nearest neighbor color picker when GD max colors exceeded \item {} fixed figure background color bug in GD backend \end{itemize} \item[{2003-11-10 - 2003-11-11}] \leavevmode\begin{itemize} \item {} major refactoring. \begin{itemize} \item {} Ticks (with labels, lines and grid) handled by dedicated class \item {} Artist now know bounding box and dpi \item {} Bounding boxes and transforms handled by dedicated classes \item {} legend in dedicated class. Does a better job of alignment and bordering. Can be initialized with specific line instances. See examples/legend\_demo2.py \end{itemize} \end{itemize} \end{description} 2003-11-14 Fixed legend positioning bug and added new position args 2003-11-16 Finsihed porting GD to new axes API 2003-11-20 - add TM for matlab on website and in docs 2003-11-20 - make a nice errorbar and scatter screenshot \begin{description} \item[{2003-11-20 - auto line style cycling for multiple line types}] \leavevmode broken \end{description} 2003-11-18 (using inkrect) :logical rect too big on gtk backend \begin{description} \item[{2003-11-18 ticks don't reach edge of axes in gtk mode --}] \leavevmode rounding error? \end{description} 2003-11-20 - port Gary's errorbar code to new API before 0.40 \begin{description} \item[{2003-11-20 - problem with stale \_set\_font. legend axes box}] \leavevmode doesn't resize on save in GTK backend -- see htdocs legend\_demo.py \end{description} 2003-11-21 - make a dash-dot dict for the GC 2003-12-15 - fix install path bug \section{New in matplotlib 0.98.4} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:new-in-matplotlib-0-98-4}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:whats-new-0-98-4}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:new-in-matplotlib-0-98-4}]{\sphinxcrossref{New in matplotlib 0.98.4}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:legend-enhancements}]{\sphinxcrossref{Legend enhancements}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:fancy-annotations-and-arrows}]{\sphinxcrossref{Fancy annotations and arrows}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:native-os-x-backend}]{\sphinxcrossref{Native OS X backend}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:psd-amplitude-scaling}]{\sphinxcrossref{psd amplitude scaling}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:fill-between}]{\sphinxcrossref{Fill between}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.98.4:lots-more}]{\sphinxcrossref{Lots more}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} It's been four months since the last matplotlib release, and there are a lot of new features and bug-fixes. Thanks to Charlie Moad for testing and preparing the source release, including binaries for OS X and Windows for python 2.4 and 2.5 (2.6 and 3.0 will not be available until numpy is available on those releases). Thanks to the many developers who contributed to this release, with contributions from Jae-Joon Lee, Michael Droettboom, Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker, Darren Dale, David Kaplan, Michiel de Hoon and many others who submitted patches \subsection{Legend enhancements} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:legend-enhancements}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:legend-refactor}} Jae-Joon has rewritten the legend class, and added support for multiple columns and rows, as well as fancy box drawing. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} and {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_98\_4\_legend.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_98_4_legend_0011}.png}} \caption{Whats New 98 4 Legend}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id2}}\end{figure} \subsection{Fancy annotations and arrows} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:fancy-annotations-and-arrows}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:fancy-annotations}} Jae-Joon has added lots of support to annotations for drawing fancy boxes and connectors in annotations. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_98\_4\_fancy.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_98_4_fancy_0011}.png}} \caption{Whats New 98 4 Fancy}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id3}}\end{figure} \subsection{Native OS X backend} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:native-os-x-backend}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:psd-amplitude}} Michiel de Hoon has provided a native Mac OSX backend that is almost completely implemented in C. The backend can therefore use Quartz directly and, depending on the application, can be orders of magnitude faster than the existing backends. In addition, no third-party libraries are needed other than Python and NumPy. The backend is interactive from the usual terminal application on Mac using regular Python. It hasn't been tested with ipython yet, but in principle it should to work there as well. Set 'backend : macosx' in your matplotlibrc file, or run your script with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZgt{}} \PYG{n}{python} \PYG{n}{myfile}\PYG{o}{.}\PYG{n}{py} \PYG{o}{\PYGZhy{}}\PYG{n}{dmacosx} \end{sphinxVerbatim} \subsection{psd amplitude scaling} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:psd-amplitude-scaling}} Ryan May did a lot of work to rationalize the amplitude scaling of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} and friends. See \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/psd\_demo}. The changes should increase MATLAB compatibility and increase scaling options. \subsection{Fill between} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:fill-between}}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id1}} Added a {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between()}}}}} function to make it easier to do shaded region plots in the presence of masked data. You can pass an \sphinxstyleemphasis{x} array and a \sphinxstyleemphasis{ylower} and \sphinxstyleemphasis{yupper} array to fill between, and an optional \sphinxstyleemphasis{where} argument which is a logical mask where you want to do the filling. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_98\_4\_fill\_between.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_98_4_fill_between_0011}.png}} \caption{Whats New 98 4 Fill Between}\label{\detokenize{users/prev_whats_new/whats_new_0.98.4:id4}}\end{figure} \subsection{Lots more} \label{\detokenize{users/prev_whats_new/whats_new_0.98.4:lots-more}} Here are the 0.98.4 notes from the CHANGELOG: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Added} \PYG{n}{mdehoon}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s native macosx backend from sf patch 2179017 \PYGZhy{} JDH} \PYG{n}{Removed} \PYG{n}{the} \PYG{n}{prints} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{set\PYGZus{}}\PYG{o}{*}\PYG{n}{style} \PYG{n}{commands}\PYG{o}{.} \PYG{n}{Return} \PYG{n}{the} \PYG{n+nb}{list} \PYG{n}{of} \PYG{n}{pretty}\PYG{o}{\PYGZhy{}}\PYG{n}{printed} \PYG{n}{strings} \PYG{n}{instead} \PYG{o}{\PYGZhy{}} \PYG{n}{JDH} \PYG{n}{Some} \PYG{n}{of} \PYG{n}{the} \PYG{n}{changes} \PYG{n}{Michael} \PYG{n}{made} \PYG{n}{to} \PYG{n}{improve} \PYG{n}{the} \PYG{n}{output} \PYG{n}{of} \PYG{n}{the} \PYG{n+nb}{property} \PYG{n}{tables} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{rest} \PYG{n}{docs} \PYG{n}{broke} \PYG{n}{of} \PYG{n}{made} \PYG{n}{difficult} \PYG{n}{to} \PYG{n}{use} \PYG{n}{some} \PYG{n}{of} \PYG{n}{the} \PYG{n}{interactive} \PYG{n}{doc} \PYG{n}{helpers}\PYG{p}{,} \PYG{n}{e}\PYG{o}{.}\PYG{n}{g}\PYG{o}{.}\PYG{p}{,} \PYG{n}{setp} \PYG{o+ow}{and} \PYG{n}{getp}\PYG{o}{.} \PYG{n}{Having} \PYG{n+nb}{all} \PYG{n}{the} \PYG{n}{rest} \PYG{n}{markup} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{ipython} \PYG{n}{shell} \PYG{n}{also} \PYG{n}{confused} \PYG{n}{the} \PYG{n}{docstrings}\PYG{o}{.} \PYG{n}{I} \PYG{n}{added} \PYG{n}{a} \PYG{n}{new} \PYG{n}{rc} \PYG{n}{param} \PYG{n}{docstring}\PYG{o}{.}\PYG{n}{harcopy}\PYG{p}{,} \PYG{n}{to} \PYG{n+nb}{format} \PYG{n}{the} \PYG{n}{docstrings} \PYG{n}{differently} \PYG{k}{for} \PYG{n}{hardcopy} \PYG{o+ow}{and} \PYG{n}{other} \PYG{n}{use}\PYG{o}{.} \PYG{n}{The} \PYG{n}{ArtistInspector} \PYG{n}{could} \PYG{n}{use} \PYG{n}{a} \PYG{n}{little} \PYG{n}{refactoring} \PYG{n}{now} \PYG{n}{since} \PYG{n}{there} \PYG{o+ow}{is} \PYG{n}{duplication} \PYG{n}{of} \PYG{n}{effort} \PYG{n}{between} \PYG{n}{the} \PYG{n}{rest} \PYG{n}{out} \PYG{n}{put} \PYG{o+ow}{and} \PYG{n}{the} \PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{rest} \PYG{n}{output} \PYG{o}{\PYGZhy{}} \PYG{n}{JDH} \PYG{n}{Updated} \PYG{n}{spectral} \PYG{n}{methods} \PYG{p}{(}\PYG{n}{psd}\PYG{p}{,} \PYG{n}{csd}\PYG{p}{,} \PYG{n}{etc}\PYG{o}{.}\PYG{p}{)} \PYG{n}{to} \PYG{n}{scale} \PYG{n}{one}\PYG{o}{\PYGZhy{}}\PYG{n}{sided} \PYG{n}{densities} \PYG{n}{by} \PYG{n}{a} \PYG{n}{factor} \PYG{n}{of} \PYG{l+m+mi}{2} \PYG{o+ow}{and}\PYG{p}{,} \PYG{n}{optionally}\PYG{p}{,} \PYG{n}{scale} \PYG{n+nb}{all} \PYG{n}{densities} \PYG{n}{by} \PYG{n}{the} \PYG{n}{sampling} \PYG{n}{frequency}\PYG{o}{.} \PYG{n}{This} \PYG{n}{gives} \PYG{n}{better} \PYG{n}{MATLAB} \PYG{n}{compatibility}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{RM} \PYG{n}{Fixed} \PYG{n}{alignment} \PYG{n}{of} \PYG{n}{ticks} \PYG{o+ow}{in} \PYG{n}{colorbars}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{MGD} \PYG{n}{drop} \PYG{n}{the} \PYG{n}{deprecated} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{new}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{keyword} \PYG{n}{of} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{numpy} \PYG{l+m+mf}{1.2} \PYG{o+ow}{or} \PYG{n}{later}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{Fixed} \PYG{n}{a} \PYG{n}{bug} \PYG{o+ow}{in} \PYG{n}{svg} \PYG{n}{backend} \PYG{n}{that} \PYG{n}{new\PYGZus{}figure\PYGZus{}manager}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ignores} \PYG{n}{keywords} \PYG{n}{arguments} \PYG{n}{such} \PYG{k}{as} \PYG{n}{figsize}\PYG{p}{,} \PYG{n}{etc}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{Fixed} \PYG{n}{a} \PYG{n}{bug} \PYG{n}{that} \PYG{n}{the} \PYG{n}{handlelength} \PYG{n}{of} \PYG{n}{the} \PYG{n}{new} \PYG{n}{legend} \PYG{k}{class} \PYG{n+nc}{set} \PYG{n}{too} \PYG{n}{short} \PYG{n}{when} \PYG{n}{numpoints}\PYG{o}{=}\PYG{l+m+mi}{1} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{Added} \PYG{n}{support} \PYG{k}{for} \PYG{n}{data} \PYG{k}{with} \PYG{n}{units} \PYG{p}{(}\PYG{n}{e}\PYG{o}{.}\PYG{n}{g}\PYG{o}{.}\PYG{p}{,} \PYG{n}{dates}\PYG{p}{)} \PYG{n}{to} \PYG{n}{Axes}\PYG{o}{.}\PYG{n}{fill\PYGZus{}between}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{RM} \PYG{n}{Added} \PYG{n}{fancybox} \PYG{n}{keyword} \PYG{n}{to} \PYG{n}{legend}\PYG{o}{.} \PYG{n}{Also} \PYG{n}{applied} \PYG{n}{some} \PYG{n}{changes} \PYG{k}{for} \PYG{n}{better} \PYG{n}{look}\PYG{p}{,} \PYG{n}{including} \PYG{n}{baseline} \PYG{n}{adjustment} \PYG{n}{of} \PYG{n}{the} \PYG{n}{multiline} \PYG{n}{texts} \PYG{n}{so} \PYG{n}{that} \PYG{n}{it} \PYG{o+ow}{is} \PYG{n}{center} \PYG{n}{aligned}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{The} \PYG{n}{transmuter} \PYG{n}{classes} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{py} \PYG{n}{are} \PYG{n}{reorganized} \PYG{k}{as} \PYG{n}{subclasses} \PYG{n}{of} \PYG{n}{the} \PYG{n}{Style} \PYG{n}{classes}\PYG{o}{.} \PYG{n}{A} \PYG{n}{few} \PYG{n}{more} \PYG{n}{box} \PYG{o+ow}{and} \PYG{n}{arrow} \PYG{n}{styles} \PYG{n}{are} \PYG{n}{added}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{Fixed} \PYG{n}{a} \PYG{n}{bug} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{new} \PYG{n}{legend} \PYG{k}{class} \PYG{n+nc}{that} \PYG{n}{didn}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{t allowed a tuple of} \PYG{n}{coordinate} \PYG{n}{values} \PYG{k}{as} \PYG{n}{loc}\PYG{o}{.} \PYG{o}{\PYGZhy{}}\PYG{n}{JJL} \PYG{n}{Improve} \PYG{n}{checks} \PYG{k}{for} \PYG{n}{external} \PYG{n}{dependencies}\PYG{p}{,} \PYG{n}{using} \PYG{n}{subprocess} \PYG{p}{(}\PYG{n}{instead} \PYG{n}{of} \PYG{n}{deprecated} \PYG{n}{popen}\PYG{o}{*}\PYG{p}{)} \PYG{o+ow}{and} \PYG{n}{distutils} \PYG{p}{(}\PYG{k}{for} \PYG{n}{version} \PYG{n}{checking}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{n}{DSD} \PYG{n}{Reimplementation} \PYG{n}{of} \PYG{n}{the} \PYG{n}{legend} \PYG{n}{which} \PYG{n}{supports} \PYG{n}{baseline} \PYG{n}{alignment}\PYG{p}{,} \PYG{n}{multi}\PYG{o}{\PYGZhy{}}\PYG{n}{column}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{expand} \PYG{n}{mode}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JJL} \PYG{n}{Fixed} \PYG{n}{histogram} \PYG{n}{autoscaling} \PYG{n}{bug} \PYG{n}{when} \PYG{n}{bins} \PYG{o+ow}{or} \PYG{n+nb}{range} \PYG{n}{are} \PYG{n}{given} \PYG{n}{explicitly} \PYG{p}{(}\PYG{n}{fixes} \PYG{n}{Debian} \PYG{n}{bug} \PYG{l+m+mi}{503148}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{n}{MM} \PYG{n}{Added} \PYG{n}{rcParam} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{unicode\PYGZus{}minus} \PYG{n}{which} \PYG{n}{allows} \PYG{n}{plain} \PYG{n}{hyphen} \PYG{k}{for} \PYG{n}{minus} \PYG{n}{when} \PYG{k+kc}{False} \PYG{o}{\PYGZhy{}} \PYG{n}{JDH} \PYG{n}{Added} \PYG{n}{scatterpoints} \PYG{n}{support} \PYG{o+ow}{in} \PYG{n}{Legend}\PYG{o}{.} \PYG{n}{patch} \PYG{n}{by} \PYG{n}{Erik} \PYG{n}{Tollerud} \PYG{o}{\PYGZhy{}} \PYG{n}{JJL} \PYG{n}{Fix} \PYG{n}{crash} \PYG{o+ow}{in} \PYG{n}{log} \PYG{n}{ticking}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Added} \PYG{n}{static} \PYG{n}{helper} \PYG{n}{method} \PYG{n}{BrokenHBarCollection}\PYG{o}{.}\PYG{n}{span\PYGZus{}where} \PYG{o+ow}{and} \PYG{n}{Axes}\PYG{o}{/}\PYG{n}{pyplot} \PYG{n}{method} \PYG{n}{fill\PYGZus{}between}\PYG{o}{.} \PYG{n}{See} \PYG{n}{examples}\PYG{o}{/}\PYG{n}{pylab}\PYG{o}{/}\PYG{n}{fill\PYGZus{}between}\PYG{o}{.}\PYG{n}{py} \PYG{o}{\PYGZhy{}} \PYG{n}{JDH} \PYG{n}{Add} \PYG{n}{x\PYGZus{}isdata} \PYG{o+ow}{and} \PYG{n}{y\PYGZus{}isdata} \PYG{n}{attributes} \PYG{n}{to} \PYG{n}{Artist} \PYG{n}{instances}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{use} \PYG{n}{them} \PYG{n}{to} \PYG{n}{determine} \PYG{n}{whether} \PYG{n}{either} \PYG{o+ow}{or} \PYG{n}{both} \PYG{n}{coordinates} \PYG{n}{are} \PYG{n}{used} \PYG{n}{when} \PYG{n}{updating} \PYG{n}{dataLim}\PYG{o}{.} \PYG{n}{This} \PYG{o+ow}{is} \PYG{n}{used} \PYG{n}{to} \PYG{n}{fix} \PYG{n}{autoscaling} \PYG{n}{problems} \PYG{n}{that} \PYG{n}{had} \PYG{n}{been} \PYG{n}{triggered} \PYG{n}{by} \PYG{n}{axhline}\PYG{p}{,} \PYG{n}{axhspan}\PYG{p}{,} \PYG{n}{axvline}\PYG{p}{,} \PYG{n}{axvspan}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Update} \PYG{n}{the} \PYG{n}{psd}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{csd}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{cohere}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{specgram}\PYG{p}{(}\PYG{p}{)} \PYG{n}{methods} \PYG{n}{of} \PYG{n}{Axes} \PYG{o+ow}{and} \PYG{n}{the} \PYG{n}{csd}\PYG{p}{(}\PYG{p}{)} \PYG{n}{cohere}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{specgram}\PYG{p}{(}\PYG{p}{)} \PYG{n}{functions} \PYG{o+ow}{in} \PYG{n}{mlab} \PYG{n}{to} \PYG{n}{be} \PYG{o+ow}{in} \PYG{n}{sync} \PYG{k}{with} \PYG{n}{the} \PYG{n}{changes} \PYG{n}{to} \PYG{n}{psd}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.} \PYG{n}{In} \PYG{n}{fact}\PYG{p}{,} \PYG{n}{under} \PYG{n}{the} \PYG{n}{hood}\PYG{p}{,} \PYG{n}{these} \PYG{n+nb}{all} \PYG{n}{call} \PYG{n}{the} \PYG{n}{same} \PYG{n}{core} \PYG{n}{to} \PYG{n}{do} \PYG{n}{computations}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{RM} \PYG{n}{Add} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pad\PYGZus{}to}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o+ow}{and} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{sides}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{parameters} \PYG{n}{to} \PYG{n}{mlab}\PYG{o}{.}\PYG{n}{psd}\PYG{p}{(}\PYG{p}{)} \PYG{n}{to} \PYG{n}{allow} \PYG{n}{controlling} \PYG{n}{of} \PYG{n}{zero} \PYG{n}{padding} \PYG{o+ow}{and} \PYG{n}{returning} \PYG{n}{of} \PYG{n}{negative} \PYG{n}{frequency} \PYG{n}{components}\PYG{p}{,} \PYG{n}{respectively}\PYG{o}{.} \PYG{n}{These} \PYG{n}{are} \PYG{n}{added} \PYG{o+ow}{in} \PYG{n}{a} \PYG{n}{way} \PYG{n}{that} \PYG{n}{does} \PYG{o+ow}{not} \PYG{n}{change} \PYG{n}{the} \PYG{n}{API}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{RM} \PYG{n}{Fix} \PYG{n}{handling} \PYG{n}{of} \PYG{n}{c} \PYG{n}{kwarg} \PYG{n}{by} \PYG{n}{scatter}\PYG{p}{;} \PYG{n}{generalize} \PYG{n}{is\PYGZus{}string\PYGZus{}like} \PYG{n}{to} \PYG{n}{accept} \PYG{n}{numpy} \PYG{o+ow}{and} \PYG{n}{numpy}\PYG{o}{.}\PYG{n}{ma} \PYG{n}{string} \PYG{n}{array} \PYG{n}{scalars}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{RM} \PYG{o+ow}{and} \PYG{n}{EF} \PYG{n}{Fix} \PYG{n}{a} \PYG{n}{possible} \PYG{n}{EINTR} \PYG{n}{problem} \PYG{o+ow}{in} \PYG{n}{dviread}\PYG{p}{,} \PYG{n}{which} \PYG{n}{might} \PYG{n}{help} \PYG{n}{when} \PYG{n}{saving} \PYG{n}{pdf} \PYG{n}{files} \PYG{k+kn}{from} \PYG{n+nn}{the} \PYG{n}{qt} \PYG{n}{backend}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{Fix} \PYG{n}{bug} \PYG{k}{with} \PYG{n}{zoom} \PYG{n}{to} \PYG{n}{rectangle} \PYG{o+ow}{and} \PYG{n}{twin} \PYG{n}{axes} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Added} \PYG{n}{Jae} \PYG{n}{Joon}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s fancy arrow, box and annotation enhancements \PYGZhy{}\PYGZhy{}} \PYG{n}{see} \PYG{n}{examples}\PYG{o}{/}\PYG{n}{pylab\PYGZus{}examples}\PYG{o}{/}\PYG{n}{annotation\PYGZus{}demo2}\PYG{o}{.}\PYG{n}{py} \PYG{n}{Autoscaling} \PYG{o+ow}{is} \PYG{n}{now} \PYG{n}{supported} \PYG{k}{with} \PYG{n}{shared} \PYG{n}{axes} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Fixed} \PYG{n}{exception} \PYG{o+ow}{in} \PYG{n}{dviread} \PYG{n}{that} \PYG{n}{happened} \PYG{k}{with} \PYG{n}{Minion} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{set\PYGZus{}xlim}\PYG{p}{,} \PYG{n}{ylim} \PYG{n}{now} \PYG{k}{return} \PYG{n}{a} \PYG{n}{copy} \PYG{n}{of} \PYG{n}{the} \PYG{n}{viewlim} \PYG{n}{array} \PYG{n}{to} \PYG{n}{avoid} \PYG{n}{modify} \PYG{n}{inplace} \PYG{n}{surprises} \PYG{n}{Added} \PYG{n}{image} \PYG{n}{thumbnail} \PYG{n}{generating} \PYG{n}{function} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{image}\PYG{o}{.}\PYG{n}{thumbnail}\PYG{o}{.} \PYG{n}{See} \PYG{n}{examples}\PYG{o}{/}\PYG{n}{misc}\PYG{o}{/}\PYG{n}{image\PYGZus{}thumbnail}\PYG{o}{.}\PYG{n}{py} \PYG{o}{\PYGZhy{}} \PYG{n}{JDH} \PYG{n}{Applied} \PYG{n}{scatleg} \PYG{n}{patch} \PYG{n}{based} \PYG{n}{on} \PYG{n}{ideas} \PYG{o+ow}{and} \PYG{n}{work} \PYG{n}{by} \PYG{n}{Erik} \PYG{n}{Tollerud} \PYG{o+ow}{and} \PYG{n}{Jae}\PYG{o}{\PYGZhy{}}\PYG{n}{Joon} \PYG{n}{Lee}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MM} \PYG{n}{Fixed} \PYG{n}{bug} \PYG{o+ow}{in} \PYG{n}{pdf} \PYG{n}{backend}\PYG{p}{:} \PYG{k}{if} \PYG{n}{you} \PYG{k}{pass} \PYG{n}{a} \PYG{n}{file} \PYG{n+nb}{object} \PYG{k}{for} \PYG{n}{output} \PYG{n}{instead} \PYG{n}{of} \PYG{n}{a} \PYG{n}{filename}\PYG{p}{,} \PYG{n}{e}\PYG{o}{.}\PYG{n}{g}\PYG{o}{.}\PYG{p}{,} \PYG{o+ow}{in} \PYG{n}{a} \PYG{n}{wep} \PYG{n}{app}\PYG{p}{,} \PYG{n}{we} \PYG{n}{now} \PYG{n}{flush} \PYG{n}{the} \PYG{n+nb}{object} \PYG{n}{at} \PYG{n}{the} \PYG{n}{end}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{Add} \PYG{n}{path} \PYG{n}{simplification} \PYG{n}{support} \PYG{n}{to} \PYG{n}{paths} \PYG{k}{with} \PYG{n}{gaps}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Fix} \PYG{n}{problem} \PYG{k}{with} \PYG{n}{AFM} \PYG{n}{files} \PYG{n}{that} \PYG{n}{don}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{t specify the font}\PYG{l+s+s1}{\PYGZsq{}}\PYG{n}{s} \PYG{n}{full} \PYG{n}{name} \PYG{o+ow}{or} \PYG{n}{family} \PYG{n}{name}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{Added} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{scilimits}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{kwarg} \PYG{n}{to} \PYG{n}{Axes}\PYG{o}{.}\PYG{n}{ticklabel\PYGZus{}format}\PYG{p}{(}\PYG{p}{)} \PYG{n}{method}\PYG{p}{,} \PYG{k}{for} \PYG{n}{easy} \PYG{n}{access} \PYG{n}{to} \PYG{n}{the} \PYG{n}{set\PYGZus{}powerlimits} \PYG{n}{method} \PYG{n}{of} \PYG{n}{the} \PYG{n}{major} \PYG{n}{ScalarFormatter}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Experimental} \PYG{n}{new} \PYG{n}{kwarg} \PYG{n}{borderpad} \PYG{n}{to} \PYG{n}{replace} \PYG{n}{pad} \PYG{o+ow}{in} \PYG{n}{legend}\PYG{p}{,} \PYG{n}{based} \PYG{n}{on} \PYG{n}{suggestion} \PYG{n}{by} \PYG{n}{Jae}\PYG{o}{\PYGZhy{}}\PYG{n}{Joon} \PYG{n}{Lee}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Allow} \PYG{n}{spy} \PYG{n}{to} \PYG{n}{ignore} \PYG{n}{zero} \PYG{n}{values} \PYG{o+ow}{in} \PYG{n}{sparse} \PYG{n}{arrays}\PYG{p}{,} \PYG{n}{based} \PYG{n}{on} \PYG{n}{patch} \PYG{n}{by} \PYG{n}{Tony} \PYG{n}{Yu}\PYG{o}{.} \PYG{n}{Also} \PYG{n}{fixed} \PYG{n}{plot} \PYG{n}{to} \PYG{n}{handle} \PYG{n}{empty} \PYG{n}{data} \PYG{n}{arrays}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{fixed} \PYG{n}{handling} \PYG{n}{of} \PYG{n}{markers} \PYG{o+ow}{in} \PYG{n}{figlegend}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Introduce} \PYG{n}{drawstyles} \PYG{k}{for} \PYG{n}{lines}\PYG{o}{.} \PYG{n}{Transparently} \PYG{n}{split} \PYG{n}{linestyles} \PYG{n}{like} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{steps\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{into} \PYG{n}{drawstyle} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{steps}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o+ow}{and} \PYG{n}{linestyle} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.} \PYG{n}{Legends} \PYG{n}{always} \PYG{n}{use} \PYG{n}{drawstyle} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{default}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MM} \PYG{n}{Fixed} \PYG{n}{quiver} \PYG{o+ow}{and} \PYG{n}{quiverkey} \PYG{n}{bugs} \PYG{p}{(}\PYG{n}{failure} \PYG{n}{to} \PYG{n}{scale} \PYG{n}{properly} \PYG{n}{when} \PYG{n}{resizing}\PYG{p}{)} \PYG{o+ow}{and} \PYG{n}{added} \PYG{n}{additional} \PYG{n}{methods} \PYG{k}{for} \PYG{n}{determining} \PYG{n}{the} \PYG{n}{arrow} \PYG{n}{angles} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Fix} \PYG{n}{polar} \PYG{n}{interpolation} \PYG{n}{to} \PYG{n}{handle} \PYG{n}{negative} \PYG{n}{values} \PYG{n}{of} \PYG{n}{theta} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Reorganized} \PYG{n}{cbook} \PYG{o+ow}{and} \PYG{n}{mlab} \PYG{n}{methods} \PYG{n}{related} \PYG{n}{to} \PYG{n}{numerical} \PYG{n}{calculations} \PYG{n}{that} \PYG{n}{have} \PYG{n}{little} \PYG{n}{to} \PYG{n}{do} \PYG{k}{with} \PYG{n}{the} \PYG{n}{goals} \PYG{n}{of} \PYG{n}{those} \PYG{n}{two} \PYG{n}{modules} \PYG{n}{into} \PYG{n}{a} \PYG{n}{separate} \PYG{n}{module} \PYG{n}{numerical\PYGZus{}methods}\PYG{o}{.}\PYG{n}{py} \PYG{n}{Also}\PYG{p}{,} \PYG{n}{added} \PYG{n}{ability} \PYG{n}{to} \PYG{n}{select} \PYG{n}{points} \PYG{o+ow}{and} \PYG{n}{stop} \PYG{n}{point} \PYG{n}{selection} \PYG{k}{with} \PYG{n}{keyboard} \PYG{o+ow}{in} \PYG{n}{ginput} \PYG{o+ow}{and} \PYG{n}{manual} \PYG{n}{contour} \PYG{n}{labeling} \PYG{n}{code}\PYG{o}{.} \PYG{n}{Finally}\PYG{p}{,} \PYG{n}{fixed} \PYG{n}{contour} \PYG{n}{labeling} \PYG{n}{bug}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{DMK} \PYG{n}{Fix} \PYG{n}{backtick} \PYG{o+ow}{in} \PYG{n}{Postscript} \PYG{n}{output}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{p}{[} \PYG{l+m+mi}{2089958} \PYG{p}{]} \PYG{n}{Path} \PYG{n}{simplification} \PYG{k}{for} \PYG{n}{vector} \PYG{n}{output} \PYG{n}{backends} \PYG{n}{Leverage} \PYG{n}{the} \PYG{n}{simplification} \PYG{n}{code} \PYG{n}{exposed} \PYG{n}{through} \PYG{n}{path\PYGZus{}to\PYGZus{}polygons} \PYG{n}{to} \PYG{n}{simplify} \PYG{n}{certain} \PYG{n}{well}\PYG{o}{\PYGZhy{}}\PYG{n}{behaved} \PYG{n}{paths} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{vector} \PYG{n}{backends} \PYG{p}{(}\PYG{n}{PDF}\PYG{p}{,} \PYG{n}{PS} \PYG{o+ow}{and} \PYG{n}{SVG}\PYG{p}{)}\PYG{o}{.} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{path.simplify}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{must} \PYG{n}{be} \PYG{n+nb}{set} \PYG{n}{to} \PYG{k+kc}{True} \PYG{o+ow}{in} \PYG{n}{matplotlibrc} \PYG{k}{for} \PYG{n}{this} \PYG{n}{to} \PYG{n}{work}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Add} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{filled}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{kwarg} \PYG{n}{to} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{intersects\PYGZus{}path} \PYG{o+ow}{and} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{intersects\PYGZus{}bbox}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Changed} \PYG{n}{full} \PYG{n}{arrows} \PYG{n}{slightly} \PYG{n}{to} \PYG{n}{avoid} \PYG{n}{an} \PYG{n}{xpdf} \PYG{n}{rendering} \PYG{n}{problem} \PYG{n}{reported} \PYG{n}{by} \PYG{n}{Friedrich} \PYG{n}{Hagedorn}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{Fix} \PYG{n}{conversion} \PYG{n}{of} \PYG{n}{quadratic} \PYG{n}{to} \PYG{n}{cubic} \PYG{n}{Bezier} \PYG{n}{curves} \PYG{o+ow}{in} \PYG{n}{PDF} \PYG{o+ow}{and} \PYG{n}{PS} \PYG{n}{backends}\PYG{o}{.} \PYG{n}{Patch} \PYG{n}{by} \PYG{n}{Jae}\PYG{o}{\PYGZhy{}}\PYG{n}{Joon} \PYG{n}{Lee}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{JKS} \PYG{n}{Added} \PYG{l+m+mi}{5}\PYG{o}{\PYGZhy{}}\PYG{n}{point} \PYG{n}{star} \PYG{n}{marker} \PYG{n}{to} \PYG{n}{plot} \PYG{n}{command} \PYG{n}{q}\PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Fix} \PYG{n}{hatching} \PYG{o+ow}{in} \PYG{n}{PS} \PYG{n}{backend} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Fix} \PYG{n}{log} \PYG{k}{with} \PYG{n}{base} \PYG{l+m+mi}{2} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Added} \PYG{n}{support} \PYG{k}{for} \PYG{n}{bilinear} \PYG{n}{interpolation} \PYG{o+ow}{in} \PYG{n}{NonUniformImage}\PYG{p}{;} \PYG{n}{patch} \PYG{n}{by} \PYG{n}{Gregory} \PYG{n}{Lielens}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{EF} \PYG{n}{Added} \PYG{n}{support} \PYG{k}{for} \PYG{n}{multiple} \PYG{n}{histograms} \PYG{k}{with} \PYG{n}{data} \PYG{n}{of} \PYG{n}{different} \PYG{n}{length} \PYG{o}{\PYGZhy{}} \PYG{n}{MM} \PYG{n}{Fix} \PYG{n}{step} \PYG{n}{plots} \PYG{k}{with} \PYG{n}{log} \PYG{n}{scale} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Fix} \PYG{n}{masked} \PYG{n}{arrays} \PYG{k}{with} \PYG{n}{markers} \PYG{o+ow}{in} \PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{Agg} \PYG{n}{backends} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Fix} \PYG{n}{clip\PYGZus{}on} \PYG{n}{kwarg} \PYG{n}{so} \PYG{n}{it} \PYG{n}{actually} \PYG{n}{works} \PYG{n}{correctly} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{Fix} \PYG{n}{locale} \PYG{n}{problems} \PYG{o+ow}{in} \PYG{n}{SVG} \PYG{n}{backend} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{n}{fix} \PYG{n}{quiver} \PYG{n}{so} \PYG{n}{masked} \PYG{n}{values} \PYG{n}{are} \PYG{o+ow}{not} \PYG{n}{plotted} \PYG{o}{\PYGZhy{}} \PYG{n}{JSW} \PYG{n}{improve} \PYG{n}{interactive} \PYG{n}{pan}\PYG{o}{/}\PYG{n}{zoom} \PYG{o+ow}{in} \PYG{n}{qt4} \PYG{n}{backend} \PYG{n}{on} \PYG{n}{windows} \PYG{o}{\PYGZhy{}} \PYG{n}{DSD} \PYG{n}{Fix} \PYG{n}{more} \PYG{n}{bugs} \PYG{o+ow}{in} \PYG{n}{NaN}\PYG{o}{/}\PYG{n}{inf} \PYG{n}{handling}\PYG{o}{.} \PYG{n}{In} \PYG{n}{particular}\PYG{p}{,} \PYG{n}{path} \PYG{n}{simplification} \PYG{p}{(}\PYG{n}{which} \PYG{n}{does} \PYG{o+ow}{not} \PYG{n}{handle} \PYG{n}{NaNs} \PYG{o+ow}{or} \PYG{n}{infs}\PYG{p}{)} \PYG{n}{will} \PYG{n}{be} \PYG{n}{turned} \PYG{n}{off} \PYG{n}{automatically} \PYG{n}{when} \PYG{n}{infs} \PYG{o+ow}{or} \PYG{n}{NaNs} \PYG{n}{are} \PYG{n}{present}\PYG{o}{.} \PYG{n}{Also} \PYG{n}{masked} \PYG{n}{arrays} \PYG{n}{are} \PYG{n}{now} \PYG{n}{converted} \PYG{n}{to} \PYG{n}{arrays} \PYG{k}{with} \PYG{n}{NaNs} \PYG{k}{for} \PYG{n}{consistent} \PYG{n}{handling} \PYG{n}{of} \PYG{n}{masks} \PYG{o+ow}{and} \PYG{n}{NaNs} \PYG{o}{\PYGZhy{}} \PYG{n}{MGD} \PYG{o+ow}{and} \PYG{n}{EF} \PYG{n}{Added} \PYG{n}{support} \PYG{k}{for} \PYG{n}{arbitrary} \PYG{n}{rasterization} \PYG{n}{resolutions} \PYG{n}{to} \PYG{n}{the} \PYG{n}{SVG} \PYG{n}{backend}\PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{MW} \end{sphinxVerbatim} \section{New in matplotlib 0.99} \label{\detokenize{users/prev_whats_new/whats_new_0.99:new-in-matplotlib-0-99}}\label{\detokenize{users/prev_whats_new/whats_new_0.99:whats-new-0-99}}\label{\detokenize{users/prev_whats_new/whats_new_0.99::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.99:id4}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.99:new-in-matplotlib-0-99}]{\sphinxcrossref{New in matplotlib 0.99}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.99:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.99:new-documentation}]{\sphinxcrossref{New documentation}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.99:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.99:mplot3d}]{\sphinxcrossref{mplot3d}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.99:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.99:axes-grid-toolkit}]{\sphinxcrossref{axes grid toolkit}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_0.99:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_0.99:axis-spine-placement}]{\sphinxcrossref{Axis spine placement}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{New documentation} \label{\detokenize{users/prev_whats_new/whats_new_0.99:new-documentation}} Jae-Joon Lee has written two new guides {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} and {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}}. Michael Sarahan has written {\hyperref[\detokenize{tutorials/introductory/images::doc}]{\sphinxcrossref{\DUrole{doc}{Image tutorial}}}}. John Hunter has written two new tutorials on working with paths and transformations: {\hyperref[\detokenize{tutorials/advanced/path_tutorial::doc}]{\sphinxcrossref{\DUrole{doc}{Path Tutorial}}}} and {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial::doc}]{\sphinxcrossref{\DUrole{doc}{Transformations Tutorial}}}}. \subsection{mplot3d} \label{\detokenize{users/prev_whats_new/whats_new_0.99:mplot3d}}\label{\detokenize{users/prev_whats_new/whats_new_0.99:whats-new-mplot3d}} Reinier Heeres has ported John Porter's mplot3d over to the new matplotlib transformations framework, and it is now available as a toolkit mpl\_toolkits.mplot3d (which now comes standard with all mpl installs). See \DUrole{xref,std,std-ref}{mplot3d-examples-index} and {\hyperref[\detokenize{tutorials/toolkits/mplot3d:toolkit-mplot3d-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting started}}}} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_99\_mplot3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_99_mplot3d_0011}.png}} \caption{Whats New 99 Mplot3d}\label{\detokenize{users/prev_whats_new/whats_new_0.99:id1}}\end{figure} \subsection{axes grid toolkit} \label{\detokenize{users/prev_whats_new/whats_new_0.99:axes-grid-toolkit}}\label{\detokenize{users/prev_whats_new/whats_new_0.99:whats-new-axes-grid}} Jae-Joon Lee has added a new toolkit to ease displaying multiple images in matplotlib, as well as some support for curvilinear grids to support the world coordinate system. The toolkit is included standard with all new mpl installs. See \DUrole{xref,std,std-ref}{axes\_grid1-examples-index}, \DUrole{xref,std,std-ref}{axisartist-examples-index}, {\hyperref[\detokenize{tutorials/toolkits/axes_grid:axes-grid1-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{What is axes\_grid1 toolkit?}}}} and {\hyperref[\detokenize{tutorials/toolkits/axisartist:axisartist-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{axisartist}}}} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_99\_axes\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_99_axes_grid_0011}.png}} \caption{Whats New 99 Axes Grid}\label{\detokenize{users/prev_whats_new/whats_new_0.99:id2}}\end{figure} \subsection{Axis spine placement} \label{\detokenize{users/prev_whats_new/whats_new_0.99:axis-spine-placement}}\label{\detokenize{users/prev_whats_new/whats_new_0.99:whats-new-spine}} Andrew Straw has added the ability to place "axis spines" -- the lines that denote the data limits -- in various arbitrary locations. No longer are your axis lines constrained to be a simple rectangle around the figure -- you can turn on or off left, bottom, right and top, as well as "detach" the spine to offset it away from the data. See \DUrole{xref,std,std-doc}{/gallery/ticks\_and\_spines/spine\_placement\_demo} and {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.spines.Spine}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_99\_spines.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_99_spines_0011}.png}} \caption{Whats New 99 Spines}\label{\detokenize{users/prev_whats_new/whats_new_0.99:id3}}\end{figure} \section{New in matplotlib 1.0} \label{\detokenize{users/prev_whats_new/whats_new_1.0:new-in-matplotlib-1-0}}\label{\detokenize{users/prev_whats_new/whats_new_1.0:whats-new-1-0}}\label{\detokenize{users/prev_whats_new/whats_new_1.0::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id4}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:new-in-matplotlib-1-0}]{\sphinxcrossref{New in matplotlib 1.0}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:html5-canvas-backend}]{\sphinxcrossref{HTML5/Canvas backend}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:sophisticated-subplot-grid-layout}]{\sphinxcrossref{Sophisticated subplot grid layout}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:easy-pythonic-subplots}]{\sphinxcrossref{Easy pythonic subplots}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:contour-fixes-and-and-triplot}]{\sphinxcrossref{Contour fixes and and triplot}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:multiple-calls-to-show-supported}]{\sphinxcrossref{multiple calls to show supported}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:mplot3d-graphs-can-be-embedded-in-arbitrary-axes}]{\sphinxcrossref{mplot3d graphs can be embedded in arbitrary axes}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:tick-params}]{\sphinxcrossref{tick\_params}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:lots-of-performance-and-feature-enhancements}]{\sphinxcrossref{Lots of performance and feature enhancements}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:much-improved-software-carpentry}]{\sphinxcrossref{Much improved software carpentry}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.0:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.0:bugfix-marathon}]{\sphinxcrossref{Bugfix marathon}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{HTML5/Canvas backend} \label{\detokenize{users/prev_whats_new/whats_new_1.0:html5-canvas-backend}}\label{\detokenize{users/prev_whats_new/whats_new_1.0:whats-new-html5}} Simon Ratcliffe and Ludwig Schwardt have released an \sphinxhref{http://code.google.com/p/mplh5canvas/}{HTML5/Canvas} backend for matplotlib. The backend is almost feature complete, and they have done a lot of work comparing their html5 rendered images with our core renderer Agg. The backend features client/server interactive navigation of matplotlib figures in an html5 compliant browser. \subsection{Sophisticated subplot grid layout} \label{\detokenize{users/prev_whats_new/whats_new_1.0:sophisticated-subplot-grid-layout}} Jae-Joon Lee has written {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}}, a new module for doing complex subplot layouts, featuring row and column spans and more. See {\hyperref[\detokenize{tutorials/intermediate/gridspec::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} for a tutorial overview. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/userdemo/demo\_gridspec01.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_gridspec01_0011}.png}} \caption{Demo Gridspec01}\label{\detokenize{users/prev_whats_new/whats_new_1.0:id1}}\end{figure} \subsection{Easy pythonic subplots} \label{\detokenize{users/prev_whats_new/whats_new_1.0:easy-pythonic-subplots}} Fernando Perez got tired of all the boilerplate code needed to create a figure and multiple subplots when using the matplotlib API, and wrote a {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} helper function. Basic usage allows you to create the figure and an array of subplots with numpy indexing (starts with 0). e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axarr} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{axarr}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} upper, left} \end{sphinxVerbatim} See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/subplot\_demo} for several code examples. \subsection{Contour fixes and and triplot} \label{\detokenize{users/prev_whats_new/whats_new_1.0:contour-fixes-and-and-triplot}} Ian Thomas has fixed a long-standing bug that has vexed our most talented developers for years. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}} now handles interior masked regions, and the boundaries of line and filled contours coincide. Additionally, he has contributed a new module {\hyperref[\detokenize{api/tri_api:module-matplotlib.tri}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tri}}}}} and helper function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib.pyplot.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{triplot()}}}}} for creating and plotting unstructured triangular grids. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/triplot\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_triplot_demo_0011}.png}} \caption{Triplot Demo}\label{\detokenize{users/prev_whats_new/whats_new_1.0:id2}}\end{figure} \subsection{multiple calls to show supported} \label{\detokenize{users/prev_whats_new/whats_new_1.0:multiple-calls-to-show-supported}} A long standing request is to support multiple calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}}. This has been difficult because it is hard to get consistent behavior across operating systems, user interface toolkits and versions. Eric Firing has done a lot of work on rationalizing show across backends, with the desired behavior to make show raise all newly created figures and block execution until they are closed. Repeated calls to show should raise newly created figures since the last call. Eric has done a lot of testing on the user interface toolkits and versions and platforms he has access to, but it is not possible to test them all, so please report problems to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-users}{mailing list} and \sphinxhref{https://github.com/matplotlib/matplotlib/issues}{bug tracker}. \subsection{mplot3d graphs can be embedded in arbitrary axes} \label{\detokenize{users/prev_whats_new/whats_new_1.0:mplot3d-graphs-can-be-embedded-in-arbitrary-axes}} You can now place an mplot3d graph into an arbitrary axes location, supporting mixing of 2D and 3D graphs in the same figure, and/or multiple 3D graphs in a single figure, using the "projection" keyword argument to add\_axes or add\_subplot. Thanks Ben Root. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pyplots/whats\_new\_1\_subplot3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_whats_new_1_subplot3d_0011}.png}} \caption{Whats New 1 Subplot3d}\label{\detokenize{users/prev_whats_new/whats_new_1.0:id3}}\end{figure} \subsection{tick\_params} \label{\detokenize{users/prev_whats_new/whats_new_1.0:tick-params}} Eric Firing wrote tick\_params, a convenience method for changing the appearance of ticks and tick labels. See pyplot function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tick_params:matplotlib.pyplot.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params()}}}}} and associated Axes method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params()}}}}}. \subsection{Lots of performance and feature enhancements} \label{\detokenize{users/prev_whats_new/whats_new_1.0:lots-of-performance-and-feature-enhancements}}\begin{itemize} \item {} Faster magnification of large images, and the ability to zoom in to a single pixel \item {} Local installs of documentation work better \item {} Improved "widgets" -- mouse grabbing is supported \item {} More accurate snapping of lines to pixel boundaries \item {} More consistent handling of color, particularly the alpha channel, throughout the API \end{itemize} \subsection{Much improved software carpentry} \label{\detokenize{users/prev_whats_new/whats_new_1.0:much-improved-software-carpentry}} The matplotlib trunk is probably in as good a shape as it has ever been, thanks to improved \sphinxhref{http://software-carpentry.org/}{software carpentry}. We now have a \sphinxhref{https://buildbot.net}{buildbot} which runs a suite of \sphinxhref{http://code.google.com/p/python-nose/}{nose} regression tests on every svn commit, auto-generating a set of images and comparing them against a set of known-goods, sending emails to developers on failures with a pixel-by-pixel image comparison. Releases and release bugfixes happen in branches, allowing active new feature development to happen in the trunk while keeping the release branches stable. Thanks to Andrew Straw, Michael Droettboom and other matplotlib developers for the heavy lifting. \subsection{Bugfix marathon} \label{\detokenize{users/prev_whats_new/whats_new_1.0:bugfix-marathon}} Eric Firing went on a bug fixing and closing marathon, closing over 100 bugs on the \sphinxhref{http://sourceforge.net/tracker/?group\_id=80706\&atid=560720}{bug tracker} with help from Jae-Joon Lee, Michael Droettboom, Christoph Gohlke and Michiel de Hoon. \section{New in matplotlib 1.1} \label{\detokenize{users/prev_whats_new/whats_new_1.1:new-in-matplotlib-1-1}}\label{\detokenize{users/prev_whats_new/whats_new_1.1:whats-new-1-1}}\label{\detokenize{users/prev_whats_new/whats_new_1.1::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:new-in-matplotlib-1-1}]{\sphinxcrossref{New in matplotlib 1.1}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:sankey-diagrams}]{\sphinxcrossref{Sankey Diagrams}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:animation}]{\sphinxcrossref{Animation}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:tight-layout}]{\sphinxcrossref{Tight Layout}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:pyqt4-pyside-and-ipython}]{\sphinxcrossref{PyQT4, PySide, and IPython}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:legend}]{\sphinxcrossref{Legend}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:mplot3d}]{\sphinxcrossref{mplot3d}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:numerix-support-removed}]{\sphinxcrossref{Numerix support removed}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:markers}]{\sphinxcrossref{Markers}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.1:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.1:other-improvements}]{\sphinxcrossref{Other improvements}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \begin{sphinxadmonition}{note}{Note:} matplotlib 1.1 supports Python 2.4 to 2.7 \end{sphinxadmonition} \subsection{Sankey Diagrams} \label{\detokenize{users/prev_whats_new/whats_new_1.1:sankey-diagrams}} Kevin Davies has extended Yannick Copin's original Sankey example into a module ({\hyperref[\detokenize{api/sankey_api:module-matplotlib.sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sankey}}}}}) and provided new examples (\DUrole{xref,std,std-doc}{/gallery/specialty\_plots/sankey\_basics}, \DUrole{xref,std,std-doc}{/gallery/specialty\_plots/sankey\_links}, \DUrole{xref,std,std-doc}{/gallery/specialty\_plots/sankey\_rankine}). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/specialty\_plots/sankey\_rankine.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_sankey_rankine_0011}.png}} \caption{Sankey Rankine}\label{\detokenize{users/prev_whats_new/whats_new_1.1:id1}}\end{figure} \subsection{Animation} \label{\detokenize{users/prev_whats_new/whats_new_1.1:animation}} Ryan May has written a backend-independent framework for creating animated figures. The {\hyperref[\detokenize{api/animation_api:module-matplotlib.animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animation}}}}} module is intended to replace the backend-specific examples formerly in the \DUrole{xref,std,std-ref}{examples-index} listings. Examples using the new framework are in \DUrole{xref,std,std-ref}{animation-examples-index}; see the entrancing \sphinxcode{\sphinxupquote{double pendulum \textless{}gallery/animation/double\_pendulum\_sgskip.py\textgreater{}}} which uses {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation.Animation.save()}}}}} to create the movie below. This should be considered as a beta release of the framework; please try it and provide feedback. \subsection{Tight Layout} \label{\detokenize{users/prev_whats_new/whats_new_1.1:tight-layout}} A frequent issue raised by users of matplotlib is the lack of a layout engine to nicely space out elements of the plots. While matplotlib still adheres to the philosophy of giving users complete control over the placement of plot elements, Jae-Joon Lee created the {\hyperref[\detokenize{api/tight_layout_api:module-matplotlib.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} module and introduced a new command {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} to address the most common layout issues. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-1-1_00_00}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-1-1_01_00}.pdf} \end{figure} The usage of this functionality can be as simple as \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{tight\PYGZus{}layout}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} and it will adjust the spacing between subplots so that the axis labels do not overlap with neighboring subplots. A {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Tight Layout guide}}}} has been created to show how to use this new tool. \subsection{PyQT4, PySide, and IPython} \label{\detokenize{users/prev_whats_new/whats_new_1.1:pyqt4-pyside-and-ipython}} Gerald Storer made the Qt4 backend compatible with PySide as well as PyQT4. At present, however, PySide does not support the PyOS\_InputHook mechanism for handling gui events while waiting for text input, so it cannot be used with the new version 0.11 of \sphinxhref{http://ipython.org}{IPython}. Until this feature appears in PySide, IPython users should use the PyQT4 wrapper for QT4, which remains the matplotlib default. An rcParam entry, "backend.qt4", has been added to allow users to select PyQt4, PyQt4v2, or PySide. The latter two use the Version 2 Qt API. In most cases, users can ignore this rcParam variable; it is available to aid in testing, and to provide control for users who are embedding matplotlib in a PyQt4 or PySide app. \subsection{Legend} \label{\detokenize{users/prev_whats_new/whats_new_1.1:legend}} Jae-Joon Lee has improved plot legends. First, legends for complex plots such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stem:matplotlib.pyplot.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem()}}}}} plots will now display correctly. Second, the 'best' placement of a legend has been improved in the presence of NANs. See the {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for more detailed explanation and examples. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/legend\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_legend_demo_0041}.png}} \caption{Legend Demo4}\label{\detokenize{users/prev_whats_new/whats_new_1.1:id2}}\end{figure} \subsection{mplot3d} \label{\detokenize{users/prev_whats_new/whats_new_1.1:mplot3d}} In continuing the efforts to make 3D plotting in matplotlib just as easy as 2D plotting, Ben Root has made several improvements to the {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mplot3d}}}}} module. \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D}}}}} has been improved to bring the class towards feature-parity with regular Axes objects \item {} Documentation for {\hyperref[\detokenize{tutorials/toolkits/mplot3d:toolkit-mplot3d-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting started}}}} was significantly expanded \item {} Axis labels and orientation improved \item {} Most 3D plotting functions now support empty inputs \item {} Ticker offset display added: \end{itemize} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/offset.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_offset_0011}.png}} \caption{Offset}\label{\detokenize{users/prev_whats_new/whats_new_1.1:id3}}\end{figure} \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}} gains \sphinxstyleemphasis{zdir} and \sphinxstyleemphasis{offset} kwargs. You can now do this: \end{itemize} \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/contourf3d\_2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contourf3d_2_0012}.png}} \caption{Contourf3d 2}\label{\detokenize{users/prev_whats_new/whats_new_1.1:id4}}\end{figure} \subsection{Numerix support removed} \label{\detokenize{users/prev_whats_new/whats_new_1.1:numerix-support-removed}} After more than two years of deprecation warnings, Numerix support has now been completely removed from matplotlib. \subsection{Markers} \label{\detokenize{users/prev_whats_new/whats_new_1.1:markers}} The list of available markers for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} has now been merged. While they were mostly similar, some markers existed for one function, but not the other. This merge did result in a conflict for the 'd' diamond marker. Now, 'd' will be interpreted to always mean "thin" diamond while 'D' will mean "regular" diamond. Thanks to Michael Droettboom for this effort. \subsection{Other improvements} \label{\detokenize{users/prev_whats_new/whats_new_1.1:other-improvements}}\begin{itemize} \item {} Unit support for polar axes and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.arrow:matplotlib.axes.Axes.arrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{arrow()}}}}} \item {} {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolarAxes}}}}} gains getters and setters for "theta\_direction", and "theta\_offset" to allow for theta to go in either the clock-wise or counter-clockwise direction and to specify where zero degrees should be placed. {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_theta_zero_location}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_theta\_zero\_location()}}}}} is an added convenience function. \item {} Fixed error in argument handling for tri-functions such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tripcolor()}}}}} \item {} \sphinxcode{\sphinxupquote{axes.labelweight}} parameter added to rcParams. \item {} For {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}, \sphinxstyleemphasis{interpolation='nearest'} will now always perform an interpolation. A "none" option has been added to indicate no interpolation at all. \item {} An error in the Hammer projection has been fixed. \item {} \sphinxstyleemphasis{clabel} for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} now accepts a callable. Thanks to Daniel Hyams for the original patch. \item {} Jae-Joon Lee added the \sphinxcode{\sphinxupquote{HBox}} and \sphinxcode{\sphinxupquote{VBox}} classes. \item {} Christoph Gohlke reduced memory usage in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} now accepts empty inputs. \item {} The behavior for 'symlog' scale has been fixed, but this may result in some minor changes to existing plots. This work was refined by ssyr. \item {} Peter Butterworth added named figure support to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}. \item {} Michiel de Hoon has modified the MacOSX backend to make its interactive behavior consistent with the other backends. \item {} Pim Schellart added a new colormap called "cubehelix". Sameer Grover also added a colormap called "coolwarm". See it and all other colormaps {\hyperref[\detokenize{tutorials/colors/colormaps:color-colormaps-reference}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}}. \item {} Many bug fixes and documentation improvements. \end{itemize} \section{New in matplotlib 1.2} \label{\detokenize{users/prev_whats_new/whats_new_1.2:new-in-matplotlib-1-2}}\label{\detokenize{users/prev_whats_new/whats_new_1.2:whats-new-1-2}}\label{\detokenize{users/prev_whats_new/whats_new_1.2::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:new-in-matplotlib-1-2}]{\sphinxcrossref{New in matplotlib 1.2}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:python-3-x-support}]{\sphinxcrossref{Python 3.x support}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:pgf-tikz-backend}]{\sphinxcrossref{PGF/TikZ backend}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:locator-interface}]{\sphinxcrossref{Locator interface}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:tri-surface-plots}]{\sphinxcrossref{Tri-Surface Plots}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:control-the-lengths-of-colorbar-extensions}]{\sphinxcrossref{Control the lengths of colorbar extensions}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:figures-are-picklable}]{\sphinxcrossref{Figures are picklable}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:set-default-bounding-box-in-matplotlibrc}]{\sphinxcrossref{Set default bounding box in matplotlibrc}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:new-boxplot-functionality}]{\sphinxcrossref{New Boxplot Functionality}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id15}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:new-rc-parameter-functionality}]{\sphinxcrossref{New RC parameter functionality}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id16}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:streamplot}]{\sphinxcrossref{Streamplot}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id17}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:new-hist-functionality}]{\sphinxcrossref{New hist functionality}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id18}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:updated-shipped-dependencies}]{\sphinxcrossref{Updated shipped dependencies}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id19}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:face-centred-colors-in-tripcolor-plots}]{\sphinxcrossref{Face-centred colors in tripcolor plots}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id20}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:hatching-patterns-in-filled-contour-plots-with-legends}]{\sphinxcrossref{Hatching patterns in filled contour plots, with legends}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2:id21}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2:known-issues-in-the-matplotlib-1-2-release}]{\sphinxcrossref{Known issues in the matplotlib 1.2 release}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \begin{sphinxadmonition}{note}{Note:} matplotlib 1.2 supports Python 2.6, 2.7, and 3.1 \end{sphinxadmonition} \subsection{Python 3.x support} \label{\detokenize{users/prev_whats_new/whats_new_1.2:python-3-x-support}} Matplotlib 1.2 is the first version to support Python 3.x, specifically Python 3.1 and 3.2. To make this happen in a reasonable way, we also had to drop support for Python versions earlier than 2.6. This work was done by Michael Droettboom, the Cape Town Python Users' Group, many others and supported financially in part by the SAGE project. The following GUI backends work under Python 3.x: Gtk3Cairo, Qt4Agg, TkAgg and MacOSX. The other GUI backends do not yet have adequate bindings for Python 3.x, but continue to work on Python 2.6 and 2.7, particularly the Qt and QtAgg backends (which have been deprecated). The non-GUI backends, such as PDF, PS and SVG, work on both Python 2.x and 3.x. Features that depend on the Python Imaging Library, such as JPEG handling, do not work, since the version of PIL for Python 3.x is not sufficiently mature. \subsection{PGF/TikZ backend} \label{\detokenize{users/prev_whats_new/whats_new_1.2:pgf-tikz-backend}} Peter Würtz wrote a backend that allows matplotlib to export figures as drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are found in {\hyperref[\detokenize{tutorials/text/pgf::doc}]{\sphinxcrossref{\DUrole{doc}{Typesetting With XeLaTeX/LuaLaTeX}}}}. \noindent\sphinxincludegraphics{{pgf_preamble}.pdf} \subsection{Locator interface} \label{\detokenize{users/prev_whats_new/whats_new_1.2:locator-interface}} Philip Elson exposed the intelligence behind the tick Locator classes with a simple interface. For instance, to get no more than 5 sensible steps which span the values 10 and 19.5: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{as} \PYG{n+nn}{mticker} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{locator} \PYG{o}{=} \PYG{n}{mticker}\PYG{o}{.}\PYG{n}{MaxNLocator}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{locator}\PYG{o}{.}\PYG{n}{tick\PYGZus{}values}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mf}{19.5}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[ 10. 12. 14. 16. 18. 20.]} \end{sphinxVerbatim} \subsection{Tri-Surface Plots} \label{\detokenize{users/prev_whats_new/whats_new_1.2:tri-surface-plots}} Damon McDougall added a new plotting method for the {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mplot3d}}}}} toolkit called {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_trisurf()}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/trisurf3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_trisurf3d_0012}.png}} \caption{Trisurf3d}\label{\detokenize{users/prev_whats_new/whats_new_1.2:id1}}\end{figure} \subsection{Control the lengths of colorbar extensions} \label{\detokenize{users/prev_whats_new/whats_new_1.2:control-the-lengths-of-colorbar-extensions}} Andrew Dawson added a new keyword argument \sphinxstyleemphasis{extendfrac} to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} to control the length of minimum and maximum colorbar extensions. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-2-1}.pdf} \end{figure} \subsection{Figures are picklable} \label{\detokenize{users/prev_whats_new/whats_new_1.2:figures-are-picklable}} Philip Elson added an experimental feature to make figures picklable for quick and easy short-term storage of plots. Pickle files are not designed for long term storage, are unsupported when restoring a pickle saved in another matplotlib version and are insecure when restoring a pickle from an untrusted source. Having said this, they are useful for short term storage for later modification inside matplotlib. \subsection{Set default bounding box in matplotlibrc} \label{\detokenize{users/prev_whats_new/whats_new_1.2:set-default-bounding-box-in-matplotlibrc}} Two new defaults are available in the matplotlibrc configuration file: \sphinxcode{\sphinxupquote{savefig.bbox}}, which can be set to 'standard' or 'tight', and \sphinxcode{\sphinxupquote{savefig.pad\_inches}}, which controls the bounding box padding. \subsection{New Boxplot Functionality} \label{\detokenize{users/prev_whats_new/whats_new_1.2:new-boxplot-functionality}} Users can now incorporate their own methods for computing the median and its confidence intervals into the \sphinxcode{\sphinxupquote{boxplot()}} method. For every column of data passed to boxplot, the user can specify an accompanying median and confidence interval. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/statistics/boxplot\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_boxplot_demo_0031}.png}} \caption{Boxplot Demo3}\label{\detokenize{users/prev_whats_new/whats_new_1.2:id2}}\end{figure} \subsection{New RC parameter functionality} \label{\detokenize{users/prev_whats_new/whats_new_1.2:new-rc-parameter-functionality}} Matthew Emmett added a function and a context manager to help manage RC parameters: {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rc_file}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc\_file()}}}}} and {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rc_context}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc\_context}}}}}. To load RC parameters from a file: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}file}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mpl.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} To temporarily use RC parameters: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mpl.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rc}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{text.usetex}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{True}\PYG{p}{\PYGZcb{}}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} } \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \end{sphinxVerbatim} \subsection{Streamplot} \label{\detokenize{users/prev_whats_new/whats_new_1.2:streamplot}} Tom Flannaghan and Tony Yu have added a new {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot()}}}}} function to plot the streamlines of a vector field. This has been a long-requested feature and complements the existing {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver()}}}}} function for plotting vector fields. In addition to simply plotting the streamlines of the vector field, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot()}}}}} allows users to map the colors and/or line widths of the streamlines to a separate parameter, such as the speed or local intensity of the vector field. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/plot\_streamplot.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_plot_streamplot_0012}.png}} \caption{Plot Streamplot}\label{\detokenize{users/prev_whats_new/whats_new_1.2:id3}}\end{figure} \subsection{New hist functionality} \label{\detokenize{users/prev_whats_new/whats_new_1.2:new-hist-functionality}} Nic Eggert added a new \sphinxcode{\sphinxupquote{stacked}} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} that allows creation of stacked histograms using any of the histogram types. Previously, this functionality was only available by using the \sphinxcode{\sphinxupquote{barstacked}} histogram type. Now, when \sphinxcode{\sphinxupquote{stacked=True}} is passed to the function, any of the histogram types can be stacked. The \sphinxcode{\sphinxupquote{barstacked}} histogram type retains its previous functionality for backwards compatibility. \subsection{Updated shipped dependencies} \label{\detokenize{users/prev_whats_new/whats_new_1.2:updated-shipped-dependencies}} The following dependencies that ship with matplotlib and are optionally installed alongside it have been updated: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{pytz}} 2012d \item {} \sphinxcode{\sphinxupquote{dateutil}} 1.5 on Python 2.x, and 2.1 on Python 3.x \end{itemize} \subsection{Face-centred colors in tripcolor plots} \label{\detokenize{users/prev_whats_new/whats_new_1.2:face-centred-colors-in-tripcolor-plots}} Ian Thomas extended {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tripcolor()}}}}} to allow one color value to be specified for each triangular face rather than for each point in a triangulation. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/tripcolor\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tripcolor_demo_0011}.png}} \caption{Tripcolor Demo}\label{\detokenize{users/prev_whats_new/whats_new_1.2:id4}}\end{figure} \subsection{Hatching patterns in filled contour plots, with legends} \label{\detokenize{users/prev_whats_new/whats_new_1.2:hatching-patterns-in-filled-contour-plots-with-legends}} Phil Elson added support for hatching to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}}, together with the ability to use a legend to identify contoured ranges. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/contourf\_hatching.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contourf_hatching_0011}.png}} \caption{Contourf Hatching}\label{\detokenize{users/prev_whats_new/whats_new_1.2:id5}}\end{figure} \subsection{Known issues in the matplotlib 1.2 release} \label{\detokenize{users/prev_whats_new/whats_new_1.2:known-issues-in-the-matplotlib-1-2-release}}\begin{itemize} \item {} When using the Qt4Agg backend with IPython 0.11 or later, the save dialog will not display. This should be fixed in a future version of IPython. \end{itemize} \section{New in matplotlib 1.2.2} \label{\detokenize{users/prev_whats_new/whats_new_1.2.2:new-in-matplotlib-1-2-2}}\label{\detokenize{users/prev_whats_new/whats_new_1.2.2:whats-new-1-2-2}}\label{\detokenize{users/prev_whats_new/whats_new_1.2.2::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2.2:id1}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2.2:new-in-matplotlib-1-2-2}]{\sphinxcrossref{New in matplotlib 1.2.2}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2.2:id2}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2.2:improved-collections}]{\sphinxcrossref{Improved collections}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.2.2:id3}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.2.2:multiple-images-on-same-axes-are-correctly-transparent}]{\sphinxcrossref{Multiple images on same axes are correctly transparent}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{Improved collections} \label{\detokenize{users/prev_whats_new/whats_new_1.2.2:improved-collections}} The individual items of a collection may now have different alpha values and be rendered correctly. This also fixes a bug where collections were always filled in the PDF backend. \subsection{Multiple images on same axes are correctly transparent} \label{\detokenize{users/prev_whats_new/whats_new_1.2.2:multiple-images-on-same-axes-are-correctly-transparent}} When putting multiple images onto the same axes, the background color of the axes will now show through correctly. \section{New in matplotlib 1.3} \label{\detokenize{users/prev_whats_new/whats_new_1.3:new-in-matplotlib-1-3}}\label{\detokenize{users/prev_whats_new/whats_new_1.3:whats-new-1-3}}\label{\detokenize{users/prev_whats_new/whats_new_1.3::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:new-in-matplotlib-1-3}]{\sphinxcrossref{New in matplotlib 1.3}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:new-in-1-3-1}]{\sphinxcrossref{New in 1.3.1}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:new-plotting-features}]{\sphinxcrossref{New plotting features}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:updated-axes3d-contour-methods}]{\sphinxcrossref{Updated Axes3D.contour methods}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:drawing}]{\sphinxcrossref{Drawing}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:text}]{\sphinxcrossref{Text}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:configuration-rcparams}]{\sphinxcrossref{Configuration (rcParams)}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:backends}]{\sphinxcrossref{Backends}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id15}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:documentation-and-examples}]{\sphinxcrossref{Documentation and examples}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.3:id16}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.3:infrastructure}]{\sphinxcrossref{Infrastructure}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \begin{sphinxadmonition}{note}{Note:} matplotlib 1.3 supports Python 2.6, 2.7, 3.2, and 3.3 \end{sphinxadmonition} \subsection{New in 1.3.1} \label{\detokenize{users/prev_whats_new/whats_new_1.3:new-in-1-3-1}} 1.3.1 is a bugfix release, primarily dealing with improved setup and handling of dependencies, and correcting and enhancing the documentation. The following changes were made in 1.3.1 since 1.3.0. \subsubsection{Enhancements} \label{\detokenize{users/prev_whats_new/whats_new_1.3:enhancements}}\begin{itemize} \item {} Added a context manager for creating multi-page pdfs (see {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.PdfPages}}}}}). \item {} The WebAgg backend should now have lower latency over heterogeneous Internet connections. \end{itemize} \subsubsection{Bug fixes} \label{\detokenize{users/prev_whats_new/whats_new_1.3:bug-fixes}}\begin{itemize} \item {} Histogram plots now contain the endline. \item {} Fixes to the Molleweide projection. \item {} Handling recent fonts from Microsoft and Macintosh-style fonts with non-ascii metadata is improved. \item {} Hatching of fill between plots now works correctly in the PDF backend. \item {} Tight bounding box support now works in the PGF backend. \item {} Transparent figures now display correctly in the Qt4Agg backend. \item {} Drawing lines from one subplot to another now works. \item {} Unit handling on masked arrays has been improved. \end{itemize} \subsubsection{Setup and dependencies} \label{\detokenize{users/prev_whats_new/whats_new_1.3:setup-and-dependencies}}\begin{itemize} \item {} Now works with any version of pyparsing 1.5.6 or later, without displaying hundreds of warnings. \item {} Now works with 64-bit versions of Ghostscript on MS-Windows. \item {} When installing from source into an environment without Numpy, Numpy will first be downloaded and built and then used to build matplotlib. \item {} Externally installed backends are now always imported using a fully-qualified path to the module. \item {} Works with newer version of wxPython. \item {} Can now build with a PyCXX installed globally on the system from source. \item {} Better detection of Gtk3 dependencies. \end{itemize} \subsubsection{Testing} \label{\detokenize{users/prev_whats_new/whats_new_1.3:testing}}\begin{itemize} \item {} Tests should now work in non-English locales. \item {} PEP8 conformance tests now report on locations of issues. \end{itemize} \subsection{New plotting features} \label{\detokenize{users/prev_whats_new/whats_new_1.3:new-plotting-features}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{xkcd}}-style sketch plotting} \label{\detokenize{users/prev_whats_new/whats_new_1.3:xkcd-style-sketch-plotting}} To give your plots a sense of authority that they may be missing, Michael Droettboom (inspired by the work of many others in \sphinxhref{https://github.com/matplotlib/matplotlib/pull/1329/}{PR \#1329}) has added an \sphinxhref{http://xkcd.com/}{xkcd-style} sketch plotting mode. To use it, simply call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:matplotlib.pyplot.xkcd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.xkcd()}}}}} before creating your plot. For really fine control, it is also possible to modify each artist's sketch parameters individually with {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.set\_sketch\_params()}}}}}. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/showcase/xkcd.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_xkcd_0012}.png}} \caption{xkcd}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id1}}\end{figure} \subsection{Updated Axes3D.contour methods} \label{\detokenize{users/prev_whats_new/whats_new_1.3:updated-axes3d-contour-methods}} Damon McDougall updated the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour()}}}}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf()}}}}} methods to allow 3D contour plots on abitrary unstructured user-specified triangulations. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/tricontour3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tricontour3d_0011}.png}} \caption{Tricontour3d}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id2}}\end{figure} \subsubsection{New eventplot plot type} \label{\detokenize{users/prev_whats_new/whats_new_1.3:new-eventplot-plot-type}} Todd Jennings added a {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.eventplot:matplotlib.pyplot.eventplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eventplot()}}}}} function to create multiple rows or columns of identical line segments \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/eventplot\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_eventplot_demo_0011}.png}} \caption{Eventplot Demo}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id3}}\end{figure} As part of this feature, there is a new {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EventCollection}}}}} class that allows for plotting and manipulating rows or columns of identical line segments. \subsubsection{Triangular grid interpolation} \label{\detokenize{users/prev_whats_new/whats_new_1.3:triangular-grid-interpolation}} Geoffroy Billotey and Ian Thomas added classes to perform interpolation within triangular grids: ({\hyperref[\detokenize{api/tri_api:matplotlib.tri.LinearTriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearTriInterpolator}}}}} and {\hyperref[\detokenize{api/tri_api:matplotlib.tri.CubicTriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CubicTriInterpolator}}}}}) and a utility class to find the triangles in which points lie ({\hyperref[\detokenize{api/tri_api:matplotlib.tri.TrapezoidMapTriFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TrapezoidMapTriFinder}}}}}). A helper class to perform mesh refinement and smooth contouring was also added ({\hyperref[\detokenize{api/tri_api:matplotlib.tri.UniformTriRefiner}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{UniformTriRefiner}}}}}). Finally, a class implementing some basic tools for triangular mesh improvement was added ({\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriAnalyzer}}}}}). \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/tricontour\_smooth\_user.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_tricontour_smooth_user_0011}.png}} \caption{Tricontour Smooth User}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id4}}\end{figure} \subsubsection{Baselines for stackplot} \label{\detokenize{users/prev_whats_new/whats_new_1.3:baselines-for-stackplot}} Till Stensitzki added non-zero baselines to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stackplot:matplotlib.pyplot.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stackplot()}}}}}. They may be symmetric or weighted. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/stackplot\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_stackplot_demo_0011}.png}} \caption{Stackplot Demo2}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id5}}\end{figure} \subsubsection{Rectangular colorbar extensions} \label{\detokenize{users/prev_whats_new/whats_new_1.3:rectangular-colorbar-extensions}} Andrew Dawson added a new keyword argument \sphinxstyleemphasis{extendrect} to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} to optionally make colorbar extensions rectangular instead of triangular. \subsubsection{More robust boxplots} \label{\detokenize{users/prev_whats_new/whats_new_1.3:more-robust-boxplots}} Paul Hobson provided a fix to the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot()}}}}} method that prevent whiskers from being drawn inside the box for oddly distributed data sets. \subsubsection{Calling subplot() without arguments} \label{\detokenize{users/prev_whats_new/whats_new_1.3:calling-subplot-without-arguments}} A call to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}} without any arguments now acts the same as \sphinxcode{\sphinxupquote{subplot(111)}} or \sphinxcode{\sphinxupquote{subplot(1,1,1)}} -- it creates one axes for the whole figure. This was already the behavior for both {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}}, and now this consistency is shared with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}}. \subsection{Drawing} \label{\detokenize{users/prev_whats_new/whats_new_1.3:drawing}} \subsubsection{Independent alpha values for face and edge colors} \label{\detokenize{users/prev_whats_new/whats_new_1.3:independent-alpha-values-for-face-and-edge-colors}} Wes Campaigne modified how {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} objects are drawn such that (for backends supporting transparency) you can set different alpha values for faces and edges, by specifying their colors in RGBA format. Note that if you set the alpha attribute for the patch object (e.g. using {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_alpha()}}}}} or the \sphinxcode{\sphinxupquote{alpha}} keyword argument), that value will override the alpha components set in both the face and edge colors. \subsubsection{Path effects on lines} \label{\detokenize{users/prev_whats_new/whats_new_1.3:path-effects-on-lines}} Thanks to Jae-Joon Lee, path effects now also work on plot lines. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/misc/patheffect\_demo.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_patheffect_demo_0011}.png}} \caption{Patheffect Demo}\label{\detokenize{users/prev_whats_new/whats_new_1.3:id6}}\end{figure} \subsubsection{Easier creation of colormap and normalizer for levels with colors} \label{\detokenize{users/prev_whats_new/whats_new_1.3:easier-creation-of-colormap-and-normalizer-for-levels-with-colors}} Phil Elson added the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.from_levels_and_colors:matplotlib.colors.from_levels_and_colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.from\_levels\_and\_colors()}}}}} function to easily create a colormap and normalizer for representation of discrete colors for plot types such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.pcolormesh()}}}}}, with a similar interface to that of \sphinxcode{\sphinxupquote{contourf()}}. \subsubsection{Full control of the background color} \label{\detokenize{users/prev_whats_new/whats_new_1.3:full-control-of-the-background-color}} Wes Campaigne and Phil Elson fixed the Agg backend such that PNGs are now saved with the correct background color when \sphinxcode{\sphinxupquote{fig.patch.get\_alpha()}} is not 1. \subsubsection{Improved \sphinxstyleliteralintitle{\sphinxupquote{bbox\_inches="tight"}} functionality} \label{\detokenize{users/prev_whats_new/whats_new_1.3:improved-bbox-inches-tight-functionality}} Passing \sphinxcode{\sphinxupquote{bbox\_inches="tight"}} through to \sphinxcode{\sphinxupquote{plt.save()}} now takes into account \sphinxstyleemphasis{all} artists on a figure - this was previously not the case and led to several corner cases which did not function as expected. \subsubsection{Initialize a rotated rectangle} \label{\detokenize{users/prev_whats_new/whats_new_1.3:initialize-a-rotated-rectangle}} Damon McDougall extended the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} constructor to accept an \sphinxcode{\sphinxupquote{angle}} kwarg, specifying the rotation of a rectangle in degrees. \subsection{Text} \label{\detokenize{users/prev_whats_new/whats_new_1.3:text}} \subsubsection{Anchored text support} \label{\detokenize{users/prev_whats_new/whats_new_1.3:anchored-text-support}} The \sphinxcode{\sphinxupquote{svg}} and \sphinxcode{\sphinxupquote{pgf}} backends are now able to save text alignment information to their output formats. This allows to edit text elements in saved figures, using Inkscape for example, while preserving their intended position. For \sphinxcode{\sphinxupquote{svg}} please note that you'll have to disable the default text-to-path conversion (\sphinxcode{\sphinxupquote{mpl.rc('svg', fonttype='none')}}). \subsubsection{Better vertical text alignment and multi-line text} \label{\detokenize{users/prev_whats_new/whats_new_1.3:better-vertical-text-alignment-and-multi-line-text}} The vertical alignment of text is now consistent across backends. You may see small differences in text placement, particularly with rotated text. If you are using a custom backend, note that the \sphinxcode{\sphinxupquote{draw\_text}} renderer method is now passed the location of the baseline, not the location of the bottom of the text bounding box. Multi-line text will now leave enough room for the height of very tall or very low text, such as superscripts and subscripts. \subsubsection{Left and right side axes titles} \label{\detokenize{users/prev_whats_new/whats_new_1.3:left-and-right-side-axes-titles}} Andrew Dawson added the ability to add axes titles flush with the left and right sides of the top of the axes using a new keyword argument \sphinxcode{\sphinxupquote{loc}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title()}}}}}. \subsubsection{Improved manual contour plot label positioning} \label{\detokenize{users/prev_whats_new/whats_new_1.3:improved-manual-contour-plot-label-positioning}} Brian Mattern modified the manual contour plot label positioning code to interpolate along line segments and find the actual closest point on a contour to the requested position. Previously, the closest path vertex was used, which, in the case of straight contours was sometimes quite distant from the requested location. Much more precise label positioning is now possible. \subsection{Configuration (rcParams)} \label{\detokenize{users/prev_whats_new/whats_new_1.3:configuration-rcparams}} \subsubsection{Quickly find rcParams} \label{\detokenize{users/prev_whats_new/whats_new_1.3:quickly-find-rcparams}} Phil Elson made it easier to search for rcParameters by passing a valid regular expression to {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.find_all}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.RcParams.find\_all()}}}}}. {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.RcParams}}}}} now also has a pretty repr and str representation so that search results are printed prettily: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{rcParams}\PYG{o}{.}\PYG{n}{find\PYGZus{}all}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{.size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{RcParams(\PYGZob{}\PYGZsq{}font.size\PYGZsq{}: 12,} \PYG{g+go}{ \PYGZsq{}xtick.major.size\PYGZsq{}: 4,} \PYG{g+go}{ \PYGZsq{}xtick.minor.size\PYGZsq{}: 2,} \PYG{g+go}{ \PYGZsq{}ytick.major.size\PYGZsq{}: 4,} \PYG{g+go}{ \PYGZsq{}ytick.minor.size\PYGZsq{}: 2\PYGZcb{})} \end{sphinxVerbatim} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{axes.xmargin}} and \sphinxstyleliteralintitle{\sphinxupquote{axes.ymargin}} added to rcParams} \label{\detokenize{users/prev_whats_new/whats_new_1.3:axes-xmargin-and-axes-ymargin-added-to-rcparams}} \sphinxcode{\sphinxupquote{rcParam}} values (\sphinxcode{\sphinxupquote{axes.xmargin}} and \sphinxcode{\sphinxupquote{axes.ymargin}}) were added to configure the default margins used. Previously they were hard-coded to default to 0, default value of both rcParam values is 0. \subsubsection{Changes to font rcParams} \label{\detokenize{users/prev_whats_new/whats_new_1.3:changes-to-font-rcparams}} The \sphinxcode{\sphinxupquote{font.*}} rcParams now affect only text objects created after the rcParam has been set, and will not retroactively affect already existing text objects. This brings their behavior in line with most other rcParams. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{savefig.jpeg\_quality}} added to rcParams} \label{\detokenize{users/prev_whats_new/whats_new_1.3:savefig-jpeg-quality-added-to-rcparams}} rcParam value \sphinxcode{\sphinxupquote{savefig.jpeg\_quality}} was added so that the user can configure the default quality used when a figure is written as a JPEG. The default quality is 95; previously, the default quality was 75. This change minimizes the artifacting inherent in JPEG images, particularly with images that have sharp changes in color as plots often do. \subsection{Backends} \label{\detokenize{users/prev_whats_new/whats_new_1.3:backends}} \subsubsection{WebAgg backend} \label{\detokenize{users/prev_whats_new/whats_new_1.3:webagg-backend}} Michael Droettboom, Phil Elson and others have developed a new backend, WebAgg, to display figures in a web browser. It works with animations as well as being fully interactive. \noindent\sphinxincludegraphics{{webagg_screenshot}.png} Future versions of matplotlib will integrate this backend with the IPython notebook for a fully web browser based plotting frontend. \subsubsection{Remember save directory} \label{\detokenize{users/prev_whats_new/whats_new_1.3:remember-save-directory}} Martin Spacek made the save figure dialog remember the last directory saved to. The default is configurable with the new \sphinxcode{\sphinxupquote{savefig.directory}} rcParam in \sphinxcode{\sphinxupquote{matplotlibrc}}. \subsection{Documentation and examples} \label{\detokenize{users/prev_whats_new/whats_new_1.3:documentation-and-examples}} \subsubsection{Numpydoc docstrings} \label{\detokenize{users/prev_whats_new/whats_new_1.3:numpydoc-docstrings}} Nelle Varoquaux has started an ongoing project to convert matplotlib's docstrings to numpydoc format. See \sphinxhref{https://github.com/matplotlib/matplotlib/wiki/Mep10}{MEP10} for more information. \subsubsection{Example reorganization} \label{\detokenize{users/prev_whats_new/whats_new_1.3:example-reorganization}} Tony Yu has begun work reorganizing the examples into more meaningful categories. The new gallery page is the fruit of this ongoing work. See \sphinxhref{https://github.com/matplotlib/matplotlib/wiki/MEP12}{MEP12} for more information. \subsubsection{Examples now use subplots()} \label{\detokenize{users/prev_whats_new/whats_new_1.3:examples-now-use-subplots}} For the sake of brevity and clarity, most of the \DUrole{xref,std,std-ref}{examples} now use the newer {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}}, which creates a figure and one (or multiple) axes object(s) in one call. The old way involved a call to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}, followed by one (or multiple) {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot()}}}}} calls. \subsection{Infrastructure} \label{\detokenize{users/prev_whats_new/whats_new_1.3:infrastructure}} \subsubsection{Housecleaning} \label{\detokenize{users/prev_whats_new/whats_new_1.3:housecleaning}} A number of features that were deprecated in 1.2 or earlier, or have not been in a working state for a long time have been removed. Highlights include removing the Qt version 3 backends, and the FltkAgg and Emf backends. See {\hyperref[\detokenize{api/prev_api_changes/api_changes_1.3.x:changes-in-1-3}]{\sphinxcrossref{\DUrole{std,std-ref}{Changes in 1.3.x}}}} for a complete list. \subsubsection{New setup script} \label{\detokenize{users/prev_whats_new/whats_new_1.3:new-setup-script}} matplotlib 1.3 includes an entirely rewritten setup script. We now ship fewer dependencies with the tarballs and installers themselves. Notably, \sphinxcode{\sphinxupquote{pytz}}, \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pyparsing}} and \sphinxcode{\sphinxupquote{six}} are no longer included with matplotlib. You can either install them manually first, or let \sphinxcode{\sphinxupquote{pip}} install them as dependencies along with matplotlib. It is now possible to not include certain subcomponents, such as the unit test data, in the install. See \sphinxcode{\sphinxupquote{setup.cfg.template}} for more information. \subsubsection{XDG base directory support} \label{\detokenize{users/prev_whats_new/whats_new_1.3:xdg-base-directory-support}} On Linux, matplotlib now uses the \sphinxcode{\sphinxupquote{XDG base directory specification}} to find the \sphinxcode{\sphinxupquote{matplotlibrc}} configuration file. \sphinxcode{\sphinxupquote{matplotlibrc}} should now be kept in \sphinxcode{\sphinxupquote{config/matplotlib}}, rather than \sphinxcode{\sphinxupquote{matplotlib}}. If your configuration is found in the old location, it will still be used, but a warning will be displayed. \subsubsection{Catch opening too many figures using pyplot} \label{\detokenize{users/prev_whats_new/whats_new_1.3:catch-opening-too-many-figures-using-pyplot}} Figures created through \sphinxcode{\sphinxupquote{pyplot.figure}} are retained until they are explicitly closed. It is therefore common for new users of matplotlib to run out of memory when creating a large series of figures in a loop without closing them. matplotlib will now display a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeWarning}{\sphinxcode{\sphinxupquote{RuntimeWarning}}} when too many figures have been opened at once. By default, this is displayed for 20 or more figures, but the exact number may be controlled using the \sphinxcode{\sphinxupquote{figure.max\_open\_warning}} rcParam. \section{New in matplotlib 1.4} \label{\detokenize{users/prev_whats_new/whats_new_1.4:new-in-matplotlib-1-4}}\label{\detokenize{users/prev_whats_new/whats_new_1.4:whats-new-1-4}}\label{\detokenize{users/prev_whats_new/whats_new_1.4::doc}} Thomas A. Caswell served as the release manager for the 1.4 release. \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id3}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:new-in-matplotlib-1-4}]{\sphinxcrossref{New in matplotlib 1.4}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id4}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:new-colormap}]{\sphinxcrossref{New colormap}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:the-nbagg-backend}]{\sphinxcrossref{The nbagg backend}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:new-plotting-features}]{\sphinxcrossref{New plotting features}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:date-handling}]{\sphinxcrossref{Date handling}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:configuration-rcparams}]{\sphinxcrossref{Configuration (rcParams)}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:style-package-added}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{style}} package added}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:backends}]{\sphinxcrossref{Backends}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:text}]{\sphinxcrossref{Text}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:sphinx-extensions}]{\sphinxcrossref{Sphinx extensions}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:legend-and-patheffects-documentation}]{\sphinxcrossref{Legend and PathEffects documentation}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:widgets}]{\sphinxcrossref{Widgets}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.4:id15}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.4:gae-integration}]{\sphinxcrossref{GAE integration}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \begin{sphinxadmonition}{note}{Note:} matplotlib 1.4 supports Python 2.6, 2.7, 3.3, and 3.4 \end{sphinxadmonition} \subsection{New colormap} \label{\detokenize{users/prev_whats_new/whats_new_1.4:new-colormap}} In heatmaps, a green-to-red spectrum is often used to indicate intensity of activity, but this can be problematic for the red/green colorblind. A new, colorblind-friendly colormap is now available at \sphinxcode{\sphinxupquote{matplotlib.cm.Wistia}}. This colormap maintains the red/green symbolism while achieving deuteranopic legibility through brightness variations. See \sphinxhref{https://github.com/wistia/heatmap-palette}{here} for more information. \subsection{The nbagg backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:the-nbagg-backend}} Phil Elson added a new backend, named "nbagg", which enables interactive figures in a live IPython notebook session. The backend makes use of the infrastructure developed for the webagg backend, which itself gives standalone server backed interactive figures in the browser, however nbagg does not require a dedicated matplotlib server as all communications are handled through the IPython Comm machinery. As with other backends nbagg can be enabled inside the IPython notebook with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{nbagg}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Once figures are created and then subsequently shown, they will placed in an interactive widget inside the notebook allowing panning and zooming in the same way as any other matplotlib backend. Because figures require a connection to the IPython notebook server for their interactivity, once the notebook is saved, each figure will be rendered as a static image - thus allowing non-interactive viewing of figures on services such as \sphinxhref{http://nbviewer.ipython.org/}{nbviewer}. \subsection{New plotting features} \label{\detokenize{users/prev_whats_new/whats_new_1.4:new-plotting-features}} \subsubsection{Power-law normalization} \label{\detokenize{users/prev_whats_new/whats_new_1.4:power-law-normalization}} Ben Gamari added a power-law normalization method, {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PowerNorm}}}}}. This class maps a range of values to the interval {[}0,1{]} with power-law scaling with the exponent provided by the constructor's \sphinxcode{\sphinxupquote{gamma}} argument. Power law normalization can be useful for, e.g., emphasizing small populations in a histogram. \subsubsection{Fully customizable boxplots} \label{\detokenize{users/prev_whats_new/whats_new_1.4:fully-customizable-boxplots}} Paul Hobson overhauled the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot()}}}}} method such that it is now completely customizable in terms of the styles and positions of the individual artists. Under the hood, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot()}}}}} relies on a new function ({\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.boxplot_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot\_stats()}}}}}), which accepts any data structure currently compatible with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot()}}}}}, and returns a list of dictionaries containing the positions for each element of the boxplots. Then a second method, \sphinxcode{\sphinxupquote{bxp()}} is called to draw the boxplots based on the stats. The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot()}}}}} function can be used as before to generate boxplots from data in one step. But now the user has the flexibility to generate the statistics independently, or to modify the output of {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.boxplot_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot\_stats()}}}}} prior to plotting with \sphinxcode{\sphinxupquote{bxp()}}. Lastly, each artist (e.g., the box, outliers, cap, notches) can now be toggled on or off and their styles can be passed in through individual kwargs. See the examples: \DUrole{xref,std,std-doc}{/gallery/statistics/boxplot} and \DUrole{xref,std,std-doc}{/gallery/statistics/bxp} Added a bool kwarg, \sphinxcode{\sphinxupquote{manage\_xticks}}, which if False disables the management of the ticks and limits on the x-axis by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp()}}}}}. \subsubsection{Support for datetime axes in 2d plots} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-datetime-axes-in-2d-plots}} Andrew Dawson added support for datetime axes to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}}. \subsubsection{Support for additional spectrum types} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-additional-spectrum-types}} Todd Jennings added support for new types of frequency spectrum plots: {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}, as well as corresponding functions in mlab. He also added these spectrum types to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}, as well as adding support for linear scaling there (in addition to the existing dB scaling). Support for additional spectrum types was also added to {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}. He also increased the performance for all of these functions and plot types. \subsubsection{Support for detrending and windowing 2D arrays in mlab} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-detrending-and-windowing-2d-arrays-in-mlab}} Todd Jennings added support for 2D arrays in the {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean()}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none()}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend()}}}}}, as well as adding {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.apply_window}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_window()}}}}} which support windowing 2D arrays. \subsubsection{Support for strides in mlab} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-strides-in-mlab}} Todd Jennings added some functions to mlab to make it easier to use numpy strides to create memory-efficient 2D arrays. This includes {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.stride_repeat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stride\_repeat()}}}}}, which repeats an array to create a 2D array, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.stride_windows}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stride\_windows()}}}}}, which uses a moving window to create a 2D array from a 1D array. \subsubsection{Formatter for new-style formatting strings} \label{\detokenize{users/prev_whats_new/whats_new_1.4:formatter-for-new-style-formatting-strings}} Added \sphinxcode{\sphinxupquote{FormatStrFormatterNewStyle}} which does the same job as \sphinxcode{\sphinxupquote{FormatStrFormatter}}, but accepts new-style formatting strings instead of printf-style formatting strings \subsubsection{Consistent grid sizes in streamplots} \label{\detokenize{users/prev_whats_new/whats_new_1.4:consistent-grid-sizes-in-streamplots}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot()}}}}} uses a base grid size of 30x30 for both \sphinxcode{\sphinxupquote{density=1}} and \sphinxcode{\sphinxupquote{density=(1, 1)}}. Previously a grid size of 30x30 was used for \sphinxcode{\sphinxupquote{density=1}}, but a grid size of 25x25 was used for \sphinxcode{\sphinxupquote{density=(1, 1)}}. \subsubsection{Get a list of all tick labels (major and minor)} \label{\detokenize{users/prev_whats_new/whats_new_1.4:get-a-list-of-all-tick-labels-major-and-minor}} Added the \sphinxcode{\sphinxupquote{kwarg}} 'which' to \sphinxcode{\sphinxupquote{get\_xticklabels()}}, \sphinxcode{\sphinxupquote{get\_yticklabels()}} and \sphinxcode{\sphinxupquote{get\_ticklabels()}}. 'which' can be 'major', 'minor', or 'both' select which ticks to return, like \sphinxcode{\sphinxupquote{set\_ticks\_position()}}. If 'which' is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} then the old behaviour (controlled by the bool \sphinxcode{\sphinxupquote{minor}}). \subsubsection{Separate horizontal/vertical axes padding support in ImageGrid} \label{\detokenize{users/prev_whats_new/whats_new_1.4:separate-horizontal-vertical-axes-padding-support-in-imagegrid}} The \sphinxcode{\sphinxupquote{kwarg}} 'axes\_pad' to \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.ImageGrid}} can now be a tuple if separate horizontal/vertical padding is needed. This is supposed to be very helpful when you have a labelled legend next to every subplot and you need to make some space for legend's labels. \subsubsection{Support for skewed transformations} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-skewed-transformations}} The {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}} gained additional methods \sphinxcode{\sphinxupquote{skew}} and \sphinxcode{\sphinxupquote{skew\_deg}} to create skewed transformations. Additionally, matplotlib internals were cleaned up to support using such transforms in \sphinxcode{\sphinxupquote{Axes}}. This transform is important for some plot types, specifically the Skew-T used in meteorology. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/specialty\_plots/skewt.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_skewt_0011}.png}} \caption{Skewt}\label{\detokenize{users/prev_whats_new/whats_new_1.4:id1}}\end{figure} \subsubsection{Support for specifying properties of wedge and text in pie charts.} \label{\detokenize{users/prev_whats_new/whats_new_1.4:support-for-specifying-properties-of-wedge-and-text-in-pie-charts}} Added the \sphinxcode{\sphinxupquote{kwargs}} 'wedgeprops' and 'textprops' to \sphinxcode{\sphinxupquote{pie()}} to accept properties for wedge and text objects in a pie. For example, one can specify wedgeprops = \{'linewidth':3\} to specify the width of the borders of the wedges in the pie. For more properties that the user can specify, look at the docs for the wedge and text objects. \subsubsection{Fixed the direction of errorbar upper/lower limits} \label{\detokenize{users/prev_whats_new/whats_new_1.4:fixed-the-direction-of-errorbar-upper-lower-limits}} Larry Bradley fixed the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}} method such that the upper and lower limits (\sphinxstyleemphasis{lolims}, \sphinxstyleemphasis{uplims}, \sphinxstyleemphasis{xlolims}, \sphinxstyleemphasis{xuplims}) now point in the correct direction. \subsubsection{More consistent add-object API for Axes} \label{\detokenize{users/prev_whats_new/whats_new_1.4:more-consistent-add-object-api-for-axes}} Added the Axes method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_image:matplotlib.axes.Axes.add_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_image}}}}} to put image handling on a par with artists, collections, containers, lines, patches, and tables. \subsubsection{Violin Plots} \label{\detokenize{users/prev_whats_new/whats_new_1.4:violin-plots}} Per Parker, Gregory Kelsie, Adam Ortiz, Kevin Chan, Geoffrey Lee, Deokjae Donald Seo, and Taesu Terry Lim added a basic implementation for violin plots. Violin plots can be used to represent the distribution of sample data. They are similar to box plots, but use a kernel density estimation function to present a smooth approximation of the data sample used. The added features are: \sphinxcode{\sphinxupquote{violin()}} - Renders a violin plot from a collection of statistics. {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.violin_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violin\_stats()}}}}} - Produces a collection of statistics suitable for rendering a violin plot. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.violinplot:matplotlib.pyplot.violinplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violinplot()}}}}} - Creates a violin plot from a set of sample data. This method makes use of {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.violin_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violin\_stats()}}}}} to process the input data, and {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.violin_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violin\_stats()}}}}} to do the actual rendering. Users are also free to modify or replace the output of {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.violin_stats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violin\_stats()}}}}} in order to customize the violin plots to their liking. This feature was implemented for a software engineering course at the University of Toronto, Scarborough, run in Winter 2014 by Anya Tafliovich. \subsubsection{More \sphinxstyleliteralintitle{\sphinxupquote{markevery}} options to show only a subset of markers} \label{\detokenize{users/prev_whats_new/whats_new_1.4:more-markevery-options-to-show-only-a-subset-of-markers}} Rohan Walker extended the \sphinxcode{\sphinxupquote{markevery}} property in {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. You can now specify a subset of markers to show with an int, slice object, numpy fancy indexing, or float. Using a float shows markers at approximately equal display-coordinate-distances along the line. \subsubsection{Added size related functions to specialized \sphinxstyleliteralintitle{\sphinxupquote{Collections}}} \label{\detokenize{users/prev_whats_new/whats_new_1.4:added-size-related-functions-to-specialized-collections}} Added the \sphinxcode{\sphinxupquote{get\_size}} and \sphinxcode{\sphinxupquote{set\_size}} functions to control the size of elements of specialized collections ( {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AsteriskPolygonCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CircleCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RegularPolyCollection}}}}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StarPolygonCollection}}}}}). \subsubsection{Fixed the mouse coordinates giving the wrong theta value in Polar graph} \label{\detokenize{users/prev_whats_new/whats_new_1.4:fixed-the-mouse-coordinates-giving-the-wrong-theta-value-in-polar-graph}} Added code to \sphinxcode{\sphinxupquote{transform\_non\_affine()}} to ensure that the calculated theta value was between the range of 0 and 2 * pi since the problem was that the value can become negative after applying the direction and rotation to the theta calculation. \subsubsection{Simple quiver plot for mplot3d toolkit} \label{\detokenize{users/prev_whats_new/whats_new_1.4:simple-quiver-plot-for-mplot3d-toolkit}} A team of students in an \sphinxstyleemphasis{Engineering Large Software Systems} course, taught by Prof. Anya Tafliovich at the University of Toronto, implemented a simple version of a quiver plot in 3D space for the mplot3d toolkit as one of their term project. This feature is documented in {\hyperref[\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver()}}}}}. The team members are: Ryan Steve D'Souza, Victor B, xbtsw, Yang Wang, David, Caradec Bisesar and Vlad Vassilovski. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/quiver3d.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_quiver3d_0012}.png}} \caption{Quiver3d}\label{\detokenize{users/prev_whats_new/whats_new_1.4:id2}}\end{figure} \subsubsection{polar-plot r-tick locations} \label{\detokenize{users/prev_whats_new/whats_new_1.4:polar-plot-r-tick-locations}} Added the ability to control the angular position of the r-tick labels on a polar plot via \sphinxcode{\sphinxupquote{set\_rlabel\_position()}}. \subsection{Date handling} \label{\detokenize{users/prev_whats_new/whats_new_1.4:date-handling}} \subsubsection{n-d array support for date conversion} \label{\detokenize{users/prev_whats_new/whats_new_1.4:n-d-array-support-for-date-conversion}} Andrew Dawson added support for n-d array handling to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.num2date()}}}}}, {\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.date2num()}}}}} and {\hyperref[\detokenize{api/dates_api:matplotlib.dates.datestr2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.datestr2num()}}}}}. Support is also added to the unit conversion interfaces \sphinxcode{\sphinxupquote{matplotlib.dates.DateConverter}} and {\hyperref[\detokenize{api/units_api:matplotlib.units.Registry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.Registry}}}}}. \subsection{Configuration (rcParams)} \label{\detokenize{users/prev_whats_new/whats_new_1.4:configuration-rcparams}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{savefig.transparent}} added} \label{\detokenize{users/prev_whats_new/whats_new_1.4:savefig-transparent-added}} Controls whether figures are saved with a transparent background by default. Previously \sphinxcode{\sphinxupquote{savefig}} always defaulted to a non-transparent background. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{axes.titleweight}}} \label{\detokenize{users/prev_whats_new/whats_new_1.4:axes-titleweight}} Added rcParam to control the weight of the title \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{axes.formatter.useoffset}} added} \label{\detokenize{users/prev_whats_new/whats_new_1.4:axes-formatter-useoffset-added}} Controls the default value of \sphinxcode{\sphinxupquote{useOffset}} in \sphinxcode{\sphinxupquote{ScalarFormatter}}. If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} and the data range is much smaller than the data average, then an offset will be determined such that the tick labels are meaningful. If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} then the full number will be formatted in all conditions. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{nbagg.transparent}} added} \label{\detokenize{users/prev_whats_new/whats_new_1.4:nbagg-transparent-added}} Controls whether nbagg figures have a transparent background. \sphinxcode{\sphinxupquote{nbagg.transparent}} is \sphinxcode{\sphinxupquote{True}} by default. \subsubsection{XDG compliance} \label{\detokenize{users/prev_whats_new/whats_new_1.4:xdg-compliance}} Matplotlib now looks for configuration files (both rcparams and style) in XDG compliant locations. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{style}} package added} \label{\detokenize{users/prev_whats_new/whats_new_1.4:style-package-added}} You can now easily switch between different styles using the new \sphinxcode{\sphinxupquote{style}} package: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{style} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dark\PYGZus{}background}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Subsequent plots will use updated colors, sizes, etc. To list all available styles, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print} \PYG{n}{style}\PYG{o}{.}\PYG{n}{available} \end{sphinxVerbatim} You can add your own custom \sphinxcode{\sphinxupquote{\textless{}style name\textgreater{}.mplstyle}} files to \sphinxcode{\sphinxupquote{\textasciitilde{}/.matplotlib/stylelib}} or call \sphinxcode{\sphinxupquote{use}} with a URL pointing to a file with \sphinxcode{\sphinxupquote{matplotlibrc}} settings. \sphinxstyleemphasis{Note that this is an experimental feature}, and the interface may change as users test out this new feature. \subsection{Backends} \label{\detokenize{users/prev_whats_new/whats_new_1.4:backends}} \subsubsection{Qt5 backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:qt5-backend}} Martin Fitzpatrick and Tom Badran implemented a Qt5 backend. The differences in namespace locations between Qt4 and Qt5 was dealt with by shimming Qt4 to look like Qt5, thus the Qt5 implementation is the primary implementation. Backwards compatibility for Qt4 is maintained by wrapping the Qt5 implementation. The Qt5Agg backend currently does not work with IPython's \%matplotlib magic. The 1.4.0 release has a known bug where the toolbar is broken. This can be fixed by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cd} \PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{installed}\PYG{o}{/}\PYG{n}{matplotlib} \PYG{n}{wget} \PYG{n}{https}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{github}\PYG{o}{.}\PYG{n}{com}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{pull}\PYG{o}{/}\PYG{l+m+mf}{3322.}\PYG{n}{diff} \PYG{c+c1}{\PYGZsh{} unix2dos 3322.diff (if on windows to fix line endings)} \PYG{n}{patch} \PYG{o}{\PYGZhy{}}\PYG{n}{p2} \PYG{o}{\PYGZlt{}} \PYG{l+m+mf}{3322.}\PYG{n}{diff} \end{sphinxVerbatim} \subsubsection{Qt4 backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:qt4-backend}} Rudolf Höfler changed the appearance of the subplottool. All sliders are vertically arranged now, buttons for tight layout and reset were added. Furthermore, the subplottool is now implemented as a modal dialog. It was previously a QMainWindow, leaving the SPT open if one closed the plot window. In the figure options dialog one can now choose to (re-)generate a simple automatic legend. Any explicitly set legend entries will be lost, but changes to the curves' label, linestyle, et cetera will now be updated in the legend. Interactive performance of the Qt4 backend has been dramatically improved under windows. The mapping of key-signals from Qt to values matplotlib understands was greatly improved (For both Qt4 and Qt5). \subsubsection{Cairo backends} \label{\detokenize{users/prev_whats_new/whats_new_1.4:cairo-backends}} The Cairo backends are now able to use the \sphinxhref{https://github.com/SimonSapin/cairocffi}{cairocffi bindings} which are more actively maintained than the \sphinxhref{https://www.cairographics.org/pycairo/}{pycairo bindings}. \subsubsection{Gtk3Agg backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:gtk3agg-backend}} The Gtk3Agg backend now works on Python 3.x, if the \sphinxhref{https://github.com/SimonSapin/cairocffi}{cairocffi bindings} are installed. \subsubsection{PDF backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:pdf-backend}} Added context manager for saving to multi-page PDFs. \subsection{Text} \label{\detokenize{users/prev_whats_new/whats_new_1.4:text}} \subsubsection{Text URLs supported by SVG backend} \label{\detokenize{users/prev_whats_new/whats_new_1.4:text-urls-supported-by-svg-backend}} The \sphinxcode{\sphinxupquote{svg}} backend will now render {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} objects' url as a link in output SVGs. This allows one to make clickable text in saved figures using the url kwarg of the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} class. \subsubsection{Anchored sizebar font} \label{\detokenize{users/prev_whats_new/whats_new_1.4:anchored-sizebar-font}} Added the \sphinxcode{\sphinxupquote{fontproperties}} kwarg to \sphinxcode{\sphinxupquote{AnchoredSizeBar}} to control the font properties. \subsection{Sphinx extensions} \label{\detokenize{users/prev_whats_new/whats_new_1.4:sphinx-extensions}} The \sphinxcode{\sphinxupquote{:context:}} directive in the {\hyperref[\detokenize{devel/plot_directive:module-matplotlib.sphinxext.plot_directive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_directive}}}}} Sphinx extension can now accept an optional \sphinxcode{\sphinxupquote{reset}} setting, which will cause the context to be reset. This allows more than one distinct context to be present in documentation. To enable this option, use \sphinxcode{\sphinxupquote{:context: reset}} instead of \sphinxcode{\sphinxupquote{:context:}} any time you want to reset the context. \subsection{Legend and PathEffects documentation} \label{\detokenize{users/prev_whats_new/whats_new_1.4:legend-and-patheffects-documentation}} The {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} and {\hyperref[\detokenize{tutorials/advanced/patheffects_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Path effects guide}}}} have both been updated to better reflect the full potential of each of these powerful features. \subsection{Widgets} \label{\detokenize{users/prev_whats_new/whats_new_1.4:widgets}} \subsubsection{Span Selector} \label{\detokenize{users/prev_whats_new/whats_new_1.4:span-selector}} Added an option \sphinxcode{\sphinxupquote{span\_stays}} to the {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpanSelector}}}}} which makes the selector rectangle stay on the axes after you release the mouse. \subsection{GAE integration} \label{\detokenize{users/prev_whats_new/whats_new_1.4:gae-integration}} Matplotlib will now run on google app engine. \section{New in matplotlib 1.5} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-in-matplotlib-1-5}}\label{\detokenize{users/prev_whats_new/whats_new_1.5:whats-new-1-5}}\label{\detokenize{users/prev_whats_new/whats_new_1.5::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id4}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:new-in-matplotlib-1-5}]{\sphinxcrossref{New in matplotlib 1.5}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:interactive-oo-usage}]{\sphinxcrossref{Interactive OO usage}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:working-with-labeled-data-like-pandas-dataframes}]{\sphinxcrossref{Working with labeled data like pandas DataFrames}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:added-axes-prop-cycle-key-to-rcparams}]{\sphinxcrossref{Added \sphinxcode{\sphinxupquote{axes.prop\_cycle}} key to rcParams}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:new-colormaps}]{\sphinxcrossref{New Colormaps}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:styles}]{\sphinxcrossref{Styles}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:backends}]{\sphinxcrossref{Backends}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:configuration-rcparams}]{\sphinxcrossref{Configuration (rcParams)}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:widgets}]{\sphinxcrossref{Widgets}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:new-plotting-features}]{\sphinxcrossref{New plotting features}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:toolmanager}]{\sphinxcrossref{ToolManager}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id15}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:cbook-is-sequence-of-strings-recognizes-string-objects}]{\sphinxcrossref{cbook.is\_sequence\_of\_strings recognizes string objects}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id16}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:new-close-figs-argument-for-plot-directive}]{\sphinxcrossref{New \sphinxcode{\sphinxupquote{close-figs}} argument for plot directive}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id17}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:support-for-url-string-arguments-to-imread}]{\sphinxcrossref{Support for URL string arguments to \sphinxcode{\sphinxupquote{imread}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id18}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:display-hook-for-animations-in-the-ipython-notebook}]{\sphinxcrossref{Display hook for animations in the IPython notebook}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_1.5:id19}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_1.5:prefixed-pkg-config-for-building}]{\sphinxcrossref{Prefixed pkg-config for building}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \begin{sphinxadmonition}{note}{Note:} matplotlib 1.5 supports Python 2.7, 3.4, and 3.5 \end{sphinxadmonition} \subsection{Interactive OO usage} \label{\detokenize{users/prev_whats_new/whats_new_1.5:interactive-oo-usage}} All \sphinxcode{\sphinxupquote{Artists}} now keep track of if their internal state has been changed but not reflected in the display ('stale') by a call to \sphinxcode{\sphinxupquote{draw}}. It is thus possible to pragmatically determine if a given \sphinxcode{\sphinxupquote{Figure}} needs to be re-drawn in an interactive session. To facilitate interactive usage a \sphinxcode{\sphinxupquote{draw\_all}} method has been added to \sphinxcode{\sphinxupquote{pyplot}} which will redraw all of the figures which are 'stale'. To make this convenient for interactive use matplotlib now registers a function either with IPython's 'post\_execute' event or with the displayhook in the standard python REPL to automatically call \sphinxcode{\sphinxupquote{plt.draw\_all}} just before control is returned to the REPL. This ensures that the draw command is deferred and only called once. The upshot of this is that for interactive backends (including \sphinxcode{\sphinxupquote{\%matplotlib notebook}}) in interactive mode (with \sphinxcode{\sphinxupquote{plt.ion()}}) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ln}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{16}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ln}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} will automatically update the plot to be green. Any subsequent modifications to the \sphinxcode{\sphinxupquote{Artist}} objects will do likewise. This is the first step of a larger consolidation and simplification of the pyplot internals. \subsection{Working with labeled data like pandas DataFrames} \label{\detokenize{users/prev_whats_new/whats_new_1.5:working-with-labeled-data-like-pandas-dataframes}} Plot methods which take arrays as inputs can now also work with labeled data and unpack such data. This means that the following two examples produce the same plot: Example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{df} \PYG{o}{=} \PYG{n}{pandas}\PYG{o}{.}\PYG{n}{DataFrame}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{df}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{df}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{var2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{df}\PYG{p}{)} \end{sphinxVerbatim} This works for most plotting methods, which expect arrays/sequences as inputs. \sphinxcode{\sphinxupquote{data}} can be anything which supports \sphinxcode{\sphinxupquote{\_\_getitem\_\_}} (\sphinxcode{\sphinxupquote{dict}}, \sphinxcode{\sphinxupquote{pandas.DataFrame}}, \sphinxcode{\sphinxupquote{h5py}}, ...) to access \sphinxcode{\sphinxupquote{array}} like values with string keys. In addition to this, some other changes were made, which makes working with labeled data (ex \sphinxcode{\sphinxupquote{pandas.Series}}) easier: \begin{itemize} \item {} For plotting methods with \sphinxcode{\sphinxupquote{label}} keyword argument, one of the data inputs is designated as the label source. If the user does not supply a \sphinxcode{\sphinxupquote{label}} that value object will be introspected for a label, currently by looking for a \sphinxcode{\sphinxupquote{name}} attribute. If the value object does not have a \sphinxcode{\sphinxupquote{name}} attribute but was specified by as a key into the \sphinxcode{\sphinxupquote{data}} kwarg, then the key is used. In the above examples, this results in an implicit \sphinxcode{\sphinxupquote{label="var2"}} for both cases. \item {} \sphinxcode{\sphinxupquote{plot()}} now uses the index of a \sphinxcode{\sphinxupquote{Series}} instead of \sphinxcode{\sphinxupquote{np.arange(len(y))}}, if no \sphinxcode{\sphinxupquote{x}} argument is supplied. \end{itemize} \subsection{Added \sphinxstyleliteralintitle{\sphinxupquote{axes.prop\_cycle}} key to rcParams} \label{\detokenize{users/prev_whats_new/whats_new_1.5:added-axes-prop-cycle-key-to-rcparams}} This is a more generic form of the now-deprecated \sphinxcode{\sphinxupquote{axes.color\_cycle}} param. Now, we can cycle more than just colors, but also linestyles, hatches, and just about any other artist property. Cycler notation is used for defining property cycles. Adding cyclers together will be like you are \sphinxcode{\sphinxupquote{zip()}}-ing together two or more property cycles together: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{prop\PYGZus{}cycle}\PYG{p}{:} \PYG{n}{cycler}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rgb}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{o}{+} \PYG{n}{cycler}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lw}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} You can even multiply cyclers, which is like using \sphinxcode{\sphinxupquote{itertools.product()}} on two or more property cycles. Remember to use parentheses if writing a multi-line \sphinxcode{\sphinxupquote{prop\_cycle}} parameter. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../tutorials/intermediate/color\_cycle.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_color_cycle_0011}.png}} \caption{Color Cycle}\label{\detokenize{users/prev_whats_new/whats_new_1.5:id1}}\end{figure} \subsection{New Colormaps} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-colormaps}} All four of the colormaps proposed as the new default are available as \sphinxcode{\sphinxupquote{'viridis'}} (the new default in 2.0), \sphinxcode{\sphinxupquote{'magma'}}, \sphinxcode{\sphinxupquote{'plasma'}}, and \sphinxcode{\sphinxupquote{'inferno'}} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-1}.pdf} \end{figure} \subsection{Styles} \label{\detokenize{users/prev_whats_new/whats_new_1.5:styles}} Several new styles have been added, including many styles from the Seaborn project. Additionally, in order to prep for the upcoming 2.0 style-change release, a 'classic' and 'default' style has been added. For this release, the 'default' and 'classic' styles are identical. By using them now in your scripts, you can help ensure a smooth transition during future upgrades of matplotlib, so that you can upgrade to the snazzy new defaults when you are ready! \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{style} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{classic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} The 'default' style will give you matplotlib's latest plotting styles: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{default}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Backends} \label{\detokenize{users/prev_whats_new/whats_new_1.5:backends}} \subsubsection{New backend selection} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-backend-selection}} The environment variable \index{MPLBACKEND@\spxentry{MPLBACKEND}}\index{environment variable@\spxentry{environment variable}!MPLBACKEND@\spxentry{MPLBACKEND}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLBACKEND}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLBACKEND}}}}} can now be used to set the matplotlib backend. \subsubsection{wx backend has been updated} \label{\detokenize{users/prev_whats_new/whats_new_1.5:wx-backend-has-been-updated}} The wx backend can now be used with both wxPython classic and \sphinxhref{http://wxpython.org/Phoenix/docs/html/main.html}{Phoenix}. wxPython classic has to be at least version 2.8.12 and works on Python 2.x. As of May 2015 no official release of wxPython Phoenix is available but a current snapshot will work on Python 2.7+ and 3.4+. If you have multiple versions of wxPython installed, then the user code is responsible setting the wxPython version. How to do this is explained in the comment at the beginning of the example \sphinxcode{\sphinxupquote{examplesuser\_interfacesembedding\_in\_wx2.py}}. \subsection{Configuration (rcParams)} \label{\detokenize{users/prev_whats_new/whats_new_1.5:configuration-rcparams}} Some parameters have been added, others have been improved. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Parameter &\sphinxstyletheadfamily Description \\ \hline \sphinxcode{\sphinxupquote{\{x,y\}axis.labelpad}} & mplot3d now respects these parameters \\ \hline \sphinxcode{\sphinxupquote{axes.labelpad}} & Default space between the axis and the label \\ \hline \sphinxcode{\sphinxupquote{errorbar.capsize}} & Default length of end caps on error bars \\ \hline \sphinxcode{\sphinxupquote{\{x,y\}tick.minor.visible}} & Default visibility of minor x/y ticks \\ \hline \sphinxcode{\sphinxupquote{legend.framealpha}} & Default transparency of the legend frame box \\ \hline \sphinxcode{\sphinxupquote{legend.facecolor}} & Default facecolor of legend frame box (or \sphinxcode{\sphinxupquote{'inherit'}} from \sphinxcode{\sphinxupquote{axes.facecolor}}) \\ \hline \sphinxcode{\sphinxupquote{legend.edgecolor}} & Default edgecolor of legend frame box (or \sphinxcode{\sphinxupquote{'inherit'}} from \sphinxcode{\sphinxupquote{axes.edgecolor}}) \\ \hline \sphinxcode{\sphinxupquote{figure.titlesize}} & Default font size for figure suptitles \\ \hline \sphinxcode{\sphinxupquote{figure.titleweight}} & Default font weight for figure suptitles \\ \hline \sphinxcode{\sphinxupquote{image.composite\_image}} & Whether a vector graphics backend should composite several images into a single image or not when saving. Useful when needing to edit the files further in Inkscape or other programs. \\ \hline \sphinxcode{\sphinxupquote{markers.fillstyle}} & Default fillstyle of markers. Possible values are \sphinxcode{\sphinxupquote{'full'}} (the default), \sphinxcode{\sphinxupquote{'left'}}, \sphinxcode{\sphinxupquote{'right'}}, \sphinxcode{\sphinxupquote{'bottom'}}, \sphinxcode{\sphinxupquote{'top'}} and \sphinxcode{\sphinxupquote{'none'}} \\ \hline \sphinxcode{\sphinxupquote{toolbar}} & Added \sphinxcode{\sphinxupquote{'toolmanager'}} as a valid value, enabling the experimental \sphinxcode{\sphinxupquote{ToolManager}} feature. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsection{Widgets} \label{\detokenize{users/prev_whats_new/whats_new_1.5:widgets}} \subsubsection{Active state of Selectors} \label{\detokenize{users/prev_whats_new/whats_new_1.5:active-state-of-selectors}} All selectors now implement \sphinxcode{\sphinxupquote{set\_active}} and \sphinxcode{\sphinxupquote{get\_active}} methods (also called when accessing the \sphinxcode{\sphinxupquote{active}} property) to properly update and query whether they are active. \subsubsection{Moved \sphinxstyleliteralintitle{\sphinxupquote{ignore}}, \sphinxstyleliteralintitle{\sphinxupquote{set\_active}}, and \sphinxstyleliteralintitle{\sphinxupquote{get\_active}} methods to base class \sphinxstyleliteralintitle{\sphinxupquote{Widget}}} \label{\detokenize{users/prev_whats_new/whats_new_1.5:moved-ignore-set-active-and-get-active-methods-to-base-class-widget}} Pushes up duplicate methods in child class to parent class to avoid duplication of code. \subsubsection{Adds enable/disable feature to MultiCursor} \label{\detokenize{users/prev_whats_new/whats_new_1.5:adds-enable-disable-feature-to-multicursor}} A MultiCursor object can be disabled (and enabled) after it has been created without destroying the object. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{multi\PYGZus{}cursor}\PYG{o}{.}\PYG{n}{active} \PYG{o}{=} \PYG{k+kc}{False} \end{sphinxVerbatim} \subsubsection{Improved RectangleSelector and new EllipseSelector Widget} \label{\detokenize{users/prev_whats_new/whats_new_1.5:improved-rectangleselector-and-new-ellipseselector-widget}} Adds an \sphinxcode{\sphinxupquote{interactive}} keyword which enables visible handles for manipulating the shape after it has been drawn. Adds keyboard modifiers for: \begin{itemize} \item {} Moving the existing shape (default key = 'space') \item {} Making the shape square (default 'shift') \item {} Make the initial point the center of the shape (default 'control') \item {} Square and center can be combined \end{itemize} \subsubsection{Allow Artists to Display Pixel Data in Cursor} \label{\detokenize{users/prev_whats_new/whats_new_1.5:allow-artists-to-display-pixel-data-in-cursor}} Adds \sphinxcode{\sphinxupquote{get\_pixel\_data}} and \sphinxcode{\sphinxupquote{format\_pixel\_data}} methods to artists which can be used to add zdata to the cursor display in the status bar. Also adds an implementation for Images. \subsection{New plotting features} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-plotting-features}} \subsubsection{Auto-wrapping Text} \label{\detokenize{users/prev_whats_new/whats_new_1.5:auto-wrapping-text}} Added the keyword argument "wrap" to Text, which automatically breaks long lines of text when being drawn. Works for any rotated text, different modes of alignment, and for text that are either labels or titles. This breaks at the \sphinxcode{\sphinxupquote{Figure}}, not \sphinxcode{\sphinxupquote{Axes}} edge. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-2}.pdf} \end{figure} \subsubsection{Contour plot corner masking} \label{\detokenize{users/prev_whats_new/whats_new_1.5:contour-plot-corner-masking}} Ian Thomas rewrote the C++ code that calculates contours to add support for corner masking. This is controlled by a new keyword argument \sphinxcode{\sphinxupquote{corner\_mask}} in the functions {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}}. The previous behaviour, which is now obtained using \sphinxcode{\sphinxupquote{corner\_mask=False}}, was for a single masked point to completely mask out all four quads touching that point. The new behaviour, obtained using \sphinxcode{\sphinxupquote{corner\_mask=True}}, only masks the corners of those quads touching the point; any triangular corners comprising three unmasked points are contoured as usual. If the \sphinxcode{\sphinxupquote{corner\_mask}} keyword argument is not specified, the default value is taken from rcParams. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/images\_contours\_and\_fields/contour\_corner\_mask.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contour_corner_mask_0011}.png}} \caption{Contour Corner Mask}\label{\detokenize{users/prev_whats_new/whats_new_1.5:id2}}\end{figure} \subsubsection{Mostly unified linestyles for \sphinxstyleliteralintitle{\sphinxupquote{Line2D}}, \sphinxstyleliteralintitle{\sphinxupquote{Patch}} and \sphinxstyleliteralintitle{\sphinxupquote{Collection}}} \label{\detokenize{users/prev_whats_new/whats_new_1.5:mostly-unified-linestyles-for-line2d-patch-and-collection}} The handling of linestyles for Lines, Patches and Collections has been unified. Now they all support defining linestyles with short symbols, like \sphinxcode{\sphinxupquote{"-{-}"}}, as well as with full names, like \sphinxcode{\sphinxupquote{"dashed"}}. Also the definition using a dash pattern (\sphinxcode{\sphinxupquote{(0., {[}3., 3.{]})}}) is supported for all methods using \sphinxcode{\sphinxupquote{Line2D}}, \sphinxcode{\sphinxupquote{Patch}} or \sphinxcode{\sphinxupquote{Collection}}. \subsubsection{Legend marker order} \label{\detokenize{users/prev_whats_new/whats_new_1.5:legend-marker-order}} Added ability to place the label before the marker in a legend box with \sphinxcode{\sphinxupquote{markerfirst}} keyword \subsubsection{Support for legend for PolyCollection and stackplot} \label{\detokenize{users/prev_whats_new/whats_new_1.5:support-for-legend-for-polycollection-and-stackplot}} Added a \sphinxcode{\sphinxupquote{legend\_handler}} for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} as well as a \sphinxcode{\sphinxupquote{labels}} argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot:matplotlib.axes.Axes.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stackplot()}}}}}. \subsubsection{Support for alternate pivots in mplot3d quiver plot} \label{\detokenize{users/prev_whats_new/whats_new_1.5:support-for-alternate-pivots-in-mplot3d-quiver-plot}} Added a \sphinxcode{\sphinxupquote{pivot}} kwarg to {\hyperref[\detokenize{tutorials/toolkits/mplot3d:mpl_toolkits.mplot3d.Axes3D.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver()}}}}} that controls the pivot point around which the quiver line rotates. This also determines the placement of the arrow head along the quiver line. \subsubsection{Logit Scale} \label{\detokenize{users/prev_whats_new/whats_new_1.5:logit-scale}} Added support for the 'logit' axis scale, a nonlinear transformation \begin{equation*} \begin{split}x -> \log10(x / (1-x))\end{split} \end{equation*} for data between 0 and 1 excluded. \subsubsection{Add step kwargs to fill\_between} \label{\detokenize{users/prev_whats_new/whats_new_1.5:add-step-kwargs-to-fill-between}} Added \sphinxcode{\sphinxupquote{step}} kwarg to \sphinxcode{\sphinxupquote{Axes.fill\_between}} to allow to fill between lines drawn using the 'step' draw style. The values of \sphinxcode{\sphinxupquote{step}} match those of the \sphinxcode{\sphinxupquote{where}} kwarg of \sphinxcode{\sphinxupquote{Axes.step}}. The asymmetry of of the kwargs names is not ideal, but \sphinxcode{\sphinxupquote{Axes.fill\_between}} already has a \sphinxcode{\sphinxupquote{where}} kwarg. This is particularly useful for plotting pre-binned histograms. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/lines\_bars\_and\_markers/filled\_step.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_filled_step_0011}.png}} \caption{Filled Step}\label{\detokenize{users/prev_whats_new/whats_new_1.5:id3}}\end{figure} \subsubsection{Square Plot} \label{\detokenize{users/prev_whats_new/whats_new_1.5:square-plot}} Implemented square plots feature as a new parameter in the axis function. When argument 'square' is specified, equal scaling is set, and the limits are set such that \sphinxcode{\sphinxupquote{xmax-xmin == ymax-ymin}}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-3}.pdf} \end{figure} \subsubsection{Updated figimage to take optional resize parameter} \label{\detokenize{users/prev_whats_new/whats_new_1.5:updated-figimage-to-take-optional-resize-parameter}} Added the ability to plot simple 2D-Array using \sphinxcode{\sphinxupquote{plt.figimage(X, resize=True)}}. This is useful for plotting simple 2D-Array without the Axes or whitespacing around the image. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-4}.pdf} \end{figure} \subsubsection{Updated Figure.savefig() can now use figure's dpi} \label{\detokenize{users/prev_whats_new/whats_new_1.5:updated-figure-savefig-can-now-use-figure-s-dpi}} Added support to save the figure with the same dpi as the figure on the screen using \sphinxcode{\sphinxupquote{dpi='figure'}}. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{f} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{25}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} dpi set to 25} \PYG{n}{S} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{)} \PYG{n}{f}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{output.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} output savefig dpi set to 25 (same as figure)} \end{sphinxVerbatim} \subsubsection{Updated Table to control edge visibility} \label{\detokenize{users/prev_whats_new/whats_new_1.5:updated-table-to-control-edge-visibility}} Added the ability to toggle the visibility of lines in Tables. Functionality added to the \sphinxcode{\sphinxupquote{pyplot.table()}} factory function under the keyword argument "edges". Values can be the strings "open", "closed", "horizontal", "vertical" or combinations of the letters "L", "R", "T", "B" which represent left, right, top, and bottom respectively. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{table}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{edges}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{open}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} No line visible} \PYG{n}{table}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{edges}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{closed}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} All lines visible} \PYG{n}{table}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{edges}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{horizontal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Only top and bottom lines visible} \PYG{n}{table}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{edges}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{LT}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Only left and top lines visible.} \end{sphinxVerbatim} \subsubsection{Zero r/cstride support in plot\_wireframe} \label{\detokenize{users/prev_whats_new/whats_new_1.5:zero-r-cstride-support-in-plot-wireframe}} Adam Hughes added support to mplot3d's plot\_wireframe to draw only row or column line plots. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-5}.pdf} \end{figure} \subsubsection{Plot bar and barh with labels} \label{\detokenize{users/prev_whats_new/whats_new_1.5:plot-bar-and-barh-with-labels}} Added kwarg \sphinxcode{\sphinxupquote{"tick\_label"}} to \sphinxcode{\sphinxupquote{bar}} and \sphinxcode{\sphinxupquote{barh}} to support plotting bar graphs with a text label for each bar. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_1-5-6}.pdf} \end{figure} \subsubsection{Added center and frame kwargs to pie} \label{\detokenize{users/prev_whats_new/whats_new_1.5:added-center-and-frame-kwargs-to-pie}} These control where the center of the pie graph are and if the Axes frame is shown. \subsubsection{Fixed 3D filled contour plot polygon rendering} \label{\detokenize{users/prev_whats_new/whats_new_1.5:fixed-3d-filled-contour-plot-polygon-rendering}} Certain cases of 3D filled contour plots that produce polygons with multiple holes produced improper rendering due to a loss of path information between {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}}. A function {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_verts_and_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_verts\_and\_codes()}}}}} was added to allow path information to be retained for proper rendering. \subsubsection{Dense colorbars are rasterized} \label{\detokenize{users/prev_whats_new/whats_new_1.5:dense-colorbars-are-rasterized}} Vector file formats (pdf, ps, svg) are efficient for many types of plot element, but for some they can yield excessive file size and even rendering artifacts, depending on the renderer used for screen display. This is a problem for colorbars that show a large number of shades, as is most commonly the case. Now, if a colorbar is showing 50 or more colors, it will be rasterized in vector backends. \subsubsection{DateFormatter strftime} \label{\detokenize{users/prev_whats_new/whats_new_1.5:dateformatter-strftime}} \sphinxcode{\sphinxupquote{strftime}} method will format a \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime.datetime}}} object with the format string passed to the formatter's constructor. This method accepts datetimes with years before 1900, unlike \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime.strftime}{\sphinxcode{\sphinxupquote{datetime.datetime.strftime()}}}. \subsubsection{Artist-level \{get,set\}\_usetex for text} \label{\detokenize{users/prev_whats_new/whats_new_1.5:artist-level-get-set-usetex-for-text}} Add \sphinxcode{\sphinxupquote{\{get,set\}\_usetex}} methods to {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} objects which allow artist-level control of LaTeX rendering vs the internal mathtex rendering. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ax.remove()}} works as expected} \label{\detokenize{users/prev_whats_new/whats_new_1.5:ax-remove-works-as-expected}} As with artists added to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, \sphinxcode{\sphinxupquote{Axes}} objects can be removed from their figure via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove:matplotlib.axes.Axes.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove()}}}}}. \subsubsection{API Consistency fix within Locators set\_params() function} \label{\detokenize{users/prev_whats_new/whats_new_1.5:api-consistency-fix-within-locators-set-params-function}} {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator.set_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_params()}}}}} function, which sets parameters within a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} type instance, is now available to all \sphinxcode{\sphinxupquote{Locator}} types. The implementation also prevents unsafe usage by strictly defining the parameters that a user can set. To use, call \sphinxcode{\sphinxupquote{set\_params()}} on a \sphinxcode{\sphinxupquote{Locator}} instance with desired arguments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{LogLocator}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set given attributes for loc.} \PYG{n}{loc}\PYG{o}{.}\PYG{n}{set\PYGZus{}params}\PYG{p}{(}\PYG{n}{numticks}\PYG{o}{=}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{n}{numdecs}\PYG{o}{=}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{n}{subs}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mf}{2.0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{base}\PYG{o}{=}\PYG{l+m+mi}{8}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} The below will error, as there is no such parameter for LogLocator} \PYG{c+c1}{\PYGZsh{} named foo} \PYG{c+c1}{\PYGZsh{} loc.set\PYGZus{}params(foo=\PYGZsq{}bar\PYGZsq{})} \end{sphinxVerbatim} \subsubsection{Date Locators} \label{\detokenize{users/prev_whats_new/whats_new_1.5:date-locators}} Date Locators (derived from {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateLocator}}}}}) now implement the \sphinxcode{\sphinxupquote{tick\_values()}} method. This is expected of all Locators derived from \sphinxcode{\sphinxupquote{Locator}}. The Date Locators can now be used easily without creating axes \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{datetime} \PYG{k}{import} \PYG{n}{datetime} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{import} \PYG{n}{YearLocator} \PYG{n}{t0} \PYG{o}{=} \PYG{n}{datetime}\PYG{p}{(}\PYG{l+m+mi}{2002}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{tf} \PYG{o}{=} \PYG{n}{datetime}\PYG{p}{(}\PYG{l+m+mi}{2005}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{)} \PYG{n}{loc} \PYG{o}{=} \PYG{n}{YearLocator}\PYG{p}{(}\PYG{p}{)} \PYG{n}{values} \PYG{o}{=} \PYG{n}{loc}\PYG{o}{.}\PYG{n}{tick\PYGZus{}values}\PYG{p}{(}\PYG{n}{t0}\PYG{p}{,} \PYG{n}{tf}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{OffsetBoxes now support clipping} \label{\detokenize{users/prev_whats_new/whats_new_1.5:offsetboxes-now-support-clipping}} \sphinxcode{\sphinxupquote{Artists}} draw onto objects of type \sphinxcode{\sphinxupquote{OffsetBox}} through \sphinxcode{\sphinxupquote{DrawingArea}} and \sphinxcode{\sphinxupquote{TextArea}}. The \sphinxcode{\sphinxupquote{TextArea}} calculates the required space for the text and so the text is always within the bounds, for this nothing has changed. However, \sphinxcode{\sphinxupquote{DrawingArea}} acts as a parent for zero or more \sphinxcode{\sphinxupquote{Artists}} that draw on it and may do so beyond the bounds. Now child \sphinxcode{\sphinxupquote{Artists}} can be clipped to the bounds of the \sphinxcode{\sphinxupquote{DrawingArea}}. \subsubsection{OffsetBoxes now considered by tight\_layout} \label{\detokenize{users/prev_whats_new/whats_new_1.5:offsetboxes-now-considered-by-tight-layout}} When {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} or \sphinxcode{\sphinxupquote{Figure.tight\_layout()}} or \sphinxcode{\sphinxupquote{GridSpec.tight\_layout()}} is called, \sphinxcode{\sphinxupquote{OffsetBoxes}} that are anchored outside the axes will not get chopped out. The \sphinxcode{\sphinxupquote{OffsetBoxes}} will also not get overlapped by other axes in case of multiple subplots. \subsubsection{Per-page pdf notes in multi-page pdfs (PdfPages)} \label{\detokenize{users/prev_whats_new/whats_new_1.5:per-page-pdf-notes-in-multi-page-pdfs-pdfpages}} Add a new method {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.attach_note}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{attach\_note()}}}}} to the PdfPages class, allowing the attachment of simple text notes to pages in a multi-page pdf of figures. The new note is visible in the list of pdf annotations in a viewer that has this facility (Adobe Reader, OSX Preview, Skim, etc.). Per default the note itself is kept off-page to prevent it to appear in print-outs. \sphinxcode{\sphinxupquote{PdfPages.attach\_note}} needs to be called before \sphinxcode{\sphinxupquote{savefig()}} in order to be added to the correct figure. \subsubsection{Updated fignum\_exists to take figure name} \label{\detokenize{users/prev_whats_new/whats_new_1.5:updated-fignum-exists-to-take-figure-name}} Added the ability to check the existence of a figure using its name instead of just the figure number. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fignum\PYGZus{}exists}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}true} \end{sphinxVerbatim} \subsection{ToolManager} \label{\detokenize{users/prev_whats_new/whats_new_1.5:toolmanager}} Federico Ariza wrote the new {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolManager}}}}} that comes as replacement for \sphinxcode{\sphinxupquote{NavigationToolbar2}} \sphinxcode{\sphinxupquote{ToolManager}} offers a new way of looking at the user interactions with the figures. Before we had the \sphinxcode{\sphinxupquote{NavigationToolbar2}} with its own tools like \sphinxcode{\sphinxupquote{zoom/pan/home/save/...}} and also we had the shortcuts like \sphinxcode{\sphinxupquote{yscale/grid/quit/....}} \sphinxcode{\sphinxupquote{Toolmanager}} relocate all those actions as \sphinxcode{\sphinxupquote{Tools}} (located in {\hyperref[\detokenize{api/backend_tools_api:module-matplotlib.backend_tools}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_tools}}}}}), and defines a way to \sphinxcode{\sphinxupquote{access/trigger/reconfigure}} them. The \sphinxcode{\sphinxupquote{Toolbars}} are replaced for \sphinxcode{\sphinxupquote{ToolContainers}} that are just GUI interfaces to \sphinxcode{\sphinxupquote{trigger}} the tools. But don't worry the default backends include a \sphinxcode{\sphinxupquote{ToolContainer}} called \sphinxcode{\sphinxupquote{toolbar}} \begin{sphinxadmonition}{note}{Note:} At the moment, we release this primarily for feedback purposes and should be treated as experimental until further notice as API changes will occur. For the moment the \sphinxcode{\sphinxupquote{ToolManager}} works only with the \sphinxcode{\sphinxupquote{GTK3}} and \sphinxcode{\sphinxupquote{Tk}} backends. Make sure you use one of those. Port for the rest of the backends is comming soon. To activate the \sphinxcode{\sphinxupquote{ToolManager}} include the following at the top of your file \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{toolbar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{toolmanager}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \end{sphinxadmonition} \subsubsection{Interact with the ToolContainer} \label{\detokenize{users/prev_whats_new/whats_new_1.5:interact-with-the-toolcontainer}} The most important feature is the ability to easily reconfigure the ToolContainer (aka toolbar). For example, if we want to remove the "forward" button we would just do. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{remove\PYGZus{}tool}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{forward}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Now if you want to programmatically trigger the "home" button \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{trigger\PYGZus{}tool}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{home}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{New Tools for ToolManager} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-tools-for-toolmanager}} It is possible to add new tools to the ToolManager A very simple tool that prints "You're awesome" would be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{backend\PYGZus{}tools} \PYG{k}{import} \PYG{n}{ToolBase} \PYG{k}{class} \PYG{n+nc}{AwesomeTool}\PYG{p}{(}\PYG{n}{ToolBase}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{trigger}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{You}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{re awesome}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} To add this tool to \sphinxcode{\sphinxupquote{ToolManager}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{add\PYGZus{}tool}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Awesome}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{AwesomeTool}\PYG{p}{)} \end{sphinxVerbatim} If we want to add a shortcut ("d") for the tool \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{update\PYGZus{}keymap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Awesome}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} To add it to the toolbar inside the group 'foo' \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{toolbar}\PYG{o}{.}\PYG{n}{add\PYGZus{}tool}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Awesome}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{foo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} There is a second class of tools, "Toggleable Tools", this are almost the same as our basic tools, just that belong to a group, and are mutually exclusive inside that group. For tools derived from \sphinxcode{\sphinxupquote{ToolToggleBase}} there are two basic methods \sphinxcode{\sphinxupquote{enable}} and \sphinxcode{\sphinxupquote{disable}} that are called automatically whenever it is toggled. A full example is located in \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/toolmanager\_sgskip} \subsection{cbook.is\_sequence\_of\_strings recognizes string objects} \label{\detokenize{users/prev_whats_new/whats_new_1.5:cbook-is-sequence-of-strings-recognizes-string-objects}} This is primarily how pandas stores a sequence of strings \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{pandas} \PYG{k}{as} \PYG{n+nn}{pd} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{as} \PYG{n+nn}{cbook} \PYG{n}{a} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{cbook}\PYG{o}{.}\PYG{n}{is\PYGZus{}sequence\PYGZus{}of\PYGZus{}strings}\PYG{p}{(}\PYG{n}{a}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} True} \PYG{n}{a} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{dtype}\PYG{o}{=}\PYG{n+nb}{object}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{cbook}\PYG{o}{.}\PYG{n}{is\PYGZus{}sequence\PYGZus{}of\PYGZus{}strings}\PYG{p}{(}\PYG{n}{a}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} True} \PYG{n}{s} \PYG{o}{=} \PYG{n}{pd}\PYG{o}{.}\PYG{n}{Series}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{cbook}\PYG{o}{.}\PYG{n}{is\PYGZus{}sequence\PYGZus{}of\PYGZus{}strings}\PYG{p}{(}\PYG{n}{s}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} True} \end{sphinxVerbatim} Previously, the last two prints returned false. \subsection{New \sphinxstyleliteralintitle{\sphinxupquote{close-figs}} argument for plot directive} \label{\detokenize{users/prev_whats_new/whats_new_1.5:new-close-figs-argument-for-plot-directive}} Matplotlib has a sphinx extension \sphinxcode{\sphinxupquote{plot\_directive}} that creates plots for inclusion in sphinx documents. Matplotlib 1.5 adds a new option to the plot directive - \sphinxcode{\sphinxupquote{close-figs}} - that closes any previous figure windows before creating the plots. This can help avoid some surprising duplicates of plots when using \sphinxcode{\sphinxupquote{plot\_directive}}. \subsection{Support for URL string arguments to \sphinxstyleliteralintitle{\sphinxupquote{imread}}} \label{\detokenize{users/prev_whats_new/whats_new_1.5:support-for-url-string-arguments-to-imread}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib.pyplot.imread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imread()}}}}} function now accepts URL strings that point to remote PNG files. This circumvents the generation of a HTTPResponse object directly. \subsection{Display hook for animations in the IPython notebook} \label{\detokenize{users/prev_whats_new/whats_new_1.5:display-hook-for-animations-in-the-ipython-notebook}} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} instances gained a \sphinxcode{\sphinxupquote{\_repr\_html\_}} method to support inline display of animations in the notebook. The method used to display is controlled by the \sphinxcode{\sphinxupquote{animation.html}} rc parameter, which currently supports values of \sphinxcode{\sphinxupquote{none}} and \sphinxcode{\sphinxupquote{html5}}. \sphinxcode{\sphinxupquote{none}} is the default, performing no display. \sphinxcode{\sphinxupquote{html5}} converts the animation to an h264 encoded video, which is embedded directly in the notebook. Users not wishing to use the \sphinxcode{\sphinxupquote{\_repr\_html\_}} display hook can also manually call the \sphinxcode{\sphinxupquote{to\_html5\_video}} method to get the HTML and display using IPython's \sphinxcode{\sphinxupquote{HTML}} display class: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{IPython}\PYG{n+nn}{.}\PYG{n+nn}{display} \PYG{k}{import} \PYG{n}{HTML} \PYG{n}{HTML}\PYG{p}{(}\PYG{n}{anim}\PYG{o}{.}\PYG{n}{to\PYGZus{}html5\PYGZus{}video}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Prefixed pkg-config for building} \label{\detokenize{users/prev_whats_new/whats_new_1.5:prefixed-pkg-config-for-building}} Handling of \sphinxcode{\sphinxupquote{pkg-config}} has been fixed in so far as it is now possible to set it using the environment variable \sphinxcode{\sphinxupquote{PKG\_CONFIG}}. This is important if your toolchain is prefixed. This is done in a simpilar way as setting \sphinxcode{\sphinxupquote{CC}} or \sphinxcode{\sphinxupquote{CXX}} before building. An example follows. \begin{quote} export PKG\_CONFIG=x86\_64-pc-linux-gnu-pkg-config \end{quote} \section{New in matplotlib 2.0} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:new-in-matplotlib-2-0}}\label{\detokenize{users/prev_whats_new/whats_new_2.0.0:whats-new-2-0-0}}\label{\detokenize{users/prev_whats_new/whats_new_2.0.0::doc}} \begin{sphinxadmonition}{note}{Note:} matplotlib 2.0 supports Python 2.7, and 3.4+ \end{sphinxadmonition} \subsection{Default style changes} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:default-style-changes}} The major changes in v2.0 are related to overhauling the default styles. \subsubsection{Changes to the default style} \label{\detokenize{users/dflt_style_changes:changes-to-the-default-style}}\label{\detokenize{users/dflt_style_changes::doc}} The most important changes in matplotlib 2.0 are the changes to the default style. While it is impossible to select the best default for all cases, these are designed to work well in the most common cases. A 'classic' style sheet is provided so reverting to the 1.x default values is a single line of python \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{style} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{classic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} See {\hyperref[\detokenize{tutorials/introductory/customizing:customizing-with-matplotlibrc-files}]{\sphinxcrossref{\DUrole{std,std-ref}{The matplotlibrc file}}}} for details about how to persistently and selectively revert many of these changes. \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id1}}{\hyperref[\detokenize{users/dflt_style_changes:colors-color-cycles-and-color-maps}]{\sphinxcrossref{Colors, color cycles, and color maps}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id2}}{\hyperref[\detokenize{users/dflt_style_changes:colors-in-default-property-cycle}]{\sphinxcrossref{Colors in default property cycle}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id3}}{\hyperref[\detokenize{users/dflt_style_changes:colormap}]{\sphinxcrossref{Colormap}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id4}}{\hyperref[\detokenize{users/dflt_style_changes:interactive-figures}]{\sphinxcrossref{Interactive figures}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id5}}{\hyperref[\detokenize{users/dflt_style_changes:grid-lines}]{\sphinxcrossref{Grid lines}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id6}}{\hyperref[\detokenize{users/dflt_style_changes:figure-size-font-size-and-screen-dpi}]{\sphinxcrossref{Figure size, font size, and screen dpi}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id7}}{\hyperref[\detokenize{users/dflt_style_changes:plotting-functions}]{\sphinxcrossref{Plotting functions}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id8}}{\hyperref[\detokenize{users/dflt_style_changes:scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id9}}{\hyperref[\detokenize{users/dflt_style_changes:plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id10}}{\hyperref[\detokenize{users/dflt_style_changes:errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id11}}{\hyperref[\detokenize{users/dflt_style_changes:boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id12}}{\hyperref[\detokenize{users/dflt_style_changes:fill-between-and-fill-betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}} and \sphinxcode{\sphinxupquote{fill\_betweenx}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id13}}{\hyperref[\detokenize{users/dflt_style_changes:patch-edges-and-color}]{\sphinxcrossref{Patch edges and color}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id14}}{\hyperref[\detokenize{users/dflt_style_changes:hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hexbin}}}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id15}}{\hyperref[\detokenize{users/dflt_style_changes:bar-and-barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}} and \sphinxcode{\sphinxupquote{barh}}}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id16}}{\hyperref[\detokenize{users/dflt_style_changes:hatching}]{\sphinxcrossref{Hatching}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id17}}{\hyperref[\detokenize{users/dflt_style_changes:fonts}]{\sphinxcrossref{Fonts}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id18}}{\hyperref[\detokenize{users/dflt_style_changes:normal-text}]{\sphinxcrossref{Normal text}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id19}}{\hyperref[\detokenize{users/dflt_style_changes:math-text}]{\sphinxcrossref{Math text}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id20}}{\hyperref[\detokenize{users/dflt_style_changes:legends}]{\sphinxcrossref{Legends}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id21}}{\hyperref[\detokenize{users/dflt_style_changes:image}]{\sphinxcrossref{Image}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id22}}{\hyperref[\detokenize{users/dflt_style_changes:interpolation}]{\sphinxcrossref{Interpolation}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id23}}{\hyperref[\detokenize{users/dflt_style_changes:colormapping-pipeline}]{\sphinxcrossref{Colormapping pipeline}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id24}}{\hyperref[\detokenize{users/dflt_style_changes:shading}]{\sphinxcrossref{Shading}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id25}}{\hyperref[\detokenize{users/dflt_style_changes:plot-layout}]{\sphinxcrossref{Plot layout}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id26}}{\hyperref[\detokenize{users/dflt_style_changes:auto-limits}]{\sphinxcrossref{Auto limits}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id27}}{\hyperref[\detokenize{users/dflt_style_changes:z-order}]{\sphinxcrossref{Z-order}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id28}}{\hyperref[\detokenize{users/dflt_style_changes:ticks}]{\sphinxcrossref{Ticks}}} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id29}}{\hyperref[\detokenize{users/dflt_style_changes:tick-label-formatting}]{\sphinxcrossref{Tick label formatting}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/dflt_style_changes:id30}}{\hyperref[\detokenize{users/dflt_style_changes:mplot3d}]{\sphinxcrossref{mplot3d}}} \end{itemize} \end{sphinxShadowBox} \paragraph{Colors, color cycles, and color maps} \label{\detokenize{users/dflt_style_changes:colors-color-cycles-and-color-maps}} \subparagraph{Colors in default property cycle} \label{\detokenize{users/dflt_style_changes:colors-in-default-property-cycle}} The colors in the default property cycle have been changed from \sphinxcode{\sphinxupquote{{[}'b', 'g', 'r', 'c', 'm', 'y', 'k'{]}}} to the category10 color palette used by \sphinxhref{https://github.com/vega/vega/wiki/Scales\#scale-range-literals}{Vega} and \sphinxhref{https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md\#category10}{d3} originally developed at Tableau. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-1}.pdf} \end{figure} In addition to changing the colors, an additional method to specify colors was added. Previously, the default colors were the single character short-hand notations for red, green, blue, cyan, magenta, yellow, and black. This made them easy to type and usable in the abbreviated style string in \sphinxcode{\sphinxupquote{plot}}, however the new default colors are only specified via hex values. To access these colors outside of the property cycling the notation for colors \sphinxcode{\sphinxupquote{'CN'}}, where \sphinxcode{\sphinxupquote{N}} takes values 0-9, was added to denote the first 10 colors in \sphinxcode{\sphinxupquote{mpl.rcParams{[}'axes.prop\_cycle'{]}}} See {\hyperref[\detokenize{tutorials/colors/colors::doc}]{\sphinxcrossref{\DUrole{doc}{Specifying Colors}}}} for more details. To restore the old color cycle use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{cycler} \PYG{k}{import} \PYG{n}{cycler} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.prop\PYGZus{}cycle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bgrcmyk}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} or set \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{prop\PYGZus{}cycle} \PYG{p}{:} \PYG{n}{cycler}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bgrcmyk}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{Colormap} \label{\detokenize{users/dflt_style_changes:colormap}}\begin{description} \item[{The new default color map used by {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} instances is}] \leavevmode \sphinxcode{\sphinxupquote{'viridis'}} (aka \sphinxhref{https://bids.github.io/colormap/}{option D}). \end{description} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-2}.pdf} \end{figure} For an introduction to color theory and how 'viridis' was generated watch Nathaniel Smith and Stéfan van der Walt's talk from SciPy2015. See \sphinxhref{https://bids.github.io/colormap/}{here for many more details} about the other alternatives and the tools used to create the color map. For details on all of the color maps available in matplotlib see {\hyperref[\detokenize{tutorials/colors/colormaps::doc}]{\sphinxcrossref{\DUrole{doc}{Choosing Colormaps in Matplotlib}}}}. The previous default can be restored using \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{image.cmap}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{jet}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or setting \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{image}\PYG{o}{.}\PYG{n}{cmap} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{jet}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file; however this is strongly discouraged. \subparagraph{Interactive figures} \label{\detokenize{users/dflt_style_changes:interactive-figures}} The default interactive figure background color has changed from grey to white, which matches the default background color used when saving. The previous defaults can be restored by \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{0.75}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or by setting \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{o}{.}\PYG{n}{facecolor} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{0.75}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{Grid lines} \label{\detokenize{users/dflt_style_changes:grid-lines}} The default style of grid lines was changed from black dashed lines to thicker solid light grey lines. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-3}.pdf} \end{figure} The previous default can be restored by using: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{grid.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{grid.linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{:}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{grid.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{0.5} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{o}{.}\PYG{n}{color} \PYG{p}{:} \PYG{n}{k} \PYG{c+c1}{\PYGZsh{} grid color} \PYG{n}{grid}\PYG{o}{.}\PYG{n}{linestyle} \PYG{p}{:} \PYG{p}{:} \PYG{c+c1}{\PYGZsh{} dotted} \PYG{n}{grid}\PYG{o}{.}\PYG{n}{linewidth} \PYG{p}{:} \PYG{l+m+mf}{0.5} \PYG{c+c1}{\PYGZsh{} in points} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \paragraph{Figure size, font size, and screen dpi} \label{\detokenize{users/dflt_style_changes:figure-size-font-size-and-screen-dpi}} The default dpi used for on-screen display was changed from 80 dpi to 100 dpi, the same as the default dpi for saving files. Due to this change, the on-screen display is now more what-you-see-is-what-you-get for saved files. To keep the figure the same size in terms of pixels, in order to maintain approximately the same size on the screen, the default figure size was reduced from 8x6 inches to 6.4x4.8 inches. As a consequence of this the default font sizes used for the title, tick labels, and axes labels were reduced to maintain their size relative to the overall size of the figure. By default the dpi of the saved image is now the dpi of the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance being saved. This will have consequences if you are trying to match text in a figure directly with external text. The previous defaults can be restored by \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.figsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mf}{8.0}\PYG{p}{,} \PYG{l+m+mf}{6.0}\PYG{p}{]} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.dpi}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{80} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{savefig.dpi}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{100} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font.size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{12} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{large}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{medium}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{o}{.}\PYG{n}{figsize} \PYG{p}{:} \PYG{p}{[}\PYG{l+m+mf}{8.0}\PYG{p}{,} \PYG{l+m+mf}{6.0}\PYG{p}{]} \PYG{n}{figure}\PYG{o}{.}\PYG{n}{dpi} \PYG{p}{:} \PYG{l+m+mi}{80} \PYG{n}{savefig}\PYG{o}{.}\PYG{n}{dpi} \PYG{p}{:} \PYG{l+m+mi}{100} \PYG{n}{font}\PYG{o}{.}\PYG{n}{size} \PYG{p}{:} \PYG{l+m+mf}{12.0} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{fontsize} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{large}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{figure}\PYG{o}{.}\PYG{n}{titlesize} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{medium}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} In your \sphinxcode{\sphinxupquote{matplotlibrc}} file. In addition, the \sphinxcode{\sphinxupquote{forward}} kwarg to \sphinxcode{\sphinxupquote{set\_size\_inches}} now defaults to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} to improve the interactive experience. Backend canvases that adjust the size of their bound {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} must pass \sphinxcode{\sphinxupquote{forward=False}} to avoid circular behavior. This default is not configurable. \paragraph{Plotting functions} \label{\detokenize{users/dflt_style_changes:plotting-functions}} \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{scatter}}} \label{\detokenize{users/dflt_style_changes:scatter}} The following changes were made to the default behavior of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} \begin{itemize} \item {} The default size of the elements in a scatter plot is now based on the rcParam \sphinxcode{\sphinxupquote{lines.markersize}} so it is consistent with \sphinxcode{\sphinxupquote{plot(X, Y, 'o')}}. The old value was 20, and the new value is 36 (6\textasciicircum{}2). \item {} Scatter markers no longer have a black edge. \item {} If the color of the markers is not specified it will follow the property cycle, pulling from the 'patches' cycle on the \sphinxcode{\sphinxupquote{Axes}}. \end{itemize} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-4}.pdf} \end{figure} The classic default behavior of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} can only be recovered through \sphinxcode{\sphinxupquote{mpl.style.use('classic')}}. The marker size can be recovered via \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParam}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.markersize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sqrt}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)} \end{sphinxVerbatim} however, this will also affect the default marker size of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. To recover the classic behavior on a per-call basis pass the following kwargs: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{classic\PYGZus{}kwargs} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{edgecolors}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{c}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{plot}}} \label{\detokenize{users/dflt_style_changes:plot}} The following changes were made to the default behavior of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} \begin{itemize} \item {} the default linewidth increased from 1 to 1.5 \item {} the dash patterns associated with \sphinxcode{\sphinxupquote{'-{-}'}}, \sphinxcode{\sphinxupquote{':'}}, and \sphinxcode{\sphinxupquote{'-.'}} have changed \item {} the dash patterns now scale with line width \end{itemize} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-5}.pdf} \end{figure} The previous defaults can be restored by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.dashed\PYGZus{}pattern}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{]} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.dashdot\PYGZus{}pattern}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{]} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.dotted\PYGZus{}pattern}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.scale\PYGZus{}dashes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{False} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lines}\PYG{o}{.}\PYG{n}{linewidth} \PYG{p}{:} \PYG{l+m+mf}{1.0} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{dashed\PYGZus{}pattern} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{6} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{dashdot\PYGZus{}pattern} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{dotted\PYGZus{}pattern} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{scale\PYGZus{}dashes}\PYG{p}{:} \PYG{k+kc}{False} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{errorbar}}} \label{\detokenize{users/dflt_style_changes:errorbar}} By default, caps on the ends of errorbars are not present. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-6}.pdf} \end{figure} This also changes the return value of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}} as the list of 'caplines' will be empty by default. The previous defaults can be restored by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{errorbar.capsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{3} \end{sphinxVerbatim} or by setting \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{errorbar}\PYG{o}{.}\PYG{n}{capsize} \PYG{p}{:} \PYG{l+m+mi}{3} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{boxplot}}} \label{\detokenize{users/dflt_style_changes:boxplot}} Previously, boxplots were composed of a mish-mash of styles that were, for better for worse, inherited from Matlab. Most of the elements were blue, but the medians were red. The fliers (outliers) were black plus-symbols (\sphinxcode{\sphinxupquote{+}}) and the whiskers were dashed lines, which created ambiguity if the (solid and black) caps were not drawn. For the new defaults, everything is black except for the median and mean lines (if drawn), which are set to the first two elements of the current color cycle. Also, the default flier markers are now hollow circles, which maintain the ability of the plus-symbols to overlap without obscuring data too much. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-7}.pdf} \end{figure} The previous defaults can be restored by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.flierprops.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.flierprops.marker}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{+}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.flierprops.markerfacecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{none}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.flierprops.markeredgecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.boxprops.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.whiskerprops.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.whiskerprops.linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.medianprops.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.marker}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZca{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.markerfacecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.markeredgecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.markersize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{6} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{boxplot.meanprops.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{flierprops}\PYG{o}{.}\PYG{n}{color}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{flierprops}\PYG{o}{.}\PYG{n}{marker}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{+}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{flierprops}\PYG{o}{.}\PYG{n}{markerfacecolor}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{none}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{flierprops}\PYG{o}{.}\PYG{n}{markeredgecolor}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{boxprops}\PYG{o}{.}\PYG{n}{color}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{whiskerprops}\PYG{o}{.}\PYG{n}{color}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{whiskerprops}\PYG{o}{.}\PYG{n}{linestyle}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{medianprops}\PYG{o}{.}\PYG{n}{color}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{color}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{marker}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZca{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{markerfacecolor}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{markeredgecolor}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{markersize}\PYG{p}{:} \PYG{l+m+mi}{6} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{linestyle}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{boxplot}\PYG{o}{.}\PYG{n}{meanprops}\PYG{o}{.}\PYG{n}{linewidth}\PYG{p}{:} \PYG{l+m+mf}{1.0} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{fill\_between}} and \sphinxstyleliteralintitle{\sphinxupquote{fill\_betweenx}}} \label{\detokenize{users/dflt_style_changes:fill-between-and-fill-betweenx}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib.axes.Axes.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx}}}}} both follow the patch color cycle. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-8}.pdf} \end{figure} If the facecolor is set via the \sphinxcode{\sphinxupquote{facecolors}} or \sphinxcode{\sphinxupquote{color}} keyword argument, then the color is not cycled. To restore the previous behavior, explicitly pass the keyword argument \sphinxcode{\sphinxupquote{facecolors='C0'}} to the method call. \subparagraph{Patch edges and color} \label{\detokenize{users/dflt_style_changes:patch-edges-and-color}} Most artists drawn with a patch (\sphinxcode{\sphinxupquote{\textasciitilde{}matplotlib.axes.Axes.bar}}, \sphinxcode{\sphinxupquote{\textasciitilde{}matplotlib.axes.Axes.pie}}, etc) no longer have a black edge by default. The default face color is now \sphinxcode{\sphinxupquote{'C0'}} instead of \sphinxcode{\sphinxupquote{'b'}}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-9}.pdf} \end{figure} The previous defaults can be restored by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{patch.force\PYGZus{}edgecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{patch.facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{patch}\PYG{o}{.}\PYG{n}{facecolor} \PYG{p}{:} \PYG{n}{b} \PYG{n}{patch}\PYG{o}{.}\PYG{n}{force\PYGZus{}edgecolor} \PYG{p}{:} \PYG{k+kc}{True} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{hexbin}}} \label{\detokenize{users/dflt_style_changes:hexbin}} The default value of the \sphinxcode{\sphinxupquote{linecolor}} kwarg for \sphinxcode{\sphinxupquote{hexbin}} has changed from \sphinxcode{\sphinxupquote{'none'}} to \sphinxcode{\sphinxupquote{'face'}}. If 'none' is now supplied, no line edges are drawn around the hexagons. \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{bar}} and \sphinxstyleliteralintitle{\sphinxupquote{barh}}} \label{\detokenize{users/dflt_style_changes:bar-and-barh}}\label{\detokenize{users/dflt_style_changes:barbarh-align}} The default value of the \sphinxcode{\sphinxupquote{align}} kwarg for both \sphinxcode{\sphinxupquote{bar}} and \sphinxcode{\sphinxupquote{barh}} is changed from \sphinxcode{\sphinxupquote{'edge'}} to \sphinxcode{\sphinxupquote{'center'}}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-10}.pdf} \end{figure} To restore the previous behavior explicitly pass the keyword argument \sphinxcode{\sphinxupquote{align='edge'}} to the method call. \paragraph{Hatching} \label{\detokenize{users/dflt_style_changes:hatching}} The color of the lines in the hatch is now determined by \begin{itemize} \item {} If an edge color is explicitly set, use that for the hatch color \item {} If the edge color is not explicitly set, use \sphinxcode{\sphinxupquote{rcParam{[}'hatch.color'{]}}} which is looked up at artist creation time. \end{itemize} The width of the lines in a hatch pattern is now configurable by the rcParams \sphinxcode{\sphinxupquote{hatch.linewidth}}, which defaults to 1 point. The old behavior for the line width was different depending on backend: \begin{itemize} \item {} PDF: 0.1 pt \item {} SVG: 1.0 pt \item {} PS: 1 px \item {} Agg: 1 px \end{itemize} The old line width behavior can not be restored across all backends simultaneously, but can be restored for a single backend by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hatch.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{0.1} \PYG{c+c1}{\PYGZsh{} previous pdf hatch linewidth} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hatch.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} previous svg hatch linewidth} \end{sphinxVerbatim} The behavior of the PS and Agg backends was DPI dependent, thus: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.dpi}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{dpi} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{savefig.dpi}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{dpi} \PYG{c+c1}{\PYGZsh{} or leave as default \PYGZsq{}figure\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hatch.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{o}{/} \PYG{n}{dpi} \PYG{c+c1}{\PYGZsh{} previous ps and Agg hatch linewidth} \end{sphinxVerbatim} There is no direct API level control of the hatch color or linewidth. Hatching patterns are now rendered at a consistent density, regardless of DPI. Formerly, high DPI figures would be more dense than the default, and low DPI figures would be less dense. This old behavior cannot be directly restored, but the density may be increased by repeating the hatch specifier. \paragraph{Fonts} \label{\detokenize{users/dflt_style_changes:fonts}}\label{\detokenize{users/dflt_style_changes:default-changes-font}} \subparagraph{Normal text} \label{\detokenize{users/dflt_style_changes:normal-text}} The default font has changed from "Bitstream Vera Sans" to "DejaVu Sans". DejaVu Sans has additional international and math characters, but otherwise has the same appearance as Bitstream Vera Sans. Latin, Greek, Cyrillic, Armenian, Georgian, Hebrew, and Arabic are \sphinxhref{https://dejavu-fonts.github.io/}{all supported} (but right-to-left rendering is still not handled by matplotlib). In addition, DejaVu contains a sub-set of emoji symbols. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-11}.pdf} \end{figure} See the \sphinxhref{http://dejavu.sourceforge.net/samples/DejaVuSans.pdf}{DejaVu Sans PDF sample for full coverage}. \subparagraph{Math text} \label{\detokenize{users/dflt_style_changes:math-text}} The default math font when using the built-in math rendering engine (mathtext) has changed from "Computer Modern" (i.e. LaTeX-like) to "DejaVu Sans". This change has no effect if the TeX backend is used (i.e. \sphinxcode{\sphinxupquote{text.usetex}} is \sphinxcode{\sphinxupquote{True}}). \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-12}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-13}.pdf} \end{figure} To revert to the old behavior set the: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mathtext.fontset}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{cm}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mathtext.rm}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{serif}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mathtext}\PYG{o}{.}\PYG{n}{fontset}\PYG{p}{:} \PYG{n}{cm} \PYG{n}{mathtext}\PYG{o}{.}\PYG{n}{rm} \PYG{p}{:} \PYG{n}{serif} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. This \sphinxcode{\sphinxupquote{rcParam}} is consulted when the text is drawn, not when the artist is created. Thus all mathtext on a given \sphinxcode{\sphinxupquote{canvas}} will use the same fontset. \paragraph{Legends} \label{\detokenize{users/dflt_style_changes:legends}}\begin{itemize} \item {} By default, the number of points displayed in a legend is now 1. \item {} The default legend location is \sphinxcode{\sphinxupquote{'best'}}, so the legend will be automatically placed in a location to minimize overlap with data. \item {} The legend defaults now include rounded corners, a lighter boundary, and partially transparent boundary and background. \end{itemize} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-14}.pdf} \end{figure} The previous defaults can be restored by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.fancybox}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{False} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.loc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.numpoints}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{large}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.framealpha}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{None} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.scatterpoints}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{3} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{legend.edgecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{inherit}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or by setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{o}{.}\PYG{n}{fancybox} \PYG{p}{:} \PYG{k+kc}{False} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{loc} \PYG{p}{:} \PYG{n}{upper} \PYG{n}{right} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{numpoints} \PYG{p}{:} \PYG{l+m+mi}{2} \PYG{c+c1}{\PYGZsh{} the number of points in the legend line} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{fontsize} \PYG{p}{:} \PYG{n}{large} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{framealpha} \PYG{p}{:} \PYG{k+kc}{None} \PYG{c+c1}{\PYGZsh{} opacity of legend frame} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{scatterpoints} \PYG{p}{:} \PYG{l+m+mi}{3} \PYG{c+c1}{\PYGZsh{} number of scatter points} \PYG{n}{legend}\PYG{o}{.}\PYG{n}{edgecolor} \PYG{p}{:} \PYG{n}{inherit} \PYG{c+c1}{\PYGZsh{} legend edge color (\PYGZsq{}inherit\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} means it uses axes.edgecolor)} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \paragraph{Image} \label{\detokenize{users/dflt_style_changes:image}} \subparagraph{Interpolation} \label{\detokenize{users/dflt_style_changes:interpolation}} The default interpolation method for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} is now \sphinxcode{\sphinxupquote{'nearest'}} and by default it resamples the data (both up and down sampling) before color mapping. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-15}.pdf} \end{figure} To restore the previous behavior set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{image.interpolation}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bilinear}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{image.resample}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{False} \end{sphinxVerbatim} or set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{image}\PYG{o}{.}\PYG{n}{interpolation} \PYG{p}{:} \PYG{n}{bilinear} \PYG{c+c1}{\PYGZsh{} see help(imshow) for options} \PYG{n}{image}\PYG{o}{.}\PYG{n}{resample} \PYG{p}{:} \PYG{k+kc}{False} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{Colormapping pipeline} \label{\detokenize{users/dflt_style_changes:colormapping-pipeline}} Previously, the input data was normalized, then color mapped, and then resampled to the resolution required for the screen. This meant that the final resampling was being done in color space. Because the color maps are not generally linear in RGB space, colors not in the color map may appear in the final image. This bug was addressed by an almost complete overhaul of the image handling code. The input data is now normalized, then resampled to the correct resolution (in normalized dataspace), and then color mapped to RGB space. This ensures that only colors from the color map appear in the final image. (If your viewer subsequently resamples the image, the artifact may reappear.) The previous behavior cannot be restored. \subparagraph{Shading} \label{\detokenize{users/dflt_style_changes:shading}}\begin{itemize} \item {} The default shading mode for light source shading, in \sphinxcode{\sphinxupquote{matplotlib.colors.LightSource.shade}}, is now \sphinxcode{\sphinxupquote{overlay}}. Formerly, it was \sphinxcode{\sphinxupquote{hsv}}. \end{itemize} \paragraph{Plot layout} \label{\detokenize{users/dflt_style_changes:plot-layout}} \subparagraph{Auto limits} \label{\detokenize{users/dflt_style_changes:auto-limits}} The previous auto-scaling behavior was to find 'nice' round numbers as view limits that enclosed the data limits, but this could produce bad plots if the data happened to fall on a vertical or horizontal line near the chosen 'round number' limit. The new default sets the view limits to 5\% wider than the data range. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-16}.pdf} \end{figure} The size of the padding in the x and y directions is controlled by the \sphinxcode{\sphinxupquote{'axes.xmargin'}} and \sphinxcode{\sphinxupquote{'axes.ymargin'}} rcParams respectively. Whether the view limits should be 'round numbers' is controlled by the \sphinxcode{\sphinxupquote{'axes.autolimit\_mode'}} rcParam. In the original \sphinxcode{\sphinxupquote{'round\_number'}} mode, the view limits coincide with ticks. The previous default can be restored by using: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.autolimit\PYGZus{}mode}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{round\PYGZus{}numbers}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.xmargin}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{0} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.ymargin}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{0} \end{sphinxVerbatim} or setting: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{autolimit\PYGZus{}mode}\PYG{p}{:} \PYG{n}{round\PYGZus{}numbers} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{xmargin}\PYG{p}{:} \PYG{l+m+mi}{0} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{ymargin}\PYG{p}{:} \PYG{l+m+mi}{0} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{Z-order} \label{\detokenize{users/dflt_style_changes:z-order}}\begin{itemize} \item {} Ticks and grids are now plotted above solid elements such as filled contours, but below lines. To return to the previous behavior of plotting ticks and grids above lines, set \sphinxcode{\sphinxupquote{rcParams{[}'axes.axisbelow'{]} = False}}. \end{itemize} \subparagraph{Ticks} \label{\detokenize{users/dflt_style_changes:ticks}} \subparagraph{Direction} \label{\detokenize{users/dflt_style_changes:direction}} To reduce the collision of tick marks with data, the default ticks now point outward by default. In addition, ticks are now drawn only on the bottom and left spines to prevent a porcupine appearance, and for a cleaner separation between subplots. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-17}.pdf} \end{figure} To restore the previous behavior set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xtick.direction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{in}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ytick.direction}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{in}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xtick.top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ytick.right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{k+kc}{True} \end{sphinxVerbatim} or set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xtick}\PYG{o}{.}\PYG{n}{top}\PYG{p}{:} \PYG{k+kc}{True} \PYG{n}{xtick}\PYG{o}{.}\PYG{n}{direction}\PYG{p}{:} \PYG{o+ow}{in} \PYG{n}{ytick}\PYG{o}{.}\PYG{n}{right}\PYG{p}{:} \PYG{k+kc}{True} \PYG{n}{ytick}\PYG{o}{.}\PYG{n}{direction}\PYG{p}{:} \PYG{o+ow}{in} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subparagraph{Number of ticks} \label{\detokenize{users/dflt_style_changes:number-of-ticks}} The default {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} used for the x and y axis is {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoLocator}}}}} which tries to find, up to some maximum number, 'nicely' spaced ticks. The locator now includes an algorithm to estimate the maximum number of ticks that will leave room for the tick labels. By default it also ensures that there are at least two ticks visible. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-18}.pdf} \end{figure} There is no way, other than using \sphinxcode{\sphinxupquote{mpl.style.use('classic')}}, to restore the previous behavior as the default. On an axis-by-axis basis you may either control the existing locator via: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{get\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{set\PYGZus{}params}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{9}\PYG{p}{,} \PYG{n}{steps}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} or create a new {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{as} \PYG{n+nn}{mticker} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{mticker}\PYG{o}{.}\PYG{n}{MaxNLocator}\PYG{p}{(}\PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{9}\PYG{p}{,} \PYG{n}{steps}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} The algorithm used by {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} has been improved, and this may change the choice of tick locations in some cases. This also affects {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoLocator}}}}}, which uses \sphinxcode{\sphinxupquote{MaxNLocator}} internally. For a log-scaled axis the default locator is the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}}. Previously the maximum number of ticks was set to 15, and could not be changed. Now there is a \sphinxcode{\sphinxupquote{numticks}} kwarg for setting the maximum to any integer value, to the string 'auto', or to its default value of None which is equivalent to 'auto'. With the 'auto' setting the maximum number will be no larger than 9, and will be reduced depending on the length of the axis in units of the tick font size. As in the case of the AutoLocator, the heuristic algorithm reduces the incidence of overlapping tick labels but does not prevent it. \subparagraph{Tick label formatting} \label{\detokenize{users/dflt_style_changes:tick-label-formatting}} \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{LogFormatter}} labeling of minor ticks} \label{\detokenize{users/dflt_style_changes:logformatter-labeling-of-minor-ticks}} Minor ticks on a log axis are now labeled when the axis view limits span a range less than or equal to the interval between two major ticks. See {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatter}}}}} for details. The minor tick labeling is turned off when using \sphinxcode{\sphinxupquote{mpl.style.use('classic')}}, but cannot be controlled independently via \sphinxcode{\sphinxupquote{rcParams}}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-19}.pdf} \end{figure} \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{ScalarFormatter}} tick label formatting with offsets} \label{\detokenize{users/dflt_style_changes:scalarformatter-tick-label-formatting-with-offsets}} With the default of \sphinxcode{\sphinxupquote{rcParams{[}'axes.formatter.useoffset'{]} = True}}, an offset will be used when it will save 4 or more digits. This can be controlled with the new rcParam, \sphinxcode{\sphinxupquote{axes.formatter.offset\_threshold}}. To restore the previous behavior of using an offset to save 2 or more digits, use \sphinxcode{\sphinxupquote{rcParams{[}'axes.formatter.offset\_threshold'{]} = 2}}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dflt_style_changes-20}.pdf} \end{figure} \subparagraph{\sphinxstyleliteralintitle{\sphinxupquote{AutoDateFormatter}} format strings} \label{\detokenize{users/dflt_style_changes:autodateformatter-format-strings}} The default date formats are now all based on ISO format, i.e., with the slowest-moving value first. The date formatters are configurable through the \sphinxcode{\sphinxupquote{date.autoformatter.*}} rcParams. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline \sphinxstyletheadfamily Threshold (tick interval \textgreater{}= than) &\sphinxstyletheadfamily rcParam &\sphinxstyletheadfamily classic &\sphinxstyletheadfamily v2.0 \\ \hline 365 days & \sphinxcode{\sphinxupquote{'date.autoformatter.year'}} & \sphinxcode{\sphinxupquote{'\%Y'}} & \sphinxcode{\sphinxupquote{'\%Y'}} \\ \hline 30 days & \sphinxcode{\sphinxupquote{'date.autoformatter.month'}} & \sphinxcode{\sphinxupquote{'\%b \%Y'}} & \sphinxcode{\sphinxupquote{'\%Y-\%m'}} \\ \hline 1 day & \sphinxcode{\sphinxupquote{'date.autoformatter.day'}} & \sphinxcode{\sphinxupquote{'\%b \%d \%Y'}} & \sphinxcode{\sphinxupquote{'\%Y-\%m-\%d'}} \\ \hline 1 hour & \sphinxcode{\sphinxupquote{'date.autoformatter.hour'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S'}} & \sphinxcode{\sphinxupquote{'\%H:\%M'}} \\ \hline 1 minute & \sphinxcode{\sphinxupquote{'date.autoformatter.minute'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S.\%f'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S'}} \\ \hline 1 second & \sphinxcode{\sphinxupquote{'date.autoformatter.second'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S.\%f'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S'}} \\ \hline 1 microsecond & \sphinxcode{\sphinxupquote{'date.autoformatter.microsecond'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S.\%f'}} & \sphinxcode{\sphinxupquote{'\%H:\%M:\%S.\%f'}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Python's \sphinxcode{\sphinxupquote{\%x}} and \sphinxcode{\sphinxupquote{\%X}} date formats may be of particular interest to format dates based on the current locale. The previous default can be restored by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.year}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.month}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b }\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.day}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b }\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.hour}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.minute}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S.}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.second}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S.}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformatter.microsecond}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S.}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or setting \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{year} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{Y} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{month} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{b} \PYG{o}{\PYGZpc{}}\PYG{n}{Y} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{day} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{b} \PYG{o}{\PYGZpc{}}\PYG{n}{d} \PYG{o}{\PYGZpc{}}\PYG{n}{Y} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{hour} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{H}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{M}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{S} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{minute} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{H}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{M}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{S}\PYG{o}{.}\PYG{o}{\PYGZpc{}}\PYG{n}{f} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{second} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{H}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{M}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{S}\PYG{o}{.}\PYG{o}{\PYGZpc{}}\PYG{n}{f} \PYG{n}{date}\PYG{o}{.}\PYG{n}{autoformatter}\PYG{o}{.}\PYG{n}{microsecond} \PYG{p}{:} \PYG{o}{\PYGZpc{}}\PYG{n}{H}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{M}\PYG{p}{:}\PYG{o}{\PYGZpc{}}\PYG{n}{S}\PYG{o}{.}\PYG{o}{\PYGZpc{}}\PYG{n}{f} \end{sphinxVerbatim} in your \sphinxcode{\sphinxupquote{matplotlibrc}} file. \paragraph{mplot3d} \label{\detokenize{users/dflt_style_changes:mplot3d}}\begin{itemize} \item {} mplot3d now obeys some style-related rcParams, rather than using hard-coded defaults. These include: \begin{itemize} \item {} xtick.major.width \item {} ytick.major.width \item {} xtick.color \item {} ytick.color \item {} axes.linewidth \item {} axes.edgecolor \item {} grid.color \item {} grid.linewidth \item {} grid.linestyle \end{itemize} \end{itemize} \subsection{Improved color conversion API and RGBA support} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:improved-color-conversion-api-and-rgba-support}} The {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors}}}}} gained a new color conversion API with full support for the alpha channel. The main public functions are {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.is_color_like:matplotlib.colors.is_color_like}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_color\_like()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba:matplotlib.colors.to_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.to\_rgba()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array:matplotlib.colors.to_rgba_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.to\_rgba\_array()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_hex:matplotlib.colors.to_hex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_hex()}}}}}. RGBA quadruplets are encoded in hex format as \sphinxcode{\sphinxupquote{\#rrggbbaa}}. A side benefit is that the Qt options editor now allows setting the alpha channel of the artists as well. \subsection{New Configuration (rcParams)} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:new-configuration-rcparams}} New rcparams added \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Parameter &\sphinxstyletheadfamily Description \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.year}} & format string for 'year' scale dates \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.month}} & format string for 'month' scale dates \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.day}} & format string for 'day' scale dates \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.hour}} & format string for 'hour' scale times \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.minute}} & format string for 'minute' scale times \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.second}} & format string for 'second' scale times \\ \hline \sphinxcode{\sphinxupquote{date.autoformatter.microsecond}} & format string for 'microsecond' scale times \\ \hline \sphinxcode{\sphinxupquote{scatter.marker}} & default marker for scatter plot \\ \hline \sphinxcode{\sphinxupquote{svg.hashsalt}} & see note \\ \hline \sphinxcode{\sphinxupquote{xtick.top}}, \sphinxcode{\sphinxupquote{xtick.minor.top}}, \sphinxcode{\sphinxupquote{xtick.major.top}} \sphinxcode{\sphinxupquote{xtick.bottom}}, \sphinxcode{\sphinxupquote{xtick.minor.bottom}}, \sphinxcode{\sphinxupquote{xtick.major.bottom}} \sphinxcode{\sphinxupquote{ytick.left}}, \sphinxcode{\sphinxupquote{ytick.minor.left}}, \sphinxcode{\sphinxupquote{ytick.major.left}} \sphinxcode{\sphinxupquote{ytick.right}}, \sphinxcode{\sphinxupquote{ytick.minor.right}}, \sphinxcode{\sphinxupquote{ytick.major.right}} & Control where major and minor ticks are drawn. The global values are \sphinxcode{\sphinxupquote{and}} ed with the corresponding major/minor values. \\ \hline \sphinxcode{\sphinxupquote{hist.bins}} & The default number of bins to use in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist}}}}}. This can be an \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#int}{\sphinxcode{\sphinxupquote{int}}}, a list of floats, or \sphinxcode{\sphinxupquote{'auto'}} if numpy \textgreater{}= 1.11 is installed. \\ \hline \sphinxcode{\sphinxupquote{lines.scale\_dashes}} & Whether the line dash patterns should scale with linewidth. \\ \hline \sphinxcode{\sphinxupquote{axes.formatter.offset\_threshold}} & Minimum number of digits saved in tick labels that triggers using an offset. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsubsection{Added \sphinxstyleliteralintitle{\sphinxupquote{svg.hashsalt}} key to rcParams} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:added-svg-hashsalt-key-to-rcparams}} If \sphinxcode{\sphinxupquote{svg.hashsalt}} is \sphinxcode{\sphinxupquote{None}} (which it is by default), the svg backend uses \sphinxcode{\sphinxupquote{uuid4}} to generate the hash salt. If it is not \sphinxcode{\sphinxupquote{None}}, it must be a string that is used as the hash salt instead of \sphinxcode{\sphinxupquote{uuid4}}. This allows for deterministic SVG output. \subsubsection{Removed the \sphinxstyleliteralintitle{\sphinxupquote{svg.image\_noscale}} rcParam} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:removed-the-svg-image-noscale-rcparam}} As a result of the extensive changes to image handling, the \sphinxcode{\sphinxupquote{svg.image\_noscale}} rcParam has been removed. The same functionality may be achieved by setting \sphinxcode{\sphinxupquote{interpolation='none'}} on individual images or globally using the \sphinxcode{\sphinxupquote{image.interpolation}} rcParam. \subsection{Qualitative colormaps} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:qualitative-colormaps}} ColorBrewer's "qualitative" colormaps ("Accent", "Dark2", "Paired", "Pastel1", "Pastel2", "Set1", "Set2", "Set3") were intended for discrete categorical data, with no implication of value, and therefore have been converted to \sphinxcode{\sphinxupquote{ListedColormap}} instead of \sphinxcode{\sphinxupquote{LinearSegmentedColormap}}, so the colors will no longer be interpolated and they can be used for choropleths, labeled image features, etc. \subsection{Axis offset label now responds to \sphinxstyleliteralintitle{\sphinxupquote{labelcolor}}} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:axis-offset-label-now-responds-to-labelcolor}} Axis offset labels are now colored the same as axis tick markers when \sphinxcode{\sphinxupquote{labelcolor}} is altered. \subsection{Improved offset text choice} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:improved-offset-text-choice}} The default offset-text choice was changed to only use significant digits that are common to all ticks (e.g. 1231..1239 -\textgreater{} 1230, instead of 1231), except when they straddle a relatively large multiple of a power of ten, in which case that multiple is chosen (e.g. 1999..2001-\textgreater{}2000). \subsection{Style parameter blacklist} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:style-parameter-blacklist}} In order to prevent unexpected consequences from using a style, style files are no longer able to set parameters that affect things unrelated to style. These parameters include: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{interactive}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{backend}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{backend.qt4}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{webagg.port}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{webagg.port\PYGZus{}retries}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{webagg.open\PYGZus{}in\PYGZus{}browser}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{backend\PYGZus{}fallback}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{toolbar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{timezone}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{datapath}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{figure.max\PYGZus{}open\PYGZus{}warning}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{savefig.directory}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tk.window\PYGZus{}focus}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{docstring.hardcopy}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \subsection{Change in default font} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:change-in-default-font}} The default font used by matplotlib in text has been changed to DejaVu Sans and DejaVu Serif for the sans-serif and serif families, respectively. The DejaVu font family is based on the previous matplotlib default --Bitstream Vera-- but includes a much wider range of characters. The default mathtext font has been changed from Computer Modern to the DejaVu family to maintain consistency with regular text. Two new options for the \sphinxcode{\sphinxupquote{mathtext.fontset}} configuration parameter have been added: \sphinxcode{\sphinxupquote{dejavusans}} (default) and \sphinxcode{\sphinxupquote{dejavuserif}}. Both of these options use DejaVu glyphs whenever possible and fall back to STIX symbols when a glyph is not found in DejaVu. To return to the previous behavior, set the rcParam \sphinxcode{\sphinxupquote{mathtext.fontset}} to \sphinxcode{\sphinxupquote{cm}}. \subsection{Faster text rendering} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:faster-text-rendering}} Rendering text in the Agg backend is now less fuzzy and about 20\% faster to draw. \subsection{Improvements for the Qt figure options editor} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:improvements-for-the-qt-figure-options-editor}} Various usability improvements were implemented for the Qt figure options editor, among which: \begin{itemize} \item {} Line style entries are now sorted without duplicates. \item {} The colormap and normalization limits can now be set for images. \item {} Line edits for floating values now display only as many digits as necessary to avoid precision loss. An important bug was also fixed regarding input validation using Qt5 and a locale where the decimal separator is ",". \item {} The axes selector now uses shorter, more user-friendly names for axes, and does not crash if there are no axes. \item {} Line and image entries using the default labels ("\_lineX", "\_imageX") are now sorted numerically even when there are more than 10 entries. \end{itemize} \subsection{Improved image support} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:improved-image-support}} Prior to version 2.0, matplotlib resampled images by first applying the color map and then resizing the result. Since the resampling was performed on the colored image, this introduced colors in the output image that didn't actually exist in the color map. Now, images are resampled first (and entirely in floating-point, if the input image is floating-point), and then the color map is applied. In order to make this important change, the image handling code was almost entirely rewritten. As a side effect, image resampling uses less memory and fewer datatype conversions than before. The experimental private feature where one could "skew" an image by setting the private member \sphinxcode{\sphinxupquote{\_image\_skew\_coordinate}} has been removed. Instead, images will obey the transform of the axes on which they are drawn. \subsubsection{Non-linear scales on image plots} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:non-linear-scales-on-image-plots}} \sphinxcode{\sphinxupquote{imshow()}} now draws data at the requested points in data space after the application of non-linear scales. The image on the left demonstrates the new, correct behavior. The old behavior can be recreated using \sphinxcode{\sphinxupquote{pcolormesh()}} as demonstrated on the right. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-0-0-1}.pdf} \end{figure} This can be understood by analogy to plotting a histogram with linearly spaced bins with a logarithmic x-axis. Equal sized bins will be displayed as wider for small \sphinxstyleemphasis{x} and narrower for large \sphinxstyleemphasis{x}. \subsection{Support for HiDPI (Retina) displays in the NbAgg and WebAgg backends} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:support-for-hidpi-retina-displays-in-the-nbagg-and-webagg-backends}} The NbAgg and WebAgg backends will now use the full resolution of your high-pixel-density display. \subsection{Change in the default animation codec} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:change-in-the-default-animation-codec}} The default animation codec has been changed from \sphinxcode{\sphinxupquote{mpeg4}} to \sphinxcode{\sphinxupquote{h264}}, which is more efficient. It can be set via the \sphinxcode{\sphinxupquote{animation.codec}} rcParam. \subsection{Deprecated support for mencoder in animation} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:deprecated-support-for-mencoder-in-animation}} The use of mencoder for writing video files with mpl is problematic; switching to ffmpeg is strongly advised. All support for mencoder will be removed in version 2.2. \subsection{Boxplot Zorder Keyword Argument} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:boxplot-zorder-keyword-argument}} The \sphinxcode{\sphinxupquote{zorder}} parameter now exists for \sphinxcode{\sphinxupquote{boxplot()}}. This allows the zorder of a boxplot to be set in the plotting function call. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{boxplot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{zorder}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Filled \sphinxstyleliteralintitle{\sphinxupquote{+}} and \sphinxstyleliteralintitle{\sphinxupquote{x}} markers} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:filled-and-x-markers}} New fillable \sphinxstyleemphasis{plus} and \sphinxstyleemphasis{x} markers have been added. See the {\hyperref[\detokenize{api/markers_api:module-matplotlib.markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markers}}}}} module and \DUrole{xref,std,std-doc}{marker reference} examples. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{rcount}} and \sphinxstyleliteralintitle{\sphinxupquote{ccount}} for \sphinxstyleliteralintitle{\sphinxupquote{plot\_surface()}}} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:rcount-and-ccount-for-plot-surface}} As of v2.0, mplot3d's \sphinxcode{\sphinxupquote{plot\_surface()}} now accepts \sphinxcode{\sphinxupquote{rcount}} and \sphinxcode{\sphinxupquote{ccount}} arguments for controlling the sampling of the input data for plotting. These arguments specify the maximum number of evenly spaced samples to take from the input data. These arguments are also the new default sampling method for the function, and is considered a style change. The old \sphinxcode{\sphinxupquote{rstride}} and \sphinxcode{\sphinxupquote{cstride}} arguments, which specified the size of the evenly spaced samples, become the default when 'classic' mode is invoked, and are still available for use. There are no plans for deprecating these arguments. \subsection{Streamplot Zorder Keyword Argument Changes} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:streamplot-zorder-keyword-argument-changes}} The \sphinxcode{\sphinxupquote{zorder}} parameter for \sphinxcode{\sphinxupquote{streamplot()}} now has default value of \sphinxcode{\sphinxupquote{None}} instead of \sphinxcode{\sphinxupquote{2}}. If \sphinxcode{\sphinxupquote{None}} is given as \sphinxcode{\sphinxupquote{zorder}}, \sphinxcode{\sphinxupquote{streamplot()}} has a default \sphinxcode{\sphinxupquote{zorder}} of \sphinxcode{\sphinxupquote{matplotlib.lines.Line2D.zorder}}. \subsection{Extension to \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}} \label{\detokenize{users/prev_whats_new/whats_new_2.0.0:extension-to-matplotlib-backend-bases-graphicscontextbase}}\label{\detokenize{users/prev_whats_new/whats_new_2.0.0:gc-get-hatch-color-wn}} To support standardizing hatch behavior across the backends we ship the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase.get\_hatch\_color}}}}} method as added to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}}. This is only used during the render process in the backends we ship so will not break any third-party backends. If you maintain a third-party backend which extends {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}} this method is now available to you and should be used to color hatch patterns. \section{New in Matplotlib 2.1.0} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-in-matplotlib-2-1-0}}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0:whats-new-2-1-0}}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0::doc}} \subsection{Documentation} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:documentation}} The examples have been migrated to use \sphinxhref{https://sphinx-gallery.readthedocs.io/en/latest/}{sphinx gallery}. This allows better mixing of prose and code in the examples, provides links to download the examples as both a Python script and a Jupyter notebook, and improves the thumbnail galleries. The examples have been re-organized into {\hyperref[\detokenize{tutorials/index:tutorials}]{\sphinxcrossref{\DUrole{std,std-ref}{Tutorials}}}} and a \DUrole{xref,std,std-ref}{gallery}. Many docstrings and examples have been clarified and improved. \subsection{New features} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-features}} \subsubsection{String categorical values} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:string-categorical-values}} All plotting functions now support string categorical values as input. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{data} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{apples}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{oranges}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{15}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lemons}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{limes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{20}\PYG{p}{\PYGZcb{}} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{bar}\PYG{p}{(}\PYG{n}{data}\PYG{o}{.}\PYG{n}{keys}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{data}\PYG{o}{.}\PYG{n}{values}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lightgray}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-1-0-1}.pdf} \end{figure} \subsubsection{Interactive JS widgets for animation} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:interactive-js-widgets-for-animation}} Jake Vanderplas' JSAnimation package has been merged into Matplotlib. This adds to Matplotlib the \sphinxcode{\sphinxupquote{HTMLWriter}} class for generating a JavaScript HTML animation, suitable for the IPython notebook. This can be activated by default by setting the \sphinxcode{\sphinxupquote{animation.html}} rc parameter to \sphinxcode{\sphinxupquote{jshtml}}. One can also call the {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_jshtml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_jshtml}}}}} method to manually convert an animation. This can be displayed using IPython's \sphinxcode{\sphinxupquote{HTML}} display class: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{IPython}\PYG{n+nn}{.}\PYG{n+nn}{display} \PYG{k}{import} \PYG{n}{HTML} \PYG{n}{HTML}\PYG{p}{(}\PYG{n}{animation}\PYG{o}{.}\PYG{n}{to\PYGZus{}jshtml}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} The \sphinxcode{\sphinxupquote{HTMLWriter}} class can also be used to generate an HTML file by asking for the \sphinxcode{\sphinxupquote{html}} writer. \subsubsection{Enhancements to polar plot} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:enhancements-to-polar-plot}} The polar axes transforms have been greatly re-factored to allow for more customization of view limits and tick labelling. Additional options for view limits allow for creating an annulus, a sector, or some combination of the two. The {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rorigin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_rorigin()}}}}} method may be used to provide an offset to the minimum plotting radius, producing an annulus. The {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_theta_zero_location}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_theta\_zero\_location()}}}}} method now has an optional \sphinxcode{\sphinxupquote{offset}} argument. This argument may be used to further specify the zero location based on the given anchor point. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pie\_and\_polar\_charts/polar\_scatter.html\#scatter-plot-on-polar-axis-with-offset-origin}{\sphinxincludegraphics[scale=0.7]{{sphx_glr_polar_scatter_002}.png}} \caption{Polar Offset Demo}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0:id1}}\end{figure} The {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetamin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_thetamin()}}}}} and {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetamax}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_thetamax()}}}}} methods may be used to limit the range of angles plotted, producing sectors of a circle. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/pie\_and\_polar\_charts/polar\_scatter.html\#scatter-plot-on-polar-axis-confined-to-a-sector}{\sphinxincludegraphics[scale=0.7]{{sphx_glr_polar_scatter_003}.png}} \caption{Polar Sector Demo}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0:id2}}\end{figure} Previous releases allowed plots containing negative radii for which the negative values are simply used as labels, and the real radius is shifted by the configured minimum. This release also allows negative radii to be used for grids and ticks, which were previously silently ignored. Radial ticks have been modified to be parallel to the circular grid line, and angular ticks have been modified to be parallel to the grid line. It may also be useful to rotate tick \sphinxstyleemphasis{labels} to match the boundary. Calling \sphinxcode{\sphinxupquote{ax.tick\_params(rotation='auto')}} will enable the new behavior: radial tick labels will be parallel to the circular grid line, and angular tick labels will be perpendicular to the grid line (i.e., parallel to the outer boundary). Additionally, tick labels now obey the padding settings that previously only worked on Cartesian plots. Consequently, the \sphinxcode{\sphinxupquote{frac}} argument to {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolarAxes.set\_thetagrids}}}}} is no longer applied. Tick padding can be modified with the \sphinxcode{\sphinxupquote{pad}} argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tick\_params}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib.axis.Axis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_tick\_params}}}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Figure}} class now has \sphinxstyleliteralintitle{\sphinxupquote{subplots}} method} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:figure-class-now-has-subplots-method}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} class now has a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} method which behaves the same as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots()}}}}} but on an existing figure. \subsubsection{Metadata savefig keyword argument} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:metadata-savefig-keyword-argument}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} now accepts \sphinxcode{\sphinxupquote{metadata}} as a keyword argument. It can be used to store key/value pairs in the image metadata. \begin{itemize} \item {} 'png' with Agg backend \item {} 'pdf' with PDF backend (see {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeInfoDict}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{writeInfoDict()}}}}} for a list of supported keywords) \item {} 'eps' and 'ps' with PS backend (only 'Creator' key is accepted) \end{itemize} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{test.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{metadata}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Software}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{My awesome software}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Busy Cursor} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:busy-cursor}} The interactive GUI backends will now change the cursor to busy when Matplotlib is rendering the canvas. \subsubsection{PolygonSelector} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:polygonselector}} A {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.PolygonSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolygonSelector}}}}} class has been added to {\hyperref[\detokenize{api/widgets_api:module-matplotlib.widgets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets}}}}}. See \DUrole{xref,std,std-doc}{/gallery/widgets/polygon\_selector\_demo} for details. \subsubsection{Added \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.ticker.PercentFormatter}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:added-matplotlib-ticker-percentformatter}} The new {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PercentFormatter}}}}} formatter has some nice features like being able to convert from arbitrary data scales to percents, a customizable percent symbol and either automatic or manual control over the decimal points. \subsubsection{Reproducible PS, PDF and SVG output} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:reproducible-ps-pdf-and-svg-output}} The \sphinxcode{\sphinxupquote{SOURCE\_DATE\_EPOCH}} environment variable can now be used to set the timestamp value in the PS and PDF outputs. See \sphinxhref{https://reproducible-builds.org/specs/source-date-epoch/}{source date epoch}. Alternatively, calling \sphinxcode{\sphinxupquote{savefig}} with \sphinxcode{\sphinxupquote{metadata=\{'CreationDate': None\}}} will omit the timestamp altogether for the PDF backend. The reproducibility of the output from the PS and PDF backends has so far been tested using various plot elements but only default values of options such as \sphinxcode{\sphinxupquote{\{ps,pdf\}.fonttype}} that can affect the output at a low level, and not with the mathtext or usetex features. When Matplotlib calls external tools (such as PS distillers or LaTeX) their versions need to be kept constant for reproducibility, and they may add sources of nondeterminism outside the control of Matplotlib. For SVG output, the \sphinxcode{\sphinxupquote{svg.hashsalt}} rc parameter has been added in an earlier release. This parameter changes some random identifiers in the SVG file to be deterministic. The downside of this setting is that if more than one file is generated using deterministic identifiers and they end up as parts of one larger document, the identifiers can collide and cause the different parts to affect each other. These features are now enabled in the tests for the PDF and SVG backends, so most test output files (but not all of them) are now deterministic. \subsubsection{Orthographic projection for mplot3d} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:orthographic-projection-for-mplot3d}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D}}}}} now accepts \sphinxcode{\sphinxupquote{proj\_type}} keyword argument and has a method {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_proj\_type()}}}}}. The default option is \sphinxcode{\sphinxupquote{'persp'}} as before, and supplying \sphinxcode{\sphinxupquote{'ortho'}} enables orthographic view. Compare the z-axis which is vertical in orthographic view, but slightly skewed in the perspective view. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k+kn}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits.mplot3d} \PYG{k+kn}{import} \PYG{n}{Axes3D} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}proj\PYGZus{}type}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{persp}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Perspective (default)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}proj\PYGZus{}type}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ortho}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Orthographic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-1-0-2}.pdf} \end{figure} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{voxels}} function for mplot3d} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:voxels-function-for-mplot3d}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D}}}}} now has a {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.voxels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{voxels}}}}} method, for visualizing boolean 3D data. Uses could include plotting a sparse 3D heat map, or visualizing a volumetric model. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/voxels\_numpy\_logo.html}{\sphinxincludegraphics[scale=0.7]{{sphx_glr_voxels_numpy_logo_001}.png}} \caption{Voxel Demo}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0:id3}}\end{figure} \subsection{Improvements} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:improvements}} \subsubsection{CheckButtons widget \sphinxstyleliteralintitle{\sphinxupquote{get\_status}} function} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:checkbuttons-widget-get-status-function}} A {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.get_status}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_status()}}}}} method has been added to the {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.CheckButtons}}}}} class. This \sphinxcode{\sphinxupquote{get\_status}} method allows user to query the status (True/False) of all of the buttons in the \sphinxcode{\sphinxupquote{CheckButtons}} object. \subsubsection{Add \sphinxstyleliteralintitle{\sphinxupquote{fill\_bar}} argument to \sphinxstyleliteralintitle{\sphinxupquote{AnchoredSizeBar}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:add-fill-bar-argument-to-anchoredsizebar}} The \sphinxcode{\sphinxupquote{mpl\_toolkits}} class {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredSizeBar}}}}} now has an additional \sphinxcode{\sphinxupquote{fill\_bar}} argument, which makes the size bar a solid rectangle instead of just drawing the border of the rectangle. The default is \sphinxcode{\sphinxupquote{None}}, and whether or not the bar will be filled by default depends on the value of \sphinxcode{\sphinxupquote{size\_vertical}}. If \sphinxcode{\sphinxupquote{size\_vertical}} is nonzero, \sphinxcode{\sphinxupquote{fill\_bar}} will be set to \sphinxcode{\sphinxupquote{True}}. If \sphinxcode{\sphinxupquote{size\_vertical}} is zero then \sphinxcode{\sphinxupquote{fill\_bar}} will be set to \sphinxcode{\sphinxupquote{False}}. If you wish to override this default behavior, set \sphinxcode{\sphinxupquote{fill\_bar}} to \sphinxcode{\sphinxupquote{True}} or \sphinxcode{\sphinxupquote{False}} to unconditionally always or never use a filled patch rectangle for the size bar. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits.axes\PYGZus{}grid1.anchored\PYGZus{}artists} \PYG{k+kn}{import} \PYG{n}{AnchoredSizeBar} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{bar0} \PYG{o}{=} \PYG{n}{AnchoredSizeBar}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{unfilled}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{n+nb+bp}{False}\PYG{p}{,} \PYG{n}{size\PYGZus{}vertical}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{n}{fill\PYGZus{}bar}\PYG{o}{=}\PYG{n+nb+bp}{False}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{bar0}\PYG{p}{)} \PYG{n}{bar1} \PYG{o}{=} \PYG{n}{AnchoredSizeBar}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{filled}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{n+nb+bp}{False}\PYG{p}{,} \PYG{n}{size\PYGZus{}vertical}\PYG{o}{=}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{n}{fill\PYGZus{}bar}\PYG{o}{=}\PYG{n+nb+bp}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{bar1}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-1-0-3}.pdf} \end{figure} \subsubsection{Annotation can use a default arrow style} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:annotation-can-use-a-default-arrow-style}} Annotations now use the default arrow style when setting \sphinxcode{\sphinxupquote{arrowprops=\{\}}}, rather than no arrow (the new behavior actually matches the documentation). \subsubsection{Barbs and Quiver Support Dates} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:barbs-and-quiver-support-dates}} When using the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver:matplotlib.axes.Axes.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs:matplotlib.axes.Axes.barbs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barbs()}}}}} plotting methods, it is now possible to pass dates, just like for other methods like {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. This also allows these functions to handle values that need unit-conversion applied. \subsubsection{Hexbin default line color} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:hexbin-default-line-color}} The default \sphinxcode{\sphinxupquote{linecolor}} keyword argument for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hexbin:matplotlib.axes.Axes.hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hexbin()}}}}} is now \sphinxcode{\sphinxupquote{'face'}}, and supplying \sphinxcode{\sphinxupquote{'none'}} now prevents lines from being drawn around the hexagons. \subsubsection{Figure.legend() can be called without arguments} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:figure-legend-can-be-called-without-arguments}} Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend()}}}}} can now be done with no arguments. In this case a legend will be created that contains all the artists on all the axes contained within the figure. \subsubsection{Multiple legend keys for legend entries} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:multiple-legend-keys-for-legend-entries}} A legend entry can now contain more than one legend key. The extended {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerTuple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerTuple}}}}} class now accepts two parameters: \sphinxcode{\sphinxupquote{ndivide}} divides the legend area in the specified number of sections; \sphinxcode{\sphinxupquote{pad}} changes the padding between the legend keys. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/text\_labels\_and\_annotations/legend\_demo.html}{\sphinxincludegraphics[scale=0.7]{{sphx_glr_legend_demo_004}.png}} \caption{Multiple Legend Keys}\label{\detokenize{users/prev_whats_new/whats_new_2.1.0:id4}}\end{figure} \subsubsection{New parameter \sphinxstyleliteralintitle{\sphinxupquote{clear}} for \sphinxstyleliteralintitle{\sphinxupquote{figure()}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-parameter-clear-for-figure}} When the pyplot's function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}} is called with a \sphinxcode{\sphinxupquote{num}} parameter, a new window is only created if no existing window with the same value exists. A new bool parameter \sphinxcode{\sphinxupquote{clear}} was added for explicitly clearing its existing contents. This is particularly useful when utilized in interactive sessions. Since {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} also accepts keyword arguments from {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}, it can also be used there: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig0} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{num}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{fig0}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{A fancy plot}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fig0.texts: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{p}{[}\PYG{n}{t}\PYG{o}{.}\PYG{n}{get\PYGZus{}text}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{t} \PYG{o+ow}{in} \PYG{n}{fig0}\PYG{o}{.}\PYG{n}{texts}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{num}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{clear}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} do not clear contents of window} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Really fancy!}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fig0 is fig1: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fig0} \PYG{o+ow}{is} \PYG{n}{fig1}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fig1.texts: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{p}{[}\PYG{n}{t}\PYG{o}{.}\PYG{n}{get\PYGZus{}text}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{t} \PYG{o+ow}{in} \PYG{n}{fig1}\PYG{o}{.}\PYG{n}{texts}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig2}\PYG{p}{,} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{num}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{clear}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} clear contents} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fig0 is fig2: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fig0} \PYG{o+ow}{is} \PYG{n}{fig2}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fig2.texts: }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{p}{[}\PYG{n}{t}\PYG{o}{.}\PYG{n}{get\PYGZus{}text}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{t} \PYG{o+ow}{in} \PYG{n}{fig2}\PYG{o}{.}\PYG{n}{texts}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} The output:} \PYG{c+c1}{\PYGZsh{} fig0.texts: [\PYGZsq{}A fancy plot\PYGZsq{}]} \PYG{c+c1}{\PYGZsh{} fig0 is fig1: True} \PYG{c+c1}{\PYGZsh{} fig1.texts: [\PYGZsq{}A fancy plot\PYGZsq{}, \PYGZsq{}Really fancy!\PYGZsq{}]} \PYG{c+c1}{\PYGZsh{} fig0 is fig2: True} \PYG{c+c1}{\PYGZsh{} fig2.texts: []} \end{sphinxVerbatim} \subsubsection{Specify minimum value to format as scalar for \sphinxstyleliteralintitle{\sphinxupquote{LogFormatterMathtext}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:specify-minimum-value-to-format-as-scalar-for-logformattermathtext}} {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterMathtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatterMathtext}}}}} now includes the option to specify a minimum value exponent to format as a scalar (i.e., 0.001 instead of 10$^{\text{-3}}$). \subsubsection{New quiverkey angle keyword argument} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-quiverkey-angle-keyword-argument}} Plotting a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:matplotlib.axes.Axes.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiverkey()}}}}} now admits the \sphinxcode{\sphinxupquote{angle}} keyword argument, which sets the angle at which to draw the key arrow. \subsubsection{Colormap reversed method} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:colormap-reversed-method}} The methods {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.reversed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.LinearSegmentedColormap.reversed()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap.reversed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.ListedColormap.reversed()}}}}} return a reversed instance of the Colormap. This implements a way for any Colormap to be reversed. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Artist.setp}} (and \sphinxstyleliteralintitle{\sphinxupquote{pyplot.setp}}) accept a \sphinxstyleliteralintitle{\sphinxupquote{file}} argument} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:artist-setp-and-pyplot-setp-accept-a-file-argument}} The argument is keyword-only. It allows an output file other than \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.stdout}{\sphinxcode{\sphinxupquote{sys.stdout}}} to be specified. It works exactly like the \sphinxcode{\sphinxupquote{file}} argument to \sphinxhref{https://docs.python.org/3/library/functions.html\#print}{\sphinxcode{\sphinxupquote{print}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{streamplot}} streamline generation more configurable} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:streamplot-streamline-generation-more-configurable}} The starting point, direction, and length of the stream lines can now be configured. This allows to follow the vector field for a longer time and can enhance the visibility of the flow pattern in some use cases. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axis.set\_tick\_params}} now responds to \sphinxstyleliteralintitle{\sphinxupquote{rotation}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:axis-set-tick-params-now-responds-to-rotation}} Bulk setting of tick label rotation is now possible via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params()}}}}} using the \sphinxcode{\sphinxupquote{rotation}} keyword. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{which}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{90}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Ticklabels are turned off instead of being invisible} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:ticklabels-are-turned-off-instead-of-being-invisible}} Internally, the \sphinxcode{\sphinxupquote{Tick}}'s \sphinxcode{\sphinxupquote{label1On()}} attribute is now used to hide tick labels instead of setting the visibility on the tick label objects. This improves overall performance and fixes some issues. As a consequence, in case those labels ought to be shown, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params()}}}}} needs to be used, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{labelbottom}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Shading in 3D bar plots} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:shading-in-3d-bar-plots}} A new \sphinxcode{\sphinxupquote{shade}} parameter has been added the 3D {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}}}}} plotting method. The default behavior remains to shade the bars, but now users have the option of setting \sphinxcode{\sphinxupquote{shade}} to \sphinxcode{\sphinxupquote{False}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k+kn}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits.mplot3d} \PYG{k+kn}{import} \PYG{n}{Axes3D} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{x2d}\PYG{p}{,} \PYG{n}{y2d} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{meshgrid}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{x2d}\PYG{o}{.}\PYG{n}{ravel}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{y2d}\PYG{o}{.}\PYG{n}{ravel}\PYG{p}{(}\PYG{p}{)} \PYG{n}{z} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros\PYGZus{}like}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{n}{dz} \PYG{o}{=} \PYG{n}{x} \PYG{o}{+} \PYG{n}{y} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{bar3d}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{z}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{dz}\PYG{p}{,} \PYG{n}{shade}\PYG{o}{=}\PYG{n+nb+bp}{True}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Shading On}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{bar3d}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{z}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{dz}\PYG{p}{,} \PYG{n}{shade}\PYG{o}{=}\PYG{n+nb+bp}{False}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Shading Off}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-1-0-4}.pdf} \end{figure} \subsubsection{New \sphinxstyleliteralintitle{\sphinxupquote{which}} Parameter for \sphinxstyleliteralintitle{\sphinxupquote{autofmt\_xdate}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-which-parameter-for-autofmt-xdate}} A \sphinxcode{\sphinxupquote{which}} parameter now exists for the method {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.autofmt_xdate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autofmt\_xdate()}}}}}. This allows a user to format \sphinxcode{\sphinxupquote{major}}, \sphinxcode{\sphinxupquote{minor}} or \sphinxcode{\sphinxupquote{both}} tick labels selectively. The default behavior will rotate and align the \sphinxcode{\sphinxupquote{major}} tick labels. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{autofmt\PYGZus{}xdate}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{which}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{minor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{New Figure Parameter for \sphinxstyleliteralintitle{\sphinxupquote{subplot2grid}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-figure-parameter-for-subplot2grid}} A \sphinxcode{\sphinxupquote{fig}} parameter now exists for the function {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid()}}}}}. This allows a user to specify the figure where the subplots will be created. If \sphinxcode{\sphinxupquote{fig}} is \sphinxcode{\sphinxupquote{None}} (default) then the method will use the current figure retrieved by {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib.pyplot.gcf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gcf()}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{subplot2grid}\PYG{p}{(}\PYG{n}{shape}\PYG{p}{,} \PYG{n}{loc}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{fig}\PYG{o}{=}\PYG{n}{myfig}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Interpolation in \sphinxstyleliteralintitle{\sphinxupquote{fill\_betweenx}}} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:interpolation-in-fill-betweenx}} The \sphinxcode{\sphinxupquote{interpolate}} parameter now exists for the method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib.axes.Axes.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx()}}}}}. This allows a user to interpolate the data and fill the areas in the crossover points, similarly to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between()}}}}}. \subsubsection{New keyword argument \sphinxstyleliteralintitle{\sphinxupquote{sep}} for EngFormatter} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-keyword-argument-sep-for-engformatter}} A new \sphinxcode{\sphinxupquote{sep}} keyword argument has been added to {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EngFormatter}}}}} and provides a means to define the string that will be used between the value and its unit. The default string is \sphinxcode{\sphinxupquote{" "}}, which preserves the former behavior. Additionally, the separator is now present between the value and its unit even in the absence of SI prefix. There was formerly a bug that was causing strings like \sphinxcode{\sphinxupquote{"3.14V"}} to be returned instead of the expected \sphinxcode{\sphinxupquote{"3.14 V"}} (with the default behavior). \subsubsection{Extend \sphinxstyleliteralintitle{\sphinxupquote{MATPLOTLIBRC}} behavior} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:extend-matplotlibrc-behavior}} The environmental variable can now specify the full file path or the path to a directory containing a \sphinxcode{\sphinxupquote{matplotlibrc}} file. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{density}} kwarg to hist} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:density-kwarg-to-hist}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} method now prefers \sphinxcode{\sphinxupquote{density}} to \sphinxcode{\sphinxupquote{normed}} to control if the histogram should be normalized, following a change upstream to NumPy. This will reduce confusion as the behavior has always been that the integral of the histogram is 1 (rather than sum or maximum value). \subsection{Internals} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:internals}} \subsubsection{New TransformedPatchPath caching object} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:new-transformedpatchpath-caching-object}} A newly added {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPatchPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPatchPath}}}}} provides a means to transform a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} into a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} via a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} while caching the resulting path. If neither the patch nor the transform have changed, a cached copy of the path is returned. This class differs from the older {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPath}}}}} in that it is able to refresh itself based on the underlying patch while the older class uses an immutable path. \subsubsection{Abstract base class for movie writers} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:abstract-base-class-for-movie-writers}} The new {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractMovieWriter}}}}} class defines the API required by a class that is to be used as the \sphinxcode{\sphinxupquote{writer}} in the {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation.Animation.save()}}}}} method. The existing {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} class now derives from the new abstract base class. \subsubsection{Stricter validation of line style rcParams} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:stricter-validation-of-line-style-rcparams}} The validation of rcParams that are related to line styles (\sphinxcode{\sphinxupquote{lines.linestyle}}, \sphinxcode{\sphinxupquote{boxplot.*.linestyle}}, \sphinxcode{\sphinxupquote{grid.linestyle}} and \sphinxcode{\sphinxupquote{contour.negative\_linestyle}}) now effectively checks that the values are valid line styles. Strings like \sphinxcode{\sphinxupquote{'dashed'}} or \sphinxcode{\sphinxupquote{'-{-}'}} are accepted, as well as even-length sequences of on-off ink like \sphinxcode{\sphinxupquote{{[}1, 1.65{]}}}. In this latter case, the offset value is handled internally and should \sphinxstyleemphasis{not} be provided by the user. The new validation scheme replaces the former one used for the \sphinxcode{\sphinxupquote{contour.negative\_linestyle}} rcParams, that was limited to \sphinxcode{\sphinxupquote{'solid'}} and \sphinxcode{\sphinxupquote{'dashed'}} line styles. The validation is case-insensitive. The following are now valid: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{o}{.}\PYG{n}{linestyle} \PYG{p}{:} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} loosely dotted grid lines} \PYG{n}{contour}\PYG{o}{.}\PYG{n}{negative\PYGZus{}linestyle} \PYG{p}{:} \PYG{n}{dashdot} \PYG{c+c1}{\PYGZsh{} previously only solid or dashed} \end{sphinxVerbatim} \subsubsection{pytest} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:pytest}} The automated tests have been switched from \sphinxcode{\sphinxupquote{nose}} to \sphinxcode{\sphinxupquote{pytest}}. \subsection{Performance} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:performance}} \subsubsection{Path simplification updates} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:path-simplification-updates}} Line simplification controlled by the \sphinxcode{\sphinxupquote{path.simplify}} and \sphinxcode{\sphinxupquote{path.simplify\_threshold}} parameters has been improved. You should notice better rendering performance when plotting large amounts of data (as long as the above parameters are set accordingly). Only the line segment portion of paths will be simplified -- if you are also drawing markers and experiencing problems with rendering speed, you should consider using the \sphinxcode{\sphinxupquote{markevery}} option to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. See the {\hyperref[\detokenize{tutorials/introductory/usage:performance}]{\sphinxcrossref{\DUrole{std,std-ref}{Performance}}}} section in the usage tutorial for more information. The simplification works by iteratively merging line segments into a single vector until the next line segment's perpendicular distance to the vector (measured in display-coordinate space) is greater than the \sphinxcode{\sphinxupquote{path.simplify\_threshold}} parameter. Thus, higher values of \sphinxcode{\sphinxupquote{path.simplify\_threshold}} result in quicker rendering times. If you are plotting just to explore data and not for publication quality, pixel perfect plots, then a value of \sphinxcode{\sphinxupquote{1.0}} can be safely used. If you want to make sure your plot reflects your data \sphinxstyleemphasis{exactly}, then you should set \sphinxcode{\sphinxupquote{path.simplify}} to false and/or \sphinxcode{\sphinxupquote{path.simplify\_threshold}} to \sphinxcode{\sphinxupquote{0}}. Matplotlib currently defaults to a conservative value of \sphinxcode{\sphinxupquote{1/9}}, smaller values are unlikely to cause any visible differences in your plots. \subsubsection{Implement intersects\_bbox in c++} \label{\detokenize{users/prev_whats_new/whats_new_2.1.0:implement-intersects-bbox-in-c}} {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.intersects_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{intersects\_bbox()}}}}} has been implemented in c++ which improves the performance of automatically placing the legend. \section{New in Matplotlib 2.2} \label{\detokenize{users/prev_whats_new/whats_new_2.2:new-in-matplotlib-2-2}}\label{\detokenize{users/prev_whats_new/whats_new_2.2:whats-new-2-2-0}}\label{\detokenize{users/prev_whats_new/whats_new_2.2::doc}} \subsection{Constrained Layout Manager} \label{\detokenize{users/prev_whats_new/whats_new_2.2:constrained-layout-manager}} \begin{sphinxadmonition}{warning}{Warning:} Constrained Layout is \sphinxstylestrong{experimental}. The behaviour and API are subject to change, or the whole functionality may be removed without a deprecation period. \end{sphinxadmonition} A new method to automatically decide spacing between subplots and their organizing \sphinxcode{\sphinxupquote{GridSpec}} instances has been added. It is meant to replace the venerable \sphinxcode{\sphinxupquote{tight\_layout}} method. It is invoked via a new \sphinxcode{\sphinxupquote{constrained\_layout=True}} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} or \sphinxcode{\sphinxupquote{subplots}}. There are new \sphinxcode{\sphinxupquote{rcParams}} for this package, and spacing can be more finely tuned with the new {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_constrained_layout_pads}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_constrained\_layout\_pads}}}}}. Features include: \begin{quote} \begin{itemize} \item {} Automatic spacing for subplots with a fixed-size padding in inches around subplots and all their decorators, and space between as a fraction of subplot size between subplots. \item {} Spacing for \sphinxcode{\sphinxupquote{suptitle}}, and colorbars that are attached to more than one axes. \item {} Nested {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} layouts using {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec}}}}}. \end{itemize} For more details and capabilities please see the new tutorial: {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}} \end{quote} Note the new API to access this: \subsubsection{New \sphinxstyleliteralintitle{\sphinxupquote{plt.figure}} and \sphinxstyleliteralintitle{\sphinxupquote{plt.subplots}} kwarg: \sphinxstyleliteralintitle{\sphinxupquote{constrained\_layout}}} \label{\detokenize{users/prev_whats_new/whats_new_2.2:new-plt-figure-and-plt-subplots-kwarg-constrained-layout}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots()}}}}} can now be called with \sphinxcode{\sphinxupquote{constrained\_layout=True}} kwarg to enable constrained\_layout. \subsubsection{New \sphinxstyleliteralintitle{\sphinxupquote{ax.set\_position}} behaviour} \label{\detokenize{users/prev_whats_new/whats_new_2.2:new-ax-set-position-behaviour}} \sphinxcode{\sphinxupquote{set\_position()}} now makes the specified axis no longer responsive to \sphinxcode{\sphinxupquote{constrained\_layout}}, consistent with the idea that the user wants to place an axis manually. Internally, this means that old \sphinxcode{\sphinxupquote{ax.set\_position}} calls \sphinxstyleemphasis{inside} the library are changed to private \sphinxcode{\sphinxupquote{ax.\_set\_position}} calls so that \sphinxcode{\sphinxupquote{constrained\_layout}} will still work with these axes. \subsubsection{New \sphinxstyleliteralintitle{\sphinxupquote{figure}} kwarg for \sphinxstyleliteralintitle{\sphinxupquote{GridSpec}}} \label{\detokenize{users/prev_whats_new/whats_new_2.2:new-figure-kwarg-for-gridspec}} In order to facilitate \sphinxcode{\sphinxupquote{constrained\_layout}}, \sphinxcode{\sphinxupquote{GridSpec}} now accepts a \sphinxcode{\sphinxupquote{figure}} keyword. This is backwards compatible, in that not supplying this will simply cause \sphinxcode{\sphinxupquote{constrained\_layout}} to not operate on the subplots orgainzed by this \sphinxcode{\sphinxupquote{GridSpec}} instance. Routines that use \sphinxcode{\sphinxupquote{GridSpec}} (e.g. \sphinxcode{\sphinxupquote{fig.subplots}}) have been modified to pass the figure to \sphinxcode{\sphinxupquote{GridSpec}}. \subsection{xlabels and ylabels can now be automatically aligned} \label{\detokenize{users/prev_whats_new/whats_new_2.2:xlabels-and-ylabels-can-now-be-automatically-aligned}} Subplot axes \sphinxcode{\sphinxupquote{ylabels}} can be misaligned horizontally if the tick labels are very different widths. The same can happen to \sphinxcode{\sphinxupquote{xlabels}} if the ticklabels are rotated on one subplot (for instance). The new methods on the \sphinxcode{\sphinxupquote{Figure}} class: \sphinxcode{\sphinxupquote{Figure.align\_xlabels}} and \sphinxcode{\sphinxupquote{Figure.align\_ylabels}} will now align these labels horizontally or vertically. If the user only wants to align some axes, a list of axes can be passed. If no list is passed, the algorithm looks at all the labels on the figure. Only labels that have the same subplot locations are aligned. i.e. the ylabels are aligned only if the subplots are in the same column of the subplot layout. Alignemnt is persistent and automatic after these are called. A convenience wrapper \sphinxcode{\sphinxupquote{Figure.align\_labels}} calls both functions at once. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-2-1}.pdf} \end{figure} \subsection{Axes legends now included in tight\_bbox} \label{\detokenize{users/prev_whats_new/whats_new_2.2:axes-legends-now-included-in-tight-bbox}} Legends created via \sphinxcode{\sphinxupquote{ax.legend}} can sometimes overspill the limits of the axis. Tools like \sphinxcode{\sphinxupquote{fig.tight\_layout()}} and \sphinxcode{\sphinxupquote{fig.savefig(bbox\_inches='tight')}} would clip these legends. A change was made to include them in the \sphinxcode{\sphinxupquote{tight}} calculations. \subsection{Cividis colormap} \label{\detokenize{users/prev_whats_new/whats_new_2.2:cividis-colormap}} A new dark blue/yellow colormap named 'cividis' was added. Like viridis, cividis is perceptually uniform and colorblind friendly. However, cividis also goes a step further: not only is it usable by colorblind users, it should actually look effectively identical to colorblind and non-colorblind users. For more details see \sphinxhref{https://doi.org/10.1371/journal.pone.0199239}{Nuñez J, Anderton C, and Renslow R: "Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data"}. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_2-2-2}.pdf} \end{figure} \subsection{New style colorblind-friendly color cycle} \label{\detokenize{users/prev_whats_new/whats_new_2.2:new-style-colorblind-friendly-color-cycle}} A new style defining a color cycle has been added, tableau-colorblind10, to provide another option for colorblind-friendly plots. A demonstration of this new style can be found in the \sphinxhref{https://matplotlib.org/gallery/style\_sheets/style\_sheets\_reference.html}{reference} of style sheets. To load this color cycle in place of the default one: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{style}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tableau\PYGZhy{}colorblind10}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Support for numpy.datetime64} \label{\detokenize{users/prev_whats_new/whats_new_2.2:support-for-numpy-datetime64}} Matplotlib has supported \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime.datetime}}} dates for a long time in {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}}. We now support \sphinxcode{\sphinxupquote{numpy.datetime64}} dates as well. Anywhere that \sphinxcode{\sphinxupquote{dateime.datetime}} could be used, \sphinxcode{\sphinxupquote{numpy.datetime64}} can be used. eg: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{time} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{2005\PYGZhy{}02\PYGZhy{}01}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{2005\PYGZhy{}02\PYGZhy{}02}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dtype}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{datetime64[h]}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{time}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Writing animations with Pillow} \label{\detokenize{users/prev_whats_new/whats_new_2.2:writing-animations-with-pillow}} It is now possible to use Pillow as an animation writer. Supported output formats are currently gif (Pillow\textgreater{}=3.4) and webp (Pillow\textgreater{}=5.0). Use e.g. as \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{\PYGZus{}\PYGZus{}future\PYGZus{}\PYGZus{}} \PYG{k}{import} \PYG{n}{division} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{pyplot} \PYG{k}{as} \PYG{n}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{import} \PYG{n}{FuncAnimation}\PYG{p}{,} \PYG{n}{PillowWriter} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{animate}\PYG{p}{(}\PYG{n}{i}\PYG{p}{)}\PYG{p}{:} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}ydata}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{i} \PYG{o}{/} \PYG{l+m+mi}{20}\PYG{p}{]}\PYG{p}{)} \PYG{k}{return} \PYG{p}{[}\PYG{n}{line}\PYG{p}{]} \PYG{n}{anim} \PYG{o}{=} \PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{animate}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{anim}\PYG{o}{.}\PYG{n}{save}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{movie.gif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{writer}\PYG{o}{=}\PYG{n}{PillowWriter}\PYG{p}{(}\PYG{n}{fps}\PYG{o}{=}\PYG{l+m+mi}{24}\PYG{p}{)}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Slider UI widget can snap to discrete values} \label{\detokenize{users/prev_whats_new/whats_new_2.2:slider-ui-widget-can-snap-to-discrete-values}} The slider UI widget can take the optional argument \sphinxstyleemphasis{valstep}. Doing so forces the slider to take on only discrete values, starting from \sphinxstyleemphasis{valmin} and counting up to \sphinxstyleemphasis{valmax} with steps of size \sphinxstyleemphasis{valstep}. If \sphinxstyleemphasis{closedmax==True}, then the slider will snap to \sphinxstyleemphasis{valmax} as well. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{capstyle}} and \sphinxstyleliteralintitle{\sphinxupquote{joinstyle}} attributes added to \sphinxstyleliteralintitle{\sphinxupquote{Collection}}} \label{\detokenize{users/prev_whats_new/whats_new_2.2:capstyle-and-joinstyle-attributes-added-to-collection}} The \sphinxcode{\sphinxupquote{Collection}} class now has customizable \sphinxcode{\sphinxupquote{capstyle}} and \sphinxcode{\sphinxupquote{joinstyle}} attributes. This allows the user for example to set the \sphinxcode{\sphinxupquote{capstyle}} of errorbars. \subsection{\sphinxstyleemphasis{pad} kwarg added to ax.set\_title} \label{\detokenize{users/prev_whats_new/whats_new_2.2:pad-kwarg-added-to-ax-set-title}} The method \sphinxcode{\sphinxupquote{axes.set\_title}} now has a \sphinxstyleemphasis{pad} kwarg, that specifies the distance from the top of an axes to where the title is drawn. The units of \sphinxstyleemphasis{pad} is points, and the default is the value of the (already-existing) \sphinxcode{\sphinxupquote{rcParams{[}'axes.titlepad'{]}}}. \subsection{Comparison of 2 colors in Matplotlib} \label{\detokenize{users/prev_whats_new/whats_new_2.2:comparison-of-2-colors-in-matplotlib}} As the colors in Matplotlib can be specified with a wide variety of ways, the \sphinxcode{\sphinxupquote{matplotlib.colors.same\_color}} method has been added which checks if two {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors}}}}} are the same. \subsection{Autoscaling a polar plot snaps to the origin} \label{\detokenize{users/prev_whats_new/whats_new_2.2:autoscaling-a-polar-plot-snaps-to-the-origin}} Setting the limits automatically in a polar plot now snaps the radial limit to zero if the automatic limit is nearby. This means plotting from zero doesn't automatically scale to include small negative values on the radial axis. The limits can still be set manually in the usual way using \sphinxcode{\sphinxupquote{set\_ylim}}. \subsection{PathLike support} \label{\detokenize{users/prev_whats_new/whats_new_2.2:pathlike-support}} On Python 3.6+, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imsave:matplotlib.pyplot.imsave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imsave}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib.pyplot.imread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imread}}}}}, and animation writers now accept \sphinxhref{https://docs.python.org/3/library/os.html\#os.PathLike}{\sphinxcode{\sphinxupquote{os.PathLike}}}s as input. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.tick\_params}} can set gridline properties} \label{\detokenize{users/prev_whats_new/whats_new_2.2:axes-tick-params-can-set-gridline-properties}} \sphinxcode{\sphinxupquote{Tick}} objects hold gridlines as well as the tick mark and its label. \sphinxcode{\sphinxupquote{Axis.set\_tick\_params}}, \sphinxcode{\sphinxupquote{Axes.tick\_params}} and \sphinxcode{\sphinxupquote{pyplot.tick\_params}} now have keyword arguments 'grid\_color', 'grid\_alpha', 'grid\_linewidth', and 'grid\_linestyle' for overriding the defaults in \sphinxcode{\sphinxupquote{rcParams}}: 'grid.color', etc. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.imshow}} clips RGB values to the valid range} \label{\detokenize{users/prev_whats_new/whats_new_2.2:axes-imshow-clips-rgb-values-to-the-valid-range}} When \sphinxcode{\sphinxupquote{Axes.imshow}} is passed an RGB or RGBA value with out-of-range values, it now logs a warning and clips them to the valid range. The old behaviour, wrapping back in to the range, often hid outliers and made interpreting RGB images unreliable. \subsection{Properties in \sphinxstyleliteralintitle{\sphinxupquote{matplotlibrc}} to place xaxis and yaxis tick labels} \label{\detokenize{users/prev_whats_new/whats_new_2.2:properties-in-matplotlibrc-to-place-xaxis-and-yaxis-tick-labels}} Introducing four new boolean properties in \sphinxcode{\sphinxupquote{matplotlibrc}} for default positions of xaxis and yaxis tick labels, namely, \sphinxcode{\sphinxupquote{xtick.labeltop}}, \sphinxcode{\sphinxupquote{xtick.labelbottom}}, \sphinxcode{\sphinxupquote{ytick.labelright}} and \sphinxcode{\sphinxupquote{ytick.labelleft}}. These can also be changed in rcParams. \subsection{PGI bindings for gtk3} \label{\detokenize{users/prev_whats_new/whats_new_2.2:pgi-bindings-for-gtk3}} The GTK3 backends can now use \sphinxhref{https://pgi.readthedocs.io/en/latest/}{PGI} instead of \sphinxhref{http://pygobject.readthedocs.io/en/latest/\#}{PyGObject}. PGI is a fairly incomplete binding for GObject, thus its use is not recommended; its main benefit is its availability on Travis (thus allowing CI testing for the gtk3agg and gtk3cairo backends). The binding selection rules are as follows: - if \sphinxcode{\sphinxupquote{gi}} has already been imported, use it; else - if \sphinxcode{\sphinxupquote{pgi}} has already been imported, use it; else - if \sphinxcode{\sphinxupquote{gi}} can be imported, use it; else - if \sphinxcode{\sphinxupquote{pgi}} can be imported, use it; else - error out. Thus, to force usage of PGI when both bindings are installed, import it first. \subsection{Cairo rendering for Qt, WX, and Tk canvases} \label{\detokenize{users/prev_whats_new/whats_new_2.2:cairo-rendering-for-qt-wx-and-tk-canvases}} The new \sphinxcode{\sphinxupquote{Qt4Cairo}}, \sphinxcode{\sphinxupquote{Qt5Cairo}}, \sphinxcode{\sphinxupquote{WXCairo}}, and \sphinxcode{\sphinxupquote{TkCairo}} backends allow Qt, Wx, and Tk canvases to use Cairo rendering instead of Agg. \subsection{Added support for QT in new ToolManager} \label{\detokenize{users/prev_whats_new/whats_new_2.2:added-support-for-qt-in-new-toolmanager}} Now it is possible to use the ToolManager with Qt5 For example \begin{quote} import matplotlib matplotlib.use('QT5AGG') matplotlib.rcParams{[}'toolbar'{]} = 'toolmanager' import matplotlib.pyplot as plt plt.plot({[}1,2,3{]}) plt.show() \end{quote} Treat the new Tool classes experimental for now, the API will likely change and perhaps the rcParam as well The main example \sphinxcode{\sphinxupquote{examples/user\_interfaces/toolmanager\_sgskip.py}} shows more details, just adjust the header to use QT instead of GTK3 \subsection{TkAgg backend reworked to support PyPy} \label{\detokenize{users/prev_whats_new/whats_new_2.2:tkagg-backend-reworked-to-support-pypy}} \sphinxhref{https://www.pypy.org/}{PyPy} can now plot using the TkAgg backend, supported on PyPy 5.9 and greater (both PyPy for python 2.7 and PyPy for python 3.5). \subsection{Python logging library used for debug output} \label{\detokenize{users/prev_whats_new/whats_new_2.2:python-logging-library-used-for-debug-output}} Matplotlib has in the past (sporadically) used an internal verbose-output reporter. This version converts those calls to using the standard python \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} library. Support for the old \sphinxcode{\sphinxupquote{rcParams}} \sphinxcode{\sphinxupquote{verbose.level}} and \sphinxcode{\sphinxupquote{verbose.fileo}} is dropped. The command-line options \sphinxcode{\sphinxupquote{-{-}verbose-helpful}} and \sphinxcode{\sphinxupquote{-{-}verbose-debug}} are still accepted, but deprecated. They are now equivalent to setting \sphinxcode{\sphinxupquote{logging.INFO}} and \sphinxcode{\sphinxupquote{logging.DEBUG}}. The logger's root name is \sphinxcode{\sphinxupquote{matplotlib}} and can be accessed from programs as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{logging} \PYG{n}{mlog} \PYG{o}{=} \PYG{n}{logging}\PYG{o}{.}\PYG{n}{getLogger}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Instructions for basic usage are in {\hyperref[\detokenize{faq/troubleshooting_faq:troubleshooting-faq}]{\sphinxcrossref{\DUrole{std,std-ref}{Troubleshooting}}}} and for developers in {\hyperref[\detokenize{devel/contributing:contributing}]{\sphinxcrossref{\DUrole{std,std-ref}{Contributing}}}}. \subsection{Improved \sphinxstyleliteralintitle{\sphinxupquote{repr}} for \sphinxstyleliteralintitle{\sphinxupquote{Transform}}s} \label{\detokenize{users/prev_whats_new/whats_new_2.2:improved-repr-for-transforms}} \sphinxcode{\sphinxupquote{Transform}}s now indent their \sphinxhref{https://docs.python.org/3/library/functions.html\#repr}{\sphinxcode{\sphinxupquote{repr}}}s in a more legible manner: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{In [1]: }\PYG{n}{l}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)}\PYG{p}{;} \PYG{n}{l}\PYG{o}{.}\PYG{n}{get\PYGZus{}transform}\PYG{p}{(}\PYG{p}{)} \PYG{g+gh}{Out[1]:} \PYG{g+go}{CompositeGenericTransform(} \PYG{g+go}{ TransformWrapper(} \PYG{g+go}{ BlendedAffine2D(} \PYG{g+go}{ IdentityTransform(),} \PYG{g+go}{ IdentityTransform())),} \PYG{g+go}{ CompositeGenericTransform(} \PYG{g+go}{ BboxTransformFrom(} \PYG{g+go}{ TransformedBbox(} \PYG{g+go}{ Bbox(x0=\PYGZhy{}0.05500000000000001, y0=\PYGZhy{}0.05500000000000001, x1=0.05500000000000001, y1=0.05500000000000001),} \PYG{g+go}{ TransformWrapper(} \PYG{g+go}{ BlendedAffine2D(} \PYG{g+go}{ IdentityTransform(),} \PYG{g+go}{ IdentityTransform())))),} \PYG{g+go}{ BboxTransformTo(} \PYG{g+go}{ TransformedBbox(} \PYG{g+go}{ Bbox(x0=0.125, y0=0.10999999999999999, x1=0.9, y1=0.88),} \PYG{g+go}{ BboxTransformTo(} \PYG{g+go}{ TransformedBbox(} \PYG{g+go}{ Bbox(x0=0.0, y0=0.0, x1=6.4, y1=4.8),} \PYG{g+go}{ Affine2D(} \PYG{g+go}{ [[ 100. 0. 0.]} \PYG{g+go}{ [ 0. 100. 0.]} \PYG{g+go}{ [ 0. 0. 1.]])))))))} \end{sphinxVerbatim} \section{New in Matplotlib 3.0} \label{\detokenize{users/prev_whats_new/whats_new_3.0:new-in-matplotlib-3-0}}\label{\detokenize{users/prev_whats_new/whats_new_3.0:whats-new-3-0-0}}\label{\detokenize{users/prev_whats_new/whats_new_3.0::doc}} \subsection{Improved default backend selection} \label{\detokenize{users/prev_whats_new/whats_new_3.0:improved-default-backend-selection}} The default backend no longer must be set as part of the build process. Instead, at run time, the builtin backends are tried in sequence until one of them imports. Headless linux servers (identified by the DISPLAY env not being defined) will not select a GUI backend. \subsection{Cyclic colormaps} \label{\detokenize{users/prev_whats_new/whats_new_3.0:cyclic-colormaps}} Two new colormaps named 'twilight' and 'twilight\_shifted' have been added. These colormaps start and end on the same color, and have two symmetric halves with equal lightness, but diverging color. Since they wrap around, they are a good choice for cyclic data such as phase angles, compass directions, or time of day. Like \sphinxstyleemphasis{viridis} and \sphinxstyleemphasis{cividis}, \sphinxstyleemphasis{twilight} is perceptually uniform and colorblind friendly. \subsection{Ability to scale axis by a fixed order of magnitude} \label{\detokenize{users/prev_whats_new/whats_new_3.0:ability-to-scale-axis-by-a-fixed-order-of-magnitude}} To scale an axis by a fixed order of magnitude, set the \sphinxstyleemphasis{scilimits} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.ticklabel\_format}}}}} to the same (non-zero) lower and upper limits. Say to scale the y axis by a million (1e6), use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{ticklabel\PYGZus{}format}\PYG{p}{(}\PYG{n}{style}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{sci}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{scilimits}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{,} \PYG{n}{axis}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} The behavior of \sphinxcode{\sphinxupquote{scilimits=(0, 0)}} is unchanged. With this setting, Matplotlib will adjust the order of magnitude depending on the axis values, rather than keeping it fixed. Previously, setting \sphinxcode{\sphinxupquote{scilimits=(m, m)}} was equivalent to setting \sphinxcode{\sphinxupquote{scilimits=(0, 0)}}. \subsection{Add \sphinxstyleliteralintitle{\sphinxupquote{AnchoredDirectionArrows}} feature to mpl\_toolkits} \label{\detokenize{users/prev_whats_new/whats_new_3.0:add-anchoreddirectionarrows-feature-to-mpl-toolkits}} A new mpl\_toolkits class {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredDirectionArrows}}}}} draws a pair of orthogonal arrows to indicate directions on a 2D plot. A minimal working example takes in the transformation object for the coordinate system (typically ax.transAxes), and arrow labels. There are several optional parameters that can be used to alter layout. For example, the arrow pairs can be rotated and the color can be changed. By default the labels and arrows have the same color, but the class may also pass arguments for customizing arrow and text layout, these are passed to \sphinxcode{\sphinxupquote{matplotlib.text.TextPath}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}}. Location, length and width for both arrow tail and head can be adjusted, the the direction arrows and labels can have a frame. Padding and separation parameters can be adjusted. \subsection{Add \sphinxstyleliteralintitle{\sphinxupquote{minorticks\_on()/off()}} methods for colorbar} \label{\detokenize{users/prev_whats_new/whats_new_3.0:add-minorticks-on-off-methods-for-colorbar}} A new method \sphinxcode{\sphinxupquote{colorbar.Colobar.minorticks\_on()}} has been added to correctly display minor ticks on a colorbar. This method doesn't allow the minor ticks to extend into the regions beyond vmin and vmax when the extend \sphinxcode{\sphinxupquote{kwarg}} (used while creating the colorbar) is set to 'both', 'max' or 'min'. A complementary method \sphinxcode{\sphinxupquote{colorbar.Colobar.minorticks\_off()}} has also been added to remove the minor ticks on the colorbar. \subsection{Colorbar ticks can now be automatic} \label{\detokenize{users/prev_whats_new/whats_new_3.0:colorbar-ticks-can-now-be-automatic}} The number of ticks placed on colorbars was previously appropriate for a large colorbar, but looked bad if the colorbar was made smaller (i.e. via the \sphinxcode{\sphinxupquote{shrink}} kwarg). This has been changed so that the number of ticks is now responsive to how large the colorbar is. \subsection{Don't automatically rename duplicate file names} \label{\detokenize{users/prev_whats_new/whats_new_3.0:don-t-automatically-rename-duplicate-file-names}} Previously, when saving a figure to a file using the GUI's save dialog box, if the default filename (based on the figure window title) already existed on disk, Matplotlib would append a suffix (e.g. \sphinxcode{\sphinxupquote{Figure\_1-1.png}}), preventing the dialog from prompting to overwrite the file. This behaviour has been removed. Now if the file name exists on disk, the user is prompted whether or not to overwrite it. This eliminates guesswork, and allows intentional overwriting, especially when the figure name has been manually set using \sphinxcode{\sphinxupquote{figure.Figure.canvas.set\_window\_title()}}. \subsection{Legend now has a \sphinxstyleemphasis{title\_fontsize} kwarg (and rcParam)} \label{\detokenize{users/prev_whats_new/whats_new_3.0:legend-now-has-a-title-fontsize-kwarg-and-rcparam}} The title for a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}} can now have its fontsize set via the \sphinxcode{\sphinxupquote{title\_fontsize}} kwarg. There is also a new \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.title\_fontsize"{]}}}}. Both default to \sphinxcode{\sphinxupquote{None}}, which means the legend title will have the same fontsize as the axes default fontsize (\sphinxstyleemphasis{not} the legend fontsize, set by the \sphinxcode{\sphinxupquote{fontsize}} kwarg or \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fontsize"{]}}}}). \subsection{Support for axes.prop\_cycle property \sphinxstyleemphasis{markevery} in rcParams} \label{\detokenize{users/prev_whats_new/whats_new_3.0:support-for-axes-prop-cycle-property-markevery-in-rcparams}} The Matplotlib \sphinxcode{\sphinxupquote{rcParams}} settings object now supports configuration of the attribute \sphinxcode{\sphinxupquote{axes.prop\_cycle}} with cyclers using the \sphinxcode{\sphinxupquote{markevery}} Line2D object property. An example of this feature is provided at \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/markevery\_prop\_cycle}. \subsection{Multipage PDF support for pgf backend} \label{\detokenize{users/prev_whats_new/whats_new_3.0:multipage-pdf-support-for-pgf-backend}} The pgf backend now also supports multipage PDF files. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib.backends.backend\PYGZus{}pgf} \PYG{k+kn}{import} \PYG{n}{PdfPages} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k}{with} \PYG{n}{PdfPages}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{multipage.pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{pdf}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} page 1} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} page 2} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{cla}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Pie charts are now circular by default} \label{\detokenize{users/prev_whats_new/whats_new_3.0:pie-charts-are-now-circular-by-default}} We acknowledge that the majority of people do not like egg-shaped pies. Therefore, an axes to which a pie chart is plotted will be set to have equal aspect ratio by default. This ensures that the pie appears circular independent on the axes size or units. To revert to the previous behaviour set the axes' aspect ratio to automatic by using \sphinxcode{\sphinxupquote{ax.set\_aspect("auto")}} or \sphinxcode{\sphinxupquote{plt.axis("auto")}}. \subsection{Add \sphinxstyleliteralintitle{\sphinxupquote{ax.get\_gridspec}} to \sphinxstyleliteralintitle{\sphinxupquote{SubplotBase}}} \label{\detokenize{users/prev_whats_new/whats_new_3.0:add-ax-get-gridspec-to-subplotbase}} New method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.get_gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotBase.get\_gridspec}}}}} is added so that users can easily get the gridspec that went into making an axes: \begin{quote} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}gridspec}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} remove the last column} \PYG{k}{for} \PYG{n}{ax} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{flatten}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{remove}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} make a subplot in last column that spans rows.} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{quote} \subsection{Axes titles will no longer overlap xaxis} \label{\detokenize{users/prev_whats_new/whats_new_3.0:axes-titles-will-no-longer-overlap-xaxis}} Previously an axes title had to be moved manually if an xaxis overlapped (usually when the xaxis was put on the top of the axes). Now, the title will be automatically moved above the xaxis and its decorators (including the xlabel) if they are at the top. If desired, the title can still be placed manually. There is a slight kludge; the algorithm checks if the y-position of the title is 1.0 (the default), and moves if it is. If the user places the title in the default location (i.e. \sphinxcode{\sphinxupquote{ax.title.set\_position(0.5, 1.0)}}), the title will still be moved above the xaxis. If the user wants to avoid this, they can specify a number that is close (i.e. \sphinxcode{\sphinxupquote{ax.title.set\_position(0.5, 1.01)}}) and the title will not be moved via this algorithm. \subsection{New convenience methods for GridSpec} \label{\detokenize{users/prev_whats_new/whats_new_3.0:new-convenience-methods-for-gridspec}} There are new convenience methods for {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec.GridSpec}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec.GridSpecFromSubplotSpec}}}}}. Instead of the former we can now call {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_gridspec}}}}} and for the latter {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.subgridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec.subgridspec}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gssub} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gssub}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{i}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Figure has an \sphinxstyleliteralintitle{\sphinxupquote{add\_artist}} method} \label{\detokenize{users/prev_whats_new/whats_new_3.0:figure-has-an-add-artist-method}} A method {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_artist}}}}} has been added to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} class, which allows artists to be added directly to a figure. E.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{circ} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{05}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{circ}\PYG{p}{)} \end{sphinxVerbatim} In case the added artist has no transform set previously, it will be set to the figure transform (\sphinxcode{\sphinxupquote{fig.transFigure}}). This new method may be useful for adding artists to figures without axes or to easily position static elements in figure coordinates. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{:math:}} directive renamed to \sphinxstyleliteralintitle{\sphinxupquote{:mathmpl:}}} \label{\detokenize{users/prev_whats_new/whats_new_3.0:math-directive-renamed-to-mathmpl}} The \sphinxcode{\sphinxupquote{:math:}} rst role provided by \sphinxcode{\sphinxupquote{matplotlib.sphinxext.mathmpl}} has been renamed to \sphinxcode{\sphinxupquote{:mathmpl:}} to avoid conflicting with the \sphinxcode{\sphinxupquote{:math:}} role that Sphinx 1.8 provides by default. (\sphinxcode{\sphinxupquote{:mathmpl:}} uses Matplotlib to render math expressions to images embedded in html, whereas Sphinx uses MathJax.) When using Sphinx\textless{}1.8, both names (\sphinxcode{\sphinxupquote{:math:}} and \sphinxcode{\sphinxupquote{:mathmpl:}}) remain available for backcompatibility. \section{What's new in Matplotlib 3.1} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:what-s-new-in-matplotlib-3-1}}\label{\detokenize{users/prev_whats_new/whats_new_3.1.0::doc}} For a list of all of the issues and pull requests since the last revision, see the {\hyperref[\detokenize{users/github_stats:github-stats}]{\sphinxcrossref{\DUrole{std,std-ref}{GitHub Stats}}}}. \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id1}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:what-s-new-in-matplotlib-3-1}]{\sphinxcrossref{What's new in Matplotlib 3.1}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id2}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:new-features}]{\sphinxcrossref{New Features}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id3}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:concisedateformatter}]{\sphinxcrossref{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConciseDateFormatter}}}}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id4}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:secondary-x-y-axis-support}]{\sphinxcrossref{Secondary x/y Axis support}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id5}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:funcscale-for-arbitrary-axes-scales}]{\sphinxcrossref{{\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncScale}}}}} for arbitrary axes scales}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id6}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:legend-for-scatter}]{\sphinxcrossref{Legend for scatter}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id7}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:matplotlib-no-longer-requires-framework-app-build-on-macosx-backend}]{\sphinxcrossref{Matplotlib no longer requires framework app build on MacOSX backend}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id8}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:figure-figurecanvas-and-backends}]{\sphinxcrossref{Figure, FigureCanvas, and Backends}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id9}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:figure-frameon-is-now-a-direct-proxy-for-the-figure-patch-visibility-state}]{\sphinxcrossref{Figure.frameon is now a direct proxy for the Figure patch visibility state}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id10}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:pil-kwargs-argument-added-to-savefig}]{\sphinxcrossref{\sphinxstyleemphasis{pil\_kwargs} argument added to savefig}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id11}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:add-inaxes-method-to-figurecanvasbase}]{\sphinxcrossref{Add \sphinxcode{\sphinxupquote{inaxes}} method to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id12}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:cairo-backend-defaults-to-pycairo-instead-of-cairocffi}]{\sphinxcrossref{cairo backend defaults to pycairo instead of cairocffi}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id13}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:axes-and-artists}]{\sphinxcrossref{Axes and Artists}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id14}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:axes-grid1-and-axisartist-axes-no-longer-draw-spines-twice}]{\sphinxcrossref{axes\_grid1 and axisartist Axes no longer draw spines twice}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id15}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:return-type-of-artistinspector-get-aliases-changed}]{\sphinxcrossref{Return type of ArtistInspector.get\_aliases changed}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id16}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:connectionpatch-accepts-arbitrary-transforms}]{\sphinxcrossref{{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionPatch}}}}} accepts arbitrary transforms}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id17}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:mplot3d-line3d-now-allows-set-get-data-3d}]{\sphinxcrossref{mplot3d Line3D now allows \{set,get\}\_data\_3d}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id18}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:axes3d-voxels-now-shades-the-resulting-voxels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.voxels}} now shades the resulting voxels}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id19}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:axis-and-ticks}]{\sphinxcrossref{Axis and Ticks}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id20}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:added-axis-get-inverted-and-axis-set-inverted}]{\sphinxcrossref{Added \sphinxcode{\sphinxupquote{Axis.get\_inverted}} and \sphinxcode{\sphinxupquote{Axis.set\_inverted}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id21}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:adjust-default-minor-tick-spacing}]{\sphinxcrossref{Adjust default minor tick spacing}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id22}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:engformatter-now-accepts-usetex-usemathtext-as-keyword-only-arguments}]{\sphinxcrossref{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EngFormatter}}}}} now accepts \sphinxcode{\sphinxupquote{usetex}}, \sphinxcode{\sphinxupquote{useMathText}} as keyword only arguments}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id23}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:animation-and-interactivity}]{\sphinxcrossref{Animation and Interactivity}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id24}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:support-for-forward-backward-mouse-buttons}]{\sphinxcrossref{Support for forward/backward mouse buttons}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id25}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:progress-callback-argument-to-save}]{\sphinxcrossref{\sphinxstyleemphasis{progress\_callback} argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save()}}}}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id26}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:add-cache-frame-data-keyword-only-argument-into-animation-funcanimation}]{\sphinxcrossref{Add \sphinxcode{\sphinxupquote{cache\_frame\_data}} keyword-only argument into {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animation.FuncAnimation}}}}}}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id27}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:endless-looping-gifs-with-pillowwriter}]{\sphinxcrossref{Endless Looping GIFs with PillowWriter}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id28}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:adjusted-matplotlib-widgets-slider-to-have-vertical-orientation}]{\sphinxcrossref{Adjusted {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Slider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Slider}}}}} to have vertical orientation}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id29}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:improved-formatting-of-image-values-under-cursor-when-a-colorbar-is-present}]{\sphinxcrossref{Improved formatting of image values under cursor when a colorbar is present}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id30}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:mouseevent-button-attribute-is-now-an-intenum}]{\sphinxcrossref{MouseEvent button attribute is now an IntEnum}}} \end{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id31}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:configuration-install-and-development}]{\sphinxcrossref{Configuration, Install, and Development}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id32}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:the-matplotlibrc-environment-variable-can-now-point-to-any-file-path}]{\sphinxcrossref{The MATPLOTLIBRC environment variable can now point to any "file" path}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id33}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:allow-latex-code-pgf-preamble-and-text-latex-preamble-in-matplotlibrc-file}]{\sphinxcrossref{Allow LaTeX code \sphinxcode{\sphinxupquote{pgf.preamble}} and \sphinxcode{\sphinxupquote{text.latex.preamble}} in MATPLOTLIBRC file}}} \item {} \phantomsection\label{\detokenize{users/prev_whats_new/whats_new_3.1.0:id34}}{\hyperref[\detokenize{users/prev_whats_new/whats_new_3.1.0:new-logging-api}]{\sphinxcrossref{New logging API}}} \end{itemize} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{New Features} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:new-features}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ConciseDateFormatter}}} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:concisedateformatter}} The automatic date formatter used by default can be quite verbose. A new formatter can be accessed that tries to make the tick labels appropriately concise. \begin{quote} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_3-1-0-1}.pdf} \end{figure} \end{quote} \subsubsection{Secondary x/y Axis support} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:secondary-x-y-axis-support}} A new method provides the ability to add a second axis to an existing axes via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:matplotlib.axes.Axes.secondary_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_xaxis}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:matplotlib.axes.Axes.secondary_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_yaxis}}}}}. See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/secondary\_axis} for examples. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_3-1-0-2}.pdf} \end{figure} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FuncScale}} for arbitrary axes scales} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:funcscale-for-arbitrary-axes-scales}} A new {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncScale}}}}} class was added (and {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncTransform}}}}}) to allow the user to have arbitrary scale transformations without having to write a new subclass of {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaleBase}}}}}. This can be accessed by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{function}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{functions}\PYG{o}{=}\PYG{p}{(}\PYG{n}{forward}\PYG{p}{,} \PYG{n}{inverse}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{forward}} and \sphinxcode{\sphinxupquote{inverse}} are callables that return the scale transform and its inverse. See the last example in \DUrole{xref,std,std-doc}{/gallery/scales/scales}. \subsubsection{Legend for scatter} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:legend-for-scatter}} A new method for creating legends for scatter plots has been introduced. Previously, in order to obtain a legend for a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} plot, one could either plot several scatters, each with an individual label, or create proxy artists to show in the legend manually. Now, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} provides a method {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.legend_elements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend\_elements()}}}}} to obtain the handles and labels for a scatter plot in an automated way. This makes creating a legend for a scatter plot as easy as \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_3-1-0-3}.pdf} \end{figure} An example can be found in \DUrole{xref,std,std-ref}{automatedlegendcreation}. \subsubsection{Matplotlib no longer requires framework app build on MacOSX backend} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:matplotlib-no-longer-requires-framework-app-build-on-macosx-backend}} Previous versions of matplotlin required a Framework build of python to work. The app type was updated to no longer require this, so the MacOSX backend should work with non-framework python. This also adds support for the MacOSX backend for PyPy3. \subsection{Figure, FigureCanvas, and Backends} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:figure-figurecanvas-and-backends}} \subsubsection{Figure.frameon is now a direct proxy for the Figure patch visibility state} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:figure-frameon-is-now-a-direct-proxy-for-the-figure-patch-visibility-state}} Accessing \sphinxcode{\sphinxupquote{Figure.frameon}} (including via \sphinxcode{\sphinxupquote{get\_frameon}} and \sphinxcode{\sphinxupquote{set\_frameon}} now directly forwards to the visibility of the underlying Rectangle artist (\sphinxcode{\sphinxupquote{Figure.patch.get\_frameon}}, \sphinxcode{\sphinxupquote{Figure.patch.set\_frameon}}). \subsubsection{\sphinxstyleemphasis{pil\_kwargs} argument added to savefig} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:pil-kwargs-argument-added-to-savefig}} Matplotlib uses Pillow to handle saving to the JPEG and TIFF formats. The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} function gained a \sphinxstyleemphasis{pil\_kwargs} keyword argument, which can be used to forward arguments to Pillow's \sphinxcode{\sphinxupquote{pillow.Image.save()}}. The \sphinxstyleemphasis{pil\_kwargs} argument can also be used when saving to PNG. In that case, Matplotlib also uses Pillow's \sphinxcode{\sphinxupquote{pillow.Image.save()}} instead of going through its own builtin PNG support. \subsubsection{Add \sphinxstyleliteralintitle{\sphinxupquote{inaxes}} method to \sphinxstyleliteralintitle{\sphinxupquote{FigureCanvasBase}}} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:add-inaxes-method-to-figurecanvasbase}} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}} class has now an {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.inaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inaxes}}}}} method to check whether a point is in an axes and returns the topmost axes, else None. \subsubsection{cairo backend defaults to pycairo instead of cairocffi} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:cairo-backend-defaults-to-pycairo-instead-of-cairocffi}} This leads to faster import/runtime performance in some cases. The backend will fall back to cairocffi in case pycairo isn't available. \subsection{Axes and Artists} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:axes-and-artists}} \subsubsection{axes\_grid1 and axisartist Axes no longer draw spines twice} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:axes-grid1-and-axisartist-axes-no-longer-draw-spines-twice}} Previously, spines of \sphinxcode{\sphinxupquote{axes\_grid1}} and \sphinxcode{\sphinxupquote{axisartist}} Axes would be drawn twice, leading to a "bold" appearance. This is no longer the case. \subsubsection{Return type of ArtistInspector.get\_aliases changed} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:return-type-of-artistinspector-get-aliases-changed}} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_aliases}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector.get\_aliases}}}}} previously returned the set of aliases as \sphinxcode{\sphinxupquote{\{fullname: \{alias1: None, alias2: None, ...\}\}}}. The dict-to-None mapping was used to simulate a set in earlier versions of Python. It has now been replaced by a set, i.e. \sphinxcode{\sphinxupquote{\{fullname: \{alias1, alias2, ...\}\}}}. This value is also stored in \sphinxcode{\sphinxupquote{ArtistInspector.aliasd}}, which has likewise changed. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ConnectionPatch}} accepts arbitrary transforms} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:connectionpatch-accepts-arbitrary-transforms}} Alternatively to strings like \sphinxcode{\sphinxupquote{"data"}} or \sphinxcode{\sphinxupquote{"axes fraction"}} \sphinxcode{\sphinxupquote{ConnectionPatch}} now accepts any {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} as input for the \sphinxcode{\sphinxupquote{coordsA}} and \sphinxcode{\sphinxupquote{coordsB}} argument. This allows to draw lines between points defined in different user defined coordinate systems. Also see the \DUrole{xref,std,std-doc}{Connect Simple01 example}. \subsubsection{mplot3d Line3D now allows \{set,get\}\_data\_3d} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:mplot3d-line3d-now-allows-set-get-data-3d}} Lines created with the 3d projection in mplot3d can now access the data using {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.get_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_data\_3d()}}}}} which returns a tuple of array\_likes containing the (x, y, z) data. The equivalent {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.set_data_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_data\_3d}}}}} can be used to modify the data of an existing Line3D. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes3D.voxels}} now shades the resulting voxels} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:axes3d-voxels-now-shades-the-resulting-voxels}} The \sphinxcode{\sphinxupquote{voxels()}} method now takes a \sphinxstyleemphasis{shade} parameter that defaults to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}. This shades faces based on their orientation, behaving just like the matching parameters to \sphinxcode{\sphinxupquote{trisurf()}} and \sphinxcode{\sphinxupquote{bar3d()}}. The plot below shows how this affects the output. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{whats_new_3-1-0-4}.pdf} \end{figure} \subsection{Axis and Ticks} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:axis-and-ticks}} \subsubsection{Added \sphinxstyleliteralintitle{\sphinxupquote{Axis.get\_inverted}} and \sphinxstyleliteralintitle{\sphinxupquote{Axis.set\_inverted}}} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:added-axis-get-inverted-and-axis-set-inverted}} The \sphinxcode{\sphinxupquote{Axis.get\_inverted}} and \sphinxcode{\sphinxupquote{Axis.set\_inverted}} methods query and set whether the axis uses "inverted" orientation (i.e. increasing to the left for the x-axis and to the bottom for the y-axis). They perform tasks similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.xaxis\_inverted}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.yaxis\_inverted}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_xaxis}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_yaxis}}}}}, with the specific difference that \sphinxcode{\sphinxupquote{Axes..set\_inverted}} makes it easier to set the invertedness of an axis regardless of whether it had previously been inverted before. \subsubsection{Adjust default minor tick spacing} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:adjust-default-minor-tick-spacing}} Default minor tick spacing was changed from 0.625 to 0.5 for major ticks spaced 2.5 units apart. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{EngFormatter}} now accepts \sphinxstyleliteralintitle{\sphinxupquote{usetex}}, \sphinxstyleliteralintitle{\sphinxupquote{useMathText}} as keyword only arguments} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:engformatter-now-accepts-usetex-usemathtext-as-keyword-only-arguments}} A public API has been added to \sphinxcode{\sphinxupquote{EngFormatter}} to control how the numbers in the ticklabels will be rendered. By default, \sphinxcode{\sphinxupquote{useMathText}} evaluates to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.formatter.use\_mathtext'"{]}}}} and \sphinxcode{\sphinxupquote{usetex}} evaluates to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"'text.usetex'"{]}}}}. If either is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} then the numbers will be encapsulated by \sphinxcode{\sphinxupquote{\$}} signs. When using \sphinxcode{\sphinxupquote{TeX}} this implies that the numbers will be shown in TeX's math font. When using mathtext, the \sphinxcode{\sphinxupquote{\$}} signs around numbers will ensure unicode rendering (as implied by mathtext). This will make sure that the minus signs in the ticks are rendered as the unicode=minus (U+2212) when using mathtext (without relying on the \sphinxcode{\sphinxupquote{fix\_minus}} method). \subsection{Animation and Interactivity} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:animation-and-interactivity}} \subsubsection{Support for forward/backward mouse buttons} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:support-for-forward-backward-mouse-buttons}} Figure managers now support a \sphinxcode{\sphinxupquote{button\_press}} event for mouse buttons, similar to the \sphinxcode{\sphinxupquote{key\_press}} events. This allows binding actions to mouse buttons (see {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseButton}}}}}) The first application of this mechanism is support of forward/backward mouse buttons in figures created with the Qt5 backend. \subsubsection{\sphinxstyleemphasis{progress\_callback} argument to \sphinxstyleliteralintitle{\sphinxupquote{save()}}} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:progress-callback-argument-to-save}} The method {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save}}}}} gained an optional \sphinxstyleemphasis{progress\_callback} argument to notify the saving progress. \subsubsection{Add \sphinxstyleliteralintitle{\sphinxupquote{cache\_frame\_data}} keyword-only argument into \sphinxstyleliteralintitle{\sphinxupquote{animation.FuncAnimation}}} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:add-cache-frame-data-keyword-only-argument-into-animation-funcanimation}} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation.FuncAnimation}}}}} has been caching frame data by default; however, this caching is not ideal in certain cases e.g. When {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} needs to be only drawn(not saved) interactively and memory required by frame data is quite large. By adding \sphinxstyleemphasis{cache\_frame\_data} keyword-only argument, users can now disable this caching; thereby, this new argument provides a fix for issue \sphinxhref{https://github.com/matplotlib/matplotlib/issues/8528/}{\#8528}. \subsubsection{Endless Looping GIFs with PillowWriter} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:endless-looping-gifs-with-pillowwriter}} We acknowledge that most people want to watch a gif more than once. Saving an animation as a gif with PillowWriter now produces an endless looping gif. \subsubsection{Adjusted \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.widgets.Slider}} to have vertical orientation} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:adjusted-matplotlib-widgets-slider-to-have-vertical-orientation}} The {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Slider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Slider}}}}} widget now takes an optional argument \sphinxstyleemphasis{orientation} which indicates the direction (\sphinxcode{\sphinxupquote{'horizontal'}} or \sphinxcode{\sphinxupquote{'vertical'}}) that the slider should take. \subsubsection{Improved formatting of image values under cursor when a colorbar is present} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:improved-formatting-of-image-values-under-cursor-when-a-colorbar-is-present}} When a colorbar is present, its formatter is now used to format the image values under the mouse cursor in the status bar. For example, for an image displaying the values 10,000 and 10,001, the statusbar will now (using default settings) display the values as \sphinxcode{\sphinxupquote{10000}} and \sphinxcode{\sphinxupquote{10001}}), whereas both values were previously displayed as \sphinxcode{\sphinxupquote{1e+04}}. \subsubsection{MouseEvent button attribute is now an IntEnum} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:mouseevent-button-attribute-is-now-an-intenum}} The \sphinxcode{\sphinxupquote{button}} attribute of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instances can take the values None, 1 (left button), 2 (middle button), 3 (right button), "up" (scroll), and "down" (scroll). For better legibility, the 1, 2, and 3 values are now represented using the \sphinxcode{\sphinxupquote{IntEnum}} class {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseButton}}}}}, with the values \sphinxcode{\sphinxupquote{MouseButton.LEFT}} (\sphinxcode{\sphinxupquote{== 1}}), \sphinxcode{\sphinxupquote{MouseButton.MIDDLE}} (\sphinxcode{\sphinxupquote{== 2}}), and \sphinxcode{\sphinxupquote{MouseButton.RIGHT}} (\sphinxcode{\sphinxupquote{== 3}}). \subsection{Configuration, Install, and Development} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:configuration-install-and-development}} \subsubsection{The MATPLOTLIBRC environment variable can now point to any "file" path} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:the-matplotlibrc-environment-variable-can-now-point-to-any-file-path}} This includes device files; in particular, on Unix systems, one can set \sphinxcode{\sphinxupquote{MATPLOTLIBRC}} to \sphinxcode{\sphinxupquote{/dev/null}} to ignore the user's matplotlibrc file and fall back to Matplotlib's defaults. As a reminder, if \sphinxcode{\sphinxupquote{MATPLOTLIBRC}} points to a directory, Matplotlib will try to load the matplotlibrc file from \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC/matplotlibrc}}. \subsubsection{Allow LaTeX code \sphinxstyleliteralintitle{\sphinxupquote{pgf.preamble}} and \sphinxstyleliteralintitle{\sphinxupquote{text.latex.preamble}} in MATPLOTLIBRC file} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:allow-latex-code-pgf-preamble-and-text-latex-preamble-in-matplotlibrc-file}} Previously, the rc file keys \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"pgf.preamble"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.latex.preamble"{]}}}} were parsed using commas as separators. This would break valid LaTeX code, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZbs{}\PYG{n}{usepackage}\PYG{p}{[}\PYG{n}{protrusion}\PYG{o}{=}\PYG{n}{true}\PYG{p}{,} \PYG{n}{expansion}\PYG{o}{=}\PYG{n}{false}\PYG{p}{]}\PYG{p}{\PYGZob{}}\PYG{n}{microtype}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The parsing has been modified to pass the complete line to the LaTeX system, keeping all commas. Passing a list of strings from within a Python script still works as it used to. \subsubsection{New logging API} \label{\detokenize{users/prev_whats_new/whats_new_3.1.0:new-logging-api}} {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.set_loglevel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.set\_loglevel}}}}} / \sphinxcode{\sphinxupquote{pyplot.set\_loglevel}} can be called to display more (or less) detailed logging output. \chapter{License} \label{\detokenize{users/license:license}}\label{\detokenize{users/license:id1}}\label{\detokenize{users/license::doc}} Matplotlib only uses BSD compatible code, and its license is based on the \sphinxhref{https://python.org/psf/license}{PSF} license. See the Open Source Initiative \sphinxhref{https://www.opensource.org/licenses}{licenses page} for details on individual licenses. Non-BSD compatible licenses (e.g., LGPL) are acceptable in matplotlib toolkits. For a discussion of the motivations behind the licencing choice, see {\hyperref[\detokenize{devel/license:license-discussion}]{\sphinxcrossref{\DUrole{std,std-ref}{Licenses}}}}. \section{Copyright Policy} \label{\detokenize{users/license:copyright-policy}} John Hunter began matplotlib around 2003. Since shortly before his passing in 2012, Michael Droettboom has been the lead maintainer of matplotlib, but, as has always been the case, matplotlib is the work of many. Prior to July of 2013, and the 1.3.0 release, the copyright of the source code was held by John Hunter. As of July 2013, and the 1.3.0 release, matplotlib has moved to a shared copyright model. matplotlib uses a shared copyright model. Each contributor maintains copyright over their contributions to matplotlib. But, it is important to note that these contributions are typically only changes to the repositories. Thus, the matplotlib source code, in its entirety, is not the copyright of any single person or institution. Instead, it is the collective copyright of the entire matplotlib Development Team. If individual contributors want to maintain a record of what changes/contributions they have specific copyright on, they should indicate their copyright in the commit message of the change, when they commit the change to one of the matplotlib repositories. The Matplotlib Development Team is the set of all contributors to the matplotlib project. A full list can be obtained from the git version control logs. \section{License agreement for matplotlib 3.1.0} \label{\detokenize{users/license:license-agreement-for-matplotlib-version}} 1. This LICENSE AGREEMENT is between the Matplotlib Development Team ("MDT"), and the Individual or Organization ("Licensee") accessing and otherwise using matplotlib software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, MDT hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use matplotlib 3.1.0 alone or in any derivative version, provided, however, that MDT's License Agreement and MDT's notice of copyright, i.e., "Copyright (c) 2012-2013 Matplotlib Development Team; All Rights Reserved" are retained in matplotlib 3.1.0 alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates matplotlib 3.1.0 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to matplotlib 3.1.0. 4. MDT is making matplotlib 3.1.0 available to Licensee on an "AS IS" basis. MDT MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, MDT MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 3.1.0 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. MDT SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB 3.1.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING MATPLOTLIB 3.1.0, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between MDT and Licensee. This License Agreement does not grant permission to use MDT trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using matplotlib 3.1.0, Licensee agrees to be bound by the terms and conditions of this License Agreement. \section{License agreement for matplotlib versions prior to 1.3.0} \label{\detokenize{users/license:license-agreement-for-matplotlib-versions-prior-to-1-3-0}} 1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the Individual or Organization ("Licensee") accessing and otherwise using matplotlib software in source or binary form and its associated documentation. 2. Subject to the terms and conditions of this License Agreement, JDH hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use matplotlib 3.1.0 alone or in any derivative version, provided, however, that JDH's License Agreement and JDH's notice of copyright, i.e., "Copyright (c) 2002-2009 John D. Hunter; All Rights Reserved" are retained in matplotlib 3.1.0 alone or in any derivative version prepared by Licensee. 3. In the event Licensee prepares a derivative work that is based on or incorporates matplotlib 3.1.0 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to matplotlib 3.1.0. 4. JDH is making matplotlib 3.1.0 available to Licensee on an "AS IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 3.1.0 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB 3.1.0 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING MATPLOTLIB 3.1.0, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between JDH and Licensee. This License Agreement does not grant permission to use JDH trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. 8. By copying, installing or otherwise using matplotlib 3.1.0, Licensee agrees to be bound by the terms and conditions of this License Agreement. \chapter{Credits} \label{\detokenize{users/credits:credits}}\label{\detokenize{users/credits:id1}}\label{\detokenize{users/credits::doc}} Matplotlib was written by John D. Hunter, with contributions from an ever-increasing number of users and developers. The current lead developer is Thomas A. Caswell; they are assisted by many \sphinxhref{https://www.openhub.net/p/matplotlib/contributors}{active} developers. The following is a list of contributors extracted from the git revision control history of the project: 4over7, 816-8055, Aaron Boushley, Aashil Patel, AbdealiJK, Abhinuv Nitin Pitale, Acanthostega, Adam, Adam Ginsburg, Adam Heck, Adam J. Stewart, Adam Ortiz, Adam Williamson, Adrian Price-Whelan, Adrien Chardon, Adrien F. Vincent, Ahmet Bakan, Akshay Nair, Alan Bernstein, Alan Du, Alberto, Alejandro Dubrovsky, Aleksey Bilogur, Alex C. Szatmary, Alex Loew, Alex Rothberg, AlexCav, Alexander Buchkovsky, Alexander Harnisch, Alexander Taylor, Alexei Colin, Alexis Bienvenüe, Ali Mehdi, Ali Uneri, Alistair Muldal, Allan Haldane, Allen Downey, Alon Hershenhorn, Alvaro Sanchez, Amit Aronovitch, Amy, AmyTeegarden, AndersonDaniel, Andras Deak, Andrea Bedini, Andreas Gustafsson, Andreas Hilboll, Andreas Mayer, Andreas Mueller, Andreas Wallner, Andrew Dawson, Andrew Merrill, Andrew Nelson, Andrew Straw, Andy Mastbaum, Andy Zhu, Ankur Dedania, Anthony Scopatz, Anton Akhmerov, Antony Lee, Anubhav Shrimal, Ao Liu (frankliuao), Arie, Ariel Hernán Curiale, Arnaud Gardelein, Arpad Horvath, Arthur Paulino, Arvind, Aseem Bansal, Atharva Khare, Avinash Sharma, Ayappan P, BHT, BTWS, Bas van Schaik, Bastian Bechtold, Behram Mistree, Ben, Ben Cohen, Ben Gamari, Ben Keller, Ben Root, Benedikt Daurer, Benjamin Bengfort, Benjamin Berg, Benjamin Congdon, Benjamin Reedlunn, Bernhard M. Wiedemann, Bharat123rox, Bianca Gibson, Binglin Chang, Björn Dahlgren, Blaise Thompson, Boaz Mohar, Bradley M. Froehle, Brandon Liu, Brendan Zhang, Brennan Magee, Brett Cannon, Brett Graham, Brian Mattern, Brian McLaughlin, Brigitta Sipocz, Bruno Beltran, Bruno Zohreh, CJ Carey, Cameron Bates, Cameron Davidson-Pilon, Cameron Fackler, Carissa Brittain, Carl Michal, Carsten Schelp, Carwyn Pelley, Casey Webster, Casper van der Wel, Charles Moad, Charles Ruan, Chen Karako, Cho Yin Yong, Chris Beaumont, Chris G, Chris Holdgraf, Chris Zimmerman, Christian Brueffer, Christian Stade-Schuldt, Christoph Dann, Christoph Deil, Christoph Gohlke, Christoph Hoffmann, Christoph Reiter, Christopher Bradshaw, Cimarron Mittelsteadt, Cody Scot, Colin, Colin Carroll, Conner R. Phillips, Corey Farwell, Craig Citro, Craig M, Craig Tenney, DaCoEx, Dakota Blair, Damian, Damon McDougall, Dan Hickstein, Dana, Daniel C. Marcu, Daniel Hyams, Daniel Laidig, Daniel O'Connor, DanielMatu, Daniele Nicolodi, Danny Hermes, Dara Adib, Darren Dale, DaveL17, David A, David Anderson, David Haberthür, David Huard, David Kaplan, David Kent, David Kua, David Stansby, David Trémouilles, Dean Malmgren, Derek Kim, Derek Tropf, Devashish Deshpande, Diego Mora Cespedes, Dietmar Schwertberger, Dietrich Brunn, Divyam Madaan, Dmitry Lupyan, Dmitry Mottl, Dmitry Shachnev, DonaldSeo, Dora Fraeman, DoriekeMG, Dorota Jarecka, Doug Blank, Drew J. Sonne, Duncan Macleod, Dylan Evans, E. G. Patrick Bos, Edin Salkovic, Egor Panfilov, Elan Ernest, Elena Glassman, Elias Pipping, Elijah Schutz, Elizabeth Seiver, Elliott Sales de Andrade, Elvis Stansvik, Emil Mikulic, Emlyn Price, Eric Dill, Eric Firing, Eric Larson, Eric Ma, Eric O. LEBIGOT (EOL), Eric Wieser, Erik Bray, Erik M. Bray, Erin Pintozzi, Eugen Beck, Eugene Yurtsev, Evan Davey, Ezra Peisach, Fabian Kloosterman, Fabian-Robert Stöter, Fabien Maussion, Fabio Zanini, FedeMiorelli, Federico Ariza, Felipe, Felix, Felix Kohlgrüber, Felix Yan, Fernando Perez, Filip Dimitrovski, Filipe Fernandes, Florencia Noriega, Florian Le Bourdais, Florian Rhiem, Francesco Montesano, Francis Colas, Franco Vaccari, Francoise Provencher, Frank Yu, François Magimel, Gabe, Gabriel Munteanu, Galen Lynch, Gauravjeet, Gaute Hope, Gazing, Gellule Xg, Geoffrey Spear, Geoffroy Billotey, Gerald Storer, Giovanni, Graeme Smecher, Graham Poulter, Gregory Ashton, Gregory R. Lee, Grillard, Grégory Lielens, Guillaume Gay, Guillermo Breto, Gustavo Braganca, Gustavo Goretkin, HHest, Hajoon Choi, Hakan Kucukdereli, Hans Dembinski, Hans Meine, Hans Moritz Günther, Harnesser, Harshal Prakash Patankar, Harshit Patni, Hassan Kibirige, Hastings Greer, Heath Henley, Heiko Oberdiek, Helder, Henning Pohl, Herbert Kruitbosch, Holger Peters, Hubert Holin, Ian Thomas, Ida Hjorth, Ignas Anikevicius (gns\_ank), Ildar Akhmetgaleev, Ilia Kurenkov, Ilya Flyamer, ImSoErgodic, ImportanceOfBeingErnest, Ioannis Filippidis, Isa Hassen, Isaac Schwabacher, Isaac Slavitt, Ismo Toijala, J Alammar, J. Goutin, Jaap Versteegh, Jack Kelly, Jacob McDonald, Jae-Joon Lee, Jaime Fernandez, Jake Vanderplas, James A. Bednar, James Adams, James Pallister, James R. Evans, JamesMakela, Jamie Nunez, Jan S. (Milania1), Jan Schlüter, Jan Schulz, Jan-Philip Gehrcke, Jan-willem De Bleser, Jarrod Millman, Jascha Ulrich, Jason Grout, Jason King, Jason Liw Yan Chong, Jason Miller, Jason Neal, Jason Zheng, JayP16, Jeff Lutgen, Jeff Whitaker, Jeffrey Bingham, Jeffrey Hokanson @ Loki, JelsB, Jens Hedegaard Nielsen, Jeremy Fix, Jeremy O'Donoghue, Jeremy Thurgood, Jessica B. Hamrick, Jim Radford, Jochen Voss, Jody Klymak, Joe Kington, Joel B. Mohler, Joel T. Frederico, Joel Wanner, Johannes H. Jensen, Johannes Wienke, John Hoffman, John Hunter, John Vandenberg, Johnny Gill, JojoBoulix, Jonathan Waltman, Jorrit Wronski, Josef Heinen, Joseph Albert, Joseph Fox-Rabinovitz, Joseph Jon Booker, Joseph Martinot-Lagarde, José Ricardo, Jouni K. Seppänen, Juan Nunez-Iglesias, Julia Sprenger, Julian Mehne, Julian Taylor, Julian V. Modesto, JulianCienfuegos, Julien Lhermitte, Julien Schueller, Julien Woillez, Julien-Charles Lévesque, Jun Tan, Justin Cai, Jörg Dietrich, Kacper Kowalik (Xarthisius), Kai Muehlbauer, Kanchana Ranasinghe, Kanwar245, Katrin Leinweber, Katy Huff, Kayla Ngan, Keerysanth Sribaskaran, Ken McIvor, Kenneth Ma, Kevin Chan, Kevin Davies, Kevin Ji, Kevin Keating, Kevin Rose, Kexuan Sun, Kieran Ramos, Kimmo Palin, Kjartan Myrdal, Kjell Le, Klara Gerlei, Konrad Förstner, Konstantin Tretyakov, Kristen M. Thyng, Kyle Bridgemohansingh, Kyle Sunden, Kyler Brown, Lance Hepler, Laptop11\_ASPP2016, Larry Bradley, Leeonadoh, Lennart Fricke, Leo Singer, Leon Loopik, Leon Yin, LevN0, Levi Kilcher, Liam Brannigan, Lion Krischer, Lionel Miller, Lodato Luciano, Lori J, Loïc Estève, Loïc Séguin-C, Luca Verginer, Luis Pedro Coelho, Maarten Baert, Magnus Nord, Maik Riechert, Majid alDosari, Maksym P, Manish Devgan, Manuel GOACOLOU, Manuel Jung, Manuel Metz, Marc Abramowitz, Marcel Martin, Marcos Duarte, Marek Rudnicki, Marianne Corvellec, Marin Gilles, Mark Harfouche, Marko Baštovanović, Markus Roth, Markus Rothe, Martin Dengler, Martin Fitzpatrick, Martin Spacek, Martin Teichmann, Martin Thoma, Martin Ueding, Massimo Santini, Masud Rahman, Mathieu Duponchelle, Matt Giuca, Matt Hancock, Matt Klein, Matt Li, Matt Newville, Matt Shen, Matt Terry, Matthew Bell, Matthew Brett, Matthew Emmett, Matthias Bussonnier, Matthias Geier, Matthias Lüthi, Matthieu Caneill, Matti Picus, Matěj Týč, Maximilian Albert, Maximilian Maahn, Maximilian Nöthe, Maximilian Trescher, MeeseeksMachine, Mellissa Cross, Mher Kazandjian, Michael, Michael Droettboom, Michael Jancsy, Michael Sarahan, Michael Scott Cuthbert, Michael Seifert, Michael Welter, Michiel de Hoon, Michka Popoff, Mike Henninger, Mike Jarvis, Mike Kaufman, Mikhail Korobov, MinRK, Minty Zhang, MirandaXM, Miriam Sierig, Mitar, Molly Rossow, Moritz Boehle, Mudit Surana, Muhammad Mehdi, Naoya Kanai, Nathan Goldbaum, Nathan Musoke, Nathaniel M. Beaver, Neil, Neil Crighton, Nelle Varoquaux, Niall Robinson, Nic Eggert, Nicholas Devenish, Nick Forrington, Nick Garvey, Nick Papior, Nick Semenkovich, Nico Schlömer, Nicolas Courtemanche, Nicolas P. Rougier, Nicolas Pinto, Nicolas Tessore, Nik Quibin, Nikita Kniazev, Niklas Koep, Nikolay Vyahhi, Nils Werner, Ninad Bhat, Norbert Nemec, Norman Fomferra, OceanWolf, Oleg Selivanov, Olga Botvinnik, Oliver Natt, Oliver Willekens, Olivier, Orso Meneghini, Osarumwense, Pankaj Pandey, Paramonov Andrey, Parfenov Sergey, Pascal Bugnion, Pastafarianist, Patrick Chen, Patrick Marsh, Paul, Paul Barret, Paul Ganssle, Paul Hobson, Paul Ivanov, Paul J. Koprowski, Paul Kirow, Paul Romano, Paul Seyfert, Pauli Virtanen, Pavol Juhas, Per Parker, Perry Greenfield, Pete Bachant, Pete Huang, Pete Peterson, Peter Iannucci, Peter Mackenzie-Helnwein, Peter Mortensen, Peter St. John, Peter Würtz, Petr Danecek, Phil Elson, Phil Ruffwind, Pierre Haessig, Pierre Thibault, Pierre de Buyl, Pim Schellart, Piti Ongmongkolkul, Pranav Garg, Przemysław Dąbek, Puneeth Chaganti, QiCuiHub, Qingpeng "Q.P." Zhang, RAKOTOARISON Herilalaina, Ramiro Gómez, Randy Olson, Rasmus Diederichsen, Ratin\_Kumar, Reinier Heeres, Remi Rampin, Richard Gowers, Richard Hattersley, Richard Trieu, Ricky, Rishikesh, Rob Harrigan, Robert Johansson, Robin Dunn, Robin Neatherway, Robin Wilson, Rohan Walker, Roland Wirth, Roman Yurchak, Ronald Hartley-Davies, Roy Smith, Rui Lopes, Russell Owen, RutgerK, Ryan, Ryan Blomberg, Ryan D'Souza, Ryan Dale, Ryan May, Ryan Morshead, Ryan Nelson, RyanPan, SBCV, Saket Choudhary, Salganos, Salil Vanvari, Salinder Sidhu, Sam Vaughan, Sameer D'Costa, Samson, Samuel St-Jean, Sander, Sandro Tosi, Scott Howard, Scott Lasley, Scott Lawrence, Scott Stevenson, Sean Farley, Sebastian Bullinger, Sebastian Pinnau, Sebastian Raschka, Sebastián Vanrell, Seraphim Alvanides, Sergey B Kirpichev, Sergey Kholodilov, Sergey Koposov, Seunghoon Park, Silviu Tantos, Simon Cross, Simon Gibbons, Skelpdar, Skipper Seabold, Slav Basharov, Sourav Singh, Spencer McIntyre, Stanley, Simon, Stefan Lehmann, Stefan Pfenninger, Stefan van der Walt, Stefano Rivera, Stephan Erb, Stephane Raynaud, Stephen Horst, Stephen-Chilcote, Sterling Smith, Steve Chaplin, Steven Silvester, Steven Tilley, Stuart Mumford, TD22057, Tadeo Corradi, Taehoon Lee, Takafumi Arakaki, Takeshi Kanmae, Tamas Gal, Tanuj, Taras Kuzyo, Ted Petrou, Terrence J. Katzenbaer, Terrence Katzenbaer, The Gitter Badger, Thein Oo, Thomas A Caswell, Thomas Hisch, Thomas Kluyver, Thomas Lake, Thomas Levine, Thomas Mansencal, Thomas Robitaille, Thomas Spura, Thomas VINCENT, Thorsten Liebig, Tian Xia, Till Stensitzki, Tim Hoffmann, Timo Vanwynsberghe, Tobia De Koninck, Tobias Froehlich, Tobias Hoppe, Tobias Megies, Todd Jennings, Todd Miller, Tom, Tom Augspurger, Tom Dupré la Tour, Tomas Kazmar, Tony S Yu, Tor Colvin, Travis Oliphant, Trevor Bekolay, Trish Gillett-Kawamoto, Truong Pham, Tuan Dung Tran, Tyler Makaro, Ulrich Dobramysl, Umair Idris, V. Armando Solé, V. R, Vadim Markovtsev, Valentin Haenel, Valentin Schmidt, Vedant Nanda, Vidur Satija, Viktor Kerkez, Viraj Mohile, Vlad Seghete, Víctor Terrón, Víctor Zabalza, WANG Aiyong, Warren Weckesser, Wen Li, Wendell Smith, Werner F Bruhin, Wes Campaigne, Wieland Hoffmann, Will Handley, Will Silva, William Granados, William Mallard, William Manley, Wouter Overmeire, Xiaowen Tang, Xufeng Wang, Yann Tambouret, Yao-Yuan Mao, Yaron de Leeuw, Yu Feng, Yunfei Yang, Yuri D'Elia, Yuval Langer, Yuxin Wu, Yuya, ZWL, Zac Hatfield-Dodds, Zach Pincus, Zair Mubashar, Zbigniew Jędrzejewski-Szmek, Zhili (Jerry) Pan, ahed87, akrherz, alcinos, alex, alvarosg, aneda, anykraus, aparamon, apodemus, arokem, as691454, aseagram, ash13, aszilagyi, azure-pipelines{[}bot{]}, bblay, bduick, bev-a-tron, blackw1ng, blah blah, btang02, buefox, burrbull, butterw, cammil, captainwhippet, cclauss, ch3rn0v, chadawagner, chebee7i, chelseatroy, cknd, cldssty, clintval, dabana, dahlbaek, danielballan, daronjp, davidovitch, daydreamt, deeenes, deepyaman, dlmccaffrey, domspad, donald, drevicko, e-q, elpres, endolith, et2010, fardal, ffteja, fgb, fibersnet, fredrik-1, frenchwr, fuzzythecat, fvgoto, gcallah, gitj, gluap, gnaggnoyil, goir, goldstarwebs, greg-roper, gregorybchris, gwin-zegal, hannah, helmiriawan, hugadams, ilivni, insertroar, itziakos, jacob-on-github, jbbrokaw, jbhopkins, jdollichon, jerrylui803, jhelie, jli, joelostblom, jonchar, juan.gonzalez, kcrisman, keithbriggs, kelsiegr, khyox, kikocorreoso, klaus, klonuo, kramer65, kshramt, lboogaard, legitz7, lichri12, limtaesu, lspvic, luftek, luz.paz, lzkelley, mamrehn, marky, masamson, mbyt, mcelrath, mcquin, mdipierro, mitch, mlub, mobando, mromanie, muahah, myyc, nathan78906, navdeep rana, nbrunett, nemanja, neok-m4700, nepix32, nickystringer, njwhite, nmartensen, nwin, ob, pdubcali, pkienzle, productivememberofsociety666, profholzer, pupssman, rahiel, rebot, rhoef, rsnape, ruin, rvhbooth, s0vereign, s9w, saksmito, scls19fr, scott-vsi, sdementen, serv-inc, settheory, sfroid, shaunwbell, simon-kraeusel, simonpf, sindunuragarp, smheidrich, sohero, spiessbuerger, stahlous, stone, stonebig, switham, sxntxn, syngron, teresy, thoo, thuvejan, tmdavison, tomoemon, tonyyli, torfbolt, u55, ugurthemaster, ultra-andy, vab9, vbr, vraelvrangr, watkinrt, woclass, xbtsw, xuanyuansen, y1thof, yeo, zhangeugenia, zhoubecky, Élie Gouzien, Андрей Парамонов Some earlier contributors not included above are (with apologies to any we have missed): Charles Twardy, Gary Ruben, John Gill, David Moore, Paul Barrett, Jared Wahlstrand, Jim Benson, Paul Mcguire, Andrew Dalke, Nadia Dencheva, Baptiste Carvello, Sigve Tjoraand, Ted Drain, James Amundson, Daishi Harada, Nicolas Young, Paul Kienzle, John Porter, and Jonathon Taylor. Thanks to Tony Yu for the original logo design. We also thank all who have reported bugs, commented on proposed changes, or otherwise contributed to Matplotlib's development and usefulness. \part{The Matplotlib FAQ} \label{\detokenize{faq/index:the-matplotlib-faq}}\label{\detokenize{faq/index:faq-index}}\label{\detokenize{faq/index::doc}} \chapter{Installation} \label{\detokenize{faq/installing_faq:installation}}\label{\detokenize{faq/installing_faq:installing-faq}}\label{\detokenize{faq/installing_faq::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id2}}{\hyperref[\detokenize{faq/installing_faq:installation}]{\sphinxcrossref{Installation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id3}}{\hyperref[\detokenize{faq/installing_faq:report-a-compilation-problem}]{\sphinxcrossref{Report a compilation problem}}} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id4}}{\hyperref[\detokenize{faq/installing_faq:matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it}]{\sphinxcrossref{Matplotlib compiled fine, but nothing shows up when I use it}}} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id5}}{\hyperref[\detokenize{faq/installing_faq:how-to-completely-remove-matplotlib}]{\sphinxcrossref{How to completely remove Matplotlib}}} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id6}}{\hyperref[\detokenize{faq/installing_faq:linux-notes}]{\sphinxcrossref{Linux Notes}}} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id7}}{\hyperref[\detokenize{faq/installing_faq:osx-notes}]{\sphinxcrossref{OSX Notes}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id8}}{\hyperref[\detokenize{faq/installing_faq:which-python-for-osx}]{\sphinxcrossref{Which python for OSX?}}} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id9}}{\hyperref[\detokenize{faq/installing_faq:installing-osx-binary-wheels}]{\sphinxcrossref{Installing OSX binary wheels}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id10}}{\hyperref[\detokenize{faq/installing_faq:pip-problems}]{\sphinxcrossref{pip problems}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id11}}{\hyperref[\detokenize{faq/installing_faq:checking-your-installation}]{\sphinxcrossref{Checking your installation}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/installing_faq:id12}}{\hyperref[\detokenize{faq/installing_faq:install-from-source}]{\sphinxcrossref{Install from source}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \section{Report a compilation problem} \label{\detokenize{faq/installing_faq:report-a-compilation-problem}} See {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}}. \section{Matplotlib compiled fine, but nothing shows up when I use it} \label{\detokenize{faq/installing_faq:matplotlib-compiled-fine-but-nothing-shows-up-when-i-use-it}} The first thing to try is a {\hyperref[\detokenize{faq/installing_faq:clean-install}]{\sphinxcrossref{\DUrole{std,std-ref}{clean install}}}} and see if that helps. If not, the best way to test your install is by running a script, rather than working interactively from a python shell or an integrated development environment such as \sphinxstyleliteralstrong{\sphinxupquote{IDLE}} which add additional complexities. Open up a UNIX shell or a DOS command prompt and run, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{from pylab import *; plot(); show()}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{verbose}\PYG{o}{\PYGZhy{}}\PYG{n}{helpful} \end{sphinxVerbatim} This will give you additional information about which backends Matplotlib is loading, version information, and more. At this point you might want to make sure you understand Matplotlib's {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{configuration}}}} process, governed by the \sphinxcode{\sphinxupquote{matplotlibrc}} configuration file which contains instructions within and the concept of the Matplotlib backend. If you are still having trouble, see {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}}. \section{How to completely remove Matplotlib} \label{\detokenize{faq/installing_faq:how-to-completely-remove-matplotlib}}\label{\detokenize{faq/installing_faq:clean-install}} Occasionally, problems with Matplotlib can be solved with a clean installation of the package. In order to fully remove an installed Matplotlib: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Delete the caches from your {\hyperref[\detokenize{faq/troubleshooting_faq:locating-matplotlib-config-dir}]{\sphinxcrossref{\DUrole{std,std-ref}{Matplotlib configuration directory}}}}. \item {} Delete any Matplotlib directories or eggs from your {\hyperref[\detokenize{faq/troubleshooting_faq:locating-matplotlib-install}]{\sphinxcrossref{\DUrole{std,std-ref}{installation directory}}}}. \end{enumerate} \section{Linux Notes} \label{\detokenize{faq/installing_faq:linux-notes}} To install Matplotlib at the system-level, we recommend that you use your distribution's package manager. This will guarantee that Matplotlib's dependencies will be installed as well. If, for some reason, you cannot use the package manager, you may use the wheels available on PyPI: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{n}{matplotlib} \end{sphinxVerbatim} or {\hyperref[\detokenize{faq/installing_faq:install-from-git}]{\sphinxcrossref{\DUrole{std,std-ref}{build Matplotlib from source}}}}. \section{OSX Notes} \label{\detokenize{faq/installing_faq:osx-notes}} \subsection{Which python for OSX?} \label{\detokenize{faq/installing_faq:which-python-for-osx}}\label{\detokenize{faq/installing_faq:id1}} Apple ships OSX with its own Python, in \sphinxcode{\sphinxupquote{/usr/bin/python}}, and its own copy of Matplotlib. Unfortunately, the way Apple currently installs its own copies of NumPy, Scipy and Matplotlib means that these packages are difficult to upgrade (see \sphinxhref{https://github.com/MacPython/wiki/wiki/Which-Python\#system-python-and-extra-python-packages}{system python packages}). For that reason we strongly suggest that you install a fresh version of Python and use that as the basis for installing libraries such as NumPy and Matplotlib. One convenient way to install Matplotlib with other useful Python software is to use one of the excellent Python scientific software collections that are now available: \begin{itemize} \item {} \sphinxhref{https://www.anaconda.com/}{Anaconda} from \sphinxhref{https://www.continuum.io}{Continuum Analytics} \item {} \sphinxhref{https://www.enthought.com/products/canopy/}{Canopy} from \sphinxhref{https://www.enthought.com}{Enthought} \end{itemize} These collections include Python itself and a wide range of libraries; if you need a library that is not available from the collection, you can install it yourself using standard methods such as \sphinxstyleemphasis{pip}. Continuum and Enthought offer their own installation support for these collections; see the Ananconda and Canopy web pages for more information. Other options for a fresh Python install are the standard installer from \sphinxhref{https://www.python.org/downloads/mac-osx/}{python.org}, or installing Python using a general OSX package management system such as \sphinxhref{http://brew.sh}{homebrew} or \sphinxhref{https://www.macports.org}{macports}. Power users on OSX will likely want one of homebrew or macports on their system to install open source software packages, but it is perfectly possible to use these systems with another source for your Python binary, such as Anaconda, Canopy or Python.org Python. \subsection{Installing OSX binary wheels} \label{\detokenize{faq/installing_faq:installing-osx-binary-wheels}}\label{\detokenize{faq/installing_faq:install-osx-binaries}} If you are using Python from \sphinxurl{https://www.python.org}, Homebrew, or Macports, then you can use the standard pip installer to install Matplotlib binaries in the form of wheels. pip is installed by default with python.org and Homebrew Python, but needs to be manually installed on Macports with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sudo} \PYG{n}{port} \PYG{n}{install} \PYG{n}{py36}\PYG{o}{\PYGZhy{}}\PYG{n}{pip} \end{sphinxVerbatim} Once pip is installed, you can install Matplotlib and all its dependencies with from the Terminal.app command line: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python3} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{n}{matplotlib} \end{sphinxVerbatim} (\sphinxcode{\sphinxupquote{sudo python3.6 ...}} on Macports). You might also want to install IPython or the Jupyter notebook (\sphinxcode{\sphinxupquote{python3 -mpip install ipython notebook}}). \subsubsection{pip problems} \label{\detokenize{faq/installing_faq:pip-problems}} If you get errors with pip trying to run a compiler like \sphinxcode{\sphinxupquote{gcc}} or \sphinxcode{\sphinxupquote{clang}}, then the first thing to try is to \sphinxhref{https://guide.macports.org/chunked/installing.html\#installing.xcode}{install xcode} and retry the install. If that does not work, then check {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}}. \subsection{Checking your installation} \label{\detokenize{faq/installing_faq:checking-your-installation}} The new version of Matplotlib should now be on your Python "path". Check this at the Terminal.app command line: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python3} \PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{import matplotlib; print(matplotlib.\PYGZus{}\PYGZus{}version\PYGZus{}\PYGZus{}, matplotlib.\PYGZus{}\PYGZus{}file\PYGZus{}\PYGZus{})}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} You should see something like \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+m+mf}{3.0}\PYG{o}{.}\PYG{l+m+mi}{0} \PYG{o}{/}\PYG{n}{Library}\PYG{o}{/}\PYG{n}{Frameworks}\PYG{o}{/}\PYG{n}{Python}\PYG{o}{.}\PYG{n}{framework}\PYG{o}{/}\PYG{n}{Versions}\PYG{o}{/}\PYG{l+m+mf}{3.6}\PYG{o}{/}\PYG{n}{lib}\PYG{o}{/}\PYG{n}{python3}\PYG{o}{.}\PYG{l+m+mi}{6}\PYG{o}{/}\PYG{n}{site}\PYG{o}{\PYGZhy{}}\PYG{n}{packages}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n+nf+fm}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{3.0.0}} is the Matplotlib version you just installed, and the path following depends on whether you are using Python.org Python, Homebrew or Macports. If you see another version, or you get an error like \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Traceback} \PYG{p}{(}\PYG{n}{most} \PYG{n}{recent} \PYG{n}{call} \PYG{n}{last}\PYG{p}{)}\PYG{p}{:} \PYG{n}{File} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZlt{}string\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{line} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{o+ow}{in} \PYG{o}{\PYGZlt{}}\PYG{n}{module}\PYG{o}{\PYGZgt{}} \PYG{n+ne}{ImportError}\PYG{p}{:} \PYG{n}{No} \PYG{n}{module} \PYG{n}{named} \PYG{n}{matplotlib} \end{sphinxVerbatim} then check that the Python binary is the one you expected by running \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{which} \PYG{n}{python3} \end{sphinxVerbatim} If you get a result like \sphinxcode{\sphinxupquote{/usr/bin/python...}}, then you are getting the Python installed with OSX, which is probably not what you want. Try closing and restarting Terminal.app before running the check again. If that doesn't fix the problem, depending on which Python you wanted to use, consider reinstalling Python.org Python, or check your homebrew or macports setup. Remember that the disk image installer only works for Python.org Python, and will not get picked up by other Pythons. If all these fail, please {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{let us know}}}}. \section{Install from source} \label{\detokenize{faq/installing_faq:install-from-source}}\label{\detokenize{faq/installing_faq:install-from-git}} Clone the main source using one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{clone} \PYG{n}{git}\PYG{n+nd}{@github}\PYG{o}{.}\PYG{n}{com}\PYG{p}{:}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{git} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{clone} \PYG{n}{git}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{github}\PYG{o}{.}\PYG{n}{com}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{git} \end{sphinxVerbatim} and build and install as usual with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cd} \PYG{n}{matplotlib} \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{.} \end{sphinxVerbatim} \begin{sphinxadmonition}{note}{Note:} If you are on Debian/Ubuntu, you can get all the dependencies required to build Matplotlib with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sudo} \PYG{n}{apt}\PYG{o}{\PYGZhy{}}\PYG{n}{get} \PYG{n}{build}\PYG{o}{\PYGZhy{}}\PYG{n}{dep} \PYG{n}{python}\PYG{o}{\PYGZhy{}}\PYG{n}{matplotlib} \end{sphinxVerbatim} If you are on Fedora/RedHat, you can get all the dependencies required to build Matplotlib by first installing \sphinxcode{\sphinxupquote{yum-builddep}} and then running: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{su} \PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yum\PYGZhy{}builddep python\PYGZhy{}matplotlib}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} This does not build Matplotlib, but it does get all of the build dependencies, which will make building from source easier. \end{sphinxadmonition} If you want to be able to follow the development branch as it changes just replace the last step with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{e} \PYG{o}{.} \end{sphinxVerbatim} This creates links and installs the command line script in the appropriate places. \begin{sphinxadmonition}{note}{Note:} OSX users please see the {\hyperref[\detokenize{users/installing:build-osx}]{\sphinxcrossref{\DUrole{std,std-ref}{Building on macOS}}}} guide. Windows users please see the {\hyperref[\detokenize{users/installing:build-windows}]{\sphinxcrossref{\DUrole{std,std-ref}{Building on Windows}}}} guide. \end{sphinxadmonition} Then, if you want to update your Matplotlib at any time, just do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{pull} \end{sphinxVerbatim} When you run \sphinxcode{\sphinxupquote{git pull}}, if the output shows that only Python files have been updated, you are all set. If C files have changed, you need to run \sphinxcode{\sphinxupquote{pip install -e .}} again to compile them. There is more information on {\hyperref[\detokenize{devel/gitwash/index:using-git}]{\sphinxcrossref{\DUrole{std,std-ref}{using git}}}} in the developer docs. \chapter{How-To} \label{\detokenize{faq/howto_faq:how-to}}\label{\detokenize{faq/howto_faq:howto-faq}}\label{\detokenize{faq/howto_faq::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id4}}{\hyperref[\detokenize{faq/howto_faq:how-to}]{\sphinxcrossref{How-To}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id5}}{\hyperref[\detokenize{faq/howto_faq:plotting-howto}]{\sphinxcrossref{Plotting: howto}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id6}}{\hyperref[\detokenize{faq/howto_faq:plot-numpy-datetime64-values}]{\sphinxcrossref{Plot \sphinxcode{\sphinxupquote{numpy.datetime64}} values}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id7}}{\hyperref[\detokenize{faq/howto_faq:find-all-objects-in-a-figure-of-a-certain-type}]{\sphinxcrossref{Find all objects in a figure of a certain type}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id8}}{\hyperref[\detokenize{faq/howto_faq:how-to-prevent-ticklabels-from-having-an-offset}]{\sphinxcrossref{How to prevent ticklabels from having an offset}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id9}}{\hyperref[\detokenize{faq/howto_faq:save-transparent-figures}]{\sphinxcrossref{Save transparent figures}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id10}}{\hyperref[\detokenize{faq/howto_faq:save-multiple-plots-to-one-pdf-file}]{\sphinxcrossref{Save multiple plots to one pdf file}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id11}}{\hyperref[\detokenize{faq/howto_faq:move-the-edge-of-an-axes-to-make-room-for-tick-labels}]{\sphinxcrossref{Move the edge of an axes to make room for tick labels}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id12}}{\hyperref[\detokenize{faq/howto_faq:automatically-make-room-for-tick-labels}]{\sphinxcrossref{Automatically make room for tick labels}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id13}}{\hyperref[\detokenize{faq/howto_faq:configure-the-tick-widths}]{\sphinxcrossref{Configure the tick widths}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id14}}{\hyperref[\detokenize{faq/howto_faq:align-my-ylabels-across-multiple-subplots}]{\sphinxcrossref{Align my ylabels across multiple subplots}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id15}}{\hyperref[\detokenize{faq/howto_faq:skip-dates-where-there-is-no-data}]{\sphinxcrossref{Skip dates where there is no data}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id16}}{\hyperref[\detokenize{faq/howto_faq:control-the-depth-of-plot-elements}]{\sphinxcrossref{Control the depth of plot elements}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id17}}{\hyperref[\detokenize{faq/howto_faq:make-the-aspect-ratio-for-plots-equal}]{\sphinxcrossref{Make the aspect ratio for plots equal}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id18}}{\hyperref[\detokenize{faq/howto_faq:multiple-y-axis-scales}]{\sphinxcrossref{Multiple y-axis scales}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id19}}{\hyperref[\detokenize{faq/howto_faq:generate-images-without-having-a-window-appear}]{\sphinxcrossref{Generate images without having a window appear}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id20}}{\hyperref[\detokenize{faq/howto_faq:use-show}]{\sphinxcrossref{Use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}}}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id21}}{\hyperref[\detokenize{faq/howto_faq:interpreting-box-plots-and-violin-plots}]{\sphinxcrossref{Interpreting box plots and violin plots}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id22}}{\hyperref[\detokenize{faq/howto_faq:working-with-threads}]{\sphinxcrossref{Working with threads}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id23}}{\hyperref[\detokenize{faq/howto_faq:contributing-howto}]{\sphinxcrossref{Contributing: howto}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id24}}{\hyperref[\detokenize{faq/howto_faq:request-a-new-feature}]{\sphinxcrossref{Request a new feature}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id25}}{\hyperref[\detokenize{faq/howto_faq:reporting-a-bug-or-submitting-a-patch}]{\sphinxcrossref{Reporting a bug or submitting a patch}}} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id26}}{\hyperref[\detokenize{faq/howto_faq:contribute-to-matplotlib-documentation}]{\sphinxcrossref{Contribute to Matplotlib documentation}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id27}}{\hyperref[\detokenize{faq/howto_faq:matplotlib-in-a-web-application-server}]{\sphinxcrossref{Matplotlib in a web application server}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id28}}{\hyperref[\detokenize{faq/howto_faq:clickable-images-for-html}]{\sphinxcrossref{Clickable images for HTML}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/howto_faq:id29}}{\hyperref[\detokenize{faq/howto_faq:search-examples}]{\sphinxcrossref{Search examples}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \section{Plotting: howto} \label{\detokenize{faq/howto_faq:plotting-howto}}\label{\detokenize{faq/howto_faq:howto-plotting}} \subsection{Plot \sphinxstyleliteralintitle{\sphinxupquote{numpy.datetime64}} values} \label{\detokenize{faq/howto_faq:plot-numpy-datetime64-values}}\label{\detokenize{faq/howto_faq:howto-datetime64}} As of Matplotlib 2.2, \sphinxcode{\sphinxupquote{numpy.datetime64}} objects are handled the same way as \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime.datetime}}} objects. If you prefer the pandas converters and locators, you can register their converter with the {\hyperref[\detokenize{api/units_api:module-matplotlib.units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units}}}}} module: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{pandas}\PYG{n+nn}{.}\PYG{n+nn}{tseries} \PYG{k}{import} \PYG{n}{converter} \PYG{k}{as} \PYG{n}{pdtc} \PYG{n}{pdtc}\PYG{o}{.}\PYG{n}{register}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} If you only want to use the \sphinxhref{https://pandas.pydata.org/pandas-docs/stable/index.html\#module-pandas}{\sphinxcode{\sphinxupquote{pandas}}} converter for \sphinxcode{\sphinxupquote{datetime64}} values \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{pandas}\PYG{n+nn}{.}\PYG{n+nn}{tseries} \PYG{k}{import} \PYG{n}{converter} \PYG{k}{as} \PYG{n}{pdtc} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{units} \PYG{k}{as} \PYG{n+nn}{munits} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{munits}\PYG{o}{.}\PYG{n}{registry}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{datetime64}\PYG{p}{]} \PYG{o}{=} \PYG{n}{pdtc}\PYG{o}{.}\PYG{n}{DatetimeConverter}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Find all objects in a figure of a certain type} \label{\detokenize{faq/howto_faq:find-all-objects-in-a-figure-of-a-certain-type}}\label{\detokenize{faq/howto_faq:howto-findobj}} Every Matplotlib artist (see {\hyperref[\detokenize{tutorials/intermediate/artists::doc}]{\sphinxcrossref{\DUrole{doc}{Artist tutorial}}}}) has a method called {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.findobj:matplotlib.artist.Artist.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{findobj()}}}}} that can be used to recursively search the artist for any artists it may contain that meet some criteria (e.g., match all {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances or match some arbitrary filter function). For example, the following snippet finds every object in the figure which has a \sphinxcode{\sphinxupquote{set\_color}} property and makes the object blue: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{myfunc}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb}{hasattr}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{set\PYGZus{}color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{for} \PYG{n}{o} \PYG{o+ow}{in} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{findobj}\PYG{p}{(}\PYG{n}{myfunc}\PYG{p}{)}\PYG{p}{:} \PYG{n}{o}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} You can also filter on class instances: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{text} \PYG{k}{as} \PYG{n+nn}{text} \PYG{k}{for} \PYG{n}{o} \PYG{o+ow}{in} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{findobj}\PYG{p}{(}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{)}\PYG{p}{:} \PYG{n}{o}\PYG{o}{.}\PYG{n}{set\PYGZus{}fontstyle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{italic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsection{How to prevent ticklabels from having an offset} \label{\detokenize{faq/howto_faq:how-to-prevent-ticklabels-from-having-an-offset}}\label{\detokenize{faq/howto_faq:howto-supress-offset}} The default formatter will use an offset to reduce the length of the ticklabels. To turn this feature off on a per-axis basis: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xaxis}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{get\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{set\PYGZus{}useOffset}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} set the rcParam \sphinxcode{\sphinxupquote{axes.formatter.useoffset}}, or use a different formatter. See {\hyperref[\detokenize{api/ticker_api:module-matplotlib.ticker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticker}}}}} for details. \subsection{Save transparent figures} \label{\detokenize{faq/howto_faq:save-transparent-figures}}\label{\detokenize{faq/howto_faq:howto-transparent}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} command has a keyword argument \sphinxstyleemphasis{transparent} which, if 'True', will make the figure and axes backgrounds transparent when saving, but will not affect the displayed image on the screen. If you need finer grained control, e.g., you do not want full transparency or you want to affect the screen displayed version as well, you can set the alpha properties directly. The figure has a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} instance called \sphinxstyleemphasis{patch} and the axes has a Rectangle instance called \sphinxstyleemphasis{patch}. You can set any property on them directly (\sphinxstyleemphasis{facecolor}, \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{linewidth}, \sphinxstyleemphasis{linestyle}, \sphinxstyleemphasis{alpha}). e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}alpha}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{patch}\PYG{o}{.}\PYG{n}{set\PYGZus{}alpha}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} If you need \sphinxstyleemphasis{all} the figure elements to be transparent, there is currently no global alpha setting, but you can set the alpha channel on individual elements, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{volts}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Save multiple plots to one pdf file} \label{\detokenize{faq/howto_faq:save-multiple-plots-to-one-pdf-file}}\label{\detokenize{faq/howto_faq:howto-multipage}} Many image file formats can only have one image per file, but some formats support multi-page files. Currently only the pdf backend has support for this. To make a multi-page pdf file, first initialize the file: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{backends}\PYG{n+nn}{.}\PYG{n+nn}{backend\PYGZus{}pdf} \PYG{k}{import} \PYG{n}{PdfPages} \PYG{n}{pp} \PYG{o}{=} \PYG{n}{PdfPages}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{multipage.pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} You can give the {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages}}}}} object to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}}, but you have to specify the format: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{pp}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} An easier way is to call {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages.savefig}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pp}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Finally, the multipage pdf object has to be closed: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pp}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The same can be done using the pgf backend: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{backends}\PYG{n+nn}{.}\PYG{n+nn}{backend\PYGZus{}pgf} \PYG{k}{import} \PYG{n}{PdfPages} \end{sphinxVerbatim} \subsection{Move the edge of an axes to make room for tick labels} \label{\detokenize{faq/howto_faq:move-the-edge-of-an-axes-to-make-room-for-tick-labels}}\label{\detokenize{faq/howto_faq:howto-subplots-adjust}} For subplots, you can control the default spacing on the left, right, bottom, and top as well as the horizontal and vertical spacing between multiple rows and columns using the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.subplots\_adjust()}}}}} method (in pyplot it is {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib.pyplot.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots\_adjust()}}}}}). For example, to move the bottom of the subplots up to make room for some rotated x tick labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots\PYGZus{}adjust}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \end{sphinxVerbatim} You can control the defaults for these parameters in your \sphinxcode{\sphinxupquote{matplotlibrc}} file; see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}. For example, to make the above setting permanent, you would set: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{o}{.}\PYG{n}{subplot}\PYG{o}{.}\PYG{n}{bottom} \PYG{p}{:} \PYG{l+m+mf}{0.2} \PYG{c+c1}{\PYGZsh{} the bottom of the subplots of the figure} \end{sphinxVerbatim} The other parameters you can configure are, with their defaults \begin{description} \item[{\sphinxstyleemphasis{left} = 0.125}] \leavevmode the left side of the subplots of the figure \item[{\sphinxstyleemphasis{right} = 0.9}] \leavevmode the right side of the subplots of the figure \item[{\sphinxstyleemphasis{bottom} = 0.1}] \leavevmode the bottom of the subplots of the figure \item[{\sphinxstyleemphasis{top} = 0.9}] \leavevmode the top of the subplots of the figure \item[{\sphinxstyleemphasis{wspace} = 0.2}] \leavevmode the amount of width reserved for space between subplots, expressed as a fraction of the average axis width \item[{\sphinxstyleemphasis{hspace} = 0.2}] \leavevmode the amount of height reserved for space between subplots, expressed as a fraction of the average axis height \end{description} If you want additional control, you can create an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} using the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes()}}}}} command (or equivalently the figure {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}} method), which allows you to specify the location explicitly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} where all values are in fractional (0 to 1) coordinates. See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/axes\_demo} for an example of placing axes manually. \subsection{Automatically make room for tick labels} \label{\detokenize{faq/howto_faq:automatically-make-room-for-tick-labels}}\label{\detokenize{faq/howto_faq:howto-auto-adjust}} \begin{sphinxadmonition}{note}{Note:} This is now easier to handle than ever before. Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout()}}}}} can fix many common layout issues. See the {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Tight Layout guide}}}}. The information below is kept here in case it is useful for other purposes. \end{sphinxadmonition} In most use cases, it is enough to simply change the subplots adjust parameters as described in {\hyperref[\detokenize{faq/howto_faq:howto-subplots-adjust}]{\sphinxcrossref{\DUrole{std,std-ref}{Move the edge of an axes to make room for tick labels}}}}. But in some cases, you don't know ahead of time what your tick labels will be, or how large they will be (data and labels outside your control may be being fed into your graphing application), and you may need to automatically adjust your subplot parameters based on the size of the tick labels. Any {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance can report its extent in window coordinates (a negative x coordinate is outside the window), but there is a rub. The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance, which is used to calculate the text size, is not known until the figure is drawn ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}}). After the window is drawn and the text instance knows its renderer, you can call {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}}. One way to solve this chicken and egg problem is to wait until the figure is draw by connecting ({\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_connect()}}}}}) to the "on\_draw" signal ({\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.DrawEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DrawEvent}}}}}) and get the window extent there, and then do something with it, e.g., move the left of the canvas over; see {\hyperref[\detokenize{users/event_handling:event-handling-tutorial}]{\sphinxcrossref{\DUrole{std,std-ref}{Event handling and picking}}}}. Here is an example that gets a bounding box in relative figure coordinates (0..1) of each of the labels and uses it to move the left of the subplots over so that the tick labels fit in the figure: \begin{figure}[htbp] \centering \capstart \sphinxhref{../gallery/pyplots/auto\_subplots\_adjust.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_auto_subplots_adjust_001}.png}} \caption{Auto Subplots Adjust}\label{\detokenize{faq/howto_faq:id2}}\end{figure} \subsection{Configure the tick widths} \label{\detokenize{faq/howto_faq:configure-the-tick-widths}}\label{\detokenize{faq/howto_faq:howto-ticks}} Wherever possible, it is recommended to use the \sphinxcode{\sphinxupquote{tick\_params()}} or \sphinxcode{\sphinxupquote{set\_tick\_params()}} methods to modify tick properties: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{width}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} For more control of tick properties that are not provided by the above methods, it is important to know that in Matplotlib, the ticks are \sphinxstyleemphasis{markers}. All {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects support a line (solid, dashed, etc) and a marker (circle, square, tick). The tick width is controlled by the \sphinxcode{\sphinxupquote{"markeredgewidth"}} property, so the above effect can also be achieved by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{k}{for} \PYG{n}{line} \PYG{o+ow}{in} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklines}\PYG{p}{(}\PYG{p}{)} \PYG{o}{+} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}yticklines}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}markeredgewidth}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The other properties that control the tick marker, and all markers, are \sphinxcode{\sphinxupquote{markerfacecolor}}, \sphinxcode{\sphinxupquote{markeredgecolor}}, \sphinxcode{\sphinxupquote{markeredgewidth}}, \sphinxcode{\sphinxupquote{markersize}}. For more information on configuring ticks, see {\hyperref[\detokenize{tutorials/intermediate/artists:axis-container}]{\sphinxcrossref{\DUrole{std,std-ref}{Axis containers}}}} and {\hyperref[\detokenize{tutorials/intermediate/artists:tick-container}]{\sphinxcrossref{\DUrole{std,std-ref}{Tick containers}}}}. \subsection{Align my ylabels across multiple subplots} \label{\detokenize{faq/howto_faq:align-my-ylabels-across-multiple-subplots}}\label{\detokenize{faq/howto_faq:howto-align-label}} If you have multiple subplots over one another, and the y data have different scales, you can often get ylabels that do not align vertically across the multiple subplots, which can be unattractive. By default, Matplotlib positions the x location of the ylabel so that it does not overlap any of the y ticks. You can override this default behavior by specifying the coordinates of the label. The example below shows the default behavior in the left subplots, and the manual setting in the right subplots. \begin{figure}[htbp] \centering \capstart \sphinxhref{../gallery/pyplots/align\_ylabels.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_align_ylabels_001}.png}} \caption{Align Ylabels}\label{\detokenize{faq/howto_faq:id3}}\end{figure} \subsection{Skip dates where there is no data} \label{\detokenize{faq/howto_faq:skip-dates-where-there-is-no-data}}\label{\detokenize{faq/howto_faq:date-index-plots}} When plotting time series, e.g., financial time series, one often wants to leave out days on which there is no data, e.g., weekends. By passing in dates on the x-xaxis, you get large horizontal gaps on periods when there is not data. The solution is to pass in some proxy x-data, e.g., evenly sampled indices, and then use a custom formatter to format these as dates. The example below shows how to use an 'index formatter' to achieve the desired plot: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{mlab} \PYG{k}{as} \PYG{n+nn}{mlab} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{as} \PYG{n+nn}{ticker} \PYG{n}{r} \PYG{o}{=} \PYG{n}{mlab}\PYG{o}{.}\PYG{n}{csv2rec}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{../data/aapl.csv}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{r}\PYG{o}{.}\PYG{n}{sort}\PYG{p}{(}\PYG{p}{)} \PYG{n}{r} \PYG{o}{=} \PYG{n}{r}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{30}\PYG{p}{:}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} get the last 30 days} \PYG{n}{N} \PYG{o}{=} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{r}\PYG{p}{)} \PYG{n}{ind} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} the evenly spaced plot indices} \PYG{k}{def} \PYG{n+nf}{format\PYGZus{}date}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{pos}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{n}{thisind} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{clip}\PYG{p}{(}\PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{x}\PYG{o}{+}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{N}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{return} \PYG{n}{r}\PYG{o}{.}\PYG{n}{date}\PYG{p}{[}\PYG{n}{thisind}\PYG{p}{]}\PYG{o}{.}\PYG{n}{strftime}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y\PYGZhy{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{m\PYGZhy{}}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{ind}\PYG{p}{,} \PYG{n}{r}\PYG{o}{.}\PYG{n}{adj\PYGZus{}close}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{ticker}\PYG{o}{.}\PYG{n}{FuncFormatter}\PYG{p}{(}\PYG{n}{format\PYGZus{}date}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{autofmt\PYGZus{}xdate}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Control the depth of plot elements} \label{\detokenize{faq/howto_faq:control-the-depth-of-plot-elements}}\label{\detokenize{faq/howto_faq:howto-set-zorder}} Within an axes, the order that the various lines, markers, text, collections, etc appear is determined by the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zorder()}}}}} property. The default order is patches, lines, text, with collections of lines and collections of patches appearing at the same level as regular lines and patches, respectively: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{zorder}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} You can also use the Axes property {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axisbelow()}}}}} to control whether the grid lines are placed above or below your other plot elements. \subsection{Make the aspect ratio for plots equal} \label{\detokenize{faq/howto_faq:make-the-aspect-ratio-for-plots-equal}}\label{\detokenize{faq/howto_faq:howto-axis-equal}} The Axes property {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_aspect()}}}}} controls the aspect ratio of the axes. You can set it to be 'auto', 'equal', or some ratio which controls the ratio: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{aspect}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{equal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Multiple y-axis scales} \label{\detokenize{faq/howto_faq:multiple-y-axis-scales}}\label{\detokenize{faq/howto_faq:howto-twoscale}} A frequent request is to have two scales for the left and right y-axis, which is possible using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib.pyplot.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twinx()}}}}} (more than two scales are not currently supported, though it is on the wish list). This works pretty well, though there are some quirks when you are trying to interactively pan and zoom, because both scales do not get the signals. The approach uses {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib.pyplot.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twinx()}}}}} (and its sister {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twiny:matplotlib.pyplot.twiny}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twiny()}}}}}) to use \sphinxstyleemphasis{2 different axes}, turning the axes rectangular frame off on the 2nd axes to keep it from obscuring the first, and manually setting the tick locs and labels as desired. You can use separate \sphinxcode{\sphinxupquote{matplotlib.ticker}} formatters and locators as desired because the two axes are independent. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{howto_faq-1}.pdf} \end{figure} \subsection{Generate images without having a window appear} \label{\detokenize{faq/howto_faq:generate-images-without-having-a-window-appear}}\label{\detokenize{faq/howto_faq:howto-batch}} Simply do not call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}}, and directly save the figure to the desired format: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{myfig.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstrong{See also:} {\hyperref[\detokenize{faq/howto_faq:howto-webapp}]{\sphinxcrossref{\DUrole{std,std-ref}{Matplotlib in a web application server}}}} for information about running matplotlib inside of a web application. \subsection{Use \sphinxstyleliteralintitle{\sphinxupquote{show()}}} \label{\detokenize{faq/howto_faq:use-show}}\label{\detokenize{faq/howto_faq:howto-show}} When you want to view your plots on your display, the user interface backend will need to start the GUI mainloop. This is what {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}} does. It tells Matplotlib to raise all of the figure windows created so far and start the mainloop. Because this mainloop is blocking by default (i.e., script execution is paused), you should only call this once per script, at the end. Script execution is resumed after the last window is closed. Therefore, if you are using Matplotlib to generate only images and do not want a user interface window, you do not need to call \sphinxcode{\sphinxupquote{show}} (see {\hyperref[\detokenize{faq/howto_faq:howto-batch}]{\sphinxcrossref{\DUrole{std,std-ref}{Generate images without having a window appear}}}} and {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}). \begin{sphinxadmonition}{note}{Note:} Because closing a figure window invokes the destruction of its plotting elements, you should call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} \sphinxstyleemphasis{before} calling \sphinxcode{\sphinxupquote{show}} if you wish to save the figure as well as view it. \end{sphinxadmonition} \DUrole{versionmodified}{New in version v1.0.0: }\sphinxcode{\sphinxupquote{show}} now starts the GUI mainloop only if it isn't already running. Therefore, multiple calls to \sphinxcode{\sphinxupquote{show}} are now allowed. Having \sphinxcode{\sphinxupquote{show}} block further execution of the script or the python interpreter depends on whether Matplotlib is set for interactive mode or not. In non-interactive mode (the default setting), execution is paused until the last figure window is closed. In interactive mode, the execution is not paused, which allows you to create additional figures (but the script won't finish until the last figure window is closed). \begin{sphinxadmonition}{note}{Note:} Support for interactive/non-interactive mode depends upon the backend. Until version 1.0.0 (and subsequent fixes for 1.0.1), the behavior of the interactive mode was not consistent across backends. As of v1.0.1, only the macosx backend differs from other backends because it does not support non-interactive mode. \end{sphinxadmonition} Because it is expensive to draw, you typically will not want Matplotlib to redraw a figure many times in a script such as the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} draw here ?} \PYG{n}{xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} and here ?} \PYG{n}{ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{volts}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} and here ?} \PYG{n}{title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a simple plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} and here ?} \PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} However, it is \sphinxstyleemphasis{possible} to force Matplotlib to draw after every command, which might be what you want when working interactively at the python console (see {\hyperref[\detokenize{users/shell:mpl-shell}]{\sphinxcrossref{\DUrole{std,std-ref}{Using matplotlib in a python shell}}}}), but in a script you want to defer all drawing until the call to \sphinxcode{\sphinxupquote{show}}. This is especially important for complex figures that take some time to draw. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}} is designed to tell Matplotlib that you're all done issuing commands and you want to draw the figure now. \begin{sphinxadmonition}{note}{Note:} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}} should typically only be called at most once per script and it should be the last line of your script. At that point, the GUI takes control of the interpreter. If you want to force a figure draw, use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}} instead. \end{sphinxadmonition} Many users are frustrated by \sphinxcode{\sphinxupquote{show}} because they want it to be a blocking call that raises the figure, pauses the script until they close the figure, and then allow the script to continue running until the next figure is created and the next show is made. Something like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} WARNING : illustrating how NOT to use show} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} make figure i} \PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} This is not what show does and unfortunately, because doing blocking calls across user interfaces can be tricky, is currently unsupported, though we have made significant progress towards supporting blocking events. \DUrole{versionmodified}{New in version v1.0.0: }As noted earlier, this restriction has been relaxed to allow multiple calls to \sphinxcode{\sphinxupquote{show}}. In \sphinxstyleemphasis{most} backends, you can now expect to be able to create new figures and raise them in a subsequent call to \sphinxcode{\sphinxupquote{show}} after closing the figures from a previous call to \sphinxcode{\sphinxupquote{show}}. \subsection{Interpreting box plots and violin plots} \label{\detokenize{faq/howto_faq:interpreting-box-plots-and-violin-plots}}\label{\detokenize{faq/howto_faq:howto-boxplot-violinplot}} Tukey's \sphinxhref{http://matplotlib.org/examples/pylab\_examples/boxplot\_demo.html}{box plots} (Robert McGill, John W. Tukey and Wayne A. Larsen: "The American Statistician" Vol. 32, No. 1, Feb., 1978, pp. 12-16) are statistical plots that provide useful information about the data distribution such as skewness. However, bar plots with error bars are still the common standard in most scientific literature, and thus, the interpretation of box plots can be challenging for the unfamiliar reader. The figure below illustrates the different visual features of a box plot. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{boxplot_explanation}.png} \end{figure} \sphinxhref{http://matplotlib.org/examples/statistics/violinplot\_demo.html}{Violin plots} are closely related to box plots but add useful information such as the distribution of the sample data (density trace). Violin plots were added in Matplotlib 1.4. \subsection{Working with threads} \label{\detokenize{faq/howto_faq:working-with-threads}}\label{\detokenize{faq/howto_faq:how-to-threads}} Matplotlib is not thread-safe: in fact, there are known race conditions that affect certain artists. Hence, if you work with threads, it is your responsibility to set up the proper locks to serialize access to Matplotlib artists. Note that (for the case where you are working with an interactive backend) most GUI backends \sphinxstyleemphasis{require} being run from the main thread as well. \section{Contributing: howto} \label{\detokenize{faq/howto_faq:contributing-howto}}\label{\detokenize{faq/howto_faq:howto-contribute}} \subsection{Request a new feature} \label{\detokenize{faq/howto_faq:request-a-new-feature}}\label{\detokenize{faq/howto_faq:how-to-request-feature}} Is there a feature you wish Matplotlib had? Then ask! The best way to get started is to email the developer \sphinxhref{mailto:matplotlib-devel@python.org}{mailing list} for discussion. This is an open source project developed primarily in the contributors free time, so there is no guarantee that your feature will be added. The \sphinxstyleemphasis{best} way to get the feature you need added is to contribute it your self. \subsection{Reporting a bug or submitting a patch} \label{\detokenize{faq/howto_faq:reporting-a-bug-or-submitting-a-patch}}\label{\detokenize{faq/howto_faq:how-to-submit-patch}} The development of Matplotlib is organized through \sphinxhref{https://github.com/matplotlib/matplotlib}{github}. If you would like to report a bug or submit a patch please use that interface. To report a bug \sphinxhref{https://github.com/matplotlib/matplotlib/issues/new}{create an issue} on github (this requires having a github account). Please include a \sphinxhref{http://sscce.org}{Short, Self Contained, Correct (Compilable), Example} demonstrating what the bug is. Including a clear, easy to test example makes it easy for the developers to evaluate the bug. Expect that the bug reports will be a conversation. If you do not want to register with github, please email bug reports to the \sphinxhref{mailto:matplotlib-devel@python.org}{mailing list}. The easiest way to submit patches to Matplotlib is through pull requests on github. Please see the {\hyperref[\detokenize{devel/index:developers-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{The Matplotlib Developers' Guide}}}} for the details. \subsection{Contribute to Matplotlib documentation} \label{\detokenize{faq/howto_faq:contribute-to-matplotlib-documentation}}\label{\detokenize{faq/howto_faq:how-to-contribute-docs}} Matplotlib is a big library, which is used in many ways, and the documentation has only scratched the surface of everything it can do. So far, the place most people have learned all these features are through studying the examples ({\hyperref[\detokenize{faq/howto_faq:how-to-search-examples}]{\sphinxcrossref{\DUrole{std,std-ref}{Search examples}}}}), which is a recommended and great way to learn, but it would be nice to have more official narrative documentation guiding people through all the dark corners. This is where you come in. There is a good chance you know more about Matplotlib usage in some areas, the stuff you do every day, than many of the core developers who wrote most of the documentation. Just pulled your hair out compiling Matplotlib for Windows? Write a FAQ or a section for the {\hyperref[\detokenize{faq/installing_faq:installing-faq}]{\sphinxcrossref{\DUrole{std,std-ref}{Installation}}}} page. Are you a digital signal processing wizard? Write a tutorial on the signal analysis plotting functions like {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:matplotlib.pyplot.xcorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xcorr()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}. Do you use Matplotlib with \sphinxhref{https://www.djangoproject.com/}{django} or other popular web application servers? Write a FAQ or tutorial and we'll find a place for it in the {\hyperref[\detokenize{users/index:users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{User's Guide}}}}. And so on... I think you get the idea. Matplotlib is documented using the \sphinxhref{http://www.sphinx-doc.org/en/stable/}{sphinx} extensions to restructured text \sphinxhref{http://docutils.sourceforge.net/rst.html}{(ReST)}. sphinx is an extensible python framework for documentation projects which generates HTML and PDF, and is pretty easy to write; you can see the source for this document or any page on this site by clicking on the \sphinxstyleemphasis{Show Source} link at the end of the page in the sidebar. The sphinx website is a good resource for learning sphinx, but we have put together a cheat-sheet at {\hyperref[\detokenize{devel/documenting_mpl:documenting-matplotlib}]{\sphinxcrossref{\DUrole{std,std-ref}{Writing documentation}}}} which shows you how to get started, and outlines the Matplotlib conventions and extensions, e.g., for including plots directly from external code in your documents. Once your documentation contributions are working (and hopefully tested by actually \sphinxstyleemphasis{building} the docs) you can submit them as a patch against git. See {\hyperref[\detokenize{devel/gitwash/git_install:install-git}]{\sphinxcrossref{\DUrole{std,std-ref}{Install git}}}} and {\hyperref[\detokenize{faq/howto_faq:how-to-submit-patch}]{\sphinxcrossref{\DUrole{std,std-ref}{Reporting a bug or submitting a patch}}}}. Looking for something to do? Search for \sphinxhref{../search.html?q=todo}{TODO} or look at the open issues on github. \section{Matplotlib in a web application server} \label{\detokenize{faq/howto_faq:matplotlib-in-a-web-application-server}}\label{\detokenize{faq/howto_faq:howto-webapp}} In general, the simplest solution when using Matplotlib in a web server is to completely avoid using pyplot (pyplot maintains references to the opened figures to make {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}} work, but this will cause memory leaks unless the figures are properly closed). Since Matplotlib 3.1, one can directly create figures using the \sphinxcode{\sphinxupquote{Figure}} constructor and save them to in-memory buffers. The following example uses \sphinxhref{http://flask.pocoo.org/}{Flask}, but other frameworks work similarly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{base64} \PYG{k+kn}{from} \PYG{n+nn}{io} \PYG{k}{import} \PYG{n}{BytesIO} \PYG{k+kn}{from} \PYG{n+nn}{flask} \PYG{k}{import} \PYG{n}{Flask} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{figure} \PYG{k}{import} \PYG{n}{Figure} \PYG{n}{app} \PYG{o}{=} \PYG{n}{Flask}\PYG{p}{(}\PYG{n+nv+vm}{\PYGZus{}\PYGZus{}name\PYGZus{}\PYGZus{}}\PYG{p}{)} \PYG{n+nd}{@app}\PYG{o}{.}\PYG{n}{route}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{/}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{hello}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Generate the figure **without using pyplot**.} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Save it to a temporary buffer.} \PYG{n}{buf} \PYG{o}{=} \PYG{n}{BytesIO}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{buf}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{png}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Embed the result in the html output.} \PYG{n}{data} \PYG{o}{=} \PYG{n}{base64}\PYG{o}{.}\PYG{n}{b64encode}\PYG{p}{(}\PYG{n}{buf}\PYG{o}{.}\PYG{n}{getbuffer}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}\PYG{o}{.}\PYG{n}{decode}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ascii}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{k}{return} \PYG{n}{f}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZlt{}img src=}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{data:image/png;base64,}\PYG{l+s+si}{\PYGZob{}data\PYGZcb{}}\PYG{l+s+s2}{\PYGZsq{}}\PYG{l+s+s2}{/\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} When using Matplotlib versions older than 3.1, it is necessary to explicitly instantiate an Agg canvas; see e.g. \DUrole{xref,std,std-doc}{/gallery/user\_interfaces/canvasagg}. \subsection{Clickable images for HTML} \label{\detokenize{faq/howto_faq:clickable-images-for-html}}\label{\detokenize{faq/howto_faq:howto-click-maps}} Andrew Dalke of \sphinxhref{http://www.dalkescientific.com}{Dalke Scientific} has written a nice \sphinxhref{http://www.dalkescientific.com/writings/diary/archive/2005/04/24/interactive\_html.html}{article} on how to make html click maps with Matplotlib agg PNGs. We would also like to add this functionality to SVG. If you are interested in contributing to these efforts that would be great. \section{Search examples} \label{\detokenize{faq/howto_faq:search-examples}}\label{\detokenize{faq/howto_faq:how-to-search-examples}} The nearly 300 code \DUrole{xref,std,std-ref}{examples-index} included with the Matplotlib source distribution are full-text searchable from the \DUrole{xref,std,std-ref}{search} page, but sometimes when you search, you get a lot of results from the {\hyperref[\detokenize{api/index:api-index}]{\sphinxcrossref{\DUrole{std,std-ref}{The object-oriented API}}}} or other documentation that you may not be interested in if you just want to find a complete, free-standing, working piece of example code. To facilitate example searches, we have tagged every code example page with the keyword \sphinxcode{\sphinxupquote{codex}} for \sphinxstyleemphasis{code example} which shouldn't appear anywhere else on this site except in the FAQ. So if you want to search for an example that uses an ellipse, \DUrole{xref,std,std-ref}{search} for \sphinxcode{\sphinxupquote{codex ellipse}}. \chapter{Troubleshooting} \label{\detokenize{faq/troubleshooting_faq:troubleshooting}}\label{\detokenize{faq/troubleshooting_faq:troubleshooting-faq}}\label{\detokenize{faq/troubleshooting_faq::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id1}}{\hyperref[\detokenize{faq/troubleshooting_faq:troubleshooting}]{\sphinxcrossref{Troubleshooting}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id2}}{\hyperref[\detokenize{faq/troubleshooting_faq:obtaining-matplotlib-version}]{\sphinxcrossref{Obtaining Matplotlib version}}} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id3}}{\hyperref[\detokenize{faq/troubleshooting_faq:matplotlib-install-location}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib}} install location}}} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id4}}{\hyperref[\detokenize{faq/troubleshooting_faq:matplotlib-configuration-and-cache-directory-locations}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib}} configuration and cache directory locations}}} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id5}}{\hyperref[\detokenize{faq/troubleshooting_faq:getting-help}]{\sphinxcrossref{Getting help}}} \item {} \phantomsection\label{\detokenize{faq/troubleshooting_faq:id6}}{\hyperref[\detokenize{faq/troubleshooting_faq:problems-with-recent-git-versions}]{\sphinxcrossref{Problems with recent git versions}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \section{Obtaining Matplotlib version} \label{\detokenize{faq/troubleshooting_faq:obtaining-matplotlib-version}}\label{\detokenize{faq/troubleshooting_faq:matplotlib-version}} To find out your Matplotlib version number, import it and print the \sphinxcode{\sphinxupquote{\_\_version\_\_}} attribute: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{\PYGZus{}\PYGZus{}version\PYGZus{}\PYGZus{}} \PYG{g+go}{\PYGZsq{}0.98.0\PYGZsq{}} \end{sphinxVerbatim} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib}} install location} \label{\detokenize{faq/troubleshooting_faq:matplotlib-install-location}}\label{\detokenize{faq/troubleshooting_faq:locating-matplotlib-install}} You can find what directory Matplotlib is installed in by importing it and printing the \sphinxcode{\sphinxupquote{\_\_file\_\_}} attribute: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n+nv+vm}{\PYGZus{}\PYGZus{}file\PYGZus{}\PYGZus{}} \PYG{g+go}{\PYGZsq{}/home/jdhunter/dev/lib64/python2.5/site\PYGZhy{}packages/matplotlib/\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}.pyc\PYGZsq{}} \end{sphinxVerbatim} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib}} configuration and cache directory locations} \label{\detokenize{faq/troubleshooting_faq:matplotlib-configuration-and-cache-directory-locations}}\label{\detokenize{faq/troubleshooting_faq:locating-matplotlib-config-dir}} Each user has a Matplotlib configuration directory which may contain a {\hyperref[\detokenize{tutorials/introductory/customizing:customizing-with-matplotlibrc-files}]{\sphinxcrossref{\DUrole{std,std-ref}{matplotlibrc}}}} file. To locate your \sphinxcode{\sphinxupquote{matplotlib/}} configuration directory, use \sphinxcode{\sphinxupquote{matplotlib.get\_configdir()}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mpl}\PYG{o}{.}\PYG{n}{get\PYGZus{}configdir}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}/home/darren/.config/matplotlib\PYGZsq{}} \end{sphinxVerbatim} On unix-like systems, this directory is generally located in your \index{HOME@\spxentry{HOME}}\index{environment variable@\spxentry{environment variable}!HOME@\spxentry{HOME}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-HOME}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HOME}}}}} directory under the \sphinxcode{\sphinxupquote{.config/}} directory. In addition, users have a cache directory. On unix-like systems, this is separate from the configuration directory by default. To locate your \sphinxcode{\sphinxupquote{.cache/}} directory, use \sphinxcode{\sphinxupquote{matplotlib.get\_cachedir()}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mpl}\PYG{o}{.}\PYG{n}{get\PYGZus{}cachedir}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}/home/darren/.cache/matplotlib\PYGZsq{}} \end{sphinxVerbatim} On windows, both the config directory and the cache directory are the same and are in your \sphinxcode{\sphinxupquote{Documents and Settings}} or \sphinxcode{\sphinxupquote{Users}} directory by default: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mpl}\PYG{o}{.}\PYG{n}{get\PYGZus{}configdir}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}C:\PYGZbs{}\PYGZbs{}Documents and Settings\PYGZbs{}\PYGZbs{}jdhunter\PYGZbs{}\PYGZbs{}.matplotlib\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{mpl}\PYG{o}{.}\PYG{n}{get\PYGZus{}cachedir}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}C:\PYGZbs{}\PYGZbs{}Documents and Settings\PYGZbs{}\PYGZbs{}jdhunter\PYGZbs{}\PYGZbs{}.matplotlib\PYGZsq{}} \end{sphinxVerbatim} If you would like to use a different configuration directory, you can do so by specifying the location in your \index{MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}\index{environment variable@\spxentry{environment variable}!MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLCONFIGDIR}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLCONFIGDIR}}}}} environment variable -- see {\hyperref[\detokenize{faq/environment_variables_faq:setting-linux-osx-environment-variables}]{\sphinxcrossref{\DUrole{std,std-ref}{Setting environment variables in Linux and OS-X}}}}. Note that \index{MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}\index{environment variable@\spxentry{environment variable}!MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLCONFIGDIR}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLCONFIGDIR}}}}} sets the location of both the configuration directory and the cache directory. \section{Getting help} \label{\detokenize{faq/troubleshooting_faq:getting-help}}\label{\detokenize{faq/troubleshooting_faq:reporting-problems}} There are a number of good resources for getting help with Matplotlib. There is a good chance your question has already been asked: \begin{itemize} \item {} The \sphinxhref{http://matplotlib.1069221.n5.nabble.com/}{mailing list archive}. \item {} \sphinxhref{https://github.com/matplotlib/matplotlib/issues}{Github issues}. \item {} Stackoverflow questions tagged \sphinxhref{http://stackoverflow.com/questions/tagged/matplotlib}{matplotlib}. \end{itemize} If you are unable to find an answer to your question through search, please provide the following information in your e-mail to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-users}{mailing list}: \begin{itemize} \item {} Your operating system (Linux/UNIX users: post the output of \sphinxcode{\sphinxupquote{uname -a}}). \item {} Matplotlib version: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{import matplotlib; print matplotlib.\PYGZus{}\PYGZus{}version\PYGZus{}\PYGZus{}}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} \item {} Where you obtained Matplotlib (e.g., your Linux distribution's packages, Github, PyPi, or \sphinxhref{https://www.anaconda.com/}{Anaconda} or \sphinxhref{https://www.enthought.com/products/canopy/}{Enthought Canopy}). \item {} Any customizations to your \sphinxcode{\sphinxupquote{matplotlibrc}} file (see {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}). \item {} If the problem is reproducible, please try to provide a \sphinxstyleemphasis{minimal}, standalone Python script that demonstrates the problem. This is \sphinxstyleemphasis{the} critical step. If you can't post a piece of code that we can run and reproduce your error, the chances of getting help are significantly diminished. Very often, the mere act of trying to minimize your code to the smallest bit that produces the error will help you find a bug in \sphinxstyleemphasis{your} code that is causing the problem. \item {} Matplotlib provides debugging information through the \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} library, and a helper function to set the logging level: one can call \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{set\PYGZus{}loglevel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{info}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} or \PYGZdq{}debug\PYGZdq{} for more info} \end{sphinxVerbatim} to obtain this debugging information. Standard functions from the \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} module are also applicable; e.g. one could call \sphinxcode{\sphinxupquote{logging.basicConfig(level="DEBUG")}} even before importing Matplotlib (this is in particular necessary to get the logging info emitted during Matplotlib's import), or attach a custom handler to the "matplotlib" logger. This may be useful if you use a custom logging configuration. \end{itemize} If you compiled Matplotlib yourself, please also provide: \begin{itemize} \item {} any changes you have made to \sphinxcode{\sphinxupquote{setup.py}} or \sphinxcode{\sphinxupquote{setupext.py}}. \item {} the output of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rm} \PYG{o}{\PYGZhy{}}\PYG{n}{rf} \PYG{n}{build} \PYG{n}{python} \PYG{n}{setup}\PYG{o}{.}\PYG{n}{py} \PYG{n}{build} \end{sphinxVerbatim} The beginning of the build output contains lots of details about your platform that are useful for the Matplotlib developers to diagnose your problem. \item {} your compiler version -- e.g., \sphinxcode{\sphinxupquote{gcc -{-}version}}. \end{itemize} Including this information in your first e-mail to the mailing list will save a lot of time. You will likely get a faster response writing to the mailing list than filing a bug in the bug tracker. Most developers check the bug tracker only periodically. If your problem has been determined to be a bug and can not be quickly solved, you may be asked to file a bug in the tracker so the issue doesn't get lost. \section{Problems with recent git versions} \label{\detokenize{faq/troubleshooting_faq:problems-with-recent-git-versions}}\label{\detokenize{faq/troubleshooting_faq:git-trouble}} First make sure you have a clean build and install (see {\hyperref[\detokenize{faq/installing_faq:clean-install}]{\sphinxcrossref{\DUrole{std,std-ref}{How to completely remove Matplotlib}}}}), get the latest git update, install it and run a simple test script in debug mode: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rm} \PYG{o}{\PYGZhy{}}\PYG{n}{rf} \PYG{o}{/}\PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{site}\PYG{o}{\PYGZhy{}}\PYG{n}{packages}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{*} \PYG{n}{git} \PYG{n}{clean} \PYG{o}{\PYGZhy{}}\PYG{n}{xdf} \PYG{n}{git} \PYG{n}{pull} \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{v} \PYG{o}{.} \PYG{o}{\PYGZgt{}} \PYG{n}{build}\PYG{o}{.}\PYG{n}{out} \PYG{n}{python} \PYG{n}{examples}\PYG{o}{/}\PYG{n}{pylab\PYGZus{}examples}\PYG{o}{/}\PYG{n}{simple\PYGZus{}plot}\PYG{o}{.}\PYG{n}{py} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{verbose}\PYG{o}{\PYGZhy{}}\PYG{n}{debug} \PYG{o}{\PYGZgt{}} \PYG{n}{run}\PYG{o}{.}\PYG{n}{out} \end{sphinxVerbatim} and post \sphinxcode{\sphinxupquote{build.out}} and \sphinxcode{\sphinxupquote{run.out}} to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-devel}{matplotlib-devel} mailing list (please do not post git problems to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-users}{users list}). Of course, you will want to clearly describe your problem, what you are expecting and what you are getting, but often a clean build and install will help. See also {\hyperref[\detokenize{faq/troubleshooting_faq:reporting-problems}]{\sphinxcrossref{\DUrole{std,std-ref}{Getting help}}}}. \chapter{Environment Variables} \label{\detokenize{faq/environment_variables_faq:environment-variables}}\label{\detokenize{faq/environment_variables_faq:id1}}\label{\detokenize{faq/environment_variables_faq::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/environment_variables_faq:id2}}{\hyperref[\detokenize{faq/environment_variables_faq:environment-variables}]{\sphinxcrossref{Environment Variables}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/environment_variables_faq:id3}}{\hyperref[\detokenize{faq/environment_variables_faq:setting-environment-variables-in-linux-and-os-x}]{\sphinxcrossref{Setting environment variables in Linux and OS-X}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{faq/environment_variables_faq:id4}}{\hyperref[\detokenize{faq/environment_variables_faq:bash-ksh}]{\sphinxcrossref{BASH/KSH}}} \item {} \phantomsection\label{\detokenize{faq/environment_variables_faq:id5}}{\hyperref[\detokenize{faq/environment_variables_faq:csh-tcsh}]{\sphinxcrossref{CSH/TCSH}}} \end{itemize} \item {} \phantomsection\label{\detokenize{faq/environment_variables_faq:id6}}{\hyperref[\detokenize{faq/environment_variables_faq:setting-environment-variables-in-windows}]{\sphinxcrossref{Setting environment variables in windows}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \index{environment variable@\spxentry{environment variable}!HOME@\spxentry{HOME}} \begin{fulllineitems} \phantomsection\label{\detokenize{faq/environment_variables_faq:envvar-HOME}}\pysigline{\sphinxbfcode{\sphinxupquote{HOME}}} The user's home directory. On linux, \index{HOME@\spxentry{HOME}}\index{environment variable@\spxentry{environment variable}!HOME@\spxentry{HOME}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-HOME}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\textasciitilde{}}}}}} is shorthand for \index{HOME@\spxentry{HOME}}\index{environment variable@\spxentry{environment variable}!HOME@\spxentry{HOME}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-HOME}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HOME}}}}}. \end{fulllineitems} \index{environment variable@\spxentry{environment variable}!PATH@\spxentry{PATH}} \begin{fulllineitems} \phantomsection\label{\detokenize{faq/environment_variables_faq:envvar-PATH}}\pysigline{\sphinxbfcode{\sphinxupquote{PATH}}} The list of directories searched to find executable programs \end{fulllineitems} \index{environment variable@\spxentry{environment variable}!PYTHONPATH@\spxentry{PYTHONPATH}} \begin{fulllineitems} \phantomsection\label{\detokenize{faq/environment_variables_faq:envvar-PYTHONPATH}}\pysigline{\sphinxbfcode{\sphinxupquote{PYTHONPATH}}} The list of directories that is added to Python's standard search list when importing packages and modules \end{fulllineitems} \index{environment variable@\spxentry{environment variable}!MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}} \begin{fulllineitems} \phantomsection\label{\detokenize{faq/environment_variables_faq:envvar-MPLCONFIGDIR}}\pysigline{\sphinxbfcode{\sphinxupquote{MPLCONFIGDIR}}} This is the directory used to store user customizations to matplotlib, as well as some caches to improve performance. If \index{MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}\index{environment variable@\spxentry{environment variable}!MPLCONFIGDIR@\spxentry{MPLCONFIGDIR}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLCONFIGDIR}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLCONFIGDIR}}}}} is not defined, \sphinxcode{\sphinxupquote{\sphinxstyleemphasis{HOME}/.config/matplotlib}} is generally used on unix-like systems and \sphinxcode{\sphinxupquote{\sphinxstyleemphasis{HOME}/.matplotlib}} is used on other platforms, if they are writable. Otherwise, the python standard library \sphinxhref{https://docs.python.org/3/library/tempfile.html\#tempfile.gettempdir}{\sphinxcode{\sphinxupquote{tempfile.gettempdir()}}} is used to find a base directory in which the \sphinxcode{\sphinxupquote{matplotlib}} subdirectory is created. \end{fulllineitems} \index{environment variable@\spxentry{environment variable}!MPLBACKEND@\spxentry{MPLBACKEND}} \begin{fulllineitems} \phantomsection\label{\detokenize{faq/environment_variables_faq:envvar-MPLBACKEND}}\pysigline{\sphinxbfcode{\sphinxupquote{MPLBACKEND}}} This optional variable can be set to choose the matplotlib backend. See {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}. \end{fulllineitems} \section{Setting environment variables in Linux and OS-X} \label{\detokenize{faq/environment_variables_faq:setting-environment-variables-in-linux-and-os-x}}\label{\detokenize{faq/environment_variables_faq:setting-linux-osx-environment-variables}} To list the current value of \index{PYTHONPATH@\spxentry{PYTHONPATH}}\index{environment variable@\spxentry{environment variable}!PYTHONPATH@\spxentry{PYTHONPATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PYTHONPATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PYTHONPATH}}}}}, which may be empty, try: \begin{sphinxVerbatim}[commandchars=\\\{\}] echo \PYGZdl{}PYTHONPATH \end{sphinxVerbatim} The procedure for setting environment variables in depends on what your default shell is. \sphinxstyleliteralstrong{\sphinxupquote{BASH}} seems to be the most common, but \sphinxstyleliteralstrong{\sphinxupquote{CSH}} is also common. You should be able to determine which by running at the command prompt: \begin{sphinxVerbatim}[commandchars=\\\{\}] echo \PYGZdl{}SHELL \end{sphinxVerbatim} \subsection{BASH/KSH} \label{\detokenize{faq/environment_variables_faq:bash-ksh}} To create a new environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{export} \PYG{n}{PYTHONPATH}\PYG{o}{=}\PYG{o}{\PYGZti{}}\PYG{o}{/}\PYG{n}{Python} \end{sphinxVerbatim} To prepend to an existing environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] export PATH=\PYGZti{}/bin:\PYGZdl{}\PYGZob{}PATH\PYGZcb{} \end{sphinxVerbatim} The search order may be important to you, do you want \sphinxcode{\sphinxupquote{\textasciitilde{}/bin}} to be searched first or last? To append to an existing environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] export PATH=\PYGZdl{}\PYGZob{}PATH\PYGZcb{}:\PYGZti{}/bin \end{sphinxVerbatim} To make your changes available in the future, add the commands to your \sphinxcode{\sphinxupquote{\textasciitilde{}/.bashrc}} file. \subsection{CSH/TCSH} \label{\detokenize{faq/environment_variables_faq:csh-tcsh}} To create a new environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{setenv} \PYG{n}{PYTHONPATH} \PYG{o}{\PYGZti{}}\PYG{o}{/}\PYG{n}{Python} \end{sphinxVerbatim} To prepend to an existing environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] setenv PATH \PYGZti{}/bin:\PYGZdl{}\PYGZob{}PATH\PYGZcb{} \end{sphinxVerbatim} The search order may be important to you, do you want \sphinxcode{\sphinxupquote{\textasciitilde{}/bin}} to be searched first or last? To append to an existing environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] setenv PATH \PYGZdl{}\PYGZob{}PATH\PYGZcb{}:\PYGZti{}/bin \end{sphinxVerbatim} To make your changes available in the future, add the commands to your \sphinxcode{\sphinxupquote{\textasciitilde{}/.cshrc}} file. \section{Setting environment variables in windows} \label{\detokenize{faq/environment_variables_faq:setting-environment-variables-in-windows}}\label{\detokenize{faq/environment_variables_faq:setting-windows-environment-variables}} Open the \sphinxstyleliteralstrong{\sphinxupquote{Control Panel}} (\sphinxmenuselection{Start \(\rightarrow\) Control Panel}), start the \sphinxstyleliteralstrong{\sphinxupquote{System}} program. Click the \sphinxguilabel{Advanced} tab and select the \sphinxguilabel{Environment Variables} button. You can edit or add to the \sphinxguilabel{User Variables}. \chapter{Working with Matplotlib in Virtual environments} \label{\detokenize{faq/virtualenv_faq:working-with-matplotlib-in-virtual-environments}}\label{\detokenize{faq/virtualenv_faq:virtualenv-faq}}\label{\detokenize{faq/virtualenv_faq::doc}} While Matplotlib itself runs fine in a \sphinxhref{https://docs.python.org/3/library/venv.html}{virtual environment} (venv), some of the GUI frameworks that Matplotlib uses for interactive figures are tricky to install in a venv. Everything below assumes some familiarity with the Matplotlib backends as found in {\hyperref[\detokenize{tutorials/introductory/usage:what-is-a-backend}]{\sphinxcrossref{\DUrole{std,std-ref}{What is a backend?}}}}. If you only use the IPython and Jupyter Notebook's \sphinxcode{\sphinxupquote{inline}} and \sphinxcode{\sphinxupquote{notebook}} backends, or non-interactive backends, you should not have any issues and can ignore everything below. Likewise, the \sphinxcode{\sphinxupquote{Tk}} framework (\sphinxcode{\sphinxupquote{TkAgg}} backend) does not require any external dependencies and is normally always available. On certain Linux distributions, a package named \sphinxcode{\sphinxupquote{python-tk}} (or similar) needs to be installed. Otherwise, the situation (at the time of writing) is as follows: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline \sphinxstyletheadfamily framework &\sphinxstyletheadfamily bindings &\sphinxstyletheadfamily pip-installable? &\sphinxstyletheadfamily conda or conda-forge-installable? \\ \hline Qt5 & PyQt5 & yes & yes \\ \hline Qt5 & PySide2 & yes & yes \\ \hline Qt4 & PyQt4 & no & yes \\ \hline Qt4 & PySide & OSX and Windows & yes \\ \hline GTK3 & PyGObject & yes % \begin{footnote}[1]\sphinxAtStartFootnote No wheels available, see \sphinxurl{https://pygobject.readthedocs.io/en/latest/devguide/dev\_environ.html} for build instructions. % \end{footnote} & Linux and OSX \\ \hline wxWidgets & wxPython & yes % \begin{footnote}[2]\sphinxAtStartFootnote OSX and Windows wheels available on PyPI. Linux wheels available but not on PyPI, see \sphinxurl{https://wxpython.org/pages/downloads/}. % \end{footnote} & yes \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} For cases where the framework is not installable in a venv, it needs to be installed in the global (system) site-packages, and then made available from within the venv. This can be achieved by either of the following methods (in all cases, the system-wide Python and the venv Python must be of the same version): \begin{itemize} \item {} \sphinxhref{https://pypi.python.org/pypi/vext}{vext} allows controlled access from within the venv to specific system-wide packages. A specific package needs to be installed for each framework, e.g. \sphinxhref{https://pypi.python.org/pypi/vext.pyqt5}{vext.pyqt5}, etc. It is recommended to use \sphinxcode{\sphinxupquote{vext\textgreater{}=0.7.0}} as earlier versions misconfigure the logging system. \item {} Using the \sphinxcode{\sphinxupquote{-{-}system-site-packages}} option when creating an environment adds all system-wide packages to the virtual environment. However, this breaks the isolation between the virtual environment and the system install. Among other issues it results in hard to debug problems with system packages shadowing the environment packages. If you use \sphinxcode{\sphinxupquote{virtualenv}} (rather than the stdlib's \sphinxcode{\sphinxupquote{venv}}) together with \sphinxhref{https://virtualenvwrapper.readthedocs.io/}{virtualenvwrapper}, this can be toggled with the \sphinxcode{\sphinxupquote{toggleglobalsitepackages}} command. \end{itemize} If you are using Matplotlib on OSX, you may also want to consider the {\hyperref[\detokenize{faq/osx_framework:osxframework-faq}]{\sphinxcrossref{\DUrole{std,std-ref}{OSX framework FAQ}}}}. \chapter{Working with Matplotlib on OSX} \label{\detokenize{faq/osx_framework:working-with-matplotlib-on-osx}}\label{\detokenize{faq/osx_framework:osxframework-faq}}\label{\detokenize{faq/osx_framework::doc}} On OSX, two different types of Python builds exist: a regular build and a framework build. In order to interact correctly with OSX through the native GUI frameworks, you need a framework build of Python. At the time of writing the \sphinxcode{\sphinxupquote{macosx}} and \sphinxcode{\sphinxupquote{WXAgg}} backends require a framework build to function correctly. This can result in issues for a Python installation not build as a framework and may also happen in virtual envs and when using (Ana)conda. From Matplotlib 1.5 onwards, both backends check that a framework build is available and fail if a non framework build is found. (Without this check a partially functional figure is created. In particular, it is produced in the background and cannot be put in front of any other window.) \section{virtualenv} \label{\detokenize{faq/osx_framework:virtualenv}} In a \sphinxhref{https://virtualenv.pypa.io/}{virtualenv}, a non-framework build is used even when the environment is created from a framework build (\sphinxhref{https://github.com/pypa/virtualenv/issues/54}{virtualenv bug \#54}, \sphinxhref{https://github.com/pypa/virtualenv/issues/609}{virtualenv bug \#609}). The solution is to not use virtualenv, but instead the stdlib's \sphinxhref{https://docs.python.org/3/library/venv.html}{venv}, which provides similar functionality but without exhibiting this issue. If you absolutely need to use virtualenv rather than venv, then from within the environment you can set the \sphinxcode{\sphinxupquote{PYTHONHOME}} environment variable to \sphinxcode{\sphinxupquote{\$VIRTUAL\_ENV}}, then invoke Python using the full path to the framework build (typically \sphinxcode{\sphinxupquote{/usr/local/bin/python}}). \section{conda} \label{\detokenize{faq/osx_framework:conda}} The default python provided in (Ana)conda is not a framework build. However, a framework build can easily be installed, both in the main environment and in conda envs: install python.app (\sphinxcode{\sphinxupquote{conda install python.app}}) and use \sphinxcode{\sphinxupquote{pythonw}} rather than \sphinxcode{\sphinxupquote{python}}. \part{API Overview} \label{\detokenize{api/index:api-overview}}\label{\detokenize{api/index::doc}} \chapter{API Changes} \label{\detokenize{api/api_changes:api-changes}}\label{\detokenize{api/api_changes::doc}} If updating Matplotlib breaks your scripts, this list may help you figure out what caused the breakage and how to fix it by updating your code. For API changes in older versions see \section{Old API Changes} \label{\detokenize{api/api_changes_old:old-api-changes}}\label{\detokenize{api/api_changes_old::doc}} \subsection{Changes for 0.40} \label{\detokenize{api/prev_api_changes/api_changes_0.40:changes-for-0-40}}\label{\detokenize{api/prev_api_changes/api_changes_0.40::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} Artist * \PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{} takes a DPI instance and a Bound2D instance which is the bounding box of the artist in display coords * get\PYGZus{}window\PYGZus{}extent returns a Bound2D instance * set\PYGZus{}size is removed; replaced by bbox and dpi * the clip\PYGZus{}gc method is removed. Artists now clip themselves with their box * added \PYGZus{}clipOn boolean attribute. If True, gc clip to bbox. \PYGZhy{} AxisTextBase * Initialized with a transx, transy which are Transform instances * set\PYGZus{}drawing\PYGZus{}area removed * get\PYGZus{}left\PYGZus{}right and get\PYGZus{}top\PYGZus{}bottom are replaced by get\PYGZus{}window\PYGZus{}extent \PYGZhy{} Line2D Patches now take transx, transy * Initialized with a transx, transy which are Transform instances \PYGZhy{} Patches * Initialized with a transx, transy which are Transform instances \PYGZhy{} FigureBase attributes dpi is a DPI instance rather than scalar and new attribute bbox is a Bound2D in display coords, and I got rid of the left, width, height, etc... attributes. These are now accessible as, for example, bbox.x.min is left, bbox.x.interval() is width, bbox.y.max is top, etc... \PYGZhy{} GcfBase attribute pagesize renamed to figsize \PYGZhy{} Axes * removed figbg attribute * added fig instance to \PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{} * resizing is handled by figure call to resize. \PYGZhy{} Subplot * added fig instance to \PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{} \PYGZhy{} Renderer methods for patches now take gcEdge and gcFace instances. gcFace=None takes the place of filled=False \PYGZhy{} True and False symbols provided by cbook in a python2.3 compatible way \PYGZhy{} new module transforms supplies Bound1D, Bound2D and Transform instances and more \PYGZhy{} Changes to the MATLAB helpers API * \PYGZus{}matlab\PYGZus{}helpers.GcfBase is renamed by Gcf. Backends no longer need to derive from this class. Instead, they provide a factory function new\PYGZus{}figure\PYGZus{}manager(num, figsize, dpi). The destroy method of the GcfDerived from the backends is moved to the derived FigureManager. * FigureManagerBase moved to backend\PYGZus{}bases * Gcf.get\PYGZus{}all\PYGZus{}figwins renamed to Gcf.get\PYGZus{}all\PYGZus{}fig\PYGZus{}managers Jeremy: Make sure to self.\PYGZus{}reset = False in AxisTextWX.\PYGZus{}set\PYGZus{}font. This was something missing in my backend code. \end{sphinxVerbatim} \subsection{Changes for 0.42} \label{\detokenize{api/prev_api_changes/api_changes_0.42:changes-for-0-42}}\label{\detokenize{api/prev_api_changes/api_changes_0.42::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] * Refactoring AxisText to be backend independent. Text drawing and get\PYGZus{}window\PYGZus{}extent functionality will be moved to the Renderer. * backend\PYGZus{}bases.AxisTextBase is now text.Text module * All the erase and reset functionality removed from AxisText \PYGZhy{} not needed with double buffered drawing. Ditto with state change. Text instances have a get\PYGZus{}prop\PYGZus{}tup method that returns a hashable tuple of text properties which you can use to see if text props have changed, e.g., by caching a font or layout instance in a dict with the prop tup as a key \PYGZhy{}\PYGZhy{} see RendererGTK.get\PYGZus{}pango\PYGZus{}layout in backend\PYGZus{}gtk for an example. * Text.\PYGZus{}get\PYGZus{}xy\PYGZus{}display renamed Text.get\PYGZus{}xy\PYGZus{}display * Artist set\PYGZus{}renderer and wash\PYGZus{}brushes methods removed * Moved Legend class from matplotlib.axes into matplotlib.legend * Moved Tick, XTick, YTick, Axis, XAxis, YAxis from matplotlib.axes to matplotlib.axis * moved process\PYGZus{}text\PYGZus{}args to matplotlib.text * After getting Text handled in a backend independent fashion, the import process is much cleaner since there are no longer cyclic dependencies * matplotlib.matlab.\PYGZus{}get\PYGZus{}current\PYGZus{}fig\PYGZus{}manager renamed to matplotlib.matlab.get\PYGZus{}current\PYGZus{}fig\PYGZus{}manager to allow user access to the GUI window attribute, e.g., figManager.window for GTK and figManager.frame for wx \end{sphinxVerbatim} \subsection{Changes for 0.50} \label{\detokenize{api/prev_api_changes/api_changes_0.50:changes-for-0-50}}\label{\detokenize{api/prev_api_changes/api_changes_0.50::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] * refactored Figure class so it is no longer backend dependent. FigureCanvasBackend takes over the backend specific duties of the Figure. matplotlib.backend\PYGZus{}bases.FigureBase moved to matplotlib.figure.Figure. * backends must implement FigureCanvasBackend (the thing that controls the figure and handles the events if any) and FigureManagerBackend (wraps the canvas and the window for MATLAB interface). FigureCanvasBase implements a backend switching mechanism * Figure is now an Artist (like everything else in the figure) and is totally backend independent * GDFONTPATH renamed to TTFPATH * backend faceColor argument changed to rgbFace * colormap stuff moved to colors.py * arg\PYGZus{}to\PYGZus{}rgb in backend\PYGZus{}bases moved to class ColorConverter in colors.py * GD users must upgrade to gd\PYGZhy{}2.0.22 and gdmodule\PYGZhy{}0.52 since new gd features (clipping, antialiased lines) are now used. * Renderer must implement points\PYGZus{}to\PYGZus{}pixels Migrating code: MATLAB interface: The only API change for those using the MATLAB interface is in how you call figure redraws for dynamically updating figures. In the old API, you did fig.draw() In the new API, you do manager = get\PYGZus{}current\PYGZus{}fig\PYGZus{}manager() manager.canvas.draw() See the examples system\PYGZus{}monitor.py, dynamic\PYGZus{}demo.py, and anim.py API There is one important API change for application developers. Figure instances used subclass GUI widgets that enabled them to be placed directly into figures. e.g., FigureGTK subclassed gtk.DrawingArea. Now the Figure class is independent of the backend, and FigureCanvas takes over the functionality formerly handled by Figure. In order to include figures into your apps, you now need to do, for example \PYGZsh{} gtk example fig = Figure(figsize=(5,4), dpi=100) canvas = FigureCanvasGTK(fig) \PYGZsh{} a gtk.DrawingArea canvas.show() vbox.pack\PYGZus{}start(canvas) If you use the NavigationToolbar, this in now initialized with a FigureCanvas, not a Figure. The examples embedding\PYGZus{}in\PYGZus{}gtk.py, embedding\PYGZus{}in\PYGZus{}gtk2.py, and mpl\PYGZus{}with\PYGZus{}glade.py all reflect the new API so use these as a guide. All prior calls to figure.draw() and figure.print\PYGZus{}figure(args) should now be canvas.draw() and canvas.print\PYGZus{}figure(args) Apologies for the inconvenience. This refactorization brings significant more freedom in developing matplotlib and should bring better plotting capabilities, so I hope the inconvenience is worth it. \end{sphinxVerbatim} \subsection{Changes for 0.54} \label{\detokenize{api/prev_api_changes/api_changes_0.54:changes-for-0-54}}\label{\detokenize{api/prev_api_changes/api_changes_0.54::doc}} \subsubsection{MATLAB interface} \label{\detokenize{api/prev_api_changes/api_changes_0.54:matlab-interface}} \paragraph{dpi} \label{\detokenize{api/prev_api_changes/api_changes_0.54:dpi}} Several of the backends used a PIXELS\_PER\_INCH hack that I added to try and make images render consistently across backends. This just complicated matters. So you may find that some font sizes and line widths appear different than before. Apologies for the inconvenience. You should set the dpi to an accurate value for your screen to get true sizes. \paragraph{pcolor and scatter} \label{\detokenize{api/prev_api_changes/api_changes_0.54:pcolor-and-scatter}} There are two changes to the MATLAB interface API, both involving the patch drawing commands. For efficiency, pcolor and scatter have been rewritten to use polygon collections, which are a new set of objects from matplotlib.collections designed to enable efficient handling of large collections of objects. These new collections make it possible to build large scatter plots or pcolor plots with no loops at the python level, and are significantly faster than their predecessors. The original pcolor and scatter functions are retained as pcolor\_classic and scatter\_classic. The return value from pcolor is a PolyCollection. Most of the propertes that are available on rectangles or other patches are also available on PolyCollections, e.g., you can say: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{c} \PYG{o}{=} \PYG{n}{scatter}\PYG{p}{(}\PYG{n}{blah}\PYG{p}{,} \PYG{n}{blah}\PYG{p}{)} \PYG{n}{c}\PYG{o}{.}\PYG{n}{set\PYGZus{}linewidth}\PYG{p}{(}\PYG{l+m+mf}{1.0}\PYG{p}{)} \PYG{n}{c}\PYG{o}{.}\PYG{n}{set\PYGZus{}facecolor}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{c}\PYG{o}{.}\PYG{n}{set\PYGZus{}alpha}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{c} \PYG{o}{=} \PYG{n}{scatter}\PYG{p}{(}\PYG{n}{blah}\PYG{p}{,} \PYG{n}{blah}\PYG{p}{)} \PYG{n+nb}{set}\PYG{p}{(}\PYG{n}{c}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{facecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{alpha}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} Because the collection is a single object, you no longer need to loop over the return value of scatter or pcolor to set properties for the entire list. If you want the different elements of a collection to vary on a property, e.g., to have different line widths, see matplotlib.collections for a discussion on how to set the properties as a sequence. For scatter, the size argument is now in points\textasciicircum{}2 (the area of the symbol in points) as in MATLAB and is not in data coords as before. Using sizes in data coords caused several problems. So you will need to adjust your size arguments accordingly or use scatter\_classic. \paragraph{mathtext spacing} \label{\detokenize{api/prev_api_changes/api_changes_0.54:mathtext-spacing}} For reasons not clear to me (and which I'll eventually fix) spacing no longer works in font groups. However, I added three new spacing commands which compensate for this '' (regular space), '/' (small space) and 'hspace\{frac\}' where frac is a fraction of fontsize in points. You will need to quote spaces in font strings, is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{title}\PYG{p}{(}\PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZdl{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{rm}\PYG{l+s+s1}{\PYGZob{}}\PYG{l+s+s1}{Histogram}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ of}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ IQ:\PYGZcb{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{mu=100,}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{sigma=15\PYGZdl{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Object interface - Application programmers} \label{\detokenize{api/prev_api_changes/api_changes_0.54:object-interface-application-programmers}} \paragraph{Autoscaling} \label{\detokenize{api/prev_api_changes/api_changes_0.54:autoscaling}}\begin{quote} The x and y axis instances no longer have autoscale view. These are handled by axes.autoscale\_view \end{quote} \paragraph{Axes creation} \label{\detokenize{api/prev_api_changes/api_changes_0.54:axes-creation}}\begin{quote} You should not instantiate your own Axes any more using the OO API. Rather, create a Figure as before and in place of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{f} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{a} \PYG{o}{=} \PYG{n}{Subplot}\PYG{p}{(}\PYG{n}{f}\PYG{p}{,} \PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{f}\PYG{o}{.}\PYG{n}{add\PYGZus{}axis}\PYG{p}{(}\PYG{n}{a}\PYG{p}{)} \end{sphinxVerbatim} use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{f} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{a} \PYG{o}{=} \PYG{n}{f}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \end{sphinxVerbatim} That is, add\_axis no longer exists and is replaced by: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{axisbg}\PYG{o}{=}\PYG{n}{defaultcolor}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{num}\PYG{p}{,} \PYG{n}{axisbg}\PYG{o}{=}\PYG{n}{defaultcolor}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \end{quote} \paragraph{Artist methods} \label{\detokenize{api/prev_api_changes/api_changes_0.54:artist-methods}}\begin{quote} If you define your own Artists, you need to rename the \_draw method to draw \end{quote} \paragraph{Bounding boxes} \label{\detokenize{api/prev_api_changes/api_changes_0.54:bounding-boxes}}\begin{quote} matplotlib.transforms.Bound2D is replaced by matplotlib.transforms.Bbox. If you want to construct a bbox from left, bottom, width, height (the signature for Bound2D), use matplotlib.transforms.lbwh\_to\_bbox, as in \begin{quote} bbox = clickBBox = lbwh\_to\_bbox(left, bottom, width, height) \end{quote} The Bbox has a different API than the Bound2D. e.g., if you want to get the width and height of the bbox \begin{quote} \begin{description} \item[{OLD::}] \leavevmode width = fig.bbox.x.interval() height = fig.bbox.y.interval() \item[{New::}] \leavevmode width = fig.bbox.width() height = fig.bbox.height() \end{description} \end{quote} \end{quote} \paragraph{Object constructors} \label{\detokenize{api/prev_api_changes/api_changes_0.54:object-constructors}}\begin{quote} You no longer pass the bbox, dpi, or transforms to the various Artist constructors. The old way or creating lines and rectangles was cumbersome because you had to pass so many attributes to the Line2D and Rectangle classes not related directly to the geometry and properties of the object. Now default values are added to the object when you call axes.add\_line or axes.add\_patch, so they are hidden from the user. If you want to define a custom transformation on these objects, call o.set\_transform(trans) where trans is a Transformation instance. In prior versions of you wanted to add a custom line in data coords, you would have to do \begin{quote} \begin{description} \item[{l = Line2D(dpi, bbox, x, y,}] \leavevmode color = color, transx = transx, transy = transy, ) \end{description} \end{quote} now all you need is \begin{quote} l = Line2D(x, y, color=color) \end{quote} and the axes will set the transformation for you (unless you have set your own already, in which case it will eave it unchanged) \end{quote} \paragraph{Transformations} \label{\detokenize{api/prev_api_changes/api_changes_0.54:transformations}}\begin{quote} The entire transformation architecture has been rewritten. Previously the x and y transformations where stored in the xaxis and yaxis instances. The problem with this approach is it only allows for separable transforms (where the x and y transformations don't depend on one another). But for cases like polar, they do. Now transformations operate on x,y together. There is a new base class matplotlib.transforms.Transformation and two concrete implementations, matplotlib.transforms.SeparableTransformation and matplotlib.transforms.Affine. The SeparableTransformation is constructed with the bounding box of the input (this determines the rectangular coordinate system of the input, i.e., the x and y view limits), the bounding box of the display, and possibly nonlinear transformations of x and y. The 2 most frequently used transformations, data coordinates -\textgreater{} display and axes coordinates -\textgreater{} display are available as ax.transData and ax.transAxes. See alignment\_demo.py which uses axes coords. Also, the transformations should be much faster now, for two reasons \begin{itemize} \item {} they are written entirely in extension code \item {} because they operate on x and y together, they can do the entire transformation in one loop. Earlier I did something along the lines of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xt} \PYG{o}{=} \PYG{n}{sx}\PYG{o}{*}\PYG{n}{func}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{o}{+} \PYG{n}{tx} \PYG{n}{yt} \PYG{o}{=} \PYG{n}{sy}\PYG{o}{*}\PYG{n}{func}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{o}{+} \PYG{n}{ty} \end{sphinxVerbatim} Although this was done in numerix, it still involves 6 length(x) for-loops (the multiply, add, and function evaluation each for x and y). Now all of that is done in a single pass. \end{itemize} If you are using transformations and bounding boxes to get the cursor position in data coordinates, the method calls are a little different now. See the updated examples/coords\_demo.py which shows you how to do this. Likewise, if you are using the artist bounding boxes to pick items on the canvas with the GUI, the bbox methods are somewhat different. You will need to see the updated examples/object\_picker.py. See unit/transforms\_unit.py for many examples using the new transformations. \end{quote} \subsection{Changes for 0.54.3} \label{\detokenize{api/prev_api_changes/api_changes_0.54.3:changes-for-0-54-3}}\label{\detokenize{api/prev_api_changes/api_changes_0.54.3::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] removed the set\PYGZus{}default\PYGZus{}font / get\PYGZus{}default\PYGZus{}font scheme from the font\PYGZus{}manager to unify customization of font defaults with the rest of the rc scheme. See examples/font\PYGZus{}properties\PYGZus{}demo.py and help(rc) in matplotlib.matlab. \end{sphinxVerbatim} \subsection{Changes for 0.60} \label{\detokenize{api/prev_api_changes/api_changes_0.60:changes-for-0-60}}\label{\detokenize{api/prev_api_changes/api_changes_0.60::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] ColormapJet and Grayscale are deprecated. For backwards compatibility, they can be obtained either by doing from matplotlib.cm import ColormapJet or from matplotlib.matlab import * They are replaced by cm.jet and cm.grey \end{sphinxVerbatim} \subsection{Changes for 0.61} \label{\detokenize{api/prev_api_changes/api_changes_0.61:changes-for-0-61}}\label{\detokenize{api/prev_api_changes/api_changes_0.61::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] canvas.connect is now deprecated for event handling. use mpl\PYGZus{}connect and mpl\PYGZus{}disconnect instead. The callback signature is func(event) rather than func(widget, event) \end{sphinxVerbatim} \subsection{Changes for 0.63} \label{\detokenize{api/prev_api_changes/api_changes_0.63:changes-for-0-63}}\label{\detokenize{api/prev_api_changes/api_changes_0.63::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Dates are now represented internally as float days since 0001\PYGZhy{}01\PYGZhy{}01, UTC. All date tickers and formatters are now in matplotlib.dates, rather than matplotlib.tickers converters have been abolished from all functions and classes. num2date and date2num are now the converter functions for all date plots Most of the date tick locators have a different meaning in their constructors. In the prior implementation, the first argument was a base and multiples of the base were ticked. e.g., HourLocator(5) \PYGZsh{} old: tick every 5 minutes In the new implementation, the explicit points you want to tick are provided as a number or sequence HourLocator(range(0,5,61)) \PYGZsh{} new: tick every 5 minutes This gives much greater flexibility. I have tried to make the default constructors (no args) behave similarly, where possible. Note that YearLocator still works under the base/multiple scheme. The difference between the YearLocator and the other locators is that years are not recurrent. Financial functions: matplotlib.finance.quotes\PYGZus{}historical\PYGZus{}yahoo(ticker, date1, date2) date1, date2 are now datetime instances. Return value is a list of quotes where the quote time is a float \PYGZhy{} days since gregorian start, as returned by date2num See examples/finance\PYGZus{}demo.py for example usage of new API \end{sphinxVerbatim} \subsection{Changes for 0.65} \label{\detokenize{api/prev_api_changes/api_changes_0.65:changes-for-0-65}}\label{\detokenize{api/prev_api_changes/api_changes_0.65::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] mpl\PYGZus{}connect and mpl\PYGZus{}disconnect in the MATLAB interface renamed to connect and disconnect Did away with the text methods for angle since they were ambiguous. fontangle could mean fontstyle (obligue, etc) or the rotation of the text. Use style and rotation instead. \end{sphinxVerbatim} \subsection{Changes for 0.65.1} \label{\detokenize{api/prev_api_changes/api_changes_0.65.1:changes-for-0-65-1}}\label{\detokenize{api/prev_api_changes/api_changes_0.65.1::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] removed add\PYGZus{}axes and add\PYGZus{}subplot from backend\PYGZus{}bases. Use figure.add\PYGZus{}axes and add\PYGZus{}subplot instead. The figure now manages the current axes with gca and sca for get and set current axes. If you have code you are porting which called, e.g., figmanager.add\PYGZus{}axes, you can now simply do figmanager.canvas.figure.add\PYGZus{}axes. \end{sphinxVerbatim} \subsection{Changes for 0.70} \label{\detokenize{api/prev_api_changes/api_changes_0.70:changes-for-0-70}}\label{\detokenize{api/prev_api_changes/api_changes_0.70::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] MplEvent factored into a base class Event and derived classes MouseEvent and KeyEvent Removed definct set\PYGZus{}measurement in wx toolbar \end{sphinxVerbatim} \subsection{Changes for 0.71} \label{\detokenize{api/prev_api_changes/api_changes_0.71:changes-for-0-71}}\label{\detokenize{api/prev_api_changes/api_changes_0.71::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Significant numerix namespace changes, introduced to resolve namespace clashes between python built\PYGZhy{}ins and mlab names. Refactored numerix to maintain separate modules, rather than folding all these names into a single namespace. See the following mailing list threads for more information and background http://sourceforge.net/mailarchive/forum.php?thread\PYGZus{}id=6398890\PYGZam{}forum\PYGZus{}id=36187 http://sourceforge.net/mailarchive/forum.php?thread\PYGZus{}id=6323208\PYGZam{}forum\PYGZus{}id=36187 OLD usage from matplotlib.numerix import array, mean, fft NEW usage from matplotlib.numerix import array from matplotlib.numerix.mlab import mean from matplotlib.numerix.fft import fft numerix dir structure mirrors numarray (though it is an incomplete implementation) numerix numerix/mlab numerix/linear\PYGZus{}algebra numerix/fft numerix/random\PYGZus{}array but of course you can use \PYGZsq{}numerix : Numeric\PYGZsq{} and still get the symbols. pylab still imports most of the symbols from Numerix, MLab, fft, etc, but is more cautious. For names that clash with python names (min, max, sum), pylab keeps the builtins and provides the numeric versions with an a* prefix, e.g., (amin, amax, asum) \end{sphinxVerbatim} \subsection{Changes for 0.72} \label{\detokenize{api/prev_api_changes/api_changes_0.72:changes-for-0-72}}\label{\detokenize{api/prev_api_changes/api_changes_0.72::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} Line2D, Text, and Patch copy\PYGZus{}properties renamed update\PYGZus{}from and moved into artist base class \PYGZhy{} LineCollecitons.color renamed to LineCollections.set\PYGZus{}color for consistency with set/get introspection mechanism, \PYGZhy{} pylab figure now defaults to num=None, which creates a new figure with a guaranteed unique number \PYGZhy{} contour method syntax changed \PYGZhy{} now it is MATLAB compatible unchanged: contour(Z) old: contour(Z, x=Y, y=Y) new: contour(X, Y, Z) see http://matplotlib.sf.net/matplotlib.pylab.html\PYGZsh{}\PYGZhy{}contour \PYGZhy{} Increased the default resolution for save command. \PYGZhy{} Renamed the base attribute of the ticker classes to \PYGZus{}base to avoid conflict with the base method. Sitt for subs \PYGZhy{} subs=none now does autosubbing in the tick locator. \PYGZhy{} New subplots that overlap old will delete the old axes. If you do not want this behavior, use fig.add\PYGZus{}subplot or the axes command \end{sphinxVerbatim} \subsection{Changes for 0.73} \label{\detokenize{api/prev_api_changes/api_changes_0.73:changes-for-0-73}}\label{\detokenize{api/prev_api_changes/api_changes_0.73::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} Removed deprecated ColormapJet and friends \PYGZhy{} Removed all error handling from the verbose object \PYGZhy{} figure num of zero is now allowed \end{sphinxVerbatim} \subsection{Changes for 0.80} \label{\detokenize{api/prev_api_changes/api_changes_0.80:changes-for-0-80}}\label{\detokenize{api/prev_api_changes/api_changes_0.80::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} xlim/ylim/axis always return the new limits regardless of arguments. They now take kwargs which allow you to selectively change the upper or lower limits while leaving unnamed limits unchanged. See help(xlim) for example \end{sphinxVerbatim} \subsection{Changes for 0.81} \label{\detokenize{api/prev_api_changes/api_changes_0.81:changes-for-0-81}}\label{\detokenize{api/prev_api_changes/api_changes_0.81::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} pylab and artist \PYGZdq{}set\PYGZdq{} functions renamed to setp to avoid clash with python2.4 built\PYGZhy{}in set. Current version will issue a deprecation warning which will be removed in future versions \PYGZhy{} imshow interpolation arguments changes for advanced interpolation schemes. See help imshow, particularly the interpolation, filternorm and filterrad kwargs \PYGZhy{} Support for masked arrays has been added to the plot command and to the Line2D object. Only the valid points are plotted. A \PYGZdq{}valid\PYGZus{}only\PYGZdq{} kwarg was added to the get\PYGZus{}xdata() and get\PYGZus{}ydata() methods of Line2D; by default it is False, so that the original data arrays are returned. Setting it to True returns the plottable points. \PYGZhy{} contour changes: Masked arrays: contour and contourf now accept masked arrays as the variable to be contoured. Masking works correctly for contour, but a bug remains to be fixed before it will work for contourf. The \PYGZdq{}badmask\PYGZdq{} kwarg has been removed from both functions. Level argument changes: Old version: a list of levels as one of the positional arguments specified the lower bound of each filled region; the upper bound of the last region was taken as a very large number. Hence, it was not possible to specify that z values between 0 and 1, for example, be filled, and that values outside that range remain unfilled. New version: a list of N levels is taken as specifying the boundaries of N\PYGZhy{}1 z ranges. Now the user has more control over what is colored and what is not. Repeated calls to contourf (with different colormaps or color specifications, for example) can be used to color different ranges of z. Values of z outside an expected range are left uncolored. Example: Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0\PYGZhy{}1, 1\PYGZhy{}2, and \PYGZgt{}2. New: it would yield 2 regions: 0\PYGZhy{}1, 1\PYGZhy{}2. If the same 3 regions were desired, the equivalent list of levels would be [0, 1, 2, 1e38]. \end{sphinxVerbatim} \subsection{Changes for 0.82} \label{\detokenize{api/prev_api_changes/api_changes_0.82:changes-for-0-82}}\label{\detokenize{api/prev_api_changes/api_changes_0.82::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} toolbar import change in GTKAgg, GTKCairo and WXAgg \PYGZhy{} Added subplot config tool to GTK* backends \PYGZhy{}\PYGZhy{} note you must now import the NavigationToolbar2 from your backend of choice rather than from backend\PYGZus{}gtk because it needs to know about the backend specific canvas \PYGZhy{}\PYGZhy{} see examples/embedding\PYGZus{}in\PYGZus{}gtk2.py. Ditto for wx backend \PYGZhy{}\PYGZhy{} see examples/embedding\PYGZus{}in\PYGZus{}wxagg.py \PYGZhy{} hist bin change Sean Richards notes there was a problem in the way we created the binning for histogram, which made the last bin underrepresented. From his post: I see that hist uses the linspace function to create the bins and then uses searchsorted to put the values in their correct bin. That\PYGZsq{}s all good but I am confused over the use of linspace for the bin creation. I wouldn\PYGZsq{}t have thought that it does what is needed, to quote the docstring it creates a \PYGZdq{}Linear spaced array from min to max\PYGZdq{}. For it to work correctly shouldn\PYGZsq{}t the values in the bins array be the same bound for each bin? (i.e. each value should be the lower bound of a bin). To provide the correct bins for hist would it not be something like def bins(xmin, xmax, N): if N==1: return xmax dx = (xmax\PYGZhy{}xmin)/N \PYGZsh{} instead of N\PYGZhy{}1 return xmin + dx*arange(N) This suggestion is implemented in 0.81. My test script with these changes does not reveal any bias in the binning from matplotlib.numerix.mlab import randn, rand, zeros, Float from matplotlib.mlab import hist, mean Nbins = 50 Ntests = 200 results = zeros((Ntests,Nbins), typecode=Float) for i in range(Ntests): print \PYGZsq{}computing\PYGZsq{}, i x = rand(10000) n, bins = hist(x, Nbins) results[i] = n print mean(results) \end{sphinxVerbatim} \subsection{Changes for 0.83} \label{\detokenize{api/prev_api_changes/api_changes_0.83:changes-for-0-83}}\label{\detokenize{api/prev_api_changes/api_changes_0.83::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZhy{} Made HOME/.matplotlib the new config dir where the matplotlibrc file, the ttf.cache, and the tex.cache live. The new default filenames in .matplotlib have no leading dot and are not hidden. e.g., the new names are matplotlibrc, tex.cache, and ttffont.cache. This is how ipython does it so it must be right. If old files are found, a warning is issued and they are moved to the new location. \PYGZhy{} backends/\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}.py no longer imports new\PYGZus{}figure\PYGZus{}manager, draw\PYGZus{}if\PYGZus{}interactive and show from the default backend, but puts these imports into a call to pylab\PYGZus{}setup. Also, the Toolbar is no longer imported from WX/WXAgg. New usage: from backends import pylab\PYGZus{}setup new\PYGZus{}figure\PYGZus{}manager, draw\PYGZus{}if\PYGZus{}interactive, show = pylab\PYGZus{}setup() \PYGZhy{} Moved Figure.get\PYGZus{}width\PYGZus{}height() to FigureCanvasBase. It now returns int instead of float. \end{sphinxVerbatim} \subsection{Changes for 0.84} \label{\detokenize{api/prev_api_changes/api_changes_0.84:changes-for-0-84}}\label{\detokenize{api/prev_api_changes/api_changes_0.84::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Unified argument handling between hlines and vlines. Both now take optionally a fmt argument (as in plot) and a keyword args that can be passed onto Line2D. Removed all references to \PYGZdq{}data clipping\PYGZdq{} in rc and lines.py since these were not used and not optimized. I\PYGZsq{}m sure they\PYGZsq{}ll be resurrected later with a better implementation when needed. \PYGZsq{}set\PYGZsq{} removed \PYGZhy{} no more deprecation warnings. Use \PYGZsq{}setp\PYGZsq{} instead. Backend developers: Added flipud method to image and removed it from to\PYGZus{}str. Removed origin kwarg from backend.draw\PYGZus{}image. origin is handled entirely by the frontend now. \end{sphinxVerbatim} \subsection{Changes for 0.85} \label{\detokenize{api/prev_api_changes/api_changes_0.85:changes-for-0-85}}\label{\detokenize{api/prev_api_changes/api_changes_0.85::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Made xtick and ytick separate props in rc made pos=None the default for tick formatters rather than 0 to indicate \PYGZdq{}not supplied\PYGZdq{} Removed \PYGZdq{}feature\PYGZdq{} of minor ticks which prevents them from overlapping major ticks. Often you want major and minor ticks at the same place, and can offset the major ticks with the pad. This could be made configurable Changed the internal structure of contour.py to a more OO style. Calls to contour or contourf in axes.py or pylab.py now return a ContourSet object which contains references to the LineCollections or PolyCollections created by the call, as well as the configuration variables that were used. The ContourSet object is a \PYGZdq{}mappable\PYGZdq{} if a colormap was used. Added a clip\PYGZus{}ends kwarg to contourf. From the docstring: * clip\PYGZus{}ends = True If False, the limits for color scaling are set to the minimum and maximum contour levels. True (default) clips the scaling limits. Example: if the contour boundaries are V = [\PYGZhy{}100, 2, 1, 0, 1, 2, 100], then the scaling limits will be [\PYGZhy{}100, 100] if clip\PYGZus{}ends is False, and [\PYGZhy{}3, 3] if clip\PYGZus{}ends is True. Added kwargs linewidths, antialiased, and nchunk to contourf. These are experimental; see the docstring. Changed Figure.colorbar(): kw argument order changed; if mappable arg is a non\PYGZhy{}filled ContourSet, colorbar() shows lines instead hof polygons. if mappable arg is a filled ContourSet with clip\PYGZus{}ends=True, the endpoints are not labelled, so as to give the correct impression of open\PYGZhy{}endedness. Changed LineCollection.get\PYGZus{}linewidths to get\PYGZus{}linewidth, for consistency. \end{sphinxVerbatim} \subsection{Changes for 0.86} \label{\detokenize{api/prev_api_changes/api_changes_0.86:changes-for-0-86}}\label{\detokenize{api/prev_api_changes/api_changes_0.86::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Matplotlib data is installed into the matplotlib module. This is similar to package\PYGZus{}data. This should get rid of having to check for many possibilities in \PYGZus{}get\PYGZus{}data\PYGZus{}path(). The MATPLOTLIBDATA env key is still checked first to allow for flexibility. 1) Separated the color table data from cm.py out into a new file, \PYGZus{}cm.py, to make it easier to find the actual code in cm.py and to add new colormaps. Everything from \PYGZus{}cm.py is imported by cm.py, so the split should be transparent. 2) Enabled automatic generation of a colormap from a list of colors in contour; see modified examples/contour\PYGZus{}demo.py. 3) Support for imshow of a masked array, with the ability to specify colors (or no color at all) for masked regions, and for regions that are above or below the normally mapped region. See examples/image\PYGZus{}masked.py. 4) In support of the above, added two new classes, ListedColormap, and no\PYGZus{}norm, to colors.py, and modified the Colormap class to include common functionality. Added a clip kwarg to the normalize class. \end{sphinxVerbatim} \subsection{Changes for 0.87.7} \label{\detokenize{api/prev_api_changes/api_changes_0.87.7:changes-for-0-87-7}}\label{\detokenize{api/prev_api_changes/api_changes_0.87.7::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] Completely reworked the annotations API because I found the old API cumbersome. The new design is much more legible and easy to read. See matplotlib.text.Annotation and examples/annotation\PYGZus{}demo.py markeredgecolor and markerfacecolor cannot be configured in matplotlibrc any more. Instead, markers are generally colored automatically based on the color of the line, unless marker colors are explicitly set as kwargs \PYGZhy{} NN Changed default comment character for load to \PYGZsq{}\PYGZsh{}\PYGZsq{} \PYGZhy{} JDH math\PYGZus{}parse\PYGZus{}s\PYGZus{}ft2font\PYGZus{}svg from mathtext.py \PYGZam{} mathtext2.py now returns width, height, svg\PYGZus{}elements. svg\PYGZus{}elements is an instance of Bunch ( cmbook.py) and has the attributes svg\PYGZus{}glyphs and svg\PYGZus{}lines, which are both lists. Renderer.draw\PYGZus{}arc now takes an additional parameter, rotation. It specifies to draw the artist rotated in degrees anti\PYGZhy{} clockwise. It was added for rotated ellipses. Renamed Figure.set\PYGZus{}figsize\PYGZus{}inches to Figure.set\PYGZus{}size\PYGZus{}inches to better match the get method, Figure.get\PYGZus{}size\PYGZus{}inches. Removed the copy\PYGZus{}bbox\PYGZus{}transform from transforms.py; added shallowcopy methods to all transforms. All transforms already had deepcopy methods. FigureManager.resize(width, height): resize the window specified in pixels barh: x and y args have been renamed to width and bottom respectively, and their order has been swapped to maintain a (position, value) order. bar and barh: now accept kwarg \PYGZsq{}edgecolor\PYGZsq{}. bar and barh: The left, height, width and bottom args can now all be scalars or sequences; see docstring. barh: now defaults to edge aligned instead of center aligned bars bar, barh and hist: Added a keyword arg \PYGZsq{}align\PYGZsq{} that controls between edge or center bar alignment. Collections: PolyCollection and LineCollection now accept vertices or segments either in the original form [(x,y), (x,y), ...] or as a 2D numerix array, with X as the first column and Y as the second. Contour and quiver output the numerix form. The transforms methods Bbox.update() and Transformation.seq\PYGZus{}xy\PYGZus{}tups() now accept either form. Collections: LineCollection is now a ScalarMappable like PolyCollection, etc. Specifying a grayscale color as a float is deprecated; use a string instead, e.g., 0.75 \PYGZhy{}\PYGZgt{} \PYGZsq{}0.75\PYGZsq{}. Collections: initializers now accept any mpl color arg, or sequence of such args; previously only a sequence of rgba tuples was accepted. Colorbar: completely new version and api; see docstring. The original version is still accessible as colorbar\PYGZus{}classic, but is deprecated. Contourf: \PYGZdq{}extend\PYGZdq{} kwarg replaces \PYGZdq{}clip\PYGZus{}ends\PYGZdq{}; see docstring. Masked array support added to pcolormesh. Modified aspect\PYGZhy{}ratio handling: Removed aspect kwarg from imshow Axes methods: set\PYGZus{}aspect(self, aspect, adjustable=None, anchor=None) set\PYGZus{}adjustable(self, adjustable) set\PYGZus{}anchor(self, anchor) Pylab interface: axis(\PYGZsq{}image\PYGZsq{}) Backend developers: ft2font\PYGZsq{}s load\PYGZus{}char now takes a flags argument, which you can OR together from the LOAD\PYGZus{}XXX constants. \end{sphinxVerbatim} \subsection{Changes for 0.90.0} \label{\detokenize{api/prev_api_changes/api_changes_0.90.0:changes-for-0-90-0}}\label{\detokenize{api/prev_api_changes/api_changes_0.90.0::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] All artists now implement a \PYGZdq{}pick\PYGZdq{} method which users should not call. Rather, set the \PYGZdq{}picker\PYGZdq{} property of any artist you want to pick on (the epsilon distance in points for a hit test) and register with the \PYGZdq{}pick\PYGZus{}event\PYGZdq{} callback. See examples/pick\PYGZus{}event\PYGZus{}demo.py for details Bar, barh, and hist have \PYGZdq{}log\PYGZdq{} binary kwarg: log=True sets the ordinate to a log scale. Boxplot can handle a list of vectors instead of just an array, so vectors can have different lengths. Plot can handle 2\PYGZhy{}D x and/or y; it plots the columns. Added linewidth kwarg to bar and barh. Made the default Artist.\PYGZus{}transform None (rather than invoking identity\PYGZus{}transform for each artist only to have it overridden later). Use artist.get\PYGZus{}transform() rather than artist.\PYGZus{}transform, even in derived classes, so that the default transform will be created lazily as needed New LogNorm subclass of Normalize added to colors.py. All Normalize subclasses have new inverse() method, and the \PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}() method has a new clip kwarg. Changed class names in colors.py to match convention: normalize \PYGZhy{}\PYGZgt{} Normalize, no\PYGZus{}norm \PYGZhy{}\PYGZgt{} NoNorm. Old names are still available for now. Removed obsolete pcolor\PYGZus{}classic command and method. Removed lineprops and markerprops from the Annotation code and replaced them with an arrow configurable with kwarg arrowprops. See examples/annotation\PYGZus{}demo.py \PYGZhy{} JDH \end{sphinxVerbatim} \subsection{Changes for 0.90.1} \label{\detokenize{api/prev_api_changes/api_changes_0.90.1:changes-for-0-90-1}}\label{\detokenize{api/prev_api_changes/api_changes_0.90.1::doc}} \begin{sphinxVerbatim}[commandchars=\\\{\}] The file dviread.py has a (very limited and fragile) dvi reader for usetex support. The API might change in the future so don\PYGZsq{}t depend on it yet. Removed deprecated support for a float value as a gray\PYGZhy{}scale; now it must be a string, like \PYGZsq{}0.5\PYGZsq{}. Added alpha kwarg to ColorConverter.to\PYGZus{}rgba\PYGZus{}list. New method set\PYGZus{}bounds(vmin, vmax) for formatters, locators sets the viewInterval and dataInterval from floats. Removed deprecated colorbar\PYGZus{}classic. Line2D.get\PYGZus{}xdata and get\PYGZus{}ydata valid\PYGZus{}only=False kwarg is replaced by orig=True. When True, it returns the original data, otherwise the processed data (masked, converted) Some modifications to the units interface. units.ConversionInterface.tickers renamed to units.ConversionInterface.axisinfo and it now returns a units.AxisInfo object rather than a tuple. This will make it easier to add axis info functionality (e.g., I added a default label on this iteration) w/o having to change the tuple length and hence the API of the client code every time new functionality is added. Also, units.ConversionInterface.convert\PYGZus{}to\PYGZus{}value is now simply named units.ConversionInterface.convert. Axes.errorbar uses Axes.vlines and Axes.hlines to draw its error limits int he vertical and horizontal direction. As you\PYGZsq{}ll see in the changes below, these functions now return a LineCollection rather than a list of lines. The new return signature for errorbar is ylins, caplines, errorcollections where errorcollections is a xerrcollection, yerrcollection Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list of lines. This is much faster. The kwarg signature has changed, so consult the docs MaxNLocator accepts a new Boolean kwarg (\PYGZsq{}integer\PYGZsq{}) to force ticks to integer locations. Commands that pass an argument to the Text constructor or to Text.set\PYGZus{}text() now accept any object that can be converted with \PYGZsq{}\PYGZpc{}s\PYGZsq{}. This affects xlabel(), title(), etc. Barh now takes a **kwargs dict instead of most of the old arguments. This helps ensure that bar and barh are kept in sync, but as a side effect you can no longer pass e.g., color as a positional argument. ft2font.get\PYGZus{}charmap() now returns a dict that maps character codes to glyph indices (until now it was reversed) Moved data files into lib/matplotlib so that setuptools\PYGZsq{} develop mode works. Re\PYGZhy{}organized the mpl\PYGZhy{}data layout so that this source structure is maintained in the installation. (i.e., the \PYGZsq{}fonts\PYGZsq{} and \PYGZsq{}images\PYGZsq{} sub\PYGZhy{}directories are maintained in site\PYGZhy{}packages.). Suggest removing site\PYGZhy{}packages/matplotlib/mpl\PYGZhy{}data and \PYGZti{}/.matplotlib/ttffont.cache before installing \end{sphinxVerbatim} \subsection{Changes for 0.91.0} \label{\detokenize{api/prev_api_changes/api_changes_0.91.0:changes-for-0-91-0}}\label{\detokenize{api/prev_api_changes/api_changes_0.91.0::doc}}\begin{itemize} \item {} Changed \sphinxcode{\sphinxupquote{cbook.is\_file\_like()}} to \sphinxcode{\sphinxupquote{cbook.is\_writable\_file\_like()}} and corrected behavior. \item {} Added ax kwarg to \sphinxcode{\sphinxupquote{pyplot.colorbar()}} and \sphinxcode{\sphinxupquote{Figure.colorbar()}} so that one can specify the axes object from which space for the colorbar is to be taken, if one does not want to make the colorbar axes manually. \item {} Changed \sphinxcode{\sphinxupquote{cbook.reversed()}} so it yields a tuple rather than a (index, tuple). This agrees with the python reversed builtin, and cbook only defines reversed if python doesn't provide the builtin. \item {} Made skiprows=1 the default on \sphinxcode{\sphinxupquote{csv2rec()}} \item {} The gd and paint backends have been deleted. \item {} The errorbar method and function now accept additional kwargs so that upper and lower limits can be indicated by capping the bar with a caret instead of a straight line segment. \item {} The {\hyperref[\detokenize{api/dviread:module-matplotlib.dviread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dviread}}}}} file now has a parser for files like psfonts.map and pdftex.map, to map TeX font names to external files. \item {} The file {\hyperref[\detokenize{api/type1font:module-matplotlib.type1font}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.type1font}}}}} contains a new class for Type 1 fonts. Currently it simply reads pfa and pfb format files and stores the data in a way that is suitable for embedding in pdf files. In the future the class might actually parse the font to allow e.g., subsetting. \item {} \sphinxcode{\sphinxupquote{matplotlib.FT2Font}} now supports \sphinxcode{\sphinxupquote{FT\_Attach\_File()}}. In practice this can be used to read an afm file in addition to a pfa/pfb file, to get metrics and kerning information for a Type 1 font. \item {} The \sphinxcode{\sphinxupquote{AFM}} class now supports querying CapHeight and stem widths. The get\_name\_char method now has an isord kwarg like get\_width\_char. \item {} Changed \sphinxcode{\sphinxupquote{pcolor()}} default to shading='flat'; but as noted now in the docstring, it is preferable to simply use the edgecolor kwarg. \item {} The mathtext font commands (\sphinxcode{\sphinxupquote{\textbackslash{}cal}}, \sphinxcode{\sphinxupquote{\textbackslash{}rm}}, \sphinxcode{\sphinxupquote{\textbackslash{}it}}, \sphinxcode{\sphinxupquote{\textbackslash{}tt}}) now behave as TeX does: they are in effect until the next font change command or the end of the grouping. Therefore uses of \sphinxcode{\sphinxupquote{\$\textbackslash{}cal\{R\}\$}} should be changed to \sphinxcode{\sphinxupquote{\$\{\textbackslash{}cal R\}\$}}. Alternatively, you may use the new LaTeX-style font commands (\sphinxcode{\sphinxupquote{\textbackslash{}mathcal}}, \sphinxcode{\sphinxupquote{\textbackslash{}mathrm}}, \sphinxcode{\sphinxupquote{\textbackslash{}mathit}}, \sphinxcode{\sphinxupquote{\textbackslash{}mathtt}}) which do affect the following group, e.g., \sphinxcode{\sphinxupquote{\$\textbackslash{}mathcal\{R\}\$}}. \item {} Text creation commands have a new default linespacing and a new \sphinxcode{\sphinxupquote{linespacing}} kwarg, which is a multiple of the maximum vertical extent of a line of ordinary text. The default is 1.2; \sphinxcode{\sphinxupquote{linespacing=2}} would be like ordinary double spacing, for example. \item {} Changed default kwarg in \sphinxcode{\sphinxupquote{matplotlib.colors.Normalize.\_\_init\_\_{}`()}} to \sphinxcode{\sphinxupquote{clip=False}}; clipping silently defeats the purpose of the special over, under, and bad values in the colormap, thereby leading to unexpected behavior. The new default should reduce such surprises. \item {} Made the emit property of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} \sphinxcode{\sphinxupquote{True}} by default; removed the Axes custom callback handling into a 'callbacks' attribute which is a {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry}}}}} instance. This now supports the 'xlim\_changed' and 'ylim\_changed' Axes events. \end{itemize} \subsection{Changes for 0.91.2} \label{\detokenize{api/prev_api_changes/api_changes_0.91.2:changes-for-0-91-2}}\label{\detokenize{api/prev_api_changes/api_changes_0.91.2::doc}}\begin{itemize} \item {} For \sphinxcode{\sphinxupquote{csv2rec()}}, checkrows=0 is the new default indicating all rows will be checked for type inference \item {} A warning is issued when an image is drawn on log-scaled axes, since it will not log-scale the image data. \item {} Moved \sphinxcode{\sphinxupquote{rec2gtk()}} to \sphinxcode{\sphinxupquote{matplotlib.toolkits.gtktools}} \item {} Moved \sphinxcode{\sphinxupquote{rec2excel()}} to \sphinxcode{\sphinxupquote{matplotlib.toolkits.exceltools}} \item {} Removed, dead/experimental ExampleInfo, Namespace and Importer code from \sphinxcode{\sphinxupquote{matplotlib.\_\_init\_\_}} \end{itemize} \subsection{Changes for 0.98.0} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:changes-for-0-98-0}}\label{\detokenize{api/prev_api_changes/api_changes_0.98.0::doc}}\begin{itemize} \item {} {\hyperref[\detokenize{api/image_api:matplotlib.image.imread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.imread()}}}}} now no longer always returns RGBA data---if the image is luminance or RGB, it will return a MxN or MxNx3 array if possible. Also uint8 is no longer always forced to float. \item {} Rewrote the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} callback infrastructure to use {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook.CallbackRegistry}}}}} rather than custom callback handling. Any users of \sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable.add\_observer()}} of the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} should use the \sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable.callbacks}} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry}}}}} instead. \item {} New axes function and Axes method provide control over the plot color cycle: \sphinxcode{\sphinxupquote{matplotlib.axes.set\_default\_color\_cycle()}} and \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_color\_cycle()}}. \item {} Matplotlib now requires Python 2.4, so {\hyperref[\detokenize{api/cbook_api:module-matplotlib.cbook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook}}}}} will no longer provide \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#set}{\sphinxcode{\sphinxupquote{set}}}, \sphinxhref{https://docs.python.org/3/library/functions.html\#enumerate}{\sphinxcode{\sphinxupquote{enumerate()}}}, \sphinxhref{https://docs.python.org/3/library/functions.html\#reversed}{\sphinxcode{\sphinxupquote{reversed()}}} or \sphinxcode{\sphinxupquote{izip()}} compatibility functions. \item {} In Numpy 1.0, bins are specified by the left edges only. The axes method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.hist()}}}}} now uses future Numpy 1.3 semantics for histograms. Providing \sphinxcode{\sphinxupquote{binedges}}, the last value gives the upper-right edge now, which was implicitly set to +infinity in Numpy 1.0. This also means that the last bin doesn't contain upper outliers any more by default. \item {} New axes method and pyplot function, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hexbin:matplotlib.pyplot.hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hexbin()}}}}}, is an alternative to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} for large datasets. It makes something like a {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}} of a 2-D histogram, but uses hexagonal bins. \item {} New kwarg, \sphinxcode{\sphinxupquote{symmetric}}, in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} allows one require an axis to be centered around zero. \item {} Toolkits must now be imported from \sphinxcode{\sphinxupquote{mpl\_toolkits}} (not \sphinxcode{\sphinxupquote{matplotlib.toolkits}}) \end{itemize} \subsubsection{Notes about the transforms refactoring} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:notes-about-the-transforms-refactoring}} A major new feature of the 0.98 series is a more flexible and extensible transformation infrastructure, written in Python/Numpy rather than a custom C extension. The primary goal of this refactoring was to make it easier to extend matplotlib to support new kinds of projections. This is mostly an internal improvement, and the possible user-visible changes it allows are yet to come. See {\hyperref[\detokenize{api/transformations:module-matplotlib.transforms}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms}}}}} for a description of the design of the new transformation framework. For efficiency, many of these functions return views into Numpy arrays. This means that if you hold on to a reference to them, their contents may change. If you want to store a snapshot of their current values, use the Numpy array method copy(). The view intervals are now stored only in one place -- in the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance, not in the locator instances as well. This means locators must get their limits from their {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Axis}}}}}, which in turn looks up its limits from the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. If a locator is used temporarily and not assigned to an Axis or Axes, (e.g., in {\hyperref[\detokenize{api/contour_api:module-matplotlib.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.contour}}}}}), a dummy axis must be created to store its bounds. Call \sphinxcode{\sphinxupquote{matplotlib.ticker.Locator.create\_dummy\_axis()}} to do so. The functionality of \sphinxcode{\sphinxupquote{Pbox}} has been merged with {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. Its methods now all return copies rather than modifying in place. The following lists many of the simple changes necessary to update code from the old transformation framework to the new one. In particular, methods that return a copy are named with a verb in the past tense, whereas methods that alter an object in place are named with a verb in the present tense. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.transforms}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-transforms}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Bbox.get\_bounds()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.bounds}} \\ \hline \sphinxcode{\sphinxupquote{Bbox.width()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.width}} \\ \hline \sphinxcode{\sphinxupquote{Bbox.height()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.height}} \\ \hline \sphinxcode{\sphinxupquote{Bbox.intervalx().get\_bounds()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.intervalx}} \\ \hline \sphinxcode{\sphinxupquote{Bbox.intervalx().set\_bounds()}} & {[}\sphinxcode{\sphinxupquote{Bbox.intervalx}} is now a property.{]} \\ \hline \sphinxcode{\sphinxupquote{Bbox.intervaly().get\_bounds()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.intervaly}} \\ \hline \sphinxcode{\sphinxupquote{Bbox.intervaly().set\_bounds()}} & {[}\sphinxcode{\sphinxupquote{Bbox.intervaly}} is now a property.{]} \\ \hline \sphinxcode{\sphinxupquote{Bbox.xmin()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.x0}} or \sphinxcode{\sphinxupquote{transforms.Bbox.xmin}} % \begin{footnote}[1]\sphinxAtStartFootnote The {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} is bound by the points (x0, y0) to (x1, y1) and there is no defined order to these points, that is, x0 is not necessarily the left edge of the box. To get the left edge of the \sphinxcode{\sphinxupquote{Bbox}}, use the read-only property \sphinxcode{\sphinxupquote{xmin}}. % \end{footnote} \\ \hline \sphinxcode{\sphinxupquote{Bbox.ymin()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.y0}} or \sphinxcode{\sphinxupquote{transforms.Bbox.ymin}} \sphinxfootnotemark[1] \\ \hline \sphinxcode{\sphinxupquote{Bbox.xmax()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.x1}} or \sphinxcode{\sphinxupquote{transforms.Bbox.xmax}} \sphinxfootnotemark[1] \\ \hline \sphinxcode{\sphinxupquote{Bbox.ymax()}} & \sphinxcode{\sphinxupquote{transforms.Bbox.y1}} or \sphinxcode{\sphinxupquote{transforms.Bbox.ymax}} \sphinxfootnotemark[1] \\ \hline \sphinxcode{\sphinxupquote{Bbox.overlaps(bboxes)}} & \sphinxcode{\sphinxupquote{Bbox.count\_overlaps(bboxes)}} \\ \hline \sphinxcode{\sphinxupquote{bbox\_all(bboxes)}} & \sphinxcode{\sphinxupquote{Bbox.union(bboxes)}} {[}\sphinxcode{\sphinxupquote{transforms.Bbox.union()}} is a staticmethod.{]} \\ \hline \sphinxcode{\sphinxupquote{lbwh\_to\_bbox(l, b, w, h)}} & \sphinxcode{\sphinxupquote{Bbox.from\_bounds(x0, y0, w, h)}} {[}\sphinxcode{\sphinxupquote{transforms.Bbox.from\_bounds()}} is a staticmethod.{]} \\ \hline \sphinxcode{\sphinxupquote{inverse\_transform\_bbox(trans, bbox)}} & \sphinxcode{\sphinxupquote{Bbox.inverse\_transformed(trans)}} \\ \hline \sphinxcode{\sphinxupquote{Interval.contains\_open(v)}} & \sphinxcode{\sphinxupquote{interval\_contains\_open(tuple, v)}} \\ \hline \sphinxcode{\sphinxupquote{Interval.contains(v)}} & \sphinxcode{\sphinxupquote{interval\_contains(tuple, v)}} \\ \hline \sphinxcode{\sphinxupquote{identity\_transform()}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.IdentityTransform}}}}} \\ \hline \sphinxcode{\sphinxupquote{blend\_xy\_sep\_transform(xtrans, ytrans)}} & \sphinxcode{\sphinxupquote{blended\_transform\_factory(xtrans, ytrans)}} \\ \hline \sphinxcode{\sphinxupquote{scale\_transform(xs, ys)}} & \sphinxcode{\sphinxupquote{Affine2D().scale(xs{[}, ys{]})}} \\ \hline \sphinxcode{\sphinxupquote{get\_bbox\_transform(boxin, boxout)}} & \sphinxcode{\sphinxupquote{BboxTransform(boxin, boxout)}} or \sphinxcode{\sphinxupquote{BboxTransformFrom(boxin)}} or \sphinxcode{\sphinxupquote{BboxTransformTo(boxout)}} \\ \hline \sphinxcode{\sphinxupquote{Transform.seq\_xy\_tup(points)}} & \sphinxcode{\sphinxupquote{Transform.transform(points)}} \\ \hline \sphinxcode{\sphinxupquote{Transform.inverse\_xy\_tup(points)}} & \sphinxcode{\sphinxupquote{Transform.inverted().transform(points)}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-axes}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Axes.get\_position()}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib.axes.Axes.get_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_position()}}}}} % \begin{footnote}[2]\sphinxAtStartFootnote {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib.axes.Axes.get_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_position()}}}}} used to return a list of points, now it returns a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}} instance. % \end{footnote} \\ \hline \sphinxcode{\sphinxupquote{Axes.set\_position()}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_position()}}}}} % \begin{footnote}[3]\sphinxAtStartFootnote {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_position()}}}}} now accepts either four scalars or a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}} instance. % \end{footnote} \\ \hline \sphinxcode{\sphinxupquote{Axes.toggle\_log\_lineary()}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_yscale()}}}}} % \begin{footnote}[4]\sphinxAtStartFootnote Since the recfactoring allows for more than two scale types ('log' or 'linear'), it no longer makes sense to have a toggle. \sphinxcode{\sphinxupquote{Axes.toggle\_log\_lineary()}} has been removed. % \end{footnote} \\ \hline \sphinxcode{\sphinxupquote{Subplot}} class & removed. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The \sphinxcode{\sphinxupquote{Polar}} class has moved to {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar}}}}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.artist}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-artist}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Artist.set\_clip\_path(path)}} & \sphinxcode{\sphinxupquote{Artist.set\_clip\_path(path, transform)}} % \begin{footnote}[5]\sphinxAtStartFootnote {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.set\_clip\_path()}}}}} now accepts a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instance and a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} that will be applied to the path immediately before clipping. % \end{footnote} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.collections}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-collections}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{linestyle}} & \sphinxcode{\sphinxupquote{linestyles}} % \begin{footnote}[6]\sphinxAtStartFootnote Linestyles are now treated like all other collection attributes, i.e. a single value or multiple values may be provided. % \end{footnote} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-colors}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{ColorConvertor.to\_rgba\_list(c)}} & \sphinxcode{\sphinxupquote{ColorConvertor.to\_rgba\_array(c)}} {[}\sphinxcode{\sphinxupquote{matplotlib.colors.ColorConvertor.to\_rgba\_array()}} returns an Nx4 Numpy array of RGBA color quadruples.{]} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.contour}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-contour}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Contour.\_segments}} & \sphinxcode{\sphinxupquote{matplotlib.contour.Contour.get\_paths{}`()}} {[}Returns a list of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instances.{]} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.figure}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-figure}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Figure.dpi.get()}} / \sphinxcode{\sphinxupquote{Figure.dpi.set()}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.dpi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.dpi}}}}} \sphinxstyleemphasis{(a property)} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-patches}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{Patch.get\_verts()}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch.get\_path()}}}}} {[}Returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instance{]} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_bases}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:matplotlib-backend-bases}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Old method &\sphinxstyletheadfamily New method \\ \hline \sphinxcode{\sphinxupquote{GraphicsContext.set\_clip\_rectangle(tuple)}} & \sphinxcode{\sphinxupquote{GraphicsContext.set\_clip\_rectangle(bbox)}} \\ \hline \sphinxcode{\sphinxupquote{GraphicsContext.get\_clip\_path()}} & \sphinxcode{\sphinxupquote{GraphicsContext.get\_clip\_path()}} % \begin{footnote}[7]\sphinxAtStartFootnote \sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContext.get\_clip\_path()}} returns a tuple of the form (\sphinxstyleemphasis{path}, \sphinxstyleemphasis{affine\_transform}), where \sphinxstyleemphasis{path} is a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instance and \sphinxstyleemphasis{affine\_transform} is a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2D}}}}} instance. % \end{footnote} \\ \hline \sphinxcode{\sphinxupquote{GraphicsContext.set\_clip\_path()}} & \sphinxcode{\sphinxupquote{GraphicsContext.set\_clip\_path()}} % \begin{footnote}[8]\sphinxAtStartFootnote \sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContext.set\_clip\_path()}} now only accepts a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformedPath}}}}} instance. % \end{footnote} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{RendererBase}}} \label{\detokenize{api/prev_api_changes/api_changes_0.98.0:rendererbase}} New methods: \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path(self, gc, path, transform, rgbFace)}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_markers(self, gc, marker\_path, marker\_trans, path, trans, rgbFace)}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection(self, master\_transform, cliprect, clippath, clippath\_trans, paths, all\_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds)}}}}} \sphinxstyleemphasis{{[}optional{]}} \end{itemize} Changed methods: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{draw\_image(self, x, y, im, bbox)}} is now {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image(self, x, y, im, bbox, clippath, clippath\_trans)}}}}} \end{itemize} Removed methods: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{draw\_arc}} \item {} \sphinxcode{\sphinxupquote{draw\_line\_collection}} \item {} \sphinxcode{\sphinxupquote{draw\_line}} \item {} \sphinxcode{\sphinxupquote{draw\_lines}} \item {} \sphinxcode{\sphinxupquote{draw\_point}} \item {} \sphinxcode{\sphinxupquote{draw\_quad\_mesh}} \item {} \sphinxcode{\sphinxupquote{draw\_poly\_collection}} \item {} \sphinxcode{\sphinxupquote{draw\_polygon}} \item {} \sphinxcode{\sphinxupquote{draw\_rectangle}} \item {} \sphinxcode{\sphinxupquote{draw\_regpoly\_collection}} \end{itemize} \subsection{Changes for 0.98.1} \label{\detokenize{api/prev_api_changes/api_changes_0.98.1:changes-for-0-98-1}}\label{\detokenize{api/prev_api_changes/api_changes_0.98.1::doc}}\begin{itemize} \item {} Removed broken \sphinxcode{\sphinxupquote{matplotlib.axes3d}} support and replaced it with a non-implemented error pointing to 0.91.x \end{itemize} \subsection{Changes for 0.98.x} \label{\detokenize{api/prev_api_changes/api_changes_0.98.x:changes-for-0-98-x}}\label{\detokenize{api/prev_api_changes/api_changes_0.98.x::doc}}\begin{itemize} \item {} psd(), csd(), and cohere() will now automatically wrap negative frequency components to the beginning of the returned arrays. This is much more sensible behavior and makes them consistent with specgram(). The previous behavior was more of an oversight than a design decision. \item {} Added new keyword parameters \sphinxstyleemphasis{nonposx}, \sphinxstyleemphasis{nonposy} to {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} methods that set log scale parameters. The default is still to mask out non-positive values, but the kwargs accept 'clip', which causes non-positive values to be replaced with a very small positive value. \item {} Added new {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists:matplotlib.pyplot.fignum_exists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.fignum\_exists()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums:matplotlib.pyplot.get_fignums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.get\_fignums()}}}}}; they merely expose information that had been hidden in \sphinxcode{\sphinxupquote{matplotlib.\_pylab\_helpers}}. \item {} Deprecated numerix package. \item {} Added new {\hyperref[\detokenize{api/image_api:matplotlib.image.imsave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.imsave()}}}}} and exposed it to the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} interface. \item {} Remove support for pyExcelerator in exceltools -- use xlwt instead \item {} Changed the defaults of acorr and xcorr to use usevlines=True, maxlags=10 and normed=True since these are the best defaults \item {} Following keyword parameters for \sphinxcode{\sphinxupquote{matplotlib.label.Label}} are now deprecated and new set of parameters are introduced. The new parameters are given as a fraction of the font-size. Also, \sphinxstyleemphasis{scatteryoffsets}, \sphinxstyleemphasis{fancybox} and \sphinxstyleemphasis{columnspacing} are added as keyword parameters. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Deprecated &\sphinxstyletheadfamily New \\ \hline pad & borderpad \\ \hline labelsep & labelspacing \\ \hline handlelen & handlelength \\ \hline handlestextsep & handletextpad \\ \hline axespad & borderaxespad \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item {} Removed the configobj and experimental traits rc support \item {} Modified {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.psd()}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.csd()}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.cohere()}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.specgram()}}}}} to scale one-sided densities by a factor of 2. Also, optionally scale the densities by the sampling frequency, which gives true values of densities that can be integrated by the returned frequency values. This also gives better MATLAB compatibility. The corresponding {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} methods and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} functions were updated as well. \item {} Font lookup now uses a nearest-neighbor approach rather than an exact match. Some fonts may be different in plots, but should be closer to what was requested. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}} now return a copy of the \sphinxcode{\sphinxupquote{viewlim}} array to avoid modify-in-place surprises. \item {} {\hyperref[\detokenize{api/afm_api:matplotlib.afm.AFM.get_fullname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.afm.AFM.get\_fullname()}}}}} and {\hyperref[\detokenize{api/afm_api:matplotlib.afm.AFM.get_familyname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.afm.AFM.get\_familyname()}}}}} no longer raise an exception if the AFM file does not specify these optional attributes, but returns a guess based on the required FontName attribute. \item {} Changed precision kwarg in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.spy:matplotlib.pyplot.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.spy()}}}}}; default is 0, and the string value 'present' is used for sparse arrays only to show filled locations. \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.EllipseCollection}}}}} added. \item {} Added \sphinxcode{\sphinxupquote{angles}} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.quiver()}}}}} for more flexible specification of the arrow angles. \item {} Deprecated (raise NotImplementedError) all the mlab2 functions from {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} out of concern that some of them were not clean room implementations. \item {} Methods {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection.get\_offsets()}}}}} and {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection.set\_offsets()}}}}} added to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} base class. \item {} \sphinxcode{\sphinxupquote{matplotlib.figure.Figure.figurePatch}} renamed \sphinxcode{\sphinxupquote{matplotlib.figure.Figure.patch}}; \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.axesPatch}} renamed \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.patch}}; \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.axesFrame}} renamed \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.frame}}. \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_frame()}}, which returns \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.patch}}, is deprecated. \item {} Changes in the {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourLabeler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.contour.ContourLabeler}}}}} attributes ({\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clabel:matplotlib.pyplot.clabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.clabel()}}}}} function) so that they all have a form like \sphinxcode{\sphinxupquote{.labelAttribute}}. The three attributes that are most likely to be used by end users, \sphinxcode{\sphinxupquote{.cl}}, \sphinxcode{\sphinxupquote{.cl\_xy}} and \sphinxcode{\sphinxupquote{.cl\_cvalues}} have been maintained for the moment (in addition to their renamed versions), but they are deprecated and will eventually be removed. \item {} Moved several functions in {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} and {\hyperref[\detokenize{api/cbook_api:module-matplotlib.cbook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook}}}}} into a separate module \sphinxcode{\sphinxupquote{matplotlib.numerical\_methods}} because they were unrelated to the initial purpose of mlab or cbook and appeared more coherent elsewhere. \end{itemize} \subsection{Changes in 0.99} \label{\detokenize{api/prev_api_changes/api_changes_0.99:changes-in-0-99}}\label{\detokenize{api/prev_api_changes/api_changes_0.99::doc}}\begin{itemize} \item {} pylab no longer provides a load and save function. These are available in matplotlib.mlab, or you can use numpy.loadtxt and numpy.savetxt for text files, or np.save and np.load for binary numpy arrays. \item {} User-generated colormaps can now be added to the set recognized by {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.get\_cmap()}}}}}. Colormaps can be made the default and applied to the current image using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.set\_cmap()}}}}}. \item {} changed use\_mrecords default to False in mlab.csv2rec since this is partially broken \item {} Axes instances no longer have a "frame" attribute. Instead, use the new "spines" attribute. Spines is a dictionary where the keys are the names of the spines (e.g., 'left','right' and so on) and the values are the artists that draw the spines. For normal (rectilinear) axes, these artists are Line2D instances. For other axes (such as polar axes), these artists may be Patch instances. \item {} Polar plots no longer accept a resolution kwarg. Instead, each Path must specify its own number of interpolation steps. This is unlikely to be a user-visible change -- if interpolation of data is required, that should be done before passing it to Matplotlib. \end{itemize} \subsection{Changes beyond 0.99.x} \label{\detokenize{api/prev_api_changes/api_changes_0.99.x:changes-beyond-0-99-x}}\label{\detokenize{api/prev_api_changes/api_changes_0.99.x::doc}}\begin{itemize} \item {} The default behavior of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib.axes.Axes.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.axis()}}}}}, and their corresponding pyplot functions, has been changed: when view limits are set explicitly with one of these methods, autoscaling is turned off for the matching axis. A new \sphinxstyleemphasis{auto} kwarg is available to control this behavior. The limit kwargs have been renamed to \sphinxstyleemphasis{left} and \sphinxstyleemphasis{right} instead of \sphinxstyleemphasis{xmin} and \sphinxstyleemphasis{xmax}, and \sphinxstyleemphasis{bottom} and \sphinxstyleemphasis{top} instead of \sphinxstyleemphasis{ymin} and \sphinxstyleemphasis{ymax}. The old names may still be used, however. \item {} There are five new Axes methods with corresponding pyplot functions to facilitate autoscaling, tick location, and tick label formatting, and the general appearance of ticks and tick labels: \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib.axes.Axes.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.autoscale()}}}}} turns autoscaling on or off, and applies it. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib.axes.Axes.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.margins()}}}}} sets margins used to autoscale the \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.viewLim}} based on the \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.dataLim}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params:matplotlib.axes.Axes.locator_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.locator\_params()}}}}} allows one to adjust axes locator parameters such as \sphinxstyleemphasis{nbins}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.ticklabel\_format()}}}}} is a convenience method for controlling the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.ScalarFormatter}}}}} that is used by default with linear axes. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tick\_params()}}}}} controls direction, size, visibility, and color of ticks and their labels. \end{itemize} \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.bar()}}}}} method accepts a \sphinxstyleemphasis{error\_kw} kwarg; it is a dictionary of kwargs to be passed to the errorbar function. \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.hist()}}}}} \sphinxstyleemphasis{color} kwarg now accepts a sequence of color specs to match a sequence of datasets. \item {} The {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EllipseCollection}}}}} has been changed in two ways: \begin{itemize} \item {} There is a new \sphinxstyleemphasis{units} option, 'xy', that scales the ellipse with the data units. This matches the :class:'\textasciitilde{}matplotlib.patches.Ellipse{}` scaling. \item {} The \sphinxstyleemphasis{height} and \sphinxstyleemphasis{width} kwargs have been changed to specify the height and width, again for consistency with {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ellipse}}}}}, and to better match their names; previously they specified the half-height and half-width. \end{itemize} \item {} There is a new rc parameter \sphinxcode{\sphinxupquote{axes.color\_cycle}}, and the color cycle is now independent of the rc parameter \sphinxcode{\sphinxupquote{lines.color}}. \sphinxcode{\sphinxupquote{matplotlib.Axes.set\_default\_color\_cycle()}} is deprecated. \item {} You can now print several figures to one pdf file and modify the document information dictionary of a pdf file. See the docstrings of the class {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.PdfPages}}}}} for more information. \item {} Removed \sphinxhref{http://www.voidspace.org.uk/python/configobj.html}{configobj} and \sphinxhref{http://code.enthought.com/pages/traits.html}{enthought.traits} packages, which are only required by the experimental traited config and are somewhat out of date. If needed, install them independently. \end{itemize} \begin{itemize} \item {} The new rc parameter \sphinxcode{\sphinxupquote{savefig.extension}} sets the filename extension that is used by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.savefig()}}}}} if its \sphinxstyleemphasis{fname} argument lacks an extension. \item {} In an effort to simplify the backend API, all clipping rectangles and paths are now passed in using GraphicsContext objects, even on collections and images. Therefore: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{draw\PYGZus{}path\PYGZus{}collection}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{master\PYGZus{}transform}\PYG{p}{,} \PYG{n}{cliprect}\PYG{p}{,} \PYG{n}{clippath}\PYG{p}{,} \PYG{n}{clippath\PYGZus{}trans}\PYG{p}{,} \PYG{n}{paths}\PYG{p}{,} \PYG{n}{all\PYGZus{}transforms}\PYG{p}{,} \PYG{n}{offsets}\PYG{p}{,} \PYG{n}{offsetTrans}\PYG{p}{,} \PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{p}{,} \PYG{n}{linewidths}\PYG{p}{,} \PYG{n}{linestyles}\PYG{p}{,} \PYG{n}{antialiaseds}\PYG{p}{,} \PYG{n}{urls}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} is now} \PYG{n}{draw\PYGZus{}path\PYGZus{}collection}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{gc}\PYG{p}{,} \PYG{n}{master\PYGZus{}transform}\PYG{p}{,} \PYG{n}{paths}\PYG{p}{,} \PYG{n}{all\PYGZus{}transforms}\PYG{p}{,} \PYG{n}{offsets}\PYG{p}{,} \PYG{n}{offsetTrans}\PYG{p}{,} \PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{p}{,} \PYG{n}{linewidths}\PYG{p}{,} \PYG{n}{linestyles}\PYG{p}{,} \PYG{n}{antialiaseds}\PYG{p}{,} \PYG{n}{urls}\PYG{p}{)} \PYG{n}{draw\PYGZus{}quad\PYGZus{}mesh}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{master\PYGZus{}transform}\PYG{p}{,} \PYG{n}{cliprect}\PYG{p}{,} \PYG{n}{clippath}\PYG{p}{,} \PYG{n}{clippath\PYGZus{}trans}\PYG{p}{,} \PYG{n}{meshWidth}\PYG{p}{,} \PYG{n}{meshHeight}\PYG{p}{,} \PYG{n}{coordinates}\PYG{p}{,} \PYG{n}{offsets}\PYG{p}{,} \PYG{n}{offsetTrans}\PYG{p}{,} \PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{antialiased}\PYG{p}{,} \PYG{n}{showedges}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} is now} \PYG{n}{draw\PYGZus{}quad\PYGZus{}mesh}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{gc}\PYG{p}{,} \PYG{n}{master\PYGZus{}transform}\PYG{p}{,} \PYG{n}{meshWidth}\PYG{p}{,} \PYG{n}{meshHeight}\PYG{p}{,} \PYG{n}{coordinates}\PYG{p}{,} \PYG{n}{offsets}\PYG{p}{,} \PYG{n}{offsetTrans}\PYG{p}{,} \PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{antialiased}\PYG{p}{,} \PYG{n}{showedges}\PYG{p}{)} \PYG{n}{draw\PYGZus{}image}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{im}\PYG{p}{,} \PYG{n}{bbox}\PYG{p}{,} \PYG{n}{clippath}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{clippath\PYGZus{}trans}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} is now} \PYG{n}{draw\PYGZus{}image}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{gc}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{im}\PYG{p}{)} \end{sphinxVerbatim} \item {} There are four new Axes methods with corresponding pyplot functions that deal with unstructured triangular grids: \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tricontour()}}}}} draws contour lines on a triangular grid. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tricontourf()}}}}} draws filled contours on a triangular grid. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor:matplotlib.axes.Axes.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tripcolor()}}}}} draws a pseudocolor plot on a triangular grid. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot:matplotlib.axes.Axes.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.triplot()}}}}} draws a triangular grid as lines and/or markers. \end{itemize} \end{itemize} \subsection{Changes in 1.1.x} \label{\detokenize{api/prev_api_changes/api_changes_1.1.x:changes-in-1-1-x}}\label{\detokenize{api/prev_api_changes/api_changes_1.1.x::doc}}\begin{itemize} \item {} Added new {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.sankey.Sankey}}}}} for generating Sankey diagrams. \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}, setting \sphinxstyleemphasis{interpolation} to 'nearest' will now always mean that the nearest-neighbor interpolation is performed. If you want the no-op interpolation to be performed, choose 'none'. \item {} There were errors in how the tri-functions were handling input parameters that had to be fixed. If your tri-plots are not working correctly anymore, or you were working around apparent mistakes, please see issue \#203 in the github tracker. When in doubt, use kwargs. \item {} The 'symlog' scale had some bad behavior in previous versions. This has now been fixed and users should now be able to use it without frustrations. The fixes did result in some minor changes in appearance for some users who may have been depending on the bad behavior. \item {} There is now a common set of markers for all plotting functions. Previously, some markers existed only for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} or just for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. This is now no longer the case. This merge did result in a conflict. The string 'd' now means "thin diamond" while 'D' will mean "regular diamond". \end{itemize} \subsection{Changes in 1.2.x} \label{\detokenize{api/prev_api_changes/api_changes_1.2.x:changes-in-1-2-x}}\label{\detokenize{api/prev_api_changes/api_changes_1.2.x::doc}}\begin{itemize} \item {} The \sphinxcode{\sphinxupquote{classic}} option of the rc parameter \sphinxcode{\sphinxupquote{toolbar}} is deprecated and will be removed in the next release. \item {} The \sphinxcode{\sphinxupquote{isvector()}} method has been removed since it is no longer functional. \item {} The \sphinxcode{\sphinxupquote{rasterization\_zorder}} property on {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} a zorder below which artists are rasterized. This has defaulted to -30000.0, but it now defaults to \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, meaning no artists will be rasterized. In order to rasterize artists below a given zorder value, \sphinxcode{\sphinxupquote{set\_rasterization\_zorder}} must be explicitly called. \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}}, and \sphinxcode{\sphinxupquote{scatter}}, when specifying a marker using a tuple, the angle is now specified in degrees, not radians. \item {} Using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx:matplotlib.axes.Axes.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twinx()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny:matplotlib.axes.Axes.twiny}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twiny()}}}}} no longer overrides the current locaters and formatters on the axes. \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}}, the handling of the \sphinxstyleemphasis{extend} kwarg has changed. Formerly, the extended ranges were mapped after to 0, 1 after being normed, so that they always corresponded to the extreme values of the colormap. Now they are mapped outside this range so that they correspond to the special colormap values determined by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_under()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_over()}}}}} methods, which default to the colormap end points. \item {} The new rc parameter \sphinxcode{\sphinxupquote{savefig.format}} replaces \sphinxcode{\sphinxupquote{cairo.format}} and \sphinxcode{\sphinxupquote{savefig.extension}}, and sets the default file format used by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.savefig()}}}}}. \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib.pyplot.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pie()}}}}} and \sphinxcode{\sphinxupquote{pie()}}, one can now set the radius of the pie; setting the \sphinxstyleemphasis{radius} to 'None' (the default value), will result in a pie with a radius of 1 as before. \item {} Use of \sphinxcode{\sphinxupquote{projection\_factory()}} is now deprecated in favour of axes class identification using {\hyperref[\detokenize{api/projections_api:matplotlib.projections.process_projection_requirements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{process\_projection\_requirements()}}}}} followed by direct axes class invocation (at the time of writing, functions which do this are: {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gca()}}}}}). Therefore: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{key} \PYG{o}{=} \PYG{n}{figure}\PYG{o}{.}\PYG{n}{\PYGZus{}make\PYGZus{}key}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{ispolar} \PYG{o}{=} \PYG{n}{kwargs}\PYG{o}{.}\PYG{n}{pop}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{projection} \PYG{o}{=} \PYG{n}{kwargs}\PYG{o}{.}\PYG{n}{pop}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{projection}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{k+kc}{None}\PYG{p}{)} \PYG{k}{if} \PYG{n}{ispolar}\PYG{p}{:} \PYG{k}{if} \PYG{n}{projection} \PYG{o+ow}{is} \PYG{o+ow}{not} \PYG{k+kc}{None} \PYG{o+ow}{and} \PYG{n}{projection} \PYG{o}{!=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k}{raise} \PYG{n+ne}{ValueError}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar and projection args are inconsistent}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{projection} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{projection\PYGZus{}factory}\PYG{p}{(}\PYG{n}{projection}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{rect}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{key} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{\PYGZus{}make\PYGZus{}key}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} is now} \PYG{n}{projection\PYGZus{}class}\PYG{p}{,} \PYG{n}{kwargs}\PYG{p}{,} \PYG{n}{key} \PYG{o}{=} \PYGZbs{} \PYG{n}{process\PYGZus{}projection\PYGZus{}requirements}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{projection\PYGZus{}class}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{rect}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This change means that third party objects can expose themselves as Matplotlib axes by providing a \sphinxcode{\sphinxupquote{\_as\_mpl\_axes}} method. See {\hyperref[\detokenize{devel/add_new_projection:adding-new-scales}]{\sphinxcrossref{\DUrole{std,std-ref}{Developer's guide for creating scales and transformations}}}} for more detail. \item {} A new keyword \sphinxstyleemphasis{extendfrac} in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} and {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}} allows one to control the size of the triangular minimum and maximum extensions on colorbars. \item {} A new keyword \sphinxstyleemphasis{capthick} in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}} has been added as an intuitive alias to the \sphinxstyleemphasis{markeredgewidth} and \sphinxstyleemphasis{mew} keyword arguments, which indirectly controlled the thickness of the caps on the errorbars. For backwards compatibility, specifying either of the original keyword arguments will override any value provided by \sphinxstyleemphasis{capthick}. \item {} Transform subclassing behaviour is now subtly changed. If your transform implements a non-affine transformation, then it should override the \sphinxcode{\sphinxupquote{transform\_non\_affine}} method, rather than the generic \sphinxcode{\sphinxupquote{transform}} method. Previously transforms would define \sphinxcode{\sphinxupquote{transform}} and then copy the method into \sphinxcode{\sphinxupquote{transform\_non\_affine}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{MyTransform}\PYG{p}{(}\PYG{n}{mtrans}\PYG{o}{.}\PYG{n}{Transform}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{xy}\PYG{p}{)}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{n}{transform\PYGZus{}non\PYGZus{}affine} \PYG{o}{=} \PYG{n}{transform} \end{sphinxVerbatim} This approach will no longer function correctly and should be changed to: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{MyTransform}\PYG{p}{(}\PYG{n}{mtrans}\PYG{o}{.}\PYG{n}{Transform}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{transform\PYGZus{}non\PYGZus{}affine}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{xy}\PYG{p}{)}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \end{sphinxVerbatim} \item {} Artists no longer have \sphinxcode{\sphinxupquote{x\_isdata}} or \sphinxcode{\sphinxupquote{y\_isdata}} attributes; instead any artist's transform can be interrogated with \sphinxcode{\sphinxupquote{artist\_instance.get\_transform().contains\_branch(ax.transData)}} \item {} Lines added to an axes now take into account their transform when updating the data and view limits. This means transforms can now be used as a pre-transform. For instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{transforms} \PYG{k}{as} \PYG{n+nn}{mtrans} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{mtrans}\PYG{o}{.}\PYG{n}{Affine2D}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{scale}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{o}{+} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{viewLim}\PYG{p}{)} \PYG{g+go}{Bbox(\PYGZsq{}array([[ 0., 0.],\PYGZbs{}n [ 90., 90.]])\PYGZsq{})} \end{sphinxVerbatim} \item {} One can now easily get a transform which goes from one transform's coordinate system to another, in an optimized way, using the new subtract method on a transform. For instance, to go from data coordinates to axes coordinates: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{data2ax} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData} \PYG{o}{\PYGZhy{}} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{o}{.}\PYG{n}{depth}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{o}{.}\PYG{n}{depth}\PYG{p}{)} \PYG{g+go}{3, 1} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{data2ax}\PYG{o}{.}\PYG{n}{depth}\PYG{p}{)} \PYG{g+go}{2} \end{sphinxVerbatim} for versions before 1.2 this could only be achieved in a sub-optimal way, using \sphinxcode{\sphinxupquote{ax.transData + ax.transAxes.inverted()}} (depth is a new concept, but had it existed it would return 4 for this example). \item {} \sphinxcode{\sphinxupquote{twinx}} and \sphinxcode{\sphinxupquote{twiny}} now returns an instance of SubplotBase if parent axes is an instance of SubplotBase. \item {} All Qt3-based backends are now deprecated due to the lack of py3k bindings. Qt and QtAgg backends will continue to work in v1.2.x for py2.6 and py2.7. It is anticipated that the Qt3 support will be completely removed for the next release. \item {} \sphinxcode{\sphinxupquote{ColorConverter}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} now subclasses \sphinxcode{\sphinxupquote{object}} \item {} ContourSet instances no longer have a \sphinxcode{\sphinxupquote{transform}} attribute. Instead, access the transform with the \sphinxcode{\sphinxupquote{get\_transform}} method. \end{itemize} \subsection{Changes in 1.3.x} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:changes-in-1-3-x}}\label{\detokenize{api/prev_api_changes/api_changes_1.3.x:changes-in-1-3}}\label{\detokenize{api/prev_api_changes/api_changes_1.3.x::doc}} \subsubsection{Changes in 1.3.1} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:changes-in-1-3-1}} It is rare that we make an API change in a bugfix release, however, for 1.3.1 since 1.3.0 the following change was made: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{text.Text.cached}} (used to cache font objects) has been made into a private variable. Among the obvious encapsulation benefit, this removes this confusing-looking member from the documentation. \item {} The method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist()}}}}} now always returns bin occupancies as an array of type \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#float}{\sphinxcode{\sphinxupquote{float}}}. Previously, it was sometimes an array of type \sphinxhref{https://pillow.readthedocs.io/en/stable/reference/ImageMath.html\#int}{\sphinxcode{\sphinxupquote{int}}}, depending on the call. \end{itemize} \subsubsection{Code removal} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:code-removal}}\begin{itemize} \item {} The following items that were deprecated in version 1.2 or earlier have now been removed completely. \begin{itemize} \item {} The Qt 3.x backends (\sphinxcode{\sphinxupquote{qt}} and \sphinxcode{\sphinxupquote{qtagg}}) have been removed in favor of the Qt 4.x backends (\sphinxcode{\sphinxupquote{qt4}} and \sphinxcode{\sphinxupquote{qt4agg}}). \item {} The FltkAgg and Emf backends have been removed. \item {} The \sphinxcode{\sphinxupquote{matplotlib.nxutils}} module has been removed. Use the functionality on {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.contains_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path.contains\_point}}}}} and friends instead. \item {} Instead of \sphinxcode{\sphinxupquote{axes.Axes.get\_frame}}, use \sphinxcode{\sphinxupquote{axes.Axes.patch}}. \item {} The following \sphinxcode{\sphinxupquote{kwargs}} to the \sphinxcode{\sphinxupquote{legend}} function have been renamed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{pad}} -\textgreater{} \sphinxcode{\sphinxupquote{borderpad}} \item {} \sphinxcode{\sphinxupquote{labelsep}} -\textgreater{} \sphinxcode{\sphinxupquote{labelspacing}} \item {} \sphinxcode{\sphinxupquote{handlelen}} -\textgreater{} \sphinxcode{\sphinxupquote{handlelength}} \item {} \sphinxcode{\sphinxupquote{handletextsep}} -\textgreater{} \sphinxcode{\sphinxupquote{handletextpad}} \item {} \sphinxcode{\sphinxupquote{axespad}} -\textgreater{} \sphinxcode{\sphinxupquote{borderaxespad}} \end{itemize} Related to this, the following rcParams have been removed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{legend.pad}}, \sphinxcode{\sphinxupquote{legend.labelsep}}, \sphinxcode{\sphinxupquote{legend.handlelen}}, \sphinxcode{\sphinxupquote{legend.handletextsep}} and \sphinxcode{\sphinxupquote{legend.axespad}} \end{itemize} \item {} For the \sphinxcode{\sphinxupquote{hist}} function, instead of \sphinxcode{\sphinxupquote{width}}, use \sphinxcode{\sphinxupquote{rwidth}} (relative width). \item {} On \sphinxcode{\sphinxupquote{patches.Circle}}, the \sphinxcode{\sphinxupquote{resolution}} kwarg has been removed. For a circle made up of line segments, use \sphinxcode{\sphinxupquote{patches.CirclePolygon}}. \item {} The printing functions in the Wx backend have been removed due to the burden of keeping them up-to-date. \item {} \sphinxcode{\sphinxupquote{mlab.liaupunov}} has been removed. \item {} \sphinxcode{\sphinxupquote{mlab.save}}, \sphinxcode{\sphinxupquote{mlab.load}}, \sphinxcode{\sphinxupquote{pylab.save}} and \sphinxcode{\sphinxupquote{pylab.load}} have been removed. We recommend using \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html\#numpy.savetxt}{\sphinxcode{\sphinxupquote{numpy.savetxt}}} and \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.loadtxt.html\#numpy.loadtxt}{\sphinxcode{\sphinxupquote{numpy.loadtxt}}} instead. \item {} \sphinxcode{\sphinxupquote{widgets.HorizontalSpanSelector}} has been removed. Use \sphinxcode{\sphinxupquote{widgets.SpanSelector}} instead. \end{itemize} \end{itemize} \subsubsection{Code deprecation} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:code-deprecation}}\begin{itemize} \item {} The CocoaAgg backend has been deprecated, with the possibility for deletion or resurrection in a future release. \item {} The top-level functions in {\hyperref[\detokenize{api/path_api:module-matplotlib.path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path}}}}} that are implemented in C++ were never meant to be public. Instead, users should use the Pythonic wrappers for them in the \sphinxcode{\sphinxupquote{path.Path}} and \sphinxcode{\sphinxupquote{collections.Collection}} classes. Use the following mapping to update your code: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{point\_in\_path}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.contains\_point}} \item {} \sphinxcode{\sphinxupquote{get\_path\_extents}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.get\_extents}} \item {} \sphinxcode{\sphinxupquote{point\_in\_path\_collection}} -\textgreater{} \sphinxcode{\sphinxupquote{collection.Collection.contains}} \item {} \sphinxcode{\sphinxupquote{path\_in\_path}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.contains\_path}} \item {} \sphinxcode{\sphinxupquote{path\_intersects\_path}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.intersects\_path}} \item {} \sphinxcode{\sphinxupquote{convert\_path\_to\_polygons}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.to\_polygons}} \item {} \sphinxcode{\sphinxupquote{cleanup\_path}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.cleaned}} \item {} \sphinxcode{\sphinxupquote{points\_in\_path}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.contains\_points}} \item {} \sphinxcode{\sphinxupquote{clip\_path\_to\_rect}} -\textgreater{} \sphinxcode{\sphinxupquote{path.Path.clip\_to\_bbox}} \end{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.colors.normalize}} and \sphinxcode{\sphinxupquote{matplotlib.colors.no\_norm}} have been deprecated in favour of {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.NoNorm:matplotlib.colors.NoNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.NoNorm}}}}} respectively. \item {} The \sphinxcode{\sphinxupquote{ScalarMappable}} class' \sphinxcode{\sphinxupquote{set\_colorbar}} is now deprecated. Instead, the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable.colorbar}}}}} attribute should be used. In previous Matplotlib versions this attribute was an undocumented tuple of \sphinxcode{\sphinxupquote{(colorbar\_instance, colorbar\_axes)}} but is now just \sphinxcode{\sphinxupquote{colorbar\_instance}}. To get the colorbar axes it is possible to just use the {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.ax}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ax}}}}} attribute on a colorbar instance. \item {} The \sphinxcode{\sphinxupquote{mpl}} module is now deprecated. Those who relied on this module should transition to simply using \sphinxcode{\sphinxupquote{import matplotlib as mpl}}. \end{itemize} \subsubsection{Code changes} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:code-changes}}\begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} now fully supports using RGBA values for its \sphinxcode{\sphinxupquote{facecolor}} and \sphinxcode{\sphinxupquote{edgecolor}} attributes, which enables faces and edges to have different alpha values. If the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} object's \sphinxcode{\sphinxupquote{alpha}} attribute is set to anything other than \sphinxcode{\sphinxupquote{None}}, that value will override any alpha-channel value in both the face and edge colors. Previously, if {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} had \sphinxcode{\sphinxupquote{alpha=None}}, the alpha component of \sphinxcode{\sphinxupquote{edgecolor}} would be applied to both the edge and face. \item {} The optional \sphinxcode{\sphinxupquote{isRGB}} argument to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_foreground}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_foreground()}}}}} (and the other GraphicsContext classes that descend from it) has been renamed to \sphinxcode{\sphinxupquote{isRGBA}}, and should now only be set to \sphinxcode{\sphinxupquote{True}} if the \sphinxcode{\sphinxupquote{fg}} color argument is known to be an RGBA tuple. \item {} For {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}, the \sphinxcode{\sphinxupquote{capstyle}} used is now \sphinxcode{\sphinxupquote{butt}}, to be consistent with the default for most other objects, and to avoid problems with non-solid \sphinxcode{\sphinxupquote{linestyle}} appearing solid when using a large \sphinxcode{\sphinxupquote{linewidth}}. Previously, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} used \sphinxcode{\sphinxupquote{capstyle='projecting'}}. \item {} \sphinxcode{\sphinxupquote{Path}} objects can now be marked as \sphinxcode{\sphinxupquote{readonly}} by passing \sphinxcode{\sphinxupquote{readonly=True}} to its constructor. The built-in path singletons, obtained through \sphinxcode{\sphinxupquote{Path.unit*}} class methods return readonly paths. If you have code that modified these, you will need to make a deepcopy first, using either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{copy} \PYG{n}{path} \PYG{o}{=} \PYG{n}{copy}\PYG{o}{.}\PYG{n}{deepcopy}\PYG{p}{(}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{unit\PYGZus{}circle}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} or} \PYG{n}{path} \PYG{o}{=} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{unit\PYGZus{}circle}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{deepcopy}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Deep copying a \sphinxcode{\sphinxupquote{Path}} always creates an editable (i.e. non-readonly) \sphinxcode{\sphinxupquote{Path}}. \item {} The list at \sphinxcode{\sphinxupquote{Path.NUM\_VERTICES}} was replaced by a dictionary mapping Path codes to the number of expected vertices at {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.NUM_VERTICES_FOR_CODE}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NUM\_VERTICES\_FOR\_CODE}}}}}. \item {} To support XKCD style plots, the \sphinxcode{\sphinxupquote{matplotlib.path.cleanup\_path()}} method's signature was updated to require a sketch argument. Users of \sphinxcode{\sphinxupquote{matplotlib.path.cleanup\_path()}} are encouraged to use the new {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.cleaned}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cleaned()}}}}} Path method. \item {} Data limits on a plot now start from a state of having "null" limits, rather than limits in the range (0, 1). This has an effect on artists that only control limits in one direction, such as \sphinxcode{\sphinxupquote{axvline}} and \sphinxcode{\sphinxupquote{axhline}}, since their limits will not longer also include the range (0, 1). This fixes some problems where the computed limits would be dependent on the order in which artists were added to the axes. \item {} Fixed a bug in setting the position for the right/top spine with data position type. Previously, it would draw the right or top spine at +1 data offset. \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}}, the default arrow head width, \sphinxcode{\sphinxupquote{head\_width}}, has been made larger to produce a visible arrow head. The new value of this kwarg is \sphinxcode{\sphinxupquote{head\_width = 20 * width}}. \item {} It is now possible to provide \sphinxcode{\sphinxupquote{number of levels + 1}} colors in the case of \sphinxcode{\sphinxupquote{extend='both'}} for contourf (or just \sphinxcode{\sphinxupquote{number of levels}} colors for an extend value \sphinxcode{\sphinxupquote{min}} or \sphinxcode{\sphinxupquote{max}}) such that the resulting colormap's \sphinxcode{\sphinxupquote{set\_under}} and \sphinxcode{\sphinxupquote{set\_over}} are defined appropriately. Any other number of colors will continue to behave as before (if more colors are provided than levels, the colors will be unused). A similar change has been applied to contour, where \sphinxcode{\sphinxupquote{extend='both'}} would expect \sphinxcode{\sphinxupquote{number of levels + 2}} colors. \item {} A new keyword \sphinxstyleemphasis{extendrect} in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} and {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}} allows one to control the shape of colorbar extensions. \item {} The extension of {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MultiCursor}}}}} to both vertical (default) and/or horizontal cursor implied that \sphinxcode{\sphinxupquote{self.line}} is replaced by \sphinxcode{\sphinxupquote{self.vline}} for vertical cursors lines and \sphinxcode{\sphinxupquote{self.hline}} is added for the horizontal cursors lines. \item {} On POSIX platforms, the {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.report_memory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{report\_memory()}}}}} function raises \sphinxhref{https://docs.python.org/3/library/exceptions.html\#NotImplementedError}{\sphinxcode{\sphinxupquote{NotImplementedError}}} instead of \sphinxhref{https://docs.python.org/3/library/exceptions.html\#OSError}{\sphinxcode{\sphinxupquote{OSError}}} if the \sphinxstyleliteralstrong{\sphinxupquote{ps}} command cannot be run. \item {} The \sphinxcode{\sphinxupquote{matplotlib.cbook.check\_output()}} function has been moved to \sphinxcode{\sphinxupquote{matplotlib.compat.subprocess()}}. \end{itemize} \subsubsection{Configuration and rcParams} \label{\detokenize{api/prev_api_changes/api_changes_1.3.x:configuration-and-rcparams}}\begin{itemize} \item {} On Linux, the user-specific \sphinxcode{\sphinxupquote{matplotlibrc}} configuration file is now located in \sphinxcode{\sphinxupquote{config/matplotlib/matplotlibrc}} to conform to the \sphinxhref{https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html}{XDG Base Directory Specification}. \item {} The \sphinxcode{\sphinxupquote{font.*}} rcParams now affect only text objects created after the rcParam has been set, and will not retroactively affect already existing text objects. This brings their behavior in line with most other rcParams. \item {} Removed call of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid()}}}}} in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:matplotlib.pyplot.plotfile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plotfile()}}}}}. To draw the axes grid, set the \sphinxcode{\sphinxupquote{axes.grid}} rcParam to \sphinxstyleemphasis{True}, or explicitly call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid()}}}}}. \end{itemize} \subsection{Changes in 1.4.x} \label{\detokenize{api/prev_api_changes/api_changes_1.4.x:changes-in-1-4-x}}\label{\detokenize{api/prev_api_changes/api_changes_1.4.x::doc}} \subsubsection{Code changes} \label{\detokenize{api/prev_api_changes/api_changes_1.4.x:code-changes}}\begin{itemize} \item {} A major refactoring of the axes module was made. The axes module has been split into smaller modules: \begin{itemize} \item {} the \sphinxcode{\sphinxupquote{\_base}} module, which contains a new private \_AxesBase class. This class contains all methods except plotting and labelling methods. \item {} the \sphinxcode{\sphinxupquote{axes}} module, which contains the Axes class. This class inherits from \_AxesBase, and contains all plotting and labelling methods. \item {} the \sphinxcode{\sphinxupquote{\_subplot}} module, with all the classes concerning subplotting. \end{itemize} \end{itemize} There are a couple of things that do not exists in the \sphinxcode{\sphinxupquote{axes}} module's namespace anymore. If you use them, you need to import them from their original location: \begin{itemize} \item {} math -\textgreater{} \sphinxcode{\sphinxupquote{import math}} \item {} ma -\textgreater{} \sphinxcode{\sphinxupquote{from numpy import ma}} \item {} cbook -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import cbook}} \item {} docstring -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import docstring}} \item {} is\_sequence\_of\_strings -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib.cbook import is\_sequence\_of\_strings}} \item {} is\_string\_like -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib.cbook import is\_string\_like}} \item {} iterable -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib.cbook import iterable}} \item {} itertools -\textgreater{} \sphinxcode{\sphinxupquote{import itertools}} \item {} martist -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import artist as martist}} \item {} matplotlib -\textgreater{} \sphinxcode{\sphinxupquote{import matplotlib}} \item {} mcoll -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import collections as mcoll}} \item {} mcolors -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import colors as mcolors}} \item {} mcontour -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import contour as mcontour}} \item {} mpatches -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import patches as mpatches}} \item {} mpath -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import path as mpath}} \item {} mquiver -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import quiver as mquiver}} \item {} mstack -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import stack as mstack}} \item {} mstream -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import stream as mstream}} \item {} mtable -\textgreater{} \sphinxcode{\sphinxupquote{from matplotlib import table as mtable}} \end{itemize} \begin{itemize} \item {} As part of the refactoring to enable Qt5 support, the module \sphinxcode{\sphinxupquote{matplotlib.backends.qt4\_compat}} was renamed to \sphinxcode{\sphinxupquote{matplotlib.qt\_compat}}. \sphinxcode{\sphinxupquote{qt4\_compat}} is deprecated in 1.4 and will be removed in 1.5. \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}} method has been changed such that the upper and lower limits (\sphinxstyleemphasis{lolims}, \sphinxstyleemphasis{uplims}, \sphinxstyleemphasis{xlolims}, \sphinxstyleemphasis{xuplims}) now point in the correct direction. \item {} The \sphinxstyleemphasis{fmt} kwarg for \sphinxcode{\sphinxupquote{plot()}} defaults. \item {} A bug has been fixed in the path effects rendering of fonts, which now means that the font size is consistent with non-path effect fonts. See \sphinxurl{https://github.com/matplotlib/matplotlib/issues/2889} for more detail. \item {} The Sphinx extensions \sphinxcode{\sphinxupquote{ipython\_directive}} and \sphinxcode{\sphinxupquote{ipython\_console\_highlighting}} have been moved to the IPython project itself. While they remain in Matplotlib for this release, they have been deprecated. Update your extensions in \sphinxcode{\sphinxupquote{conf.py}} to point to \sphinxcode{\sphinxupquote{IPython.sphinxext.ipython\_directive}} instead of \sphinxcode{\sphinxupquote{matplotlib.sphinxext.ipython\_directive}}. \item {} In \sphinxcode{\sphinxupquote{finance}}, almost all functions have been deprecated and replaced with a pair of functions name \sphinxcode{\sphinxupquote{*\_ochl}} and \sphinxcode{\sphinxupquote{*\_ohlc}}. The former is the 'open-close-high-low' order of quotes used previously in this module, and the latter is the 'open-high-low-close' order that is standard in finance. \item {} For consistency the \sphinxcode{\sphinxupquote{face\_alpha}} keyword to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.SimplePatchShadow}}}}} has been deprecated in favour of the \sphinxcode{\sphinxupquote{alpha}} keyword. Similarly, the keyword \sphinxcode{\sphinxupquote{offset\_xy}} is now named \sphinxcode{\sphinxupquote{offset}} across all \sphinxcode{\sphinxupquote{\_Base{}`}} has been renamed to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}}. \sphinxcode{\sphinxupquote{matplotlib.patheffect.ProxyRenderer}} has been renamed to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.PathEffectRenderer}}}}} and is now a full RendererBase subclass. \item {} The artist used to draw the outline of a \sphinxcode{\sphinxupquote{colorbar}} has been changed from a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Polygon}}}}}, thus \sphinxcode{\sphinxupquote{colorbar.ColorbarBase.outline}} is now a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Polygon}}}}} object. \item {} The legend handler interface has changed from a callable, to any object which implements the \sphinxcode{\sphinxupquote{legend\_artists}} method (a deprecation phase will see this interface be maintained for v1.4). See {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for further details. Further legend changes include: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.\_get\_legend\_handles()}} now returns a generator of handles, rather than a list. \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} function's "loc" positional argument has been deprecated. Use the "loc" keyword instead. \end{itemize} \item {} The rcParams \sphinxcode{\sphinxupquote{savefig.transparent}} has been added to control default transparency when saving figures. \item {} Slightly refactored the \sphinxcode{\sphinxupquote{Annotation}} family. The text location in \sphinxcode{\sphinxupquote{Annotation}} is now handled entirely handled by the underlying \sphinxcode{\sphinxupquote{Text}} object so \sphinxcode{\sphinxupquote{set\_position}} works as expected. The attributes \sphinxcode{\sphinxupquote{xytext}} and \sphinxcode{\sphinxupquote{textcoords}} have been deprecated in favor of \sphinxcode{\sphinxupquote{xyann}} and \sphinxcode{\sphinxupquote{anncoords}} so that \sphinxcode{\sphinxupquote{Annotation}} and \sphinxcode{\sphinxupquote{AnnotaionBbox}} can share a common sensibly named api for getting/setting the location of the text or box. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{xyann}} -\textgreater{} set the location of the annotation \item {} \sphinxcode{\sphinxupquote{xy}} -\textgreater{} set where the arrow points to \item {} \sphinxcode{\sphinxupquote{anncoords}} -\textgreater{} set the units of the annotation location \item {} \sphinxcode{\sphinxupquote{xycoords}} -\textgreater{} set the units of the point location \item {} \sphinxcode{\sphinxupquote{set\_position()}} -\textgreater{} \sphinxcode{\sphinxupquote{Annotation}} only set location of annotation \end{itemize} \item {} {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.specgram}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.psd}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.csd}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.cohere}}}}}, \sphinxcode{\sphinxupquote{matplotlib.mlab.cohere\_pairs}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.specgram}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.psd}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.csd}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib.pyplot.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.cohere}}}}} now raise ValueError where they previously raised AssertionError. \item {} For {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.psd}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.csd}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.cohere}}}}}, \sphinxcode{\sphinxupquote{matplotlib.mlab.cohere\_pairs}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.specgram}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.psd}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.csd}}}}}, and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib.pyplot.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.cohere}}}}}, in cases where a shape (n, 1) array is returned, this is now converted to a (n, ) array. Previously, (n, m) arrays were averaged to an (n, ) array, but (n, 1) arrays were returend unchanged. This change makes the dimensions consistent in both cases. \item {} Added the rcParam \sphinxcode{\sphinxupquote{axes.fromatter.useoffset}} to control the default value of \sphinxcode{\sphinxupquote{useOffset}} in \sphinxcode{\sphinxupquote{ticker.ScalarFormatter}} \item {} Added \sphinxcode{\sphinxupquote{Formatter}} sub-class \sphinxcode{\sphinxupquote{StrMethodFormatter}} which does the exact same thing as \sphinxcode{\sphinxupquote{FormatStrFormatter}}, but for new-style formatting strings. \item {} Deprecated \sphinxcode{\sphinxupquote{matplotlib.testing.image\_util}} and the only function within, \sphinxcode{\sphinxupquote{matplotlib.testing.image\_util.autocontrast}}. These will be removed completely in v1.5.0. \item {} The \sphinxcode{\sphinxupquote{fmt}} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib.axes.Axes.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date()}}}}} has been changed from \sphinxcode{\sphinxupquote{bo}} to just \sphinxcode{\sphinxupquote{o}}, so color cycling can happen by default. \item {} Removed the class \sphinxcode{\sphinxupquote{FigureManagerQTAgg}} and deprecated \sphinxcode{\sphinxupquote{NavigationToolbar2QTAgg}} which will be removed in 1.5. \item {} Removed formerly public (non-prefixed) attributes \sphinxcode{\sphinxupquote{rect}} and \sphinxcode{\sphinxupquote{drawRect}} from \sphinxcode{\sphinxupquote{FigureCanvasQTAgg}}; they were always an implementation detail of the (preserved) \sphinxcode{\sphinxupquote{drawRectangle()}} function. \item {} The function signatures of \sphinxcode{\sphinxupquote{tight\_bbox.adjust\_bbox}} and \sphinxcode{\sphinxupquote{tight\_bbox.process\_figure\_for\_rasterizing}} have been changed. A new \sphinxcode{\sphinxupquote{fixed\_dpi}} parameter allows for overriding the \sphinxcode{\sphinxupquote{figure.dpi}} setting instead of trying to deduce the intended behaviour from the file format. \item {} Added support for horizontal/vertical axes padding to \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.ImageGrid}} --- argument \sphinxcode{\sphinxupquote{axes\_pad}} can now be tuple-like if separate axis padding is required. The original behavior is preserved. \item {} Added support for skewed transforms to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2D}}}}}, which can be created using the \sphinxcode{\sphinxupquote{skew}} and \sphinxcode{\sphinxupquote{skew\_deg}} methods. \item {} Added clockwise parameter to control sectors direction in \sphinxcode{\sphinxupquote{axes.pie}} \item {} In {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} the \sphinxcode{\sphinxupquote{markevery}} functionality has been extended. Previously an integer start-index and stride-length could be specified using either a two-element-list or a two-element-tuple. Now this can only be done using a two-element-tuple. If a two-element-list is used then it will be treated as numpy fancy indexing and only the two markers corresponding to the given indexes will be shown. \item {} removed prop kwarg from {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredSizeBar}}}}} call. It was passed through to the base-class \sphinxcode{\sphinxupquote{\_\_init\_\_}} and is only used for setting padding. Now \sphinxcode{\sphinxupquote{fontproperties}} (which is what is really used to set the font properties of \sphinxcode{\sphinxupquote{AnchoredSizeBar}}) is passed through in place of \sphinxcode{\sphinxupquote{prop}}. If \sphinxcode{\sphinxupquote{fontpropreties}} is not passed in, but \sphinxcode{\sphinxupquote{prop}} is, then \sphinxcode{\sphinxupquote{prop}} is used inplace of \sphinxcode{\sphinxupquote{fontpropreties}}. If both are passed in, \sphinxcode{\sphinxupquote{prop}} is silently ignored. \item {} The use of the index 0 in \sphinxcode{\sphinxupquote{plt.subplot}} and related commands is deprecated. Due to a lack of validation calling \sphinxcode{\sphinxupquote{plt.subplots(2, 2, 0)}} does not raise an exception, but puts an axes in the \_last\_ position. This is due to the indexing in subplot being 1-based (to mirror MATLAB) so before indexing into the \sphinxcode{\sphinxupquote{GridSpec}} object used to determine where the axes should go, 1 is subtracted off. Passing in 0 results in passing -1 to \sphinxcode{\sphinxupquote{GridSpec}} which results in getting the last position back. Even though this behavior is clearly wrong and not intended, we are going through a deprecation cycle in an abundance of caution that any users are exploiting this 'feature'. The use of 0 as an index will raise a warning in 1.4 and an exception in 1.5. \item {} Clipping is now off by default on offset boxes. \item {} Matplotlib now uses a less-aggressive call to \sphinxcode{\sphinxupquote{gc.collect(1)}} when closing figures to avoid major delays with large numbers of user objects in memory. \item {} The default clip value of \sphinxstyleemphasis{all} pie artists now defaults to \sphinxcode{\sphinxupquote{False}}. \end{itemize} \subsubsection{Code removal} \label{\detokenize{api/prev_api_changes/api_changes_1.4.x:code-removal}}\begin{itemize} \item {} Removed \sphinxcode{\sphinxupquote{mlab.levypdf}}. The code raised a numpy error (and has for a long time) and was not the standard form of the Levy distribution. \sphinxcode{\sphinxupquote{scipy.stats.levy}} should be used instead \end{itemize} \subsection{Changes in 1.5.0} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:changes-in-1-5-0}}\label{\detokenize{api/prev_api_changes/api_changes_1.5.0::doc}} \subsubsection{Code Changes} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:code-changes}} \paragraph{Reversed \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.cbook.ls\_mapper}}, added \sphinxstyleliteralintitle{\sphinxupquote{ls\_mapper\_r}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:reversed-matplotlib-cbook-ls-mapper-added-ls-mapper-r}} Formerly, \sphinxcode{\sphinxupquote{matplotlib.cbook.ls\_mapper}} was a dictionary with the long-form line-style names (\sphinxcode{\sphinxupquote{"solid"}}) as keys and the short forms (\sphinxcode{\sphinxupquote{"-"}}) as values. This long-to-short mapping is now done by \sphinxcode{\sphinxupquote{ls\_mapper\_r}}, and the short-to-long mapping is done by the \sphinxcode{\sphinxupquote{ls\_mapper}}. \paragraph{Prevent moving artists between Axes, Property-ify Artist.axes, deprecate Artist.\{get,set\}\_axes} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:prevent-moving-artists-between-axes-property-ify-artist-axes-deprecate-artist-get-set-axes}} This was done to prevent an Artist that is already associated with an Axes from being moved/added to a different Axes. This was never supported as it causes havoc with the transform stack. The apparent support for this (as it did not raise an exception) was the source of multiple bug reports and questions on SO. For almost all use-cases, the assignment of the axes to an artist should be taken care of by the axes as part of the \sphinxcode{\sphinxupquote{Axes.add\_*}} method, hence the deprecation of \{get,set\}\_axes. Removing the \sphinxcode{\sphinxupquote{set\_axes}} method will also remove the 'axes' line from the ACCEPTS kwarg tables (assuming that the removal date gets here before that gets overhauled). \paragraph{Tightened input validation on 'pivot' kwarg to quiver} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:tightened-input-validation-on-pivot-kwarg-to-quiver}} Tightened validation so that only \{'tip', 'tail', 'mid', and 'middle'\} (but any capitalization) are valid values for the 'pivot' kwarg in the \sphinxcode{\sphinxupquote{Quiver.\_\_init\_\_}} (and hence \sphinxcode{\sphinxupquote{Axes.quiver}} and \sphinxcode{\sphinxupquote{plt.quiver}} which both fully delegate to \sphinxcode{\sphinxupquote{Quiver}}). Previously any input matching 'mid.*' would be interpreted as 'middle', 'tip.*' as 'tip' and any string not matching one of those patterns as 'tail'. The value of \sphinxcode{\sphinxupquote{Quiver.pivot}} is normalized to be in the set \{'tip', 'tail', 'middle'\} in \sphinxcode{\sphinxupquote{Quiver.\_\_init\_\_}}. \paragraph{Reordered \sphinxstyleliteralintitle{\sphinxupquote{Axes.get\_children}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:reordered-axes-get-children}} The artist order returned by \sphinxcode{\sphinxupquote{Axes.get\_children}} did not match the one used by \sphinxcode{\sphinxupquote{Axes.draw}}. They now use the same order, as \sphinxcode{\sphinxupquote{Axes.draw}} now calls \sphinxcode{\sphinxupquote{Axes.get\_children}}. \paragraph{Changed behaviour of contour plots} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:changed-behaviour-of-contour-plots}} The default behaviour of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}} when using a masked array is now determined by the new keyword argument \sphinxcode{\sphinxupquote{corner\_mask}}, or if this is not specified then the new rcParam \sphinxcode{\sphinxupquote{contour.corner\_mask}} instead. The new default behaviour is equivalent to using \sphinxcode{\sphinxupquote{corner\_mask=True}}; the previous behaviour can be obtained using \sphinxcode{\sphinxupquote{corner\_mask=False}} or by changing the rcParam. The example \sphinxurl{http://matplotlib.org/examples/pylab\_examples/contour\_corner\_mask.html} demonstrates the difference. Use of the old contouring algorithm, which is obtained with \sphinxcode{\sphinxupquote{corner\_mask='legacy'}}, is now deprecated. Contour labels may now appear in different places than in earlier versions of Matplotlib. In addition, the keyword argument \sphinxcode{\sphinxupquote{nchunk}} now applies to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour()}}}}} as well as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}}, and it subdivides the domain into subdomains of exactly \sphinxcode{\sphinxupquote{nchunk}} by \sphinxcode{\sphinxupquote{nchunk}} quads, whereas previously it was only roughly \sphinxcode{\sphinxupquote{nchunk}} by \sphinxcode{\sphinxupquote{nchunk}} quads. The C/C++ object that performs contour calculations used to be stored in the public attribute QuadContourSet.Cntr, but is now stored in a private attribute and should not be accessed by end users. \paragraph{Added set\_params function to all Locator types} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:added-set-params-function-to-all-locator-types}} This was a bug fix targeted at making the api for Locators more consistent. In the old behavior, only locators of type MaxNLocator have set\_params() defined, causing its use on any other Locator to raise an AttributeError \sphinxstyleemphasis{( aside: set\_params(args) is a function that sets the parameters of a Locator instance to be as specified within args)}. The fix involves moving set\_params() to the Locator class such that all subtypes will have this function defined. Since each of the Locator subtypes have their own modifiable parameters, a universal set\_params() in Locator isn't ideal. Instead, a default no-operation function that raises a warning is implemented in Locator. Subtypes extending Locator will then override with their own implementations. Subtypes that do not have a need for set\_params() will fall back onto their parent's implementation, which raises a warning as intended. In the new behavior, Locator instances will not raise an AttributeError when set\_params() is called. For Locators that do not implement set\_params(), the default implementation in Locator is used. \paragraph{Disallow \sphinxstyleliteralintitle{\sphinxupquote{None}} as x or y value in ax.plot} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:disallow-none-as-x-or-y-value-in-ax-plot}} Do not allow \sphinxcode{\sphinxupquote{None}} as a valid input for the \sphinxcode{\sphinxupquote{x}} or \sphinxcode{\sphinxupquote{y}} args in \sphinxcode{\sphinxupquote{ax.plot}}. This may break some user code, but this was never officially supported (ex documented) and allowing \sphinxcode{\sphinxupquote{None}} objects through can lead to confusing exceptions downstream. To create an empty line use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ln1}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{ln2}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} In either case to update the data in the \sphinxcode{\sphinxupquote{Line2D}} object you must update both the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} data. \paragraph{Removed \sphinxstyleliteralintitle{\sphinxupquote{args}} and \sphinxstyleliteralintitle{\sphinxupquote{kwargs}} from \sphinxstyleliteralintitle{\sphinxupquote{MicrosecondLocator.\_\_call\_\_}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:removed-args-and-kwargs-from-microsecondlocator-call}} The call signature of \sphinxcode{\sphinxupquote{\_\_call\_\_()}} has changed from \sphinxcode{\sphinxupquote{\_\_call\_\_(self, *args, **kwargs)}} to \sphinxcode{\sphinxupquote{\_\_call\_\_(self)}}. This is consistent with the superclass {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} and also all the other Locators derived from this superclass. \paragraph{No \sphinxstyleliteralintitle{\sphinxupquote{ValueError}} for the MicrosecondLocator and YearLocator} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:no-valueerror-for-the-microsecondlocator-and-yearlocator}} The {\hyperref[\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MicrosecondLocator}}}}} and {\hyperref[\detokenize{api/dates_api:matplotlib.dates.YearLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YearLocator}}}}} objects when called will return an empty list if the axes have no data or the view has no interval. Previously, they raised a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}}. This is consistent with all the Date Locators. \paragraph{'OffsetBox.DrawingArea' respects the 'clip' keyword argument} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:offsetbox-drawingarea-respects-the-clip-keyword-argument}} The call signature was \sphinxcode{\sphinxupquote{OffsetBox.DrawingArea(..., clip=True)}} but nothing was done with the \sphinxcode{\sphinxupquote{clip}} argument. The object did not do any clipping regardless of that parameter. Now the object can and does clip the child \sphinxcode{\sphinxupquote{Artists}} if they are set to be clipped. You can turn off the clipping on a per-child basis using \sphinxcode{\sphinxupquote{child.set\_clip\_on(False)}}. \paragraph{Add salt to clipPath id} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:add-salt-to-clippath-id}} Add salt to the hash used to determine the id of the \sphinxcode{\sphinxupquote{clipPath}} nodes. This is to avoid conflicts when two svg documents with the same clip path are included in the same document (see \sphinxurl{https://github.com/ipython/ipython/issues/8133} and \sphinxurl{https://github.com/matplotlib/matplotlib/issues/4349} ), however this means that the svg output is no longer deterministic if the same figure is saved twice. It is not expected that this will affect any users as the current ids are generated from an md5 hash of properties of the clip path and any user would have a very difficult time anticipating the value of the id. \paragraph{Changed snap threshold for circle markers to inf} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:changed-snap-threshold-for-circle-markers-to-inf}} When drawing circle markers above some marker size (previously 6.0) the path used to generate the marker was snapped to pixel centers. However, this ends up distorting the marker away from a circle. By setting the snap threshold to inf snapping is never done on circles. This change broke several tests, but is an improvement. \paragraph{Preserve units with Text position} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:preserve-units-with-text-position}} Previously the 'get\_position' method on Text would strip away unit information even though the units were still present. There was no inherent need to do this, so it has been changed so that unit data (if present) will be preserved. Essentially a call to 'get\_position' will return the exact value from a call to 'set\_position'. If you wish to get the old behaviour, then you can use the new method called 'get\_unitless\_position'. \paragraph{New API for custom Axes view changes} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:new-api-for-custom-axes-view-changes}} Interactive pan and zoom were previously implemented using a Cartesian-specific algorithm that was not necessarily applicable to custom Axes. Three new private methods, \sphinxcode{\sphinxupquote{\_get\_view()}}, \sphinxcode{\sphinxupquote{\_set\_view()}}, and \sphinxcode{\sphinxupquote{\_set\_view\_from\_bbox()}}, allow for custom \sphinxstyleemphasis{Axes} classes to override the pan and zoom algorithms. Implementors of custom \sphinxstyleemphasis{Axes} who override these methods may provide suitable behaviour for both pan and zoom as well as the view navigation buttons on the interactive toolbars. \subsubsection{MathTex visual changes} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:mathtex-visual-changes}} The spacing commands in mathtext have been changed to more closely match vanilla TeX. \paragraph{Improved spacing in mathtext} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:improved-spacing-in-mathtext}} The extra space that appeared after subscripts and superscripts has been removed. \paragraph{No annotation coordinates wrap} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:no-annotation-coordinates-wrap}} In \#2351 for 1.4.0 the behavior of {[}'axes points', 'axes pixel', 'figure points', 'figure pixel'{]} as coordinates was change to no longer wrap for negative values. In 1.4.3 this change was reverted for 'axes points' and 'axes pixel' and in addition caused 'axes fraction' to wrap. For 1.5 the behavior has been reverted to as it was in 1.4.0-1.4.2, no wrapping for any type of coordinate. \subsubsection{Deprecation} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:deprecation}} \paragraph{Deprecated \sphinxstyleliteralintitle{\sphinxupquote{GraphicsContextBase.set\_graylevel}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:deprecated-graphicscontextbase-set-graylevel}} The \sphinxcode{\sphinxupquote{GraphicsContextBase.set\_graylevel}} function has been deprecated in 1.5 and will be removed in 1.6. It has been unused. The \sphinxcode{\sphinxupquote{GraphicsContextBase.set\_foreground}} could be used instead. \paragraph{deprecated idle\_event} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:deprecated-idle-event}} The \sphinxcode{\sphinxupquote{idle\_event}} was broken or missing in most backends and causes spurious warnings in some cases, and its use in creating animations is now obsolete due to the animations module. Therefore code involving it has been removed from all but the wx backend (where it partially works), and its use is deprecated. The animations module may be used instead to create animations. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{color\_cycle}} deprecated} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:color-cycle-deprecated}} In light of the new property cycling feature, the Axes method \sphinxstyleemphasis{set\_color\_cycle} is now deprecated. Calling this method will replace the current property cycle with one that cycles just the given colors. Similarly, the rc parameter \sphinxstyleemphasis{axes.color\_cycle} is also deprecated in lieu of the new \sphinxstyleemphasis{axes.prop\_cycle} parameter. Having both parameters in the same rc file is not recommended as the result cannot be predicted. For compatibility, setting \sphinxstyleemphasis{axes.color\_cycle} will replace the cycler in \sphinxstyleemphasis{axes.prop\_cycle} with a color cycle. Accessing \sphinxstyleemphasis{axes.color\_cycle} will return just the color portion of the property cycle, if it exists. Timeline for removal has not been set. \subsubsection{Bundled jquery} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:bundled-jquery}} The version of jquery bundled with the webagg backend has been upgraded from 1.7.1 to 1.11.3. If you are using the version of jquery bundled with webagg you will need to update your html files as such \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gd}{\PYGZhy{} \PYGZlt{}script src=\PYGZdq{}\PYGZus{}static/jquery/js/jquery\PYGZhy{}1.7.1.min.js\PYGZdq{}\PYGZgt{}\PYGZlt{}/script\PYGZgt{}} \PYG{g+gi}{+ \PYGZlt{}script src=\PYGZdq{}\PYGZus{}static/jquery/js/jquery\PYGZhy{}1.11.3.min.js\PYGZdq{}\PYGZgt{}\PYGZlt{}/script\PYGZgt{}} \end{sphinxVerbatim} \subsubsection{Code Removed} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:code-removed}} \paragraph{Removed \sphinxstyleliteralintitle{\sphinxupquote{Image}} from main namespace} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:removed-image-from-main-namespace}} \sphinxcode{\sphinxupquote{Image}} was imported from PIL/pillow to test if PIL is available, but there is no reason to keep \sphinxcode{\sphinxupquote{Image}} in the namespace once the availability has been determined. \paragraph{Removed \sphinxstyleliteralintitle{\sphinxupquote{lod}} from Artist} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:removed-lod-from-artist}} Removed the method \sphinxstyleemphasis{set\_lod} and all references to the attribute \sphinxstyleemphasis{\_lod} as the are not used anywhere else in the code base. It appears to be a feature stub that was never built out. \paragraph{Removed threading related classes from cbook} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:removed-threading-related-classes-from-cbook}} The classes \sphinxcode{\sphinxupquote{Scheduler}}, \sphinxcode{\sphinxupquote{Timeout}}, and \sphinxcode{\sphinxupquote{Idle}} were in cbook, but are not used internally. They appear to be a prototype for the idle event system which was not working and has recently been pulled out. \paragraph{Removed \sphinxstyleliteralintitle{\sphinxupquote{Lena}} images from sample\_data} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:removed-lena-images-from-sample-data}} The \sphinxcode{\sphinxupquote{lena.png}} and \sphinxcode{\sphinxupquote{lena.jpg}} images have been removed from Matplotlib's sample\_data directory. The images are also no longer available from {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.get_sample_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook.get\_sample\_data}}}}}. We suggest using \sphinxcode{\sphinxupquote{matplotlib.cbook.get\_sample\_data('grace\_hopper.png')}} or \sphinxcode{\sphinxupquote{matplotlib.cbook.get\_sample\_data('grace\_hopper.jpg')}} instead. \paragraph{Legend} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:legend}} Removed handling of \sphinxcode{\sphinxupquote{loc}} as a positional argument to \sphinxcode{\sphinxupquote{Legend}} \paragraph{Legend handlers} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:legend-handlers}} Remove code to allow legend handlers to be callable. They must now implement a method \sphinxcode{\sphinxupquote{legend\_artist}}. \paragraph{Axis} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:axis}} Removed method \sphinxcode{\sphinxupquote{set\_scale}}. This is now handled via a private method which should not be used directly by users. It is called via \sphinxcode{\sphinxupquote{Axes.set\_\{x,y\}scale}} which takes care of ensuring the related changes are also made to the Axes object. \paragraph{finance.py} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:finance-py}} Removed functions with ambiguous argument order from finance.py \paragraph{Annotation} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:annotation}} Removed \sphinxcode{\sphinxupquote{textcoords}} and \sphinxcode{\sphinxupquote{xytext}} proprieties from Annotation objects. \paragraph{spinxext.ipython\_*.py} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:spinxext-ipython-py}} Both \sphinxcode{\sphinxupquote{ipython\_console\_highlighting}} and \sphinxcode{\sphinxupquote{ipython\_directive}} have been moved to \sphinxcode{\sphinxupquote{IPython}}. Change your import from 'matplotlib.sphinxext.ipython\_directive' to 'IPython.sphinxext.ipython\_directive' and from 'matplotlib.sphinxext.ipython\_directive' to 'IPython.sphinxext.ipython\_directive' \paragraph{LineCollection.color} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:linecollection-color}} Deprecated in 2005, use \sphinxcode{\sphinxupquote{set\_color}} \paragraph{remove \sphinxstyleliteralintitle{\sphinxupquote{'faceted'}} as a valid value for \sphinxstyleliteralintitle{\sphinxupquote{shading}} in \sphinxstyleliteralintitle{\sphinxupquote{tri.tripcolor}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-faceted-as-a-valid-value-for-shading-in-tri-tripcolor}} Use \sphinxcode{\sphinxupquote{edgecolor}} instead. Added validation on \sphinxcode{\sphinxupquote{shading}} to only be valid values. \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{faceted}} kwarg from scatter} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-faceted-kwarg-from-scatter}} Remove support for the \sphinxcode{\sphinxupquote{faceted}} kwarg. This was deprecated in d48b34288e9651ff95c3b8a071ef5ac5cf50bae7 (2008-04-18!) and replaced by \sphinxcode{\sphinxupquote{edgecolor}}. \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{set\_colorbar}} method from \sphinxstyleliteralintitle{\sphinxupquote{ScalarMappable}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-set-colorbar-method-from-scalarmappable}} Remove \sphinxcode{\sphinxupquote{set\_colorbar}} method, use \sphinxcode{\sphinxupquote{colorbar}} attribute directly. \paragraph{patheffects.svg} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:patheffects-svg}}\begin{itemize} \item {} remove \sphinxcode{\sphinxupquote{get\_proxy\_renderer}} method from \sphinxcode{\sphinxupquote{AbstarctPathEffect}} class \item {} remove \sphinxcode{\sphinxupquote{patch\_alpha}} and \sphinxcode{\sphinxupquote{offset\_xy}} from \sphinxcode{\sphinxupquote{SimplePatchShadow}} \end{itemize} \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{testing.image\_util.py}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-testing-image-util-py}} Contained only a no-longer used port of functionality from PIL \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{mlab.FIFOBuffer}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-mlab-fifobuffer}} Not used internally and not part of core mission of mpl. \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{mlab.prepca}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-mlab-prepca}} Deprecated in 2009. \paragraph{Remove \sphinxstyleliteralintitle{\sphinxupquote{NavigationToolbar2QTAgg}}} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:remove-navigationtoolbar2qtagg}} Added no functionality over the base \sphinxcode{\sphinxupquote{NavigationToolbar2Qt}} \paragraph{mpl.py} \label{\detokenize{api/prev_api_changes/api_changes_1.5.0:mpl-py}} Remove the module \sphinxcode{\sphinxupquote{matplotlib.mpl}}. Deprecated in 1.3 by PR \#1670 and commit 78ce67d161625833cacff23cfe5d74920248c5b2 \subsection{Changes in 1.5.2} \label{\detokenize{api/prev_api_changes/api_changes_1.5.2:changes-in-1-5-2}}\label{\detokenize{api/prev_api_changes/api_changes_1.5.2::doc}} \subsubsection{Default Behavior Changes} \label{\detokenize{api/prev_api_changes/api_changes_1.5.2:default-behavior-changes}} \paragraph{Changed default \sphinxstyleliteralintitle{\sphinxupquote{autorange}} behavior in boxplots} \label{\detokenize{api/prev_api_changes/api_changes_1.5.2:changed-default-autorange-behavior-in-boxplots}} Prior to v1.5.2, the whiskers of boxplots would extend to the minimum and maximum values if the quartiles were all equal (i.e., Q1 = median = Q3). This behavior has been disabled by default to restore consistency with other plotting packages. To restore the old behavior, simply set \sphinxcode{\sphinxupquote{autorange=True}} when calling \sphinxcode{\sphinxupquote{plt.boxplot}}. \subsection{Changes in 1.5.3} \label{\detokenize{api/prev_api_changes/api_changes_1.5.3:changes-in-1-5-3}}\label{\detokenize{api/prev_api_changes/api_changes_1.5.3::doc}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ax.plot(..., marker=None)}} gives default marker} \label{\detokenize{api/prev_api_changes/api_changes_1.5.3:ax-plot-marker-none-gives-default-marker}} Prior to 1.5.3 kwargs passed to \sphinxcode{\sphinxupquote{plot}} were handled in two parts -- default kwargs generated internal to \sphinxcode{\sphinxupquote{plot}} (such as the cycled styles) and user supplied kwargs. The internally generated kwargs were passed to the \sphinxcode{\sphinxupquote{matplotlib.lines.Line2D.\_\_init\_\_}} and the user kwargs were passed to \sphinxcode{\sphinxupquote{ln.set(**kwargs)}} to update the artist after it was created. Now both sets of kwargs are merged and passed to \sphinxcode{\sphinxupquote{\_\_init\_\_}}. This change was made to allow \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} to be passed in via the user kwargs to mean 'do the default thing' as is the convention through out mpl rather than raising an exception. Unlike most {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} setter methods {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_marker}}}}} did accept \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} as a valid input which was mapped to 'no marker'. Thus, by routing this \sphinxcode{\sphinxupquote{marker=None}} through \sphinxcode{\sphinxupquote{\_\_init\_\_}} rather than \sphinxcode{\sphinxupquote{set(...)}} the meaning of \sphinxcode{\sphinxupquote{ax.plot(..., marker=None)}} changed from 'no markers' to 'default markers from rcparams'. This is change is only evident if \sphinxcode{\sphinxupquote{mpl.rcParams{[}'lines.marker'{]}}} has a value other than \sphinxcode{\sphinxupquote{'None'}} (which is string \sphinxcode{\sphinxupquote{'None'}} which means 'no marker'). \subsection{API Changes in 2.0.0} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:api-changes-in-2-0-0}}\label{\detokenize{api/prev_api_changes/api_changes_2.0.0::doc}} \subsubsection{Deprecation and removal} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:deprecation-and-removal}} \paragraph{Color of Axes} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:color-of-axes}} The \sphinxcode{\sphinxupquote{axisbg}} and \sphinxcode{\sphinxupquote{axis\_bgcolor}} properties on \sphinxstyleemphasis{Axes} have been deprecated in favor of \sphinxcode{\sphinxupquote{facecolor}}. \paragraph{GTK and GDK backends deprecated} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:gtk-and-gdk-backends-deprecated}} The GDK and GTK backends have been deprecated. These obsolete backends allow figures to be rendered via the GDK API to files and GTK2 figures. They are untested and known to be broken, and their use has been discouraged for some time. Instead, use the \sphinxcode{\sphinxupquote{GTKAgg}} and \sphinxcode{\sphinxupquote{GTKCairo}} backends for rendering to GTK2 windows. \paragraph{WX backend deprecated} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:wx-backend-deprecated}} The WX backend has been deprecated. It is untested, and its use has been discouraged for some time. Instead, use the \sphinxcode{\sphinxupquote{WXAgg}} backend for rendering figures to WX windows. \paragraph{CocoaAgg backend removed} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:cocoaagg-backend-removed}} The deprecated and not fully functional CocoaAgg backend has been removed. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{round}} removed from TkAgg Backend} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:round-removed-from-tkagg-backend}} The TkAgg backend had its own implementation of the \sphinxhref{https://docs.python.org/3/library/functions.html\#round}{\sphinxcode{\sphinxupquote{round}}} function. This was unused internally and has been removed. Instead, use either the \sphinxhref{https://docs.python.org/3/library/functions.html\#round}{\sphinxcode{\sphinxupquote{round}}} builtin function or \sphinxcode{\sphinxupquote{numpy.round}}. \paragraph{'hold' functionality deprecated} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:hold-functionality-deprecated}}\label{\detokenize{api/prev_api_changes/api_changes_2.0.0:v200-deprecate-hold}} The 'hold' keyword argument and all functions and methods related to it are deprecated, along with the 'axes.hold' \sphinxcode{\sphinxupquote{rcParams}} entry. The behavior will remain consistent with the default \sphinxcode{\sphinxupquote{hold=True}} state that has long been in place. Instead of using a function or keyword argument (\sphinxcode{\sphinxupquote{hold=False}}) to change that behavior, explicitly clear the axes or figure as needed prior to subsequent plotting commands. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Artist.update}} has return value} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:artist-update-has-return-value}} The methods {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib.artist.Artist.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.set}}}}}, \sphinxcode{\sphinxupquote{matplotlib.Artist.update}}, and the function {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.setp}}}}} now use a common codepath to look up how to update the given artist properties (either using the setter methods or an attribute/property). The behavior of \sphinxcode{\sphinxupquote{matplotlib.Artist.update}} is slightly changed to return a list of the values returned from the setter methods to avoid changing the API of \sphinxcode{\sphinxupquote{matplotlib.Artist.set}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.setp}}}}}. The keys passed into \sphinxcode{\sphinxupquote{matplotlib.Artist.update}} are now converted to lower case before being processed, to match the behavior of \sphinxcode{\sphinxupquote{matplotlib.Artist.set}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.setp}}}}}. This should not break any user code because there are no set methods with capitals in their names, but this puts a constraint on naming properties in the future. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Legend}} initializers gain edgecolor and facecolor kwargs} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:legend-initializers-gain-edgecolor-and-facecolor-kwargs}} The {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend}}}}} background patch (or 'frame') can have its \sphinxcode{\sphinxupquote{edgecolor}} and \sphinxcode{\sphinxupquote{facecolor}} determined by the corresponding keyword arguments to the {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} initializer, or to any of the methods or functions that call that initializer. If left to their default values of \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, their values will be taken from \sphinxcode{\sphinxupquote{matplotlib.rcParams}}. The previously-existing \sphinxcode{\sphinxupquote{framealpha}} kwarg still controls the alpha transparency of the patch. \subsubsection{Qualitative colormaps} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:qualitative-colormaps}} Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired", "Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as \sphinxcode{\sphinxupquote{ListedColormap}} instead of \sphinxcode{\sphinxupquote{LinearSegmentedColormap}}. To use these for images where categories are specified as integers, for instance, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Dark2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{NoNorm}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Change in the \sphinxstyleliteralintitle{\sphinxupquote{draw\_image}} backend API} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:change-in-the-draw-image-backend-api}} The \sphinxcode{\sphinxupquote{draw\_image}} method implemented by backends has changed its interface. This change is only relevant if the backend declares that it is able to transform images by returning \sphinxcode{\sphinxupquote{True}} from \sphinxcode{\sphinxupquote{option\_scale\_image}}. See the \sphinxcode{\sphinxupquote{draw\_image}} docstring for more information. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.ticker.LinearLocator}} algorithm update} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:matplotlib-ticker-linearlocator-algorithm-update}} The \sphinxcode{\sphinxupquote{matplotlib.ticker.LinearLocator}} is used to define the range and location of axis ticks when the user wants an exact number of ticks. \sphinxcode{\sphinxupquote{LinearLocator}} thus differs from the default locator \sphinxcode{\sphinxupquote{MaxNLocator}}, for which the user specifies a maximum number of intervals rather than a precise number of ticks. The view range algorithm in \sphinxcode{\sphinxupquote{matplotlib.ticker.LinearLocator}} has been changed so that more convenient tick locations are chosen. The new algorithm returns a plot view range that is a multiple of the user-requested number of ticks. This ensures tick marks will be located at whole integers more consistently. For example, when both y-axes of a{}`{}`twinx{}`{}` plot use \sphinxcode{\sphinxupquote{matplotlib.ticker.LinearLocator}} with the same number of ticks, their y-tick locations and grid lines will coincide. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.ticker.LogLocator}} gains numticks kwarg} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:matplotlib-ticker-loglocator-gains-numticks-kwarg}} The maximum number of ticks generated by the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}} can now be controlled explicitly via setting the new 'numticks' kwarg to an integer. By default the kwarg is None which internally sets it to the 'auto' string, triggering a new algorithm for adjusting the maximum according to the axis length relative to the ticklabel font size. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.ticker.LogFormatter}}: two new kwargs} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:matplotlib-ticker-logformatter-two-new-kwargs}} Previously, minor ticks on log-scaled axes were not labeled by default. An algorithm has been added to the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatter}}}}} to control the labeling of ticks between integer powers of the base. The algorithm uses two parameters supplied in a kwarg tuple named 'minor\_thresholds'. See the docstring for further explanation. To improve support for axes using \sphinxcode{\sphinxupquote{SymmetricLogLocator}}, a 'linthresh' kwarg was added. \subsubsection{New defaults for 3D quiver function in mpl\_toolkits.mplot3d.axes3d.py} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:new-defaults-for-3d-quiver-function-in-mpl-toolkits-mplot3d-axes3d-py}} Matplotlib has both a 2D and a 3D \sphinxcode{\sphinxupquote{quiver}} function. These changes affect only the 3D function and make the default behavior of the 3D function match the 2D version. There are two changes: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \item {} The 3D quiver function previously normalized the arrows to be the same length, which makes it unusable for situations where the arrows should be different lengths and does not match the behavior of the 2D function. This normalization behavior is now controlled with the \sphinxcode{\sphinxupquote{normalize}} keyword, which defaults to False. \item {} The \sphinxcode{\sphinxupquote{pivot}} keyword now defaults to \sphinxcode{\sphinxupquote{tail}} instead of \sphinxcode{\sphinxupquote{tip}}. This was done in order to match the default behavior of the 2D quiver function. \end{enumerate} To obtain the previous behavior with the 3D quiver function, one can call the function with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{quiver}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{z}\PYG{p}{,} \PYG{n}{u}\PYG{p}{,} \PYG{n}{v}\PYG{p}{,} \PYG{n}{w}\PYG{p}{,} \PYG{n}{normalize}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{pivot}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tip}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} where "ax" is an \sphinxcode{\sphinxupquote{Axes3d}} object created with something like \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{mplot3d}\PYG{n+nn}{.}\PYG{n+nn}{axes3d} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Stale figure behavior} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:stale-figure-behavior}} Attempting to draw the figure will now mark it as not stale (independent if the draw succeeds). This change is to prevent repeatedly trying to re-draw a figure which is raising an error on draw. The previous behavior would only mark a figure as not stale after a full re-draw succeeded. \subsubsection{The spectral colormap is now nipy\_spectral} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:the-spectral-colormap-is-now-nipy-spectral}} The colormaps formerly known as \sphinxcode{\sphinxupquote{spectral}} and \sphinxcode{\sphinxupquote{spectral\_r}} have been replaced by \sphinxcode{\sphinxupquote{nipy\_spectral}} and \sphinxcode{\sphinxupquote{nipy\_spectral\_r}} since Matplotlib 1.3.0. Even though the colormap was deprecated in Matplotlib 1.3.0, it never raised a warning. As of Matplotlib 2.0.0, using the old names raises a deprecation warning. In the future, using the old names will raise an error. \subsubsection{Default install no longer includes test images} \label{\detokenize{api/prev_api_changes/api_changes_2.0.0:default-install-no-longer-includes-test-images}} To reduce the size of wheels and source installs, the tests and baseline images are no longer included by default. To restore installing the tests and images, use a \sphinxcode{\sphinxupquote{setup.cfg}} with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{packages}\PYG{p}{]} \PYG{n}{tests} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{toolkits\PYGZus{}tests} \PYG{o}{=} \PYG{k+kc}{True} \end{sphinxVerbatim} in the source directory at build/install time. \subsection{API Changes in 2.0.1} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:api-changes-in-2-0-1}}\label{\detokenize{api/prev_api_changes/api_changes_2.0.1::doc}} \subsubsection{Extensions to \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:extensions-to-matplotlib-backend-bases-graphicscontextbase}} To better support controlling the color of hatches, the method {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_hatch_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase.set\_hatch\_color}}}}} was added to the expected API of \sphinxcode{\sphinxupquote{GraphicsContext}} classes. Calls to this method are currently wrapped with a \sphinxcode{\sphinxupquote{try:...except Attribute:}} block to preserve back-compatibility with any third-party backends which do not extend {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}. This value can be accessed in the backends via {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase.get\_hatch\_color}}}}} (which was added in 2.0 see {\hyperref[\detokenize{users/prev_whats_new/whats_new_2.0.0:gc-get-hatch-color-wn}]{\sphinxcrossref{\DUrole{std,std-ref}{Extension to matplotlib.backend\_bases.GraphicsContextBase}}}}) and should be used to color the hatches. In the future there may also be \sphinxcode{\sphinxupquote{hatch\_linewidth}} and \sphinxcode{\sphinxupquote{hatch\_density}} related methods added. It is encouraged, but not required that third-party backends extend {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}} to make adapting to these changes easier. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{afm.get\_fontconfig\_fonts}} returns a list of paths and does not check for existence} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:afm-get-fontconfig-fonts-returns-a-list-of-paths-and-does-not-check-for-existence}} \sphinxcode{\sphinxupquote{afm.get\_fontconfig\_fonts}} used to return a set of paths encoded as a \sphinxcode{\sphinxupquote{\{key: 1, ...\}}} dict, and checked for the existence of the paths. It now returns a list and dropped the existence check, as the same check is performed by the caller (\sphinxcode{\sphinxupquote{afm.findSystemFonts}}) as well. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{bar}} now returns rectangles of negative height or width if the corresponding input is negative} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:bar-now-returns-rectangles-of-negative-height-or-width-if-the-corresponding-input-is-negative}} \sphinxcode{\sphinxupquote{plt.bar}} used to normalize the coordinates of the rectangles that it created, to keep their height and width positives, even if the corresponding input was negative. This normalization has been removed to permit a simpler computation of the correct \sphinxcode{\sphinxupquote{sticky\_edges}} to use. \subsubsection{Do not clip line width when scaling dashes} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:do-not-clip-line-width-when-scaling-dashes}} The algorithm to scale dashes was changed to no longer clip the scaling factor: the dash patterns now continue to shrink at thin line widths. If the line width is smaller than the effective pixel size, this may result in dashed lines turning into solid gray-ish lines. This also required slightly tweaking the default patterns for '--', ':', and '.-' so that with the default line width the final patterns would not change. There is no way to restore the old behavior. \subsubsection{Deprecate 'Vega' color maps} \label{\detokenize{api/prev_api_changes/api_changes_2.0.1:deprecate-vega-color-maps}} The "Vega" colormaps are deprecated in Matplotlib 2.0.1 and will be removed in Matplotlib 2.2. Use the "tab" colormaps instead: "tab10", "tab20", "tab20b", "tab20c". \subsection{API Changes in 2.1.0} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:api-changes-in-2-1-0}}\label{\detokenize{api/prev_api_changes/api_changes_2.1.0::doc}} \subsubsection{Default behavior of log scales changed to mask \textless{}= 0 values} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:default-behavior-of-log-scales-changed-to-mask-0-values}} Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xscale}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_yscale}}}}} now uses 'mask' as the default method to handle invalid values (as opposed to 'clip'). This means that any values \textless{}= 0 on a log scale will not be shown. Previously they were clipped to a very small number and shown. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.cbook.CallbackRegistry.process()}} suppresses exceptions by default} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:matplotlib-cbook-callbackregistry-process-suppresses-exceptions-by-default}} Matplotlib uses instances of {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry}}}}} as a bridge between user input event from the GUI and user callbacks. Previously, any exceptions raised in a user call back would bubble out of of the \sphinxcode{\sphinxupquote{process}} method, which is typically in the GUI event loop. Most GUI frameworks simple print the traceback to the screen and continue as there is not always a clear method of getting the exception back to the user. However PyQt5 now exits the process when it receives an un-handled python exception in the event loop. Thus, {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.process}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{process()}}}}} now suppresses and prints tracebacks to stderr by default. What {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.process}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{process()}}}}} does with exceptions is now user configurable via the \sphinxcode{\sphinxupquote{exception\_handler}} attribute and kwarg. To restore the previous behavior pass \sphinxcode{\sphinxupquote{None}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cb} \PYG{o}{=} \PYG{n}{CallbackRegistry}\PYG{p}{(}\PYG{n}{exception\PYGZus{}handler}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \end{sphinxVerbatim} A function which take and \sphinxcode{\sphinxupquote{Exception}} as its only argument may also be passed \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{maybe\PYGZus{}reraise}\PYG{p}{(}\PYG{n}{exc}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n+nb}{isinstance}\PYG{p}{(}\PYG{n}{exc}\PYG{p}{,} \PYG{n+ne}{RuntimeError}\PYG{p}{)}\PYG{p}{:} \PYG{k}{pass} \PYG{k}{else}\PYG{p}{:} \PYG{k}{raise} \PYG{n}{exc} \PYG{n}{cb} \PYG{o}{=} \PYG{n}{CallbackRegistry}\PYG{p}{(}\PYG{n}{exception\PYGZus{}handler}\PYG{o}{=}\PYG{n}{maybe\PYGZus{}reraise}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Improved toggling of the axes grids} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:improved-toggling-of-the-axes-grids}} The \sphinxcode{\sphinxupquote{g}} key binding now switches the states of the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} grids independently (by cycling through all four on/off combinations). The new \sphinxcode{\sphinxupquote{G}} key binding switches the states of the minor grids. Both bindings are disabled if only a subset of the grid lines (in either direction) is visible, to avoid making irreversible changes to the figure. \subsubsection{Ticklabels are turned off instead of being invisible} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:ticklabels-are-turned-off-instead-of-being-invisible}} Internally, the \sphinxcode{\sphinxupquote{Tick}}'s \sphinxcode{\sphinxupquote{label1On()}} attribute is now used to hide tick labels instead of setting the visibility on the tick label objects. This improves overall performance and fixes some issues. As a consequence, in case those labels ought to be shown, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params()}}}}} needs to be used, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{labelbottom}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Removal of warning on empty legends} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:removal-of-warning-on-empty-legends}} \sphinxcode{\sphinxupquote{plt.legend}} used to issue a warning when no labeled artist could be found. This warning has been removed. \subsubsection{More accurate legend autopositioning} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:more-accurate-legend-autopositioning}} Automatic positioning of legends now prefers using the area surrounded by a \sphinxcode{\sphinxupquote{Line2D}} rather than placing the legend over the line itself. \subsubsection{Cleanup of stock sample data} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:cleanup-of-stock-sample-data}} The sample data of stocks has been cleaned up to remove redundancies and increase portability. The \sphinxcode{\sphinxupquote{AAPL.dat.gz}}, \sphinxcode{\sphinxupquote{INTC.dat.gz}} and \sphinxcode{\sphinxupquote{aapl.csv}} files have been removed entirely and will also no longer be available from {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.get_sample_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook.get\_sample\_data}}}}}. If a CSV file is required, we suggest using the \sphinxcode{\sphinxupquote{msft.csv}} that continues to be shipped in the sample data. If a NumPy binary file is acceptable, we suggest using one of the following two new files. The \sphinxcode{\sphinxupquote{aapl.npy.gz}} and \sphinxcode{\sphinxupquote{goog.npy}} files have been replaced by \sphinxcode{\sphinxupquote{aapl.npz}} and \sphinxcode{\sphinxupquote{goog.npz}}, wherein the first column's type has changed from \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.date}{\sphinxcode{\sphinxupquote{datetime.date}}} to \sphinxcode{\sphinxupquote{np.datetime64}} for better portability across Python versions. Note that Matplotlib does not fully support \sphinxcode{\sphinxupquote{np.datetime64}} as yet. \subsubsection{Updated qhull to 2015.2} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:updated-qhull-to-2015-2}} The version of qhull shipped with Matplotlib, which is used for Delaunay triangulation, has been updated from version 2012.1 to 2015.2. \subsubsection{Improved Delaunay triangulations with large offsets} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:improved-delaunay-triangulations-with-large-offsets}} Delaunay triangulations now deal with large x,y offsets in a better way. This can cause minor changes to any triangulations calculated using Matplotlib, i.e. any use of {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} that requests that a Delaunay triangulation is calculated, which includes {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.tricontour}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.tricontourf}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.tripcolor}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib.pyplot.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.triplot}}}}}, \sphinxcode{\sphinxupquote{matplotlib.mlab.griddata}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.axes3d.Axes3D.plot\_trisurf}}}}}. \subsubsection{Use \sphinxstyleliteralintitle{\sphinxupquote{backports.functools\_lru\_cache}} instead of \sphinxstyleliteralintitle{\sphinxupquote{functools32}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:use-backports-functools-lru-cache-instead-of-functools32}} It's better maintained and more widely used (by pylint, jaraco, etc). \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{cbook.is\_numlike}} only performs an instance check} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:cbook-is-numlike-only-performs-an-instance-check}} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.is_numlike}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_numlike()}}}}} now only checks that its argument is an instance of \sphinxcode{\sphinxupquote{(numbers.Number, np.Number)}}. In particular, this means that arrays are now not num-like. \subsubsection{Elliptical arcs now drawn between correct angles} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:elliptical-arcs-now-drawn-between-correct-angles}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib.patches.Arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Arc}}}}} patch is now correctly drawn between the given angles. Previously a circular arc was drawn and then stretched into an ellipse, so the resulting arc did not lie between \sphinxstyleemphasis{theta1} and \sphinxstyleemphasis{theta2}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{-d\$backend}} no longer sets the backend} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:d-backend-no-longer-sets-the-backend}} It is no longer possible to set the backend by passing \sphinxcode{\sphinxupquote{-d\$backend}} at the command line. Use the \sphinxcode{\sphinxupquote{MPLBACKEND}} environment variable instead. \subsubsection{Path.intersects\_bbox always treats the bounding box as filled} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:path-intersects-bbox-always-treats-the-bounding-box-as-filled}} Previously, when \sphinxcode{\sphinxupquote{Path.intersects\_bbox}} was called with \sphinxcode{\sphinxupquote{filled}} set to \sphinxcode{\sphinxupquote{False}}, it would treat both the path and the bounding box as unfilled. This behavior was not well documented and it is usually not the desired behavior, since bounding boxes are used to represent more complex shapes located inside the bounding box. This behavior has now been changed: when \sphinxcode{\sphinxupquote{filled}} is \sphinxcode{\sphinxupquote{False}}, the path will be treated as unfilled, but the bounding box is still treated as filled. The old behavior was arguably an implementation bug. When \sphinxcode{\sphinxupquote{Path.intersects\_bbox}} is called with \sphinxcode{\sphinxupquote{filled}} set to \sphinxcode{\sphinxupquote{True}} (the default value), there is no change in behavior. For those rare cases where \sphinxcode{\sphinxupquote{Path.intersects\_bbox}} was called with \sphinxcode{\sphinxupquote{filled}} set to \sphinxcode{\sphinxupquote{False}} and where the old behavior is actually desired, the suggested workaround is to call \sphinxcode{\sphinxupquote{Path.intersects\_path}} with a rectangle as the path: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{k}{import} \PYG{n}{Path} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{transforms} \PYG{k}{import} \PYG{n}{Bbox}\PYG{p}{,} \PYG{n}{BboxTransformTo} \PYG{n}{rect} \PYG{o}{=} \PYG{n}{Path}\PYG{o}{.}\PYG{n}{unit\PYGZus{}rectangle}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{transformed}\PYG{p}{(}\PYG{n}{BboxTransformTo}\PYG{p}{(}\PYG{n}{bbox}\PYG{p}{)}\PYG{p}{)} \PYG{n}{result} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{intersects\PYGZus{}path}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{filled}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{WX no longer calls generates \sphinxstyleliteralintitle{\sphinxupquote{IdleEvent}} events or calls \sphinxstyleliteralintitle{\sphinxupquote{idle\_event}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:wx-no-longer-calls-generates-idleevent-events-or-calls-idle-event}} Removed unused private method \sphinxcode{\sphinxupquote{\_onIdle}} from \sphinxcode{\sphinxupquote{FigureCanvasWx}}. The \sphinxcode{\sphinxupquote{IdleEvent}} class and \sphinxcode{\sphinxupquote{FigureCanvasBase.idle\_event}} method will be removed in 2.2 \subsubsection{Correct scaling of \sphinxstyleliteralintitle{\sphinxupquote{magnitude\_spectrum()}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:correct-scaling-of-magnitude-spectrum}} The functions {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab.magnitude\_spectrum()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.magnitude\_spectrum()}}}}} implicitly assumed the sum of windowing function values to be one. In Matplotlib and Numpy the standard windowing functions are scaled to have maximum value of one, which usually results in a sum of the order of n/2 for a n-point signal. Thus the amplitude scaling \sphinxcode{\sphinxupquote{magnitude\_spectrum()}} was off by that amount when using standard windowing functions (\sphinxhref{https://github.com/matplotlib/matplotlib/issues/8417}{Bug 8417} ). Now the behavior is consistent with {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.psd()}}}}} and \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.welch.html\#scipy.signal.welch}{\sphinxcode{\sphinxupquote{scipy.signal.welch()}}}. The following example demonstrates the new and old scaling: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{tau}\PYG{p}{,} \PYG{n}{n} \PYG{o}{=} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{1024} \PYG{c+c1}{\PYGZsh{} 10 second signal with 1024 points} \PYG{n}{T} \PYG{o}{=} \PYG{n}{tau}\PYG{o}{/}\PYG{n}{n} \PYG{c+c1}{\PYGZsh{} sampling interval} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)}\PYG{o}{*}\PYG{n}{T} \PYG{n}{a} \PYG{o}{=} \PYG{l+m+mi}{4} \PYG{c+c1}{\PYGZsh{} amplitude} \PYG{n}{x} \PYG{o}{=} \PYG{n}{a}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{40}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 20 Hz sine with amplitude a} \PYG{c+c1}{\PYGZsh{} New correct behavior: Amplitude at 20 Hz is a/2} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{magnitude\PYGZus{}spectrum}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{Fs}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{o}{/}\PYG{n}{T}\PYG{p}{,} \PYG{n}{sides}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{onesided}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{scale}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linear}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Original behavior: Amplitude at 20 Hz is (a/2)*(n/2) for a Hanning window} \PYG{n}{w} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{hanning}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} default window is a Hanning window} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{magnitude\PYGZus{}spectrum}\PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sum}\PYG{p}{(}\PYG{n}{w}\PYG{p}{)}\PYG{p}{,} \PYG{n}{Fs}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{o}{/}\PYG{n}{T}\PYG{p}{,} \PYG{n}{sides}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{onesided}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{scale}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linear}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Change to signatures of \sphinxstyleliteralintitle{\sphinxupquote{bar()}} \& \sphinxstyleliteralintitle{\sphinxupquote{barh()}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:change-to-signatures-of-bar-barh}} For 2.0 the {\hyperref[\detokenize{users/dflt_style_changes:barbarh-align}]{\sphinxcrossref{\DUrole{std,std-ref}{default value of *align*}}}} changed to \sphinxcode{\sphinxupquote{'center'}}. However this caused the signature of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh()}}}}} to be misleading as the first parameters were still \sphinxstyleemphasis{left} and \sphinxstyleemphasis{bottom} respectively: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bar}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{align}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{barh}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{align}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} despite behaving as the center in both cases. The methods now take \sphinxcode{\sphinxupquote{*args, **kwargs}} as input and are documented to have the primary signatures of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bar}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{align}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{barh}\PYG{p}{(}\PYG{n}{y}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{align}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Passing \sphinxstyleemphasis{left} and \sphinxstyleemphasis{bottom} as keyword arguments to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh()}}}}} respectively will warn. Support will be removed in Matplotlib 3.0. \subsubsection{Font cache as json} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:font-cache-as-json}} The font cache is now saved as json, rather than a pickle. \subsubsection{Invalid (Non-finite) Axis Limit Error} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:invalid-non-finite-axis-limit-error}} When using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}}, passing non-finite values now results in a \sphinxcode{\sphinxupquote{ValueError}}. The previous behavior resulted in the limits being erroneously reset to \sphinxcode{\sphinxupquote{(-0.001, 0.001)}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{scatter}} and \sphinxstyleliteralintitle{\sphinxupquote{Collection}} offsets are no longer implicitly flattened} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:scatter-and-collection-offsets-are-no-longer-implicitly-flattened}} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} (and thus both 2D {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} and 3D {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}) no longer implicitly flattens its offsets. As a consequence, \sphinxcode{\sphinxupquote{scatter}}'s \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} arguments can no longer be 2+-dimensional arrays. \subsubsection{Deprecations} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:deprecations}} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{GraphicsContextBase}}'s \sphinxstyleliteralintitle{\sphinxupquote{linestyle}} property.} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:graphicscontextbase-s-linestyle-property}} The \sphinxcode{\sphinxupquote{GraphicsContextBase.get\_linestyle}} and \sphinxcode{\sphinxupquote{GraphicsContextBase.set\_linestyle}} methods, which had no effect, have been deprecated. All of the backends Matplotlib ships use \sphinxcode{\sphinxupquote{GraphicsContextBase.get\_dashes}} and \sphinxcode{\sphinxupquote{GraphicsContextBase.set\_dashes}} which are more general. Third-party backends should also migrate to the \sphinxcode{\sphinxupquote{*\_dashes}} methods. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{NavigationToolbar2.dynamic\_update}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:navigationtoolbar2-dynamic-update}} Use \sphinxcode{\sphinxupquote{draw\_idle()}} method on the \sphinxcode{\sphinxupquote{Canvas}} instance instead. \paragraph{Testing} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:testing}} \sphinxcode{\sphinxupquote{matplotlib.testing.noseclasses}} is deprecated and will be removed in 2.3 \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{EngFormatter}} \sphinxstyleemphasis{num} arg as string} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:engformatter-num-arg-as-string}} Passing a string as \sphinxstyleemphasis{num} argument when calling an instance of {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.EngFormatter}}}}} is deprecated and will be removed in 2.3. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid}} module} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:mpl-toolkits-axes-grid-module}} All functionally from \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid}} can be found in either \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1}} or \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist}}. Axes classes from \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid}} based on \sphinxcode{\sphinxupquote{Axis}} from \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist}} can be found in \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes}} collision in \sphinxstyleliteralintitle{\sphinxupquote{Figure.add\_axes}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:axes-collision-in-figure-add-axes}} Adding an axes instance to a figure by using the same arguments as for a previous axes instance currently reuses the earlier instance. This behavior has been deprecated in Matplotlib 2.1. In a future version, a \sphinxstyleemphasis{new} instance will always be created and returned. Meanwhile, in such a situation, a deprecation warning is raised by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesStack}}}}}. This warning can be suppressed, and the future behavior ensured, by passing a \sphinxstyleemphasis{unique} label to each axes instance. See the docstring of {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes()}}}}} for more information. Additional details on the rationale behind this deprecation can be found in \sphinxhref{https://github.com/matplotlib/matplotlib/issues/7377/}{\#7377} and \sphinxhref{https://github.com/matplotlib/matplotlib/issues/9024/}{\#9024}. \paragraph{Former validators for \sphinxstyleliteralintitle{\sphinxupquote{contour.negative\_linestyle}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:former-validators-for-contour-negative-linestyle}} The former public validation functions \sphinxcode{\sphinxupquote{validate\_negative\_linestyle}} and \sphinxcode{\sphinxupquote{validate\_negative\_linestyle\_legacy}} will be deprecated in 2.1 and may be removed in 2.3. There are no public functions to replace them. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{cbook}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:cbook}} Many unused or near-unused {\hyperref[\detokenize{api/cbook_api:module-matplotlib.cbook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook}}}}} functions and classes have been deprecated: \sphinxcode{\sphinxupquote{converter}}, \sphinxcode{\sphinxupquote{tostr}}, \sphinxcode{\sphinxupquote{todatetime}}, \sphinxcode{\sphinxupquote{todate}}, \sphinxcode{\sphinxupquote{tofloat}}, \sphinxcode{\sphinxupquote{toint}}, \sphinxcode{\sphinxupquote{unique}}, \sphinxcode{\sphinxupquote{is\_string\_like}}, \sphinxcode{\sphinxupquote{is\_sequence\_of\_strings}}, \sphinxcode{\sphinxupquote{is\_scalar}}, \sphinxcode{\sphinxupquote{Sorter}}, \sphinxcode{\sphinxupquote{Xlator}}, \sphinxcode{\sphinxupquote{soundex}}, \sphinxcode{\sphinxupquote{Null}}, \sphinxcode{\sphinxupquote{dict\_delall}}, \sphinxcode{\sphinxupquote{RingBuffer}}, \sphinxcode{\sphinxupquote{get\_split\_ind}}, \sphinxcode{\sphinxupquote{wrap}}, \sphinxcode{\sphinxupquote{get\_recursive\_filelist}}, \sphinxcode{\sphinxupquote{pieces}}, \sphinxcode{\sphinxupquote{exception\_to\_str}}, \sphinxcode{\sphinxupquote{allequal}}, \sphinxcode{\sphinxupquote{alltrue}}, \sphinxcode{\sphinxupquote{onetrue}}, \sphinxcode{\sphinxupquote{allpairs}}, \sphinxcode{\sphinxupquote{finddir}}, \sphinxcode{\sphinxupquote{reverse\_dict}}, \sphinxcode{\sphinxupquote{restrict\_dict}}, \sphinxcode{\sphinxupquote{issubclass\_safe}}, \sphinxcode{\sphinxupquote{recursive\_remove}}, \sphinxcode{\sphinxupquote{unmasked\_index\_ranges}}. \subsubsection{Code Removal} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:code-removal}} \paragraph{qt4\_compat.py} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:qt4-compat-py}} Moved to \sphinxcode{\sphinxupquote{qt\_compat.py}}. Renamed because it now handles Qt5 as well. \paragraph{Previously Deprecated methods} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:previously-deprecated-methods}} The \sphinxcode{\sphinxupquote{GraphicsContextBase.set\_graylevel}}, \sphinxcode{\sphinxupquote{FigureCanvasBase.onHilite}} and \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes.toggle\_axisline}} methods have been removed. The \sphinxcode{\sphinxupquote{ArtistInspector.findobj}} method, which was never working due to the lack of a \sphinxcode{\sphinxupquote{get\_children}} method, has been removed. The deprecated \sphinxcode{\sphinxupquote{point\_in\_path}}, \sphinxcode{\sphinxupquote{get\_path\_extents}}, \sphinxcode{\sphinxupquote{point\_in\_path\_collection}}, \sphinxcode{\sphinxupquote{path\_intersects\_path}}, \sphinxcode{\sphinxupquote{convert\_path\_to\_polygons}}, \sphinxcode{\sphinxupquote{cleanup\_path}} and \sphinxcode{\sphinxupquote{clip\_path\_to\_rect}} functions in the \sphinxcode{\sphinxupquote{matplotlib.path}} module have been removed. Their functionality remains exposed as methods on the \sphinxcode{\sphinxupquote{Path}} class. The deprecated \sphinxcode{\sphinxupquote{Artist.get\_axes}} and \sphinxcode{\sphinxupquote{Artist.set\_axes}} methods have been removed The \sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.seq\_allequal}} function has been removed. Use \sphinxcode{\sphinxupquote{np.array\_equal}} instead. The deprecated \sphinxcode{\sphinxupquote{matplotlib.rcsetup.validate\_maskedarray}}, \sphinxcode{\sphinxupquote{matplotlib.rcsetup.deprecate\_savefig\_extension}} and \sphinxcode{\sphinxupquote{matplotlib.rcsetup.validate\_tkpythoninspect}} functions, and associated \sphinxcode{\sphinxupquote{savefig.extension}} and \sphinxcode{\sphinxupquote{tk.pythoninspect}} rcparams entries have been removed. The kwarg \sphinxcode{\sphinxupquote{resolution}} of {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar.PolarAxes}}}}} has been removed. It has deprecation with no effect from version \sphinxcode{\sphinxupquote{0.98.x}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes.set\_aspect("normal")}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:axes-set-aspect-normal}} Support for setting an \sphinxcode{\sphinxupquote{Axes}}'s aspect to \sphinxcode{\sphinxupquote{"normal"}} has been removed, in favor of the synonym \sphinxcode{\sphinxupquote{"auto"}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{shading}} kwarg to \sphinxstyleliteralintitle{\sphinxupquote{pcolor}}} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:shading-kwarg-to-pcolor}} The \sphinxcode{\sphinxupquote{shading}} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} has been removed. Set \sphinxcode{\sphinxupquote{edgecolors}} appropriately instead. \paragraph{Functions removed from the \sphinxstyleliteralintitle{\sphinxupquote{lines}} module} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:functions-removed-from-the-lines-module}} The {\hyperref[\detokenize{api/lines_api:module-matplotlib.lines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines}}}}} module no longer imports the \sphinxcode{\sphinxupquote{pts\_to\_prestep}}, \sphinxcode{\sphinxupquote{pts\_to\_midstep}} and \sphinxcode{\sphinxupquote{pts\_to\_poststep}} functions from {\hyperref[\detokenize{api/cbook_api:module-matplotlib.cbook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook}}}}}. \paragraph{PDF backend functions} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:pdf-backend-functions}} The methods \sphinxcode{\sphinxupquote{embedTeXFont}} and \sphinxcode{\sphinxupquote{tex\_font\_mapping}} of \sphinxcode{\sphinxupquote{matplotlib.backqend\_pdf.PdfFile}} have been removed. It is unlikely that external users would have called these methods, which are related to the font system internal to the PDF backend. \paragraph{matplotlib.delaunay} \label{\detokenize{api/prev_api_changes/api_changes_2.1.0:matplotlib-delaunay}} Remove the delaunay triangulation code which is now handled by Qhull via {\hyperref[\detokenize{api/tri_api:module-matplotlib.tri}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri}}}}}. \subsection{API Changes in 2.1.1} \label{\detokenize{api/prev_api_changes/api_changes_2.1.1:api-changes-in-2-1-1}}\label{\detokenize{api/prev_api_changes/api_changes_2.1.1::doc}} \subsubsection{Default behavior of log scales reverted to clip \textless{}= 0 values} \label{\detokenize{api/prev_api_changes/api_changes_2.1.1:default-behavior-of-log-scales-reverted-to-clip-0-values}} The change it 2.1.0 to mask in logscale by default had more disruptive changes than anticipated and has been reverted, however the clipping is now done in a way that fixes the issues that motivated changing the default behavior to \sphinxcode{\sphinxupquote{'mask'}}. As a side effect of this change, error bars which go negative now work as expected on log scales. \subsection{API Changes in 2.1.2} \label{\detokenize{api/prev_api_changes/api_changes_2.1.2:api-changes-in-2-1-2}}\label{\detokenize{api/prev_api_changes/api_changes_2.1.2::doc}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Figure.legend}} no longer checks for repeated lines to ignore} \label{\detokenize{api/prev_api_changes/api_changes_2.1.2:figure-legend-no-longer-checks-for-repeated-lines-to-ignore}} \sphinxcode{\sphinxupquote{matplotlib.Figure.legend}} used to check if a line had the same label as an existing legend entry. If it also had the same line color or marker color legend didn't add a new entry for that line. However, the list of conditions was incomplete, didn't handle RGB tuples, didn't handle linewidths or linestyles etc. This logic did not exist in \sphinxcode{\sphinxupquote{Axes.legend}}. It was included (erroneously) in Matplotlib 2.1.1 when the legend argument parsing was unified {[}\#9324{]}(\sphinxurl{https://github.com/matplotlib/matplotlib/pull/9324}). This change removes that check in \sphinxcode{\sphinxupquote{Axes.legend}} again to restore the old behavior. This logic has also been dropped from {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}, where it was previously undocumented. Repeated lines with the same label will now each have an entry in the legend. If you do not want the duplicate entries, don't add a label to the line, or prepend the label with an underscore. \subsection{API Changes in 2.2.0} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:api-changes-in-2-2-0}}\label{\detokenize{api/prev_api_changes/api_changes_2.2.0::doc}} \subsubsection{New dependency} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:new-dependency}} \sphinxhref{https://github.com/nucleic/kiwi}{kiwisolver} is now a required dependency to support the new constrained\_layout, see {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}} for more details. \subsubsection{Deprecations} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:deprecations}} \paragraph{Classes, functions, and methods} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:classes-functions-and-methods}} The unused and untested \sphinxcode{\sphinxupquote{Artist.onRemove}} and \sphinxcode{\sphinxupquote{Artist.hitlist}} methods have been deprecated. The now unused \sphinxcode{\sphinxupquote{mlab.less\_simple\_linear\_interpolation}} function is deprecated. The unused \sphinxcode{\sphinxupquote{ContourLabeler.get\_real\_label\_width}} method is deprecated. The unused \sphinxcode{\sphinxupquote{FigureManagerBase.show\_popup}} method is deprecated. This introduced in e945059b327d42a99938b939a1be867fa023e7ba in 2005 but never built out into any of the backends. \sphinxcode{\sphinxupquote{backend\_tkagg.AxisMenu}} is deprecated, as it has become unused since the removal of "classic" toolbars. \paragraph{Changed function signatures} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:changed-function-signatures}} kwarg \sphinxcode{\sphinxupquote{fig}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.get_subplot_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec.get\_subplot\_params}}}}} is deprecated, use \sphinxcode{\sphinxupquote{figure}} instead. Using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}} with an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} as argument is deprecated. This sets the current axes, i.e. it has the same effect as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.sca}}}}}. For clarity \sphinxcode{\sphinxupquote{plt.sca(ax)}} should be preferred over \sphinxcode{\sphinxupquote{plt.axes(ax)}}. Using strings instead of booleans to control grid and tick visibility is deprecated. Using \sphinxcode{\sphinxupquote{"on"}}, \sphinxcode{\sphinxupquote{"off"}}, \sphinxcode{\sphinxupquote{"true"}}, or \sphinxcode{\sphinxupquote{"false"}} to control grid and tick visibility has been deprecated. Instead, use normal booleans (\sphinxcode{\sphinxupquote{True}}/\sphinxcode{\sphinxupquote{False}}) or boolean-likes. In the future, all non-empty strings may be interpreted as \sphinxcode{\sphinxupquote{True}}. When given 2D inputs with non-matching numbers of columns, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} currently cycles through the columns of the narrower input, until all the columns of the wider input have been plotted. This behavior is deprecated; in the future, only broadcasting (1 column to \sphinxstyleemphasis{n} columns) will be performed. \paragraph{rcparams} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:rcparams}} The \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"backend.qt4"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"backend.qt5"{]}}}} rcParams were deprecated in version 2.2. In order to force the use of a specific Qt binding, either import that binding first, or set the \sphinxcode{\sphinxupquote{QT\_API}} environment variable. Deprecation of the \sphinxcode{\sphinxupquote{nbagg.transparent}} rcParam. To control transparency of figure patches in the nbagg (or any other) backend, directly set \sphinxcode{\sphinxupquote{figure.patch.facecolor}}, or the \sphinxcode{\sphinxupquote{figure.facecolor}} rcParam. \paragraph{Deprecated \sphinxstyleliteralintitle{\sphinxupquote{Axis.unit\_data}}} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:deprecated-axis-unit-data}} Use \sphinxcode{\sphinxupquote{Axis.units}} (which has long existed) instead. \subsubsection{Removals} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:removals}} \paragraph{Function Signatures} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:function-signatures}} Contouring no longer supports \sphinxcode{\sphinxupquote{legacy}} corner masking. The deprecated \sphinxcode{\sphinxupquote{ContourSet.vmin}} and \sphinxcode{\sphinxupquote{ContourSet.vmax}} properties have been removed. Passing \sphinxcode{\sphinxupquote{None}} instead of \sphinxcode{\sphinxupquote{"none"}} as format to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} is no longer supported. The \sphinxcode{\sphinxupquote{bgcolor}} keyword argument to \sphinxcode{\sphinxupquote{Axes}} has been removed. \paragraph{Modules, methods, and functions} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:modules-methods-and-functions}} The \sphinxcode{\sphinxupquote{matplotlib.finance}}, \sphinxcode{\sphinxupquote{mpl\_toolkits.exceltools}} and \sphinxcode{\sphinxupquote{mpl\_toolkits.gtktools}} modules have been removed. \sphinxcode{\sphinxupquote{matplotlib.finance}} remains available at \sphinxurl{https://github.com/matplotlib/mpl\_finance}. The \sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.iscolor}} function has been removed. The \sphinxcode{\sphinxupquote{Axes.get\_axis\_bgcolor}}, \sphinxcode{\sphinxupquote{Axes.set\_axis\_bgcolor}}, \sphinxcode{\sphinxupquote{Bbox.update\_from\_data}}, \sphinxcode{\sphinxupquote{Bbox.update\_datalim\_numerix}}, \sphinxcode{\sphinxupquote{MaxNLocator.bin\_boundaries}} methods have been removed. \sphinxcode{\sphinxupquote{mencoder}} can no longer be used to encode animations. The unused \sphinxcode{\sphinxupquote{FONT\_SCALE}} and \sphinxcode{\sphinxupquote{fontd}} attributes of the \sphinxcode{\sphinxupquote{RendererSVG}} class have been removed. \paragraph{color maps} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:color-maps}} The \sphinxcode{\sphinxupquote{spectral}} colormap has been removed. The \sphinxcode{\sphinxupquote{Vega*}} colormaps, which were aliases for the \sphinxcode{\sphinxupquote{tab*}} colormaps, have been removed. \paragraph{rcparams} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:id1}} The following deprecated rcParams have been removed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{axes.color\_cycle}} (see \sphinxcode{\sphinxupquote{axes.prop\_cycle}}), \item {} \sphinxcode{\sphinxupquote{legend.isaxes}}, \item {} \sphinxcode{\sphinxupquote{svg.embed\_char\_paths}} (see \sphinxcode{\sphinxupquote{svg.fonttype}}), \item {} \sphinxcode{\sphinxupquote{text.fontstyle}}, \sphinxcode{\sphinxupquote{text.fontangle}}, \sphinxcode{\sphinxupquote{text.fontvariant}}, \sphinxcode{\sphinxupquote{text.fontweight}}, \sphinxcode{\sphinxupquote{text.fontsize}} (renamed to \sphinxcode{\sphinxupquote{text.style}}, etc.), \item {} \sphinxcode{\sphinxupquote{tick.size}} (renamed to \sphinxcode{\sphinxupquote{tick.major.size}}). \end{itemize} \subsubsection{Only accept string-like for Categorical input} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:only-accept-string-like-for-categorical-input}} Do not accept mixed string / float / int input, only strings are valid categoricals. \subsubsection{Removal of unused imports} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:removal-of-unused-imports}} Many unused imports were removed from the codebase. As a result, trying to import certain classes or functions from the "wrong" module (e.g. {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} from {\hyperref[\detokenize{api/backend_agg_api:module-matplotlib.backends.backend_agg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg}}}}} instead of {\hyperref[\detokenize{api/figure_api:module-matplotlib.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure}}}}}) will now raise an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ImportError}{\sphinxcode{\sphinxupquote{ImportError}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes3D.get\_xlim}}, \sphinxstyleliteralintitle{\sphinxupquote{get\_ylim}} and \sphinxstyleliteralintitle{\sphinxupquote{get\_zlim}} now return a tuple} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:axes3d-get-xlim-get-ylim-and-get-zlim-now-return-a-tuple}} They previously returned an array. Returning a tuple is consistent with the behavior for 2D axes. \subsubsection{Exception type changes} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:exception-type-changes}} If \sphinxcode{\sphinxupquote{MovieWriterRegistry}} can't find the requested \sphinxcode{\sphinxupquote{MovieWriter}}, a more helpful \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} message is now raised instead of the previously raised \sphinxhref{https://docs.python.org/3/library/exceptions.html\#KeyError}{\sphinxcode{\sphinxupquote{KeyError}}}. {\hyperref[\detokenize{api/tight_layout_api:matplotlib.tight_layout.auto_adjust_subplotpars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{auto\_adjust\_subplotpars}}}}} now raises \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead of \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} when sizes of input lists don't match \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Figure.set\_figwidth}} and \sphinxstyleliteralintitle{\sphinxupquote{Figure.set\_figheight}} default forward to True} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:figure-set-figwidth-and-figure-set-figheight-default-forward-to-true}} \sphinxcode{\sphinxupquote{matplotlib.Figure.set\_figwidth}} and \sphinxcode{\sphinxupquote{matplotlib.Figure.set\_figheight}} had the kwarg \sphinxcode{\sphinxupquote{forward=False}} by default, but \sphinxcode{\sphinxupquote{Figure.set\_size\_inches}} now defaults to \sphinxcode{\sphinxupquote{forward=True}}. This makes these functions conistent. \subsubsection{Do not truncate svg sizes to nearest point} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:do-not-truncate-svg-sizes-to-nearest-point}} There is no reason to size the SVG out put in integer points, change to out putting floats for the \sphinxstyleemphasis{height}, \sphinxstyleemphasis{width}, and \sphinxstyleemphasis{viewBox} attributes of the \sphinxstyleemphasis{svg} element. \subsubsection{Fontsizes less than 1 pt are clipped to be 1 pt.} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:fontsizes-less-than-1-pt-are-clipped-to-be-1-pt}} FreeType doesn't allow fonts to get smaller than 1 pt, so all Agg backends were silently rounding up to 1 pt. PDF (other vector backends?) were letting us write fonts that were less than 1 pt, but they could not be placed properly because position information comes from FreeType. This change makes it so no backends can use fonts smaller than 1 pt, consistent with FreeType and ensuring more consistent results across backends. \subsubsection{Changes to Qt backend class MRO} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:changes-to-qt-backend-class-mro}} To support both Agg and cairo rendering for Qt backends all of the non-Agg specific code previously in \sphinxcode{\sphinxupquote{backend\_qt5agg.FigureCanvasQTAggBase}} has been moved to \sphinxcode{\sphinxupquote{backend\_qt5.FigureCanvasQT}} so it can be shared with the cairo implementation. The \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase.paintEvent()}}, \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase.blit()}}, and \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase.print\_figure()}} methods have moved to \sphinxcode{\sphinxupquote{FigureCanvasQTAgg.paintEvent()}}, \sphinxcode{\sphinxupquote{FigureCanvasQTAgg.blit()}}, and \sphinxcode{\sphinxupquote{FigureCanvasQTAgg.print\_figure()}}. The first two methods assume that the instance is also a \sphinxcode{\sphinxupquote{QWidget}} so to use \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase}} it was required to multiple inherit from a \sphinxcode{\sphinxupquote{QWidget}} sub-class. Having moved all of its methods either up or down the class hierarchy \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase}} has been deprecated. To do this with out warning and to preserve as much API as possible, \sphinxcode{\sphinxupquote{backend\_qt5.FigureCanvasQTAggBase}} now inherits from \sphinxcode{\sphinxupquote{backend\_qt5.FigureCanvasQTAgg}}. The MRO for \sphinxcode{\sphinxupquote{FigureCanvasQTAgg}} and \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase}} used to be \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAggBase}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}agg}\PYG{o}{.}\PYG{n}{FigureCanvasAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5}\PYG{o}{.}\PYG{n}{FigureCanvasQT}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtWidgets}\PYG{o}{.}\PYG{n}{QWidget}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtCore}\PYG{o}{.}\PYG{n}{QObject}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{wrapper}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtGui}\PYG{o}{.}\PYG{n}{QPaintDevice}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{simplewrapper}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backend\PYGZus{}bases}\PYG{o}{.}\PYG{n}{FigureCanvasBase}\PYG{p}{,} \PYG{n+nb}{object}\PYG{p}{]} \end{sphinxVerbatim} and \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAggBase}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}agg}\PYG{o}{.}\PYG{n}{FigureCanvasAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backend\PYGZus{}bases}\PYG{o}{.}\PYG{n}{FigureCanvasBase}\PYG{p}{,} \PYG{n+nb}{object}\PYG{p}{]} \end{sphinxVerbatim} respectively. They are now \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}agg}\PYG{o}{.}\PYG{n}{FigureCanvasAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5}\PYG{o}{.}\PYG{n}{FigureCanvasQT}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtWidgets}\PYG{o}{.}\PYG{n}{QWidget}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtCore}\PYG{o}{.}\PYG{n}{QObject}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{wrapper}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtGui}\PYG{o}{.}\PYG{n}{QPaintDevice}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{simplewrapper}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backend\PYGZus{}bases}\PYG{o}{.}\PYG{n}{FigureCanvasBase}\PYG{p}{,} \PYG{n+nb}{object}\PYG{p}{]} \end{sphinxVerbatim} and \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAggBase}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5agg}\PYG{o}{.}\PYG{n}{FigureCanvasQTAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}agg}\PYG{o}{.}\PYG{n}{FigureCanvasAgg}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{o}{.}\PYG{n}{backend\PYGZus{}qt5}\PYG{o}{.}\PYG{n}{FigureCanvasQT}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtWidgets}\PYG{o}{.}\PYG{n}{QWidget}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtCore}\PYG{o}{.}\PYG{n}{QObject}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{wrapper}\PYG{p}{,} \PYG{n}{PyQt5}\PYG{o}{.}\PYG{n}{QtGui}\PYG{o}{.}\PYG{n}{QPaintDevice}\PYG{p}{,} \PYG{n}{sip}\PYG{o}{.}\PYG{n}{simplewrapper}\PYG{p}{,} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backend\PYGZus{}bases}\PYG{o}{.}\PYG{n}{FigureCanvasBase}\PYG{p}{,} \PYG{n+nb}{object}\PYG{p}{]} \end{sphinxVerbatim} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.imshow}} clips RGB values to the valid range} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:axes-imshow-clips-rgb-values-to-the-valid-range}} When \sphinxcode{\sphinxupquote{Axes.imshow}} is passed an RGB or RGBA value with out-of-range values, it now logs a warning and clips them to the valid range. The old behaviour, wrapping back in to the range, often hid outliers and made interpreting RGB images unreliable. \subsubsection{GTKAgg and GTKCairo backends deprecated} \label{\detokenize{api/prev_api_changes/api_changes_2.2.0:gtkagg-and-gtkcairo-backends-deprecated}} The GTKAgg and GTKCairo backends have been deprecated. These obsolete backends allow figures to be rendered via the GTK+ 2 toolkit. They are untested, known to be broken, will not work with Python 3, and their use has been discouraged for some time. Instead, use the \sphinxcode{\sphinxupquote{GTK3Agg}} and \sphinxcode{\sphinxupquote{GTK3Cairo}} backends for rendering to GTK+ 3 windows. \subsection{API Changes for 3.0.0} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:api-changes-for-3-0-0}}\label{\detokenize{api/prev_api_changes/api_changes_3.0.0::doc}} \subsubsection{Drop support for python 2} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:drop-support-for-python-2}} Matplotlib 3 only supports python 3.5 and higher. \subsubsection{Changes to backend loading} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:changes-to-backend-loading}} Failure to load backend modules (\sphinxcode{\sphinxupquote{macosx}} on non-framework builds and \sphinxcode{\sphinxupquote{gtk3}} when running headless) now raises \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ImportError}{\sphinxcode{\sphinxupquote{ImportError}}} (instead of \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} and \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}}, respectively). Third-party backends that integrate with an interactive framework are now encouraged to define the \sphinxcode{\sphinxupquote{required\_interactive\_framework}} global value to one of the following values: "qt5", "qt4", "gtk3", "wx", "tk", or "macosx". This information will be used to determine whether it is possible to switch from a backend to another (specifically, whether they use the same interactive framework). \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.hist2d}} now uses \sphinxstyleliteralintitle{\sphinxupquote{pcolormesh}} instead of \sphinxstyleliteralintitle{\sphinxupquote{pcolorfast}}} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:axes-hist2d-now-uses-pcolormesh-instead-of-pcolorfast}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:matplotlib.axes.Axes.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.hist2d}}}}} now uses {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} instead of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast:matplotlib.axes.Axes.pcolorfast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolorfast}}}}}, which will improve the handling of log-axes. Note that the returned \sphinxstyleemphasis{image} now is of type {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}} instead of {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}} now includes all artists} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:matplotlib-axes-axes-get-tightbbox-now-includes-all-artists}} For Matplotlib 3.0, \sphinxstyleemphasis{all} artists are now included in the bounding box returned by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}}. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}} adds a new kwarg \sphinxcode{\sphinxupquote{bbox\_extra\_artists}} to manually specify the list of artists on the axes to include in the tight bounding box calculation. Layout tools like {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout}}}}}, \sphinxcode{\sphinxupquote{constrained\_layout}}, and \sphinxcode{\sphinxupquote{fig.savefig('fname.png', bbox\_inches="tight")}} use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}} to determine the bounds of each axes on a figure and adjust spacing between axes. In Matplotlib 2.2 \sphinxcode{\sphinxupquote{get\_tightbbox}} started to include legends made on the axes, but still excluded some other artists, like text that may overspill an axes. This has been expanded to include \sphinxstyleemphasis{all} artists. This new default may be overridden in either of three ways: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Make the artist to be excluded a child of the figure, not the axes. E.g., call \sphinxcode{\sphinxupquote{fig.legend()}} instead of \sphinxcode{\sphinxupquote{ax.legend()}} (perhaps using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels:matplotlib.axes.Axes.get_legend_handles_labels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_legend\_handles\_labels}}}}} to gather handles and labels from the parent axes). \item {} If the artist is a child of the axes, set the artist property \sphinxcode{\sphinxupquote{artist.set\_in\_layout(False)}}. \item {} Manually specify a list of artists in the new kwarg \sphinxcode{\sphinxupquote{bbox\_extra\_artists}}. \end{enumerate} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Text.set\_text}} with string argument \sphinxstyleliteralintitle{\sphinxupquote{None}} sets string to empty} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:text-set-text-with-string-argument-none-sets-string-to-empty}} \sphinxcode{\sphinxupquote{Text.set\_text}} when passed a string value of \sphinxcode{\sphinxupquote{None}} would set the string to \sphinxcode{\sphinxupquote{"None"}}, so subsequent calls to \sphinxcode{\sphinxupquote{Text.get\_text}} would return the ambiguous \sphinxcode{\sphinxupquote{"None"}} string. This change sets text objects passed \sphinxcode{\sphinxupquote{None}} to have empty strings, so that \sphinxcode{\sphinxupquote{Text.get\_text}} returns an empty string. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes3D.get\_xlim}}, \sphinxstyleliteralintitle{\sphinxupquote{get\_ylim}} and \sphinxstyleliteralintitle{\sphinxupquote{get\_zlim}} now return a tuple} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:axes3d-get-xlim-get-ylim-and-get-zlim-now-return-a-tuple}} They previously returned an array. Returning a tuple is consistent with the behavior for 2D axes. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{font\_manager.list\_fonts}} now follows the platform's casefolding semantics} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:font-manager-list-fonts-now-follows-the-platform-s-casefolding-semantics}} i.e., it behaves case-insensitively on Windows only. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{bar}} / \sphinxstyleliteralintitle{\sphinxupquote{barh}} no longer accepts \sphinxstyleliteralintitle{\sphinxupquote{left}} / \sphinxstyleliteralintitle{\sphinxupquote{bottom}} as first named argument} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:bar-barh-no-longer-accepts-left-bottom-as-first-named-argument}} These arguments were renamed in 2.0 to \sphinxcode{\sphinxupquote{x}} / \sphinxcode{\sphinxupquote{y}} following the change of the default alignment from \sphinxcode{\sphinxupquote{edge}} to \sphinxcode{\sphinxupquote{center}}. \subsubsection{Different exception types for undocumented options} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:different-exception-types-for-undocumented-options}}\begin{itemize} \item {} Passing \sphinxcode{\sphinxupquote{style='comma'}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticklabel\_format()}}}}} was never supported. It now raises \sphinxcode{\sphinxupquote{ValueError}} like all other unsupported styles, rather than \sphinxcode{\sphinxupquote{NotImplementedError}}. \item {} Passing the undocumented \sphinxcode{\sphinxupquote{xmin}} or \sphinxcode{\sphinxupquote{xmax}} arguments to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} would silently override the \sphinxcode{\sphinxupquote{left}} and \sphinxcode{\sphinxupquote{right}} arguments. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} and the 3D equivalents (e.g. \sphinxcode{\sphinxupquote{set\_zlim3d()}}) had a corresponding problem. A \sphinxcode{\sphinxupquote{TypeError}} will be raised if they would override the earlier limit arguments. In 3.0 these were kwargs were deprecated, but in 3.1 the deprecation was undone. \end{itemize} \subsubsection{Improved call signature for \sphinxstyleliteralintitle{\sphinxupquote{Axes.margins}}} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:improved-call-signature-for-axes-margins}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib.axes.Axes.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.margins()}}}}} and \sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.Axes3D.margins()}} no longer accept arbitrary keywords. \sphinxcode{\sphinxupquote{TypeError}} will therefore be raised if unknown kwargs are passed; previously they would be silently ignored. If too many positional arguments are passed, \sphinxcode{\sphinxupquote{TypeError}} will be raised instead of \sphinxcode{\sphinxupquote{ValueError}}, for consistency with other call-signature violations. \sphinxcode{\sphinxupquote{Axes3D.margins}} now raises \sphinxcode{\sphinxupquote{TypeError}} instead of emitting a deprecation warning if only two positional arguments are passed. To supply only \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} margins, use keyword arguments. \subsubsection{Explicit arguments instead of *args, **kwargs} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:explicit-arguments-instead-of-args-kwargs}} \index{Python Enhancement Proposals@\spxentry{Python Enhancement Proposals}!PEP 3102@\spxentry{PEP 3102}}\sphinxhref{https://www.python.org/dev/peps/pep-3102}{\sphinxstylestrong{PEP 3102}} describes keyword-only arguments, which allow Matplotlib to provide explicit call signatures - where we previously used \sphinxcode{\sphinxupquote{*args, **kwargs}} and \sphinxcode{\sphinxupquote{kwargs.pop}}, we can now expose named arguments. In some places, unknown kwargs were previously ignored but now raise \sphinxcode{\sphinxupquote{TypeError}} because \sphinxcode{\sphinxupquote{**kwargs}} has been removed. \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.stem()}}}}} no longer accepts unknown keywords, and raises \sphinxcode{\sphinxupquote{TypeError}} instead of emitting a deprecation. \item {} \sphinxcode{\sphinxupquote{matplotlib.axex.Axes.stem()}} now raises TypeError when passed unhandled positional arguments. If two or more arguments are passed (ie X, Y, {[}linefmt{]}, ...) and Y cannot be cast to an array, an error will be raised instead of treating X as Y and Y as linefmt. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.SubPlotDivider()}} raises \sphinxcode{\sphinxupquote{TypeError}} instead of \sphinxcode{\sphinxupquote{Exception}} when passed unknown kwargs. \end{itemize} \subsubsection{Cleanup decorators and test classes no longer destroy warnings filter on exit} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:cleanup-decorators-and-test-classes-no-longer-destroy-warnings-filter-on-exit}} The decorators and classes in matplotlib.testing.decorators no longer destroy the warnings filter on exit. Instead, they restore the warnings filter that existed before the test started using \sphinxcode{\sphinxupquote{warnings.catch\_warnings}}. \subsubsection{Non-interactive FigureManager classes are now aliases of FigureManagerBase} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:non-interactive-figuremanager-classes-are-now-aliases-of-figuremanagerbase}} The \sphinxcode{\sphinxupquote{FigureManagerPdf}}, \sphinxcode{\sphinxupquote{FigureManagerPS}}, and \sphinxcode{\sphinxupquote{FigureManagerSVG}} classes, which were previously empty subclasses of \sphinxcode{\sphinxupquote{FigureManagerBase}} (i.e., not adding or overriding any attribute or method), are now direct aliases for \sphinxcode{\sphinxupquote{FigureManagerBase}}. \subsubsection{Change to the output of \sphinxstyleliteralintitle{\sphinxupquote{image.thumbnail}}} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:change-to-the-output-of-image-thumbnail}} When called with \sphinxcode{\sphinxupquote{preview=False}}, {\hyperref[\detokenize{api/image_api:matplotlib.image.thumbnail}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image.thumbnail}}}}} previously returned an figure whose canvas class was set according to the output file extension. It now returns a figure whose canvas class is the base \sphinxcode{\sphinxupquote{FigureCanvasBase}} (and relies on \sphinxcode{\sphinxupquote{FigureCanvasBase.print\_figure}}) to handle the canvas switching properly). As a side effect of this change, {\hyperref[\detokenize{api/image_api:matplotlib.image.thumbnail}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image.thumbnail}}}}} now also supports .ps, .eps, and .svgz output. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FuncAnimation}} now draws artists according to their zorder when blitting} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:funcanimation-now-draws-artists-according-to-their-zorder-when-blitting}} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} now draws artists returned by the user- function according to their zorder when using blitting, instead of using the order in which they are being passed. However, note that only zorder of passed artists will be respected, as they are drawn on top of any existing artists (see \sphinxhref{https://github.com/matplotlib/matplotlib/issues/11369}{\#11369}). \subsubsection{Contour color autoscaling improvements} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:contour-color-autoscaling-improvements}} Selection of contour levels is now the same for contour and contourf; previously, for contour, levels outside the data range were deleted. (Exception: if no contour levels are found within the data range, the \sphinxcode{\sphinxupquote{levels}} attribute is replaced with a list holding only the minimum of the data range.) When contour is called with levels specified as a target number rather than a list, and the 'extend' kwarg is used, the levels are now chosen such that some data typically will fall in the extended range. When contour is called with a \sphinxcode{\sphinxupquote{LogNorm}} or a \sphinxcode{\sphinxupquote{LogLocator}}, it will now select colors using the geometric mean rather than the arithmetic mean of the contour levels. \subsubsection{Streamplot last row and column fixed} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:streamplot-last-row-and-column-fixed}} A bug was fixed where the last row and column of data in \sphinxcode{\sphinxupquote{streamplot}} were being dropped. \subsubsection{Changed default \sphinxstyleliteralintitle{\sphinxupquote{AutoDateLocator}} kwarg \sphinxstyleemphasis{interval\_multiples} to \sphinxstyleliteralintitle{\sphinxupquote{True}}} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:changed-default-autodatelocator-kwarg-interval-multiples-to-true}} The default value of the tick locator for dates, {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.AutoDateLocator}}}}} kwarg \sphinxstyleemphasis{interval\_multiples} was set to \sphinxcode{\sphinxupquote{False}} which leads to not-nice looking automatic ticks in many instances. The much nicer \sphinxcode{\sphinxupquote{interval\_multiples=True}} is the new default. See below to get the old behavior back: \begin{quote} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{api_changes_3-0-0-1}.pdf} \end{figure} \end{quote} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.get\_position}} now returns actual position if aspect changed} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:axes-get-position-now-returns-actual-position-if-aspect-changed}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib.axes.Axes.get_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_position}}}}} used to return the original position unless a draw had been triggered or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect:matplotlib.axes.Axes.apply_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.apply\_aspect}}}}} had been called, even if the kwarg \sphinxstyleemphasis{original} was set to \sphinxcode{\sphinxupquote{False}}. Now {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect:matplotlib.axes.Axes.apply_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.apply\_aspect}}}}} is called so \sphinxcode{\sphinxupquote{ax.get\_position()}} will return the new modified position. To get the old behavior use \sphinxcode{\sphinxupquote{ax.get\_position(original=True)}}. \subsubsection{The ticks for colorbar now adjust for the size of the colorbar} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:the-ticks-for-colorbar-now-adjust-for-the-size-of-the-colorbar}} Colorbar ticks now adjust for the size of the colorbar if the colorbar is made from a mappable that is not a contour or doesn't have a BoundaryNorm, or boundaries are not specified. If boundaries, etc are specified, the colorbar maintains the original behavior. \subsubsection{Colorbar for log-scaled hexbin} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:colorbar-for-log-scaled-hexbin}} When using \sphinxcode{\sphinxupquote{hexbin}} and plotting with a logarithmic color scale, the colorbar ticks are now correctly log scaled. Previously the tick values were linear scaled log(number of counts). \subsubsection{PGF backend now explicitly makes black text black} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:pgf-backend-now-explicitly-makes-black-text-black}} Previous behavior with the pgf backend was for text specified as black to actually be the default color of whatever was rendering the pgf file (which was of course usually black). The new behavior is that black text is black, regardless of the default color. However, this means that there is no way to fall back on the default color of the renderer. \subsubsection{Blacklisted rcparams no longer updated by \sphinxstyleliteralintitle{\sphinxupquote{rcdefaults}}, \sphinxstyleliteralintitle{\sphinxupquote{rc\_file\_defaults}}, \sphinxstyleliteralintitle{\sphinxupquote{rc\_file}}} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:blacklisted-rcparams-no-longer-updated-by-rcdefaults-rc-file-defaults-rc-file}} The rc modifier functions \sphinxcode{\sphinxupquote{rcdefaults}}, \sphinxcode{\sphinxupquote{rc\_file\_defaults}} and \sphinxcode{\sphinxupquote{rc\_file}} now ignore rcParams in the \sphinxcode{\sphinxupquote{matplotlib.style.core.STYLE\_BLACKLIST}} set. In particular, this prevents the \sphinxcode{\sphinxupquote{backend}} and \sphinxcode{\sphinxupquote{interactive}} rcParams from being incorrectly modified by these functions. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{CallbackRegistry}} now stores callbacks using stdlib's \sphinxstyleliteralintitle{\sphinxupquote{WeakMethod}}s} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:callbackregistry-now-stores-callbacks-using-stdlib-s-weakmethods}} In particular, this implies that \sphinxcode{\sphinxupquote{CallbackRegistry.callbacks{[}signal{]}}} is now a mapping of callback ids to \sphinxcode{\sphinxupquote{WeakMethod}}s (i.e., they need to be first called with no arguments to retrieve the method itself). \subsubsection{Changes regarding the text.latex.unicode rcParam} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:changes-regarding-the-text-latex-unicode-rcparam}} The rcParam now defaults to True and is deprecated (i.e., in future versions of Matplotlib, unicode input will always be supported). Moreover, the underlying implementation now uses \sphinxcode{\sphinxupquote{\textbackslash{}usepackage{[}utf8{]}\{inputenc\}}} instead of \sphinxcode{\sphinxupquote{\textbackslash{}usepackage\{ucs\}\textbackslash{}usepackage{[}utf8x{]}\{inputenc\}}}. \subsubsection{Return type of ArtistInspector.get\_aliases changed} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:return-type-of-artistinspector-get-aliases-changed}} \sphinxcode{\sphinxupquote{ArtistInspector.get\_aliases}} previously returned the set of aliases as \sphinxcode{\sphinxupquote{\{fullname: \{alias1: None, alias2: None, ...\}\}}}. The dict-to-None mapping was used to simulate a set in earlier versions of Python. It has now been replaced by a set, i.e. \sphinxcode{\sphinxupquote{\{fullname: \{alias1, alias2, ...\}\}}}. This value is also stored in \sphinxcode{\sphinxupquote{ArtistInspector.aliasd}}, which has likewise changed. \subsubsection{Removed \sphinxstyleliteralintitle{\sphinxupquote{pytz}} as a dependency} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:removed-pytz-as-a-dependency}} Since \sphinxcode{\sphinxupquote{dateutil}} and \sphinxcode{\sphinxupquote{pytz}} both provide time zones, and matplotlib already depends on \sphinxcode{\sphinxupquote{dateutil}}, matplotlib will now use \sphinxcode{\sphinxupquote{dateutil}} time zones internally and drop the redundant dependency on \sphinxcode{\sphinxupquote{pytz}}. While \sphinxcode{\sphinxupquote{dateutil}} time zones are preferred (and currently recommended in the Python documentation), the explicit use of \sphinxcode{\sphinxupquote{pytz}} zones is still supported. \subsubsection{Deprecations} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:deprecations}} \paragraph{Modules} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:modules}} The following modules are deprecated: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.compat.subprocess}}. This was a python 2 workaround, but all the functionality can now be found in the python 3 standard library \sphinxhref{https://docs.python.org/3/library/subprocess.html\#module-subprocess}{\sphinxcode{\sphinxupquote{subprocess}}}. \item {} \sphinxcode{\sphinxupquote{matplotlib.backends.wx\_compat}}. Python 3 is only compatible with wxPython 4, so support for wxPython 3 or earlier can be dropped. \end{itemize} \paragraph{Classes, methods, functions, and attributes} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:classes-methods-functions-and-attributes}} The following classes, methods, functions, and attributes are deprecated: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{RcParams.msg\_depr}}, \sphinxcode{\sphinxupquote{RcParams.msg\_depr\_ignore}}, \sphinxcode{\sphinxupquote{RcParams.msg\_depr\_set}}, \sphinxcode{\sphinxupquote{RcParams.msg\_obsolete}}, \sphinxcode{\sphinxupquote{RcParams.msg\_backend\_obsolete}} \item {} \sphinxcode{\sphinxupquote{afm.parse\_afm}} \item {} \sphinxcode{\sphinxupquote{backend\_pdf.PdfFile.texFontMap}} \item {} \sphinxcode{\sphinxupquote{backend\_pgf.get\_texcommand}} \item {} \sphinxcode{\sphinxupquote{backend\_ps.get\_bbox}} \item {} \sphinxcode{\sphinxupquote{backend\_qt5.FigureCanvasQT.keyAutoRepeat}} (directly check \sphinxcode{\sphinxupquote{event.guiEvent.isAutoRepeat()}} in the event handler to decide whether to handle autorepeated key presses). \item {} \sphinxcode{\sphinxupquote{backend\_qt5.error\_msg\_qt}}, \sphinxcode{\sphinxupquote{backend\_qt5.exception\_handler}} \item {} \sphinxcode{\sphinxupquote{backend\_wx.FigureCanvasWx.macros}} \item {} \sphinxcode{\sphinxupquote{backends.pylab\_setup}} \item {} \sphinxcode{\sphinxupquote{cbook.GetRealpathAndStat}}, \sphinxcode{\sphinxupquote{cbook.Locked}} \item {} \sphinxcode{\sphinxupquote{cbook.is\_numlike}} (use \sphinxcode{\sphinxupquote{isinstance(..., numbers.Number)}} instead), \sphinxcode{\sphinxupquote{cbook.listFiles}}, \sphinxcode{\sphinxupquote{cbook.unicode\_safe}} \item {} \sphinxcode{\sphinxupquote{container.Container.set\_remove\_method}}, \item {} \sphinxcode{\sphinxupquote{contour.ContourLabeler.cl}}, \sphinxcode{\sphinxupquote{.cl\_xy}}, and \sphinxcode{\sphinxupquote{.cl\_cvalues}} \item {} \sphinxcode{\sphinxupquote{dates.DateFormatter.strftime\_pre\_1900}}, \sphinxcode{\sphinxupquote{dates.DateFormatter.strftime}} \item {} \sphinxcode{\sphinxupquote{font\_manager.TempCache}} \item {} \sphinxcode{\sphinxupquote{image.\_ImageBase.iterpnames}}, use the \sphinxcode{\sphinxupquote{interpolation\_names}} property instead. (this affects classes that inherit from \sphinxcode{\sphinxupquote{\_ImageBase}} including \sphinxcode{\sphinxupquote{FigureImage}}, \sphinxcode{\sphinxupquote{BboxImage}}, and \sphinxcode{\sphinxupquote{AxesImage}}) \item {} \sphinxcode{\sphinxupquote{mathtext.unichr\_safe}} (use \sphinxcode{\sphinxupquote{chr}} instead) \item {} \sphinxcode{\sphinxupquote{patches.Polygon.xy}} \item {} \sphinxcode{\sphinxupquote{table.Table.get\_child\_artists}} (use \sphinxcode{\sphinxupquote{get\_children}} instead) \item {} \sphinxcode{\sphinxupquote{testing.compare.ImageComparisonTest}}, \sphinxcode{\sphinxupquote{testing.compare.compare\_float}} \item {} \sphinxcode{\sphinxupquote{testing.decorators.CleanupTest}}, \sphinxcode{\sphinxupquote{testing.decorators.skip\_if\_command\_unavailable}} \item {} \sphinxcode{\sphinxupquote{FigureCanvasQT.keyAutoRepeat}} (directly check \sphinxcode{\sphinxupquote{event.guiEvent.isAutoRepeat()}} in the event handler to decide whether to handle autorepeated key presses) \item {} \sphinxcode{\sphinxupquote{FigureCanvasWx.macros}} \item {} \sphinxcode{\sphinxupquote{\_ImageBase.iterpnames}}, use the \sphinxcode{\sphinxupquote{interpolation\_names}} property instead. (this affects classes that inherit from \sphinxcode{\sphinxupquote{\_ImageBase}} including \sphinxcode{\sphinxupquote{FigureImage}}, \sphinxcode{\sphinxupquote{BboxImage}}, and \sphinxcode{\sphinxupquote{AxesImage}}) \item {} \sphinxcode{\sphinxupquote{patches.Polygon.xy}} \item {} \sphinxcode{\sphinxupquote{texmanager.dvipng\_hack\_alpha}} \item {} \sphinxcode{\sphinxupquote{text.Annotation.arrow}} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{Legend.draggable()}}, in favor of {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.set_draggable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend.set\_draggable()}}}}}}] \leavevmode (\sphinxcode{\sphinxupquote{Legend.draggable}} may be reintroduced as a property in future releases) \end{description} \item {} \sphinxcode{\sphinxupquote{textpath.TextToPath.tex\_font\_map}} \item {} \sphinxcode{\sphinxupquote{matplotlib.cbook.deprecation.mplDeprecation}} will be removed in future versions. It is just an alias for \sphinxcode{\sphinxupquote{matplotlib.cbook.deprecation.MatplotlibDeprecationWarning}}. Please use the \sphinxcode{\sphinxupquote{MatplotlibDeprecationWarning}} directly if neccessary. \item {} The \sphinxcode{\sphinxupquote{matplotlib.cbook.Bunch}} class has been deprecated. Instead, use \sphinxhref{https://docs.python.org/3/library/types.html\#types.SimpleNamespace}{\sphinxcode{\sphinxupquote{types.SimpleNamespace}}} from the standard library which provides the same functionality. \item {} \sphinxcode{\sphinxupquote{Axes.mouseover\_set}} is now a frozenset, and deprecated. Directly manipulate the artist's \sphinxcode{\sphinxupquote{.mouseover}} attribute to change their mouseover status. \end{itemize} The following keyword arguments are deprecated: \begin{itemize} \item {} passing \sphinxcode{\sphinxupquote{verts}} to \sphinxcode{\sphinxupquote{Axes.scatter}} (use \sphinxcode{\sphinxupquote{marker}} instead) \item {} passing \sphinxcode{\sphinxupquote{obj\_type}} to \sphinxcode{\sphinxupquote{cbook.deprecated}} \end{itemize} The following call signatures are deprecated: \begin{itemize} \item {} passing a \sphinxcode{\sphinxupquote{wx.EvtHandler}} as first argument to \sphinxcode{\sphinxupquote{backend\_wx.TimerWx}} \end{itemize} \paragraph{rcParams} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:rcparams}} The following rcParams are deprecated: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{examples.directory}} (use \sphinxcode{\sphinxupquote{datapath}} instead) \item {} \sphinxcode{\sphinxupquote{pgf.debug}} (the pgf backend relies on logging) \item {} \sphinxcode{\sphinxupquote{text.latex.unicode}} (always True now) \end{itemize} \paragraph{marker styles} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:marker-styles}}\begin{itemize} \item {} Using \sphinxcode{\sphinxupquote{(n, 3)}} as marker style to specify a circle marker is deprecated. Use \sphinxcode{\sphinxupquote{"o"}} instead. \item {} Using \sphinxcode{\sphinxupquote{({[}(x0, y0), (x1, y1), ...{]}, 0)}} as marker style to specify a custom marker path is deprecated. Use \sphinxcode{\sphinxupquote{{[}(x0, y0), (x1, y1), ...{]}}} instead. \end{itemize} \paragraph{Deprecation of \sphinxstyleliteralintitle{\sphinxupquote{LocatableAxes}} in toolkits} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:deprecation-of-locatableaxes-in-toolkits}} The \sphinxcode{\sphinxupquote{LocatableAxes}} classes in toolkits have been deprecated. The base \sphinxcode{\sphinxupquote{Axes}} classes provide the same functionality to all subclasses, thus these mixins are no longer necessary. Related functions have also been deprecated. Specifically: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.LocatableAxesBase}}: no specific replacement; use any other \sphinxcode{\sphinxupquote{Axes}}-derived class directly instead. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.locatable\_axes\_factory}}: no specific replacement; use any other \sphinxcode{\sphinxupquote{Axes}}-derived class directly instead. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.Axes}}: use {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}}}} directly. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.LocatableAxes}}: use {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}}}} directly. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_divider.Axes}}: use {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} directly. \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_divider.LocatableAxes}}: use {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} directly. \end{itemize} \subsubsection{Removals} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:removals}} \paragraph{Hold machinery} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:hold-machinery}} Setting or unsetting \sphinxcode{\sphinxupquote{hold}} ({\hyperref[\detokenize{api/prev_api_changes/api_changes_2.0.0:v200-deprecate-hold}]{\sphinxcrossref{\DUrole{std,std-ref}{deprecated in version 2.0}}}}) has now been completely removed. Matplotlib now always behaves as if \sphinxcode{\sphinxupquote{hold=True}}. To clear an axes you can manually use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:matplotlib.axes.Axes.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cla()}}}}}, or to clear an entire figure use {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.clf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clf()}}}}}. \paragraph{Removal of deprecated backends} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:removal-of-deprecated-backends}} Deprecated backends have been removed: \begin{itemize} \item {} GTKAgg \item {} GTKCairo \item {} GTK \item {} GDK \end{itemize} \paragraph{Deprecated APIs} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:deprecated-apis}} The following deprecated API elements have been removed: \begin{itemize} \item {} The deprecated methods \sphinxcode{\sphinxupquote{knownfailureif}} and \sphinxcode{\sphinxupquote{remove\_text}} have been removed from {\hyperref[\detokenize{api/testing_api:module-matplotlib.testing.decorators}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators}}}}}. \item {} The entire contents of \sphinxcode{\sphinxupquote{testing.noseclasses}} have also been removed. \item {} \sphinxcode{\sphinxupquote{matplotlib.checkdep\_tex}}, \sphinxcode{\sphinxupquote{matplotlib.checkdep\_xmllint}} \item {} \sphinxcode{\sphinxupquote{backend\_bases.IdleEvent}} \item {} \sphinxcode{\sphinxupquote{cbook.converter}}, \sphinxcode{\sphinxupquote{cbook.tostr}}, \sphinxcode{\sphinxupquote{cbook.todatetime}}, \sphinxcode{\sphinxupquote{cbook.todate}}, \sphinxcode{\sphinxupquote{cbook.tofloat}}, \sphinxcode{\sphinxupquote{cbook.toint}}, \sphinxcode{\sphinxupquote{cbook.unique}}, \sphinxcode{\sphinxupquote{cbook.is\_string\_like}}, \sphinxcode{\sphinxupquote{cbook.is\_sequence\_of\_strings}}, \sphinxcode{\sphinxupquote{cbook.is\_scalar}}, \sphinxcode{\sphinxupquote{cbook.soundex}}, \sphinxcode{\sphinxupquote{cbook.dict\_delall}}, \sphinxcode{\sphinxupquote{cbook.get\_split\_ind}}, \sphinxcode{\sphinxupquote{cbook.wrap}}, \sphinxcode{\sphinxupquote{cbook.get\_recursive\_filelist}}, \sphinxcode{\sphinxupquote{cbook.pieces}}, \sphinxcode{\sphinxupquote{cbook.exception\_to\_str}}, \sphinxcode{\sphinxupquote{cbook.allequal}}, \sphinxcode{\sphinxupquote{cbook.alltrue}}, \sphinxcode{\sphinxupquote{cbook.onetrue}}, \sphinxcode{\sphinxupquote{cbook.allpairs}}, \sphinxcode{\sphinxupquote{cbook.finddir}}, \sphinxcode{\sphinxupquote{cbook.reverse\_dict}}, \sphinxcode{\sphinxupquote{cbook.restrict\_dict}}, \sphinxcode{\sphinxupquote{cbook.issubclass\_safe}}, \sphinxcode{\sphinxupquote{cbook.recursive\_remove}}, \sphinxcode{\sphinxupquote{cbook.unmasked\_index\_ranges}}, \sphinxcode{\sphinxupquote{cbook.Null}}, \sphinxcode{\sphinxupquote{cbook.RingBuffer}}, \sphinxcode{\sphinxupquote{cbook.Sorter}}, \sphinxcode{\sphinxupquote{cbook.Xlator}}, \item {} \sphinxcode{\sphinxupquote{font\_manager.weight\_as\_number}}, \sphinxcode{\sphinxupquote{font\_manager.ttfdict\_to\_fnames}} \item {} \sphinxcode{\sphinxupquote{pyplot.colors}}, \sphinxcode{\sphinxupquote{pyplot.spectral}} \item {} \sphinxcode{\sphinxupquote{rcsetup.validate\_negative\_linestyle}}, \sphinxcode{\sphinxupquote{rcsetup.validate\_negative\_linestyle\_legacy}}, \item {} \sphinxcode{\sphinxupquote{testing.compare.verifiers}}, \sphinxcode{\sphinxupquote{testing.compare.verify}} \item {} \sphinxcode{\sphinxupquote{testing.decorators.knownfailureif}}, \sphinxcode{\sphinxupquote{testing.decorators.ImageComparisonTest.remove\_text}} \item {} \sphinxcode{\sphinxupquote{tests.assert\_str\_equal}}, \sphinxcode{\sphinxupquote{tests.test\_tinypages.file\_same}} \item {} \sphinxcode{\sphinxupquote{texmanager.dvipng\_hack\_alpha}}, \item {} \sphinxcode{\sphinxupquote{\_AxesBase.axesPatch}}, \sphinxcode{\sphinxupquote{\_AxesBase.set\_color\_cycle}}, \sphinxcode{\sphinxupquote{\_AxesBase.get\_cursor\_props}}, \sphinxcode{\sphinxupquote{\_AxesBase.set\_cursor\_props}} \item {} \sphinxcode{\sphinxupquote{\_ImageBase.iterpnames}} \item {} \sphinxcode{\sphinxupquote{FigureCanvasBase.start\_event\_loop\_default}}; \item {} \sphinxcode{\sphinxupquote{FigureCanvasBase.stop\_event\_loop\_default}}; \item {} \sphinxcode{\sphinxupquote{Figure.figurePatch}}, \item {} \sphinxcode{\sphinxupquote{FigureCanvasBase.dynamic\_update}}, \sphinxcode{\sphinxupquote{FigureCanvasBase.idle\_event}}, \sphinxcode{\sphinxupquote{FigureCanvasBase.get\_linestyle}}, \sphinxcode{\sphinxupquote{FigureCanvasBase.set\_linestyle}} \item {} \sphinxcode{\sphinxupquote{FigureCanvasQTAggBase}} \item {} \sphinxcode{\sphinxupquote{FigureCanvasQTAgg.blitbox}} \item {} \sphinxcode{\sphinxupquote{FigureCanvasTk.show}} (alternative: \sphinxcode{\sphinxupquote{FigureCanvasTk.draw}}) \item {} \sphinxcode{\sphinxupquote{FigureManagerTkAgg}} (alternative: \sphinxcode{\sphinxupquote{FigureManagerTk}}) \item {} \sphinxcode{\sphinxupquote{NavigationToolbar2TkAgg}} (alternative: \sphinxcode{\sphinxupquote{NavigationToolbar2Tk}}) \item {} \sphinxcode{\sphinxupquote{backend\_wxagg.Toolbar}} (alternative: \sphinxcode{\sphinxupquote{backend\_wxagg.NavigationToolbar2WxAgg}}) \item {} \sphinxcode{\sphinxupquote{RendererAgg.debug()}} \item {} passing non-numbers to \sphinxcode{\sphinxupquote{EngFormatter.format\_eng}} \item {} passing \sphinxcode{\sphinxupquote{frac}} to \sphinxcode{\sphinxupquote{PolarAxes.set\_theta\_grids}} \item {} any mention of idle events \end{itemize} The following API elements have been removed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{backend\_cairo.HAS\_CAIRO\_CFFI}} \item {} \sphinxcode{\sphinxupquote{sphinxext.sphinx\_version}} \end{itemize} \paragraph{Proprietary sphinx directives} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:proprietary-sphinx-directives}} The matplotlib documentation used the proprietary sphinx directives \sphinxcode{\sphinxupquote{ htmlonly::}}, and \sphinxcode{\sphinxupquote{ latexonly::}}. These have been replaced with the standard sphinx directives \sphinxcode{\sphinxupquote{ only:: html}} and \sphinxcode{\sphinxupquote{ only:: latex}}. This change will not affect any users. Only downstream package maintainers, who have used the proprietary directives in their docs, will have to switch to the sphinx directives. \paragraph{lib/mpl\_examples symlink} \label{\detokenize{api/prev_api_changes/api_changes_3.0.0:lib-mpl-examples-symlink}} The symlink from lib/mpl\_examples to ../examples has been removed. This is not installed as an importable package and should not affect end users, however this may require down-stream packagers to adjust. The content is still available top-level examples directory. \subsection{API Changes for 3.0.1} \label{\detokenize{api/prev_api_changes/api_changes_3.0.1:api-changes-for-3-0-1}}\label{\detokenize{api/prev_api_changes/api_changes_3.0.1::doc}} {\hyperref[\detokenize{api/tight_layout_api:matplotlib.tight_layout.auto_adjust_subplotpars}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout.auto\_adjust\_subplotpars}}}}} can return \sphinxcode{\sphinxupquote{None}} now if the new subplotparams will collapse axes to zero width or height. This prevents \sphinxcode{\sphinxupquote{tight\_layout}} from being executed. Similarly {\hyperref[\detokenize{api/tight_layout_api:matplotlib.tight_layout.get_tight_layout_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout.get\_tight\_layout\_figure}}}}} will return None. To improve import (startup) time, private modules are now imported lazily. These modules are no longer available at these locations: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.\_png}} \item {} \sphinxcode{\sphinxupquote{matplotlib.contour.\_contour}} \item {} \sphinxcode{\sphinxupquote{matplotlib.image.\_png}} \item {} \sphinxcode{\sphinxupquote{matplotlib.mathtext.\_png}} \item {} \sphinxcode{\sphinxupquote{matplotlib.testing.compare.\_png}} \item {} \sphinxcode{\sphinxupquote{matplotlib.texmanager.\_png}} \item {} \sphinxcode{\sphinxupquote{matplotlib.tri.triangulation.\_tri}} \item {} \sphinxcode{\sphinxupquote{matplotlib.tri.triangulation.\_qhull}} \item {} \sphinxcode{\sphinxupquote{matplotlib.tri.tricontour.\_tri}} \item {} \sphinxcode{\sphinxupquote{matplotlib.tri.trifinder.\_tri}} \end{itemize} \subsection{API Changes for 3.1.0} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:api-changes-for-3-1-0}}\label{\detokenize{api/prev_api_changes/api_changes_3.1.0::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id2}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:behavior-changes}]{\sphinxcrossref{Behavior changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id3}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:pgi-support-dropped}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pgi}} support dropped}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id4}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:rcparam-changes}]{\sphinxcrossref{rcParam changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id5}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:exception-changes}]{\sphinxcrossref{Exception changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id6}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:removals}]{\sphinxcrossref{Removals}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id7}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-mlab-removals}]{\sphinxcrossref{{\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} removals}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id8}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-pylab-removals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pylab}} removals}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id9}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:mplot3d-changes}]{\sphinxcrossref{mplot3d changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id10}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:testing}]{\sphinxcrossref{Testing}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id11}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:dependency-changes}]{\sphinxcrossref{Dependency changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id12}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:mathtext-changes}]{\sphinxcrossref{Mathtext changes}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id13}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:signature-deprecations}]{\sphinxcrossref{Signature deprecations}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id14}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:changes-in-parameter-names}]{\sphinxcrossref{Changes in parameter names}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id15}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:class-method-attribute-deprecations}]{\sphinxcrossref{Class/method/attribute deprecations}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id16}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:undeprecations}]{\sphinxcrossref{Undeprecations}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id17}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:new-features}]{\sphinxcrossref{New features}}} \item {} \phantomsection\label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id18}}{\hyperref[\detokenize{api/prev_api_changes/api_changes_3.1.0:invalid-inputs}]{\sphinxcrossref{Invalid inputs}}} \end{itemize} \end{sphinxShadowBox} \subsubsection{Behavior changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:behavior-changes}} \paragraph{Matplotlib.use} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-use}} Switching backends via {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.use}}}}} is now allowed by default, regardless of whether {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} has been imported. If the user tries to switch from an already-started interactive backend to a different interactive backend, an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ImportError}{\sphinxcode{\sphinxupquote{ImportError}}} will be raised. \paragraph{mplot3d auto-registration} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:mplot3d-auto-registration}} {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d}}}}} is always registered by default now. It is no longer necessary to import mplot3d to create 3d axes with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{3d}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{Invalid points in PathCollections} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:invalid-points-in-pathcollections}} PathCollections created with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} now keep track of invalid points. Previously, points with nonfinite (infinite or nan) coordinates would not be included in the offsets (as returned by \sphinxcode{\sphinxupquote{PathCollection.get\_offsets}}) of a \sphinxcode{\sphinxupquote{PathCollection}} created by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}, and points with nonfinite values (as specified by the \sphinxstyleemphasis{c} kwarg) would not be included in the array (as returned by \sphinxcode{\sphinxupquote{PathCollection.get\_array}}) Such points are now included, but masked out by returning a masked array. If the \sphinxstyleemphasis{plotnonfinite} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} is set, then points with nonfinite values are plotted using the bad color of the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{collections.PathCollection}}}}}'s colormap (as set by {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_bad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Colormap.set\_bad()}}}}}). \paragraph{Alpha blending in imshow of RBGA input} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:alpha-blending-in-imshow-of-rbga-input}} The alpha-channel of RBGA images is now re-sampled independently of RGB channels. While this is a bug fix, it does change the output and may result in some down-stream image comparison tests to fail. \paragraph{Autoscaling} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:autoscaling}} On log-axes where a single value is plotted at a "full" decade (1, 10, 100, etc.), the autoscaling now expands the axis symmetrically around that point, instead of adding a decade only to the right. \paragraph{Log-scaled axes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:log-scaled-axes}} When the default \sphinxcode{\sphinxupquote{LogLocator}} would generate no ticks for an axis (e.g., an axis with limits from 0.31 to 0.39) or only a single tick, it now instead falls back on the linear \sphinxcode{\sphinxupquote{AutoLocator}} to pick reasonable tick positions. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Figure.add\_subplot}} with no arguments} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:figure-add-subplot-with-no-arguments}} Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot()}}}}} with no positional arguments used to do nothing; this now is equivalent to calling \sphinxcode{\sphinxupquote{add\_subplot(111)}} instead. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{bxp}} and rcparams} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:bxp-and-rcparams}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} now respects \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"boxplot.boxprops.linewidth"{]}}}} even when \sphinxstyleemphasis{patch\_artist} is set. Previously, when the \sphinxstyleemphasis{patch\_artist} parameter was set, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} would ignore \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"boxplot.boxprops.linewidth"{]}}}}. This was an oversight -- in particular, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} did not ignore it. \paragraph{Major/minor tick collisions} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:major-minor-tick-collisions}} Minor ticks that collide with major ticks are now hidden by default. Previously, certain locator classes ({\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}}, {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoMinorLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoMinorLocator}}}}}) contained custom logic to avoid emitting tick locations that collided with major ticks when they were used as minor locators. This logic has now moved to the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is used regardless of the locator class. You can control this behavior via the \sphinxcode{\sphinxupquote{remove\_overlaping\_locs}} attribute on {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}. If you were relying on both the major and minor tick labels to appear on the same tick, you may need to update your code. For example, the following snippet \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{as} \PYG{n+nn}{mdates} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{2018\PYGZhy{}11\PYGZhy{}03}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{2018\PYGZhy{}11\PYGZhy{}06}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{dtype}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{datetime64}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{t}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{x}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(} \PYG{n}{major\PYGZus{}locator}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DayLocator}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{major\PYGZus{}formatter}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+si}{\PYGZpc{}a}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{minor\PYGZus{}locator}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{HourLocator}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{,} \PYG{l+m+mi}{18}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{minor\PYGZus{}formatter}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{H:}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{M}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{p}{)} \PYG{c+c1}{\PYGZsh{} disable removing overlapping locations} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{remove\PYGZus{}overlapping\PYGZus{}locs} \PYG{o}{=} \PYG{k+kc}{False} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} labeled days using major ticks, and hours and minutes using minor ticks and added a newline to the major ticks labels to avoid them crashing into the minor tick labels. Setting the {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs:matplotlib.axis.Axis.remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_overlapping\_locs}}}}} property (also accessible via {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs:matplotlib.axis.Axis.set_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_remove\_overlapping\_locs}}}}} / {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs:matplotlib.axis.Axis.get_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_remove\_overlapping\_locs}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}}) disables removing overlapping tick locations. The major tick labels could also be adjusted include hours and minutes, as the minor ticks are gone, so the \sphinxcode{\sphinxupquote{major\_formatter}} would be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{H:}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{M}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+si}{\PYGZpc{}a}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{usetex support} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:usetex-support}} Previously, if \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.usetex"{]}}}} was True, then constructing a \sphinxcode{\sphinxupquote{TextPath}} on a non-mathtext string with \sphinxcode{\sphinxupquote{usetex=False}} would rely on the mathtext parser (but not on usetex support!) to parse the string. The mathtext parser is not invoked anymore, which may cause slight changes in glyph positioning. \paragraph{get\_window\_extents} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:get-window-extents}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_window\_extent}}}}} used to return a bounding box that was slightly larger than the axes, presumably to take into account the ticks that may be on a spine. However, it was not scaling the tick sizes according to the dpi of the canvas, and it did not check if the ticks were visible, or on the spine. Now {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_window\_extent}}}}} just returns the axes extent with no padding for ticks. This affects {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}} in cases where there are outward ticks with no tick labels, and it also removes the (small) pad around axes in that case. {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spines.Spine.get\_window\_extent}}}}} now takes into account ticks that are on the spine. \paragraph{Sankey} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:sankey}} Previously, {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.add}}}}} would only accept a single string as the \sphinxstyleemphasis{labels} argument if its length is equal to the number of flows, in which case it would use one character of the string for each flow. The behavior has been changed to match the documented one: when a single string is passed, it is used to label all the flows. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{FontManager}} scores} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:fontmanager-scores}} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}} is now more strict with its inputs. Previously, when a weight string was passed to {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}}, \begin{itemize} \item {} if the weight was the string representation of an integer, it would be converted to that integer, \item {} otherwise, if the weight was not a standard weight name, it would be silently replaced by a value of 500 ("normal" weight). \end{itemize} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}} now raises an exception on such inputs. \paragraph{Text alignment} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:text-alignment}} Text alignment was previously incorrect, in particular for multiline text objects with large descenders (i.e. subscripts) and rotated text. These have been fixed and made more consistent, but could make old code that has compensated for this no longer have the correct alignment. \paragraph{Upper case color strings} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:upper-case-color-strings}} Support for passing single-letter colors (one of "rgbcmykw") as UPPERCASE characters is deprecated; these colors will become case-sensitive (lowercase) after the deprecation period has passed. The goal is to decrease the number of ambiguous cases when using the \sphinxcode{\sphinxupquote{data}} keyword to plotting methods; e.g. \sphinxcode{\sphinxupquote{plot("X", "Y", data=\{"X": ..., "Y": ...\})}} will not warn about "Y" possibly being a color anymore after the deprecation period has passed. \paragraph{Degenerate limits} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:degenerate-limits}} When bounds passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} are degenerate (i.e. the lower and upper value are equal), the method used to "expand" the bounds now matches the expansion behavior of autoscaling when the plot contains a single x-value, and should in particular produce nicer limits for non-linear scales. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{plot}} format string parsing} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:plot-format-string-parsing}} In certain cases, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} would previously accept format strings specifying more than one linestyle (e.g. \sphinxcode{\sphinxupquote{"-{-}-."}} which specifies both \sphinxcode{\sphinxupquote{"-{-}"}} and \sphinxcode{\sphinxupquote{"-."}}); only use one of them would be used. This now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \paragraph{HTMLWriter} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:htmlwriter}} The HTMLWriter constructor is more strict: it no longer normalizes unknown values of \sphinxstyleemphasis{default\_mode} to 'loop', but errors out instead. \paragraph{AFM parsing} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:afm-parsing}} In accordance with the AFM spec, the AFM parser no longer truncates the \sphinxcode{\sphinxupquote{UnderlinePosition}} and \sphinxcode{\sphinxupquote{UnderlineThickness}} fields to integers. The \sphinxcode{\sphinxupquote{Notice}} field (which can only be publicly accessed by the deprecated \sphinxcode{\sphinxupquote{afm.parse\_afm}} API) is no longer decoded to a \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}, but instead kept as \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#bytes}{\sphinxcode{\sphinxupquote{bytes}}}, to support non-conformant AFM files that use non-ASCII characters in that field. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Artist.set}} keyword normalisation} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:artist-set-keyword-normalisation}} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib.artist.Artist.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set}}}}} now normalizes keywords before sorting them. Previously it sorted its keyword arguments in reverse alphabetical order (with a special-case to put \sphinxcode{\sphinxupquote{color}} at the end) before applying them. It now normalizes aliases (and, as above, emits a warning on duplicate properties) before doing the sorting (so \sphinxcode{\sphinxupquote{c}} goes to the end too). \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes.tick\_params}} argument checking} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axes-tick-params-argument-checking}} Previously {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tick\_params}}}}} silently did nothing when an invalid \sphinxstyleemphasis{axis} parameter was supplied. This behavior has been changed to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes.hist}} output} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axes-hist-output}} Input that consists of multiple empty lists will now return a list of histogram values for each one of the lists. For example, an input of \sphinxcode{\sphinxupquote{{[}{[}{]},{[}{]}{]}}} will return 2 lists of histogram values. Previously, a single list was returned. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{backend\_bases.Timer.remove\_callback}} future signature change} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:backend-bases-timer-remove-callback-future-signature-change}} Currently, \sphinxcode{\sphinxupquote{backend\_bases.Timer.remove\_callback(func, *args, **kwargs)}} removes a callback previously added by \sphinxcode{\sphinxupquote{backend\_bases.Timer.add\_callback(func, *args, **kwargs)}}, but if \sphinxcode{\sphinxupquote{*args, **kwargs}} is not passed in (ex, \sphinxcode{\sphinxupquote{Timer.remove\_callback(func)}}), then the first callback with a matching \sphinxcode{\sphinxupquote{func}} is removed, regardless of whether it was added with or without \sphinxcode{\sphinxupquote{*args, **kwargs}}. In a future version, \sphinxcode{\sphinxupquote{Timer.remove\_callback}} will always use the latter behavior (not consider \sphinxcode{\sphinxupquote{*args, **kwargs}}); to specifically consider them, add the callback as a \sphinxhref{https://docs.python.org/3/library/functools.html\#functools.partial}{\sphinxcode{\sphinxupquote{functools.partial}}} object \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cb} \PYG{o}{=} \PYG{n}{timer}\PYG{o}{.}\PYG{n}{add\PYGZus{}callback}\PYG{p}{(}\PYG{n}{functools}\PYG{o}{.}\PYG{n}{partial}\PYG{p}{(}\PYG{n}{func}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ...} \PYG{c+c1}{\PYGZsh{} later} \PYG{n}{timer}\PYG{o}{.}\PYG{n}{remove\PYGZus{}callback}\PYG{p}{(}\PYG{n}{cb}\PYG{p}{)} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{backend\_bases.Timer.add\_callback}} was modified to return \sphinxstyleemphasis{func} to simplify the above usage (previously it returned None); this also allows using it as a decorator. The new API is modelled after \sphinxhref{https://docs.python.org/3/library/atexit.html\#atexit.register}{\sphinxcode{\sphinxupquote{atexit.register}}} / \sphinxhref{https://docs.python.org/3/library/atexit.html\#atexit.unregister}{\sphinxcode{\sphinxupquote{atexit.unregister}}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{StemContainer}} performance increase} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:stemcontainer-performance-increase}} \sphinxcode{\sphinxupquote{StemContainer}} objects can now store a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} object instead of a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects for stem lines plotted using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}}. This gives a very large performance boost to displaying and moving \sphinxcode{\sphinxupquote{stem}} plots. This will become the default behaviour in Matplotlib 3.3. To use it now, the \sphinxstyleemphasis{use\_line\_collection} keyword argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}} can be set to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{stem}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{use\PYGZus{}line\PYGZus{}collection}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} Individual line segments can be extracted from the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} using \sphinxcode{\sphinxupquote{get\_segements()}}. See the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} documentation for other methods to retrieve the collection properties. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{ColorbarBase}} inheritance} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:colorbarbase-inheritance}} {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.ColorbarBase}}}}} is no longer a subclass of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cm.ScalarMappable}}}}}. This inheritance lead to a confusing situation where the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cm.ScalarMappable}}}}} passed to {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.Colorbar}}}}} ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}}) had a \sphinxcode{\sphinxupquote{set\_norm}} method, as did the colorbar. The colorbar is now purely a follower to the \sphinxcode{\sphinxupquote{ScalarMappable}} norm and colormap, and the old inherited methods \sphinxcode{\sphinxupquote{set\_norm}}, \sphinxcode{\sphinxupquote{set\_cmap}}, \sphinxcode{\sphinxupquote{set\_clim}} are deprecated, as are the getter versions of those calls. To set the norm associated with a colorbar do \sphinxcode{\sphinxupquote{colorbar.mappable.set\_norm()}} etc. \paragraph{FreeType and libpng search paths} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:freetype-and-libpng-search-paths}} The \sphinxcode{\sphinxupquote{MPLBASEDIRLIST}} environment variables and \sphinxcode{\sphinxupquote{basedirlist}} entry in \sphinxcode{\sphinxupquote{setup.cfg}} have no effect anymore. Instead, if building in situations where FreeType or libpng are not in the compiler or linker's default path, set the standard environment variables \sphinxcode{\sphinxupquote{CFLAGS}}/\sphinxcode{\sphinxupquote{LDFLAGS}} on Linux or OSX, or \sphinxcode{\sphinxupquote{CL}}/\sphinxcode{\sphinxupquote{LINK}} on Windows, to indicate the relevant paths. See details in \sphinxcode{\sphinxupquote{Installing}}. \paragraph{Setting artist properties twice or more in the same call} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:setting-artist-properties-twice-or-more-in-the-same-call}} Setting the same artist property multiple time via aliases is deprecated. Previously, code such as \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{blue}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} would emit a warning indicating that \sphinxcode{\sphinxupquote{c}} and \sphinxcode{\sphinxupquote{color}} are aliases of one another, and only keep the \sphinxcode{\sphinxupquote{color}} kwarg. This behavior has been deprecated; in a future version, this will raise a TypeError, similar to Python's behavior when a keyword argument is passed twice \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{blue}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} This warning is raised by {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.normalize_kwargs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{normalize\_kwargs}}}}}. \paragraph{Path code types} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:path-code-types}} Path code types like \sphinxcode{\sphinxupquote{Path.MOVETO}} are now \sphinxcode{\sphinxupquote{np.uint8}} instead of \sphinxcode{\sphinxupquote{int}} \sphinxcode{\sphinxupquote{Path.STOP}}, \sphinxcode{\sphinxupquote{Path.MOVETO}}, \sphinxcode{\sphinxupquote{Path.LINETO}}, \sphinxcode{\sphinxupquote{Path.CURVE3}}, \sphinxcode{\sphinxupquote{Path.CURVE4}} and \sphinxcode{\sphinxupquote{Path.CLOSEPOLY}} are now of the type \sphinxcode{\sphinxupquote{Path.code\_type}} (\sphinxcode{\sphinxupquote{np.uint8}} by default) instead of plain \sphinxcode{\sphinxupquote{int}}. This makes their type match the array value type of the \sphinxcode{\sphinxupquote{Path.codes}} array. \paragraph{LaTeX code in matplotlibrc file} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:latex-code-in-matplotlibrc-file}} Previously, the rc file keys \sphinxcode{\sphinxupquote{pgf.preamble}} and \sphinxcode{\sphinxupquote{text.latex.preamble}} were parsed using commmas as separators. This would break valid LaTeX code, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZbs{}\PYG{n}{usepackage}\PYG{p}{[}\PYG{n}{protrusion}\PYG{o}{=}\PYG{n}{true}\PYG{p}{,} \PYG{n}{expansion}\PYG{o}{=}\PYG{n}{false}\PYG{p}{]}\PYG{p}{\PYGZob{}}\PYG{n}{microtype}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The parsing has been modified to pass the complete line to the LaTeX system, keeping all commas. Passing a list of strings from within a Python script still works as it used to. Passing a list containing non-strings now fails, instead of coercing the results to strings. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes.spy}}} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axes-spy}} The method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.spy}}}}} now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} for the keyword arguments \sphinxstyleemphasis{interpolation} and \sphinxstyleemphasis{linestyle} instead of silently ignoring them. Furthermore, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.spy}}}}} spy does now allow for an \sphinxstyleemphasis{extent} argument (was silently ignored so far). A bug with \sphinxcode{\sphinxupquote{Axes.spy(..., origin='lower')}} is fixed. Previously this flipped the data but not the y-axis resulting in a mismatch between axes labels and actual data indices. Now, \sphinxstyleemphasis{origin='lower'} flips both the data and the y-axis labels. \paragraph{Boxplot tick methods} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:boxplot-tick-methods}} The \sphinxstyleemphasis{manage\_xticks} parameter of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} has been renamed (with a deprecation period) to \sphinxstyleemphasis{manage\_ticks}, to take into account the fact that it manages either x or y ticks depending on the \sphinxstyleemphasis{vert} parameter. When \sphinxcode{\sphinxupquote{manage\_ticks=True}} (the default), these methods now attempt to take previously drawn boxplots into account when setting the axis limits, ticks, and tick labels. \paragraph{MouseEvents} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:mouseevents}} MouseEvents now include the event name in their \sphinxcode{\sphinxupquote{str()}}. Previously they contained the prefix "MPL MouseEvent". \paragraph{RGBA buffer return type} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:rgba-buffer-return-type}} {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.buffer_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasAgg.buffer\_rgba}}}}} and {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.buffer_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererAgg.buffer\_rgba}}}}} now return a memoryview The \sphinxcode{\sphinxupquote{buffer\_rgba}} method now allows direct access to the renderer's underlying buffer (as a \sphinxcode{\sphinxupquote{(m, n, 4)}}-shape memoryview) rather than copying the data to a new bytestring. This is consistent with the behavior on Py2, where a buffer object was returned. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.font\_manager.win32InstalledFonts}} return type} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-font-manager-win32installedfonts-return-type}} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.win32InstalledFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.win32InstalledFonts}}}}} returns an empty list instead of None if no fonts are found. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Axes.fmt\_xdata}} and \sphinxstyleliteralintitle{\sphinxupquote{Axes.fmt\_ydata}} error handling} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axes-fmt-xdata-and-axes-fmt-ydata-error-handling}} Previously, if the user provided a \sphinxcode{\sphinxupquote{Axes.fmt\_xdata}} or \sphinxcode{\sphinxupquote{Axes.fmt\_ydata}} function that raised a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} (or set them to a non-callable), the exception would be silently ignored and the default formatter be used instead. This is no longer the case; the exception is now propagated out. \paragraph{Deprecation of redundant \sphinxstyleliteralintitle{\sphinxupquote{Tick}} attributes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:deprecation-of-redundant-tick-attributes}} The \sphinxcode{\sphinxupquote{gridOn}}, \sphinxcode{\sphinxupquote{tick1On}}, \sphinxcode{\sphinxupquote{tick2On}}, \sphinxcode{\sphinxupquote{label1On}}, and \sphinxcode{\sphinxupquote{label2On}} {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}} attributes have been deprecated. Directly get and set the visibility on the underlying artists, available as the \sphinxcode{\sphinxupquote{gridline}}, \sphinxcode{\sphinxupquote{tick1line}}, \sphinxcode{\sphinxupquote{tick2line}}, \sphinxcode{\sphinxupquote{label1}}, and \sphinxcode{\sphinxupquote{label2}} attributes. The \sphinxcode{\sphinxupquote{label}} attribute, which was an alias for \sphinxcode{\sphinxupquote{label1}}, has been deprecated. Subclasses that relied on setting the above visibility attributes needs to be updated; see e.g. \sphinxcode{\sphinxupquote{examples/api/skewt.py}}. \paragraph{Passing a Line2D's drawstyle together with the linestyle is deprecated} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:passing-a-line2d-s-drawstyle-together-with-the-linestyle-is-deprecated}} Instead of \sphinxcode{\sphinxupquote{plt.plot(..., linestyle="steps-{-}")}}, use \sphinxcode{\sphinxupquote{plt.plot(..., linestyle="-{-}", drawstyle="steps")}}. \sphinxcode{\sphinxupquote{ds}} is now an alias for \sphinxcode{\sphinxupquote{drawstyle}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{pgi}} support dropped} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:pgi-support-dropped}} Support for \sphinxcode{\sphinxupquote{pgi}} in the GTK3 backends has been dropped. \sphinxcode{\sphinxupquote{pgi}} is an alternative implementation to \sphinxcode{\sphinxupquote{PyGObject}}. \sphinxcode{\sphinxupquote{PyGObject}} should be used instead. \subsubsection{rcParam changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:rcparam-changes}} \paragraph{Removed} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:removed}} The following deprecated rcParams have been removed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{text.dvipnghack}} \item {} \sphinxcode{\sphinxupquote{nbagg.transparent}} (use \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.facecolor"{]}}}} instead) \item {} \sphinxcode{\sphinxupquote{plugins.directory}} \item {} \sphinxcode{\sphinxupquote{axes.hold}} \item {} \sphinxcode{\sphinxupquote{backend.qt4}} and \sphinxcode{\sphinxupquote{backend.qt5}} (set the \index{QT\_API@\spxentry{QT\_API}}\index{environment variable@\spxentry{environment variable}!QT\_API@\spxentry{QT\_API}}\sphinxcode{\sphinxupquote{QT\_API}} environment variable instead) \end{itemize} \paragraph{Deprecated} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:deprecated}} The associated validator functions \sphinxcode{\sphinxupquote{rcsetup.validate\_qt4}} and \sphinxcode{\sphinxupquote{validate\_qt5}} are deprecated. The \sphinxcode{\sphinxupquote{verbose.fileo}} and \sphinxcode{\sphinxupquote{verbose.level}} rcParams have been deprecated. These have had no effect since the switch from Matplotlib's old custom Verbose logging to the stdlib's \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} module. In addition the \sphinxcode{\sphinxupquote{rcsetup.validate\_verbose}} function is deprecated. The \sphinxcode{\sphinxupquote{text.latex.unicode}} rcParam now defaults to \sphinxcode{\sphinxupquote{True}} and is deprecated (i.e., in future versions of Matplotlib, unicode input will always be supported). Moreover, the underlying implementation now uses \sphinxcode{\sphinxupquote{\textbackslash{}usepackage{[}utf8{]}\{inputenc\}}} instead of \sphinxcode{\sphinxupquote{\textbackslash{}usepackage\{ucs\}\textbackslash{}usepackage{[}utf8x{]}\{inputenc\}}}. \subsubsection{Exception changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:exception-changes}}\begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper:mpl_toolkits.axes_grid1.axes_size.GetExtentHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.GetExtentHelper}}}}} now raises \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} for invalid directions instead of \sphinxhref{https://docs.python.org/3/library/exceptions.html\#KeyError}{\sphinxcode{\sphinxupquote{KeyError}}}. \item {} Previously, subprocess failures in the animation framework would raise either in a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} or a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} depending on when the error occurred. They now raise a \sphinxhref{https://docs.python.org/3/library/subprocess.html\#subprocess.CalledProcessError}{\sphinxcode{\sphinxupquote{subprocess.CalledProcessError}}} with attributes set as documented by the exception class. \item {} In certain cases, Axes methods (and pyplot functions) used to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} if they were called with a \sphinxcode{\sphinxupquote{data}} kwarg and otherwise mismatched arguments. They now raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} instead. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:matplotlib.axes.Axes.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.streamplot}}}}} does not support irregularly gridded \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} values. So far, it used to silently plot an incorrect result. This has been changed to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \item {} The \sphinxcode{\sphinxupquote{streamplot.Grid}} class, which is internally used by streamplot code, also throws a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} when irregularly gridded values are passed in. \end{itemize} \subsubsection{Removals} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:removals}} The following deprecated APIs have been removed: \paragraph{Classes and methods} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:classes-and-methods}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{Verbose}} (replaced by python logging library) \item {} \sphinxcode{\sphinxupquote{artist.Artist.hitlist}} (no replacement) \item {} \sphinxcode{\sphinxupquote{artist.Artist.is\_figure\_set}} (use \sphinxcode{\sphinxupquote{artist.figure is not None}} instead) \item {} \sphinxcode{\sphinxupquote{axis.Axis.unit\_data}} (use \sphinxcode{\sphinxupquote{axis.Axis.units}} instead) \item {} \sphinxcode{\sphinxupquote{backend\_bases.FigureCanvasBase.onRemove}} (no replacement) \sphinxcode{\sphinxupquote{backend\_bases.FigureManagerBase.show\_popup}} (this never did anything) \item {} \sphinxcode{\sphinxupquote{backend\_wx.SubplotToolWx}} (no replacement) \item {} \sphinxcode{\sphinxupquote{backend\_wx.Toolbar}} (use \sphinxcode{\sphinxupquote{backend\_wx.NavigationToolbar2Wx}} instead) \item {} \sphinxcode{\sphinxupquote{cbook.align\_iterators}} (no replacment) \item {} \sphinxcode{\sphinxupquote{contour.ContourLabeler.get\_real\_label\_width}} (no replacement) \item {} \sphinxcode{\sphinxupquote{legend.Legend.draggable}} (use \sphinxcode{\sphinxupquote{legend.Legend.set\_draggable()}} instead) \item {} \sphinxcode{\sphinxupquote{texmanager.TexManager.postscriptd}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.pscnt}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.make\_ps}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.get\_ps\_bbox}} (no replacements) \end{itemize} \paragraph{Arguments} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:arguments}}\begin{itemize} \item {} The \sphinxstyleemphasis{fig} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.get_subplot_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec.get\_subplot\_params}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec.get_subplot_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec.get\_subplot\_params}}}}} (use the argument \sphinxstyleemphasis{figure} instead) \item {} Passing 'box-forced' to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_adjustable}}}}} (use 'box' instead) \item {} Support for the strings 'on'/'true'/'off'/'false' to mean \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} / \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} (directly use \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} / \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} instead). The following functions are affected: \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.grid}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.grid}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib.axis.Axis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_tick\_params}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib.pyplot.box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.box}}}}} \end{itemize} \item {} Using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}} with an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} type argument (use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.sca}}}}} instead) \end{itemize} \paragraph{Other} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:other}} The following miscellaneous API elements have been removed \begin{itemize} \item {} svgfont support (in \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"svg.fonttype"{]}}}}) \item {} Logging is now done with the standard python \sphinxcode{\sphinxupquote{logging}} library. \sphinxcode{\sphinxupquote{matplotlib.verbose}} and the command line switches \sphinxcode{\sphinxupquote{-{-}verbose-LEVEL}} have been removed. To control the logging output use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{logging} \PYG{n}{logger} \PYG{o}{=} \PYG{n}{logging}\PYG{o}{.}\PYG{n}{getLogger}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{logger}\PYG{o}{.}\PYG{n}{set\PYGZus{}level}\PYG{p}{(}\PYG{n}{logging}\PYG{o}{.}\PYG{n}{INFO}\PYG{p}{)} \end{sphinxVerbatim} \item {} \sphinxcode{\sphinxupquote{\_\_version\_\_numpy\_\_}} \item {} \sphinxcode{\sphinxupquote{collections.CIRCLE\_AREA\_FACTOR}} \item {} \sphinxcode{\sphinxupquote{font\_manager.USE\_FONTCONFIG}} \item {} \sphinxcode{\sphinxupquote{font\_manager.cachedir}} \end{itemize} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.mlab}} removals} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-mlab-removals}} Lots of code inside the {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} module which was deprecated in Matplotlib 2.2 has been removed. See below for a list: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mlab.exp\_safe}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html\#numpy.exp}{\sphinxcode{\sphinxupquote{numpy.exp}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.amap}} \item {} \sphinxcode{\sphinxupquote{mlab.logspace}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.logspace.html\#numpy.logspace}{\sphinxcode{\sphinxupquote{numpy.logspace}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rms\_flat}} \item {} \sphinxcode{\sphinxupquote{mlab.l1norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=1)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.l2norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.norm\_flat}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a.flat, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.frange}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html\#numpy.arange}{\sphinxcode{\sphinxupquote{numpy.arange}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.identity}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.identity.html\#numpy.identity}{\sphinxcode{\sphinxupquote{numpy.identity}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.base\_repr}} \item {} \sphinxcode{\sphinxupquote{mlab.binary\_repr}} \item {} \sphinxcode{\sphinxupquote{mlab.ispower2}} \item {} \sphinxcode{\sphinxupquote{mlab.log2}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html\#numpy.log2}{\sphinxcode{\sphinxupquote{numpy.log2}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.isvector}} \item {} \sphinxcode{\sphinxupquote{mlab.movavg}} \item {} \sphinxcode{\sphinxupquote{mlab.safe\_isinf}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.isinf.html\#numpy.isinf}{\sphinxcode{\sphinxupquote{numpy.isinf}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.safe\_isnan}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.isnan.html\#numpy.isnan}{\sphinxcode{\sphinxupquote{numpy.isnan}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.cohere\_pairs}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.coherence.html\#scipy.signal.coherence}{\sphinxcode{\sphinxupquote{scipy.signal.coherence}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.entropy}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.entropy.html\#scipy.stats.entropy}{\sphinxcode{\sphinxupquote{scipy.stats.entropy}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.normpdf}} (use \sphinxcode{\sphinxupquote{scipy.stats.norm.pdf}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.find}} (use \sphinxcode{\sphinxupquote{np.nonzero(np.ravel(condition))}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.longest\_contiguous\_ones}} \item {} \sphinxcode{\sphinxupquote{mlab.longest\_ones}} \item {} \sphinxcode{\sphinxupquote{mlab.PCA}} \item {} \sphinxcode{\sphinxupquote{mlab.prctile}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html\#numpy.percentile}{\sphinxcode{\sphinxupquote{numpy.percentile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.prctile\_rank}} \item {} \sphinxcode{\sphinxupquote{mlab.center\_matrix}} \item {} \sphinxcode{\sphinxupquote{mlab.rk4}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html\#scipy.integrate.ode}{\sphinxcode{\sphinxupquote{scipy.integrate.ode}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.bivariate\_normal}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_xyz\_where}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_sparse\_matrix}} \item {} \sphinxcode{\sphinxupquote{mlab.dist}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hypot.html\#numpy.hypot}{\sphinxcode{\sphinxupquote{numpy.hypot}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.dist\_point\_to\_segment}} \item {} \sphinxcode{\sphinxupquote{mlab.griddata}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html\#scipy.interpolate.griddata}{\sphinxcode{\sphinxupquote{scipy.interpolate.griddata}}}) \item {} \sphinxcode{\sphinxupquote{mlab.less\_simple\_linear\_interpolation}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.interp.html\#numpy.interp}{\sphinxcode{\sphinxupquote{numpy.interp}}}) \item {} \sphinxcode{\sphinxupquote{mlab.slopes}} \item {} \sphinxcode{\sphinxupquote{mlab.stineman\_interp}} \item {} \sphinxcode{\sphinxupquote{mlab.segments\_intersect}} \item {} \sphinxcode{\sphinxupquote{mlab.fftsurr}} \item {} \sphinxcode{\sphinxupquote{mlab.offset\_line}} \item {} \sphinxcode{\sphinxupquote{mlab.quad2cubic}} \item {} \sphinxcode{\sphinxupquote{mlab.vector\_lengths}} \item {} \sphinxcode{\sphinxupquote{mlab.distances\_along\_curve}} \item {} \sphinxcode{\sphinxupquote{mlab.path\_length}} \item {} \sphinxcode{\sphinxupquote{mlab.cross\_from\_above}} \item {} \sphinxcode{\sphinxupquote{mlab.cross\_from\_below}} \item {} \sphinxcode{\sphinxupquote{mlab.contiguous\_regions}} (use {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.contiguous_regions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.contiguous\_regions}}}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.is\_closed\_polygon}} \item {} \sphinxcode{\sphinxupquote{mlab.poly\_between}} \item {} \sphinxcode{\sphinxupquote{mlab.poly\_below}} \item {} \sphinxcode{\sphinxupquote{mlab.inside\_poly}} \item {} \sphinxcode{\sphinxupquote{mlab.csv2rec}} \item {} \sphinxcode{\sphinxupquote{mlab.rec2csv}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rec2text}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rec\_summarize}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_join}} \item {} \sphinxcode{\sphinxupquote{mlab.recs\_join}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_groupby}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_keep\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_drop\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_append\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.csvformat\_factory}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_formatd}} \item {} \sphinxcode{\sphinxupquote{mlab.FormatDatetime}} (use \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime.strftime}{\sphinxcode{\sphinxupquote{datetime.datetime.strftime}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.FormatDate}} (use \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.date.strftime}{\sphinxcode{\sphinxupquote{datetime.date.strftime}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.FormatMillions}}, \sphinxcode{\sphinxupquote{mlab.FormatThousands}}, \sphinxcode{\sphinxupquote{mlab.FormatPercent}}, \sphinxcode{\sphinxupquote{mlab.FormatBool}}, \sphinxcode{\sphinxupquote{mlab.FormatInt}}, \sphinxcode{\sphinxupquote{mlab.FormatFloat}}, \sphinxcode{\sphinxupquote{mlab.FormatFormatStr}}, \sphinxcode{\sphinxupquote{mlab.FormatString}}, \sphinxcode{\sphinxupquote{mlab.FormatObj}} \item {} \sphinxcode{\sphinxupquote{mlab.donothing\_callback}} \end{itemize} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pylab}} removals} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:matplotlib-pylab-removals}} Lots of code inside the {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} module which was deprecated in Matplotlib 2.2 has been removed. This means the following functions are no longer available in the \sphinxcode{\sphinxupquote{matplotlib.pylab}} module: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{amap}} \item {} \sphinxcode{\sphinxupquote{base\_repr}} \item {} \sphinxcode{\sphinxupquote{binary\_repr}} \item {} \sphinxcode{\sphinxupquote{bivariate\_normal}} \item {} \sphinxcode{\sphinxupquote{center\_matrix}} \item {} \sphinxcode{\sphinxupquote{csv2rec}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{dist}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hypot.html\#numpy.hypot}{\sphinxcode{\sphinxupquote{numpy.hypot}}} instead) \item {} \sphinxcode{\sphinxupquote{dist\_point\_to\_segment}} \item {} \sphinxcode{\sphinxupquote{distances\_along\_curve}} \item {} \sphinxcode{\sphinxupquote{entropy}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.entropy.html\#scipy.stats.entropy}{\sphinxcode{\sphinxupquote{scipy.stats.entropy}}} instead) \item {} \sphinxcode{\sphinxupquote{exp\_safe}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html\#numpy.exp}{\sphinxcode{\sphinxupquote{numpy.exp}}} instead) \item {} \sphinxcode{\sphinxupquote{fftsurr}} \item {} \sphinxcode{\sphinxupquote{find}} (use \sphinxcode{\sphinxupquote{np.nonzero(np.ravel(condition))}} instead) \item {} \sphinxcode{\sphinxupquote{frange}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html\#numpy.arange}{\sphinxcode{\sphinxupquote{numpy.arange}}} instead) \item {} \sphinxcode{\sphinxupquote{get\_sparse\_matrix}} \item {} \sphinxcode{\sphinxupquote{get\_xyz\_where}} \item {} \sphinxcode{\sphinxupquote{griddata}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html\#scipy.interpolate.griddata}{\sphinxcode{\sphinxupquote{scipy.interpolate.griddata}}} instead) \item {} \sphinxcode{\sphinxupquote{identity}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.identity.html\#numpy.identity}{\sphinxcode{\sphinxupquote{numpy.identity}}} instead) \item {} \sphinxcode{\sphinxupquote{inside\_poly}} \item {} \sphinxcode{\sphinxupquote{is\_closed\_polygon}} \item {} \sphinxcode{\sphinxupquote{ispower2}} \item {} \sphinxcode{\sphinxupquote{isvector}} \item {} \sphinxcode{\sphinxupquote{l1norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=1)}} instead) \item {} \sphinxcode{\sphinxupquote{l2norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{log2}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html\#numpy.log2}{\sphinxcode{\sphinxupquote{numpy.log2}}} instead) \item {} \sphinxcode{\sphinxupquote{longest\_contiguous\_ones}} \item {} \sphinxcode{\sphinxupquote{longest\_ones}} \item {} \sphinxcode{\sphinxupquote{movavg}} \item {} \sphinxcode{\sphinxupquote{norm\_flat}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a.flat, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{normpdf}} (use \sphinxcode{\sphinxupquote{scipy.stats.norm.pdf}} instead) \item {} \sphinxcode{\sphinxupquote{path\_length}} \item {} \sphinxcode{\sphinxupquote{poly\_below}} \item {} \sphinxcode{\sphinxupquote{poly\_between}} \item {} \sphinxcode{\sphinxupquote{prctile}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html\#numpy.percentile}{\sphinxcode{\sphinxupquote{numpy.percentile}}} instead) \item {} \sphinxcode{\sphinxupquote{prctile\_rank}} \item {} \sphinxcode{\sphinxupquote{rec2csv}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{rec\_append\_fields}} \item {} \sphinxcode{\sphinxupquote{rec\_drop\_fields}} \item {} \sphinxcode{\sphinxupquote{rec\_join}} \item {} \sphinxcode{\sphinxupquote{rk4}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html\#scipy.integrate.ode}{\sphinxcode{\sphinxupquote{scipy.integrate.ode}}} instead) \item {} \sphinxcode{\sphinxupquote{rms\_flat}} \item {} \sphinxcode{\sphinxupquote{segments\_intersect}} \item {} \sphinxcode{\sphinxupquote{slopes}} \item {} \sphinxcode{\sphinxupquote{stineman\_interp}} \item {} \sphinxcode{\sphinxupquote{vector\_lengths}} \end{itemize} \subsubsection{mplot3d changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:mplot3d-changes}} \paragraph{Voxel shading} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:voxel-shading}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.voxels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.voxels}}}}} now shades the resulting voxels; for more details see What's new. The previous behavior can be achieved by passing \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{voxels}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{shade}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{Equal aspect axes disabled} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:equal-aspect-axes-disabled}} Setting the aspect on 3D axes previously returned non-sensical results (e.g. see \sphinxhref{https://github.com/matplotlib/matplotlib/issues/1077/}{\#1077}). Calling \sphinxcode{\sphinxupquote{ax.set\_aspect('equal')}} or \sphinxcode{\sphinxupquote{ax.set\_aspect(num)}} on a 3D axes now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#NotImplementedError}{\sphinxcode{\sphinxupquote{NotImplementedError}}}. \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Poly3DCollection.set\_zsort}}} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:poly3dcollection-set-zsort}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_zsort}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection.set\_zsort}}}}} no longer silently ignores invalid inputs, or \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} (which was always broken). Passing \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} to mean \sphinxcode{\sphinxupquote{"average"}} is deprecated. \subsubsection{Testing} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:testing}} The \sphinxcode{\sphinxupquote{-{-}no-network}} flag to \sphinxcode{\sphinxupquote{tests.py}} has been removed (no test requires internet access anymore). If it is desired to disable internet access both for old and new versions of Matplotlib, use \sphinxcode{\sphinxupquote{tests.py -m 'not network'}} (which is now a no-op). The image comparison test decorators now skip (rather than xfail) the test for uncomparable formats. The affected decorators are {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison}}}}} and {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_figures\_equal}}}}}. The deprecated {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageComparisonTest}}}}} class is likewise changed. \subsubsection{Dependency changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:dependency-changes}} \paragraph{numpy} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:numpy}} Matplotlib 3.1 now requires numpy\textgreater{}=1.11. \paragraph{ghostscript} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:ghostscript}} Support for ghostscript 8.60 (released in 2007) has been removed. The oldest supported version of ghostscript is now 9.0 (released in 2010). \subsubsection{Mathtext changes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:mathtext-changes}}\begin{itemize} \item {} In constructs such as \sphinxcode{\sphinxupquote{"\$1\textasciitilde{}2\$"}}, mathtext now interprets the tilde as a space, consistently with TeX (this was previously a parse error). \end{itemize} \paragraph{Deprecations} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:deprecations}}\begin{itemize} \item {} The \sphinxcode{\sphinxupquote{\textbackslash{}stackrel}} mathtext command hsa been deprecated (it behaved differently from LaTeX's \sphinxcode{\sphinxupquote{\textbackslash{}stackrel}}. To stack two mathtext expressions, use \sphinxcode{\sphinxupquote{\textbackslash{}genfrac\{left-delim\}\{right-delim\}\{fraction-bar-thickness\}\{\}\{top\}\{bottom\}}}. \item {} The \sphinxcode{\sphinxupquote{mathcircled}} mathtext command (which is not a real TeX command) is deprecated. Directly use unicode characters (e.g. \sphinxcode{\sphinxupquote{"\textbackslash{}N\{CIRCLED LATIN CAPITAL LETTER A\}"}} or \sphinxcode{\sphinxupquote{"\textbackslash{}u24b6"}}) instead. \item {} Support for setting \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"mathtext.default"{]}}}} to circled is deprecated. \end{itemize} \subsubsection{Signature deprecations} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:signature-deprecations}} The following signature related behaviours are deprecated: \begin{itemize} \item {} The \sphinxstyleemphasis{withdash} keyword argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.text()}}}}}. Consider using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.annotate()}}}}} instead. \item {} Passing (n, 1)-shaped error arrays to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.errorbar()}}}}}, which was not documented and did not work for \sphinxcode{\sphinxupquote{n = 2}}. Pass a 1D array instead. \item {} The \sphinxstyleemphasis{frameon} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig}}}}} and the \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.frameon"{]}}}} rcParam. To emulate \sphinxcode{\sphinxupquote{frameon = False}}, set \sphinxstyleemphasis{facecolor} to fully transparent (\sphinxcode{\sphinxupquote{"none"}}, or \sphinxcode{\sphinxupquote{(0, 0, 0, 0)}}). \item {} Passing a non-1D (typically, (n, 1)-shaped) input to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:matplotlib.axes.Axes.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pie}}}}}. Pass a 1D array instead. \item {} The {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath}}}}} constructor used to silently drop ignored arguments; this behavior is deprecated. \item {} The \sphinxstyleemphasis{usetex} parameter of {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_text_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextToPath.get\_text\_path}}}}} is deprecated and folded into the \sphinxstyleemphasis{ismath} parameter, which can now take the values \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, and \sphinxcode{\sphinxupquote{"TeX"}}, consistently with other low-level text processing functions. \item {} Passing \sphinxcode{\sphinxupquote{'normal'}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib.axes.Axes.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.axis()}}}}} is deprecated, use \sphinxcode{\sphinxupquote{ax.axis('auto')}} instead. \item {} Passing the \sphinxstyleemphasis{block} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.show}}}}} positionally is deprecated; it should be passed by keyword. \item {} When using the nbagg backend, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.show}}}}} used to silently accept and ignore all combinations of positional and keyword arguments. This behavior is deprecated. \item {} The unused \sphinxstyleemphasis{shape} and \sphinxstyleemphasis{imlim} parameters to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.imshow}}}}} are deprecated. To avoid triggering the deprecation warning, the \sphinxstyleemphasis{filternorm}, \sphinxstyleemphasis{filterrad}, \sphinxstyleemphasis{resample}, and \sphinxstyleemphasis{url} arguments should be passed by keyword. \item {} The \sphinxstyleemphasis{interp\_at\_native} parameter to {\hyperref[\detokenize{api/image_api:matplotlib.image.BboxImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxImage}}}}}, which has had no effect since Matplotlib 2.0, is deprecated. \item {} All arguments to the \sphinxcode{\sphinxupquote{cbook.deprecated}} decorator and \sphinxcode{\sphinxupquote{cbook.warn\_deprecated}} function, except the first one (the version where the deprecation occurred), are now keyword-only. The goal is to avoid accidentally setting the "message" argument when the "name" (or "alternative") argument was intended, as this has repeatedly occurred in the past. \item {} The arguments of \sphinxcode{\sphinxupquote{matplotlib.testing.compare.calculate\_rms}} have been renamed from \sphinxcode{\sphinxupquote{expectedImage, actualImage}}, to \sphinxcode{\sphinxupquote{expected\_image, actual\_image}}. \item {} Passing positional arguments to {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels:matplotlib.axis.Axis.set_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_ticklabels}}}}} beyond \sphinxstyleemphasis{ticklabels} itself has no effect, and support for them is deprecated. \item {} Passing \sphinxcode{\sphinxupquote{shade=None}} to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_surface}}}}} is deprecated. This was an unintended implementation detail with the same semantics as \sphinxcode{\sphinxupquote{shade=False}}. Please use the latter code instead. \item {} {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} and its \sphinxstyleemphasis{set\_params} method will issue a warning on unknown keyword arguments instead of silently ignoring them. Future versions will raise an error. \end{itemize} \subsubsection{Changes in parameter names} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:changes-in-parameter-names}}\begin{itemize} \item {} The \sphinxstyleemphasis{arg} parameter to {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.use}}}}} has been renamed to \sphinxstyleemphasis{backend}. This will only affect cases where that parameter has been set as a keyword argument. The common usage pattern as a positional argument \sphinxcode{\sphinxupquote{matplotlib.use('Qt5Agg')}} is not affected. \item {} The \sphinxstyleemphasis{normed} parameter to \sphinxcode{\sphinxupquote{Axes.hist2d}} has been renamed to \sphinxstyleemphasis{density}. \item {} The \sphinxstyleemphasis{s} parameter to \sphinxcode{\sphinxupquote{Annotation}} (and indirectly \sphinxcode{\sphinxupquote{Axes.annotation}}) has been renamed to \sphinxstyleemphasis{text}. \item {} The \sphinxstyleemphasis{tolerence} parameter to \sphinxcode{\sphinxupquote{bezier.find\_bezier\_t\_intersecting\_with\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.split\_bezier\_intersecting\_with\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.find\_r\_to\_boundary\_of\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.split\_path\_inout}} and \sphinxcode{\sphinxupquote{bezier.check\_if\_parallel}} has been renamed to \sphinxstyleemphasis{tolerance}. \end{itemize} In each case, the old parameter name remains supported (it cannot be used simultaneously with the new name), but support for it will be dropped in Matplotlib 3.3. \subsubsection{Class/method/attribute deprecations} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:class-method-attribute-deprecations}} Support for custom backends that do not provide a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_hatch_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase.set\_hatch\_color}}}}} method is deprecated. We suggest that custom backends let their \sphinxcode{\sphinxupquote{GraphicsContext}} class inherit from {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}, to at least provide stubs for all required methods. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{spine.Spine.is\_frame\_like}} \end{itemize} This has not been used in the codebase since its addition in 2009. \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_tick_positions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis3d.Axis.get\_tick\_positions}}}}} This has never been used internally, there is no equivalent method exists on the 2D Axis classes, and despite the similar name, it has a completely different behavior from the 2D Axis' \sphinxcode{\sphinxupquote{axis.Axis.get\_ticks\_position}} method. \item {} {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManagerFactory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_pgf.LatexManagerFactory}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects:mpl_toolkits.axisartist.axislines.SimpleChainedObjects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.SimpleChainedObjects}}}}} \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.Axes.AxisDict}} \end{itemize} \paragraph{Internal Helper Functions} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:internal-helper-functions}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{checkdep\_dvipng}} \item {} \sphinxcode{\sphinxupquote{checkdep\_ghostscript}} \item {} \sphinxcode{\sphinxupquote{checkdep\_pdftops}} \item {} \sphinxcode{\sphinxupquote{checkdep\_inkscape}} \item {} \sphinxcode{\sphinxupquote{ticker.decade\_up}} \item {} \sphinxcode{\sphinxupquote{ticker.decade\_down}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.dedent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.dedent}}}}} \item {} \sphinxcode{\sphinxupquote{docstring.Appender}} \item {} \sphinxcode{\sphinxupquote{docstring.dedent}} \item {} \sphinxcode{\sphinxupquote{docstring.copy\_dedent}} \end{itemize} Use the standard library's docstring manipulation tools instead, such as \sphinxhref{https://docs.python.org/3/library/inspect.html\#inspect.cleandoc}{\sphinxcode{\sphinxupquote{inspect.cleandoc}}} and \sphinxhref{https://docs.python.org/3/library/inspect.html\#inspect.getdoc}{\sphinxcode{\sphinxupquote{inspect.getdoc}}}. \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.get_scale_docs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.get\_scale\_docs()}}}}} \item {} \sphinxcode{\sphinxupquote{matplotlib.pyplot.get\_scale\_docs()}} \end{itemize} These are considered internal and will be removed from the public API in a future version. \begin{itemize} \item {} {\hyperref[\detokenize{api/projections_api:matplotlib.projections.process_projection_requirements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.process\_projection\_requirements}}}}} \item {} \sphinxcode{\sphinxupquote{backend\_ps.PsBackendHelper{}`}} \item {} \sphinxcode{\sphinxupquote{backend\_ps.ps\_backend\_helper{}`}}, \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.iterable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.iterable}}}}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.get\_label}}}}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.safezip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.safezip}}}}} Manually check the lengths of the inputs instead, or rely on numpy to do it. \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.is_hashable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.is\_hashable}}}}} Use \sphinxcode{\sphinxupquote{isinstance(..., collections.abc.Hashable)}} instead. \item {} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.strip_math}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_bases.RendererBase.strip\_math}}}}}. Use {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.strip_math}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.strip\_math}}}}} instead. \end{itemize} Multiple internal functions that were exposed as part of the public API of {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d}}}}} are deprecated, \sphinxstylestrong{mpl\_toolkits.mplot3d.art3d} \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle:mpl_toolkits.mplot3d.art3d.norm_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.norm\_angle()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle:mpl_toolkits.mplot3d.art3d.norm_text_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.norm\_text\_angle()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment:mpl_toolkits.mplot3d.art3d.path_to_3d_segment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes:mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment\_with\_codes()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments\_with\_codes()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts:mpl_toolkits.mplot3d.art3d.get_patch_verts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.get\_patch\_verts()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors:mpl_toolkits.mplot3d.art3d.get_colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.get\_colors()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha:mpl_toolkits.mplot3d.art3d.zalpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.zalpha()}}}}} \end{itemize} \sphinxstylestrong{mpl\_toolkits.mplot3d.proj3d} \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d:mpl_toolkits.mplot3d.proj3d.line2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist:mpl_toolkits.mplot3d.proj3d.line2d_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d\_dist()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist:mpl_toolkits.mplot3d.proj3d.line2d_seg_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d\_seg\_dist()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod:mpl_toolkits.mplot3d.proj3d.mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.mod()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec:mpl_toolkits.mplot3d.proj3d.proj_transform_vec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec\_clip()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones:mpl_toolkits.mplot3d.proj3d.vec_pad_ones}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.vec\_pad\_ones()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points:mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_trans\_clip\_points()}}}}} \end{itemize} If your project relies on these functions, consider vendoring them. \paragraph{Font Handling} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:font-handling}}\begin{itemize} \item {} {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.afm_font_cache}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_pdf.RendererPdf.afm\_font\_cache}}}}} \item {} {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.afmfontd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_ps.RendererPS.afmfontd}}}}} \item {} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.OSXInstalledFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.OSXInstalledFonts}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.glyph_to_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextToPath.glyph\_to\_path}}}}} (Instead call \sphinxcode{\sphinxupquote{font.get\_path()}} and manually transform the path.) \end{itemize} \paragraph{Date related functions} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:date-related-functions}}\begin{itemize} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.seconds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.seconds()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.minutes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.minutes()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.hours}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.hours()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.weeks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.weeks()}}}}} \item {} \sphinxcode{\sphinxupquote{dates.strpdate2num}} \item {} \sphinxcode{\sphinxupquote{dates.bytespdate2num}} \end{itemize} These are brittle in the presence of locale changes. Use standard datetime parsers such as \sphinxhref{https://docs.python.org/3/library/time.html\#time.strptime}{\sphinxcode{\sphinxupquote{time.strptime}}} or \sphinxhref{https://dateutil.readthedocs.io/en/stable/parser.html\#dateutil.parser.parse}{\sphinxcode{\sphinxupquote{dateutil.parser.parse}}}, and additionally call {\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.date2num}}}}} if you need to convert to Matplotlib's internal datetime representation; or use \sphinxcode{\sphinxupquote{dates.datestr2num}}. \paragraph{Axes3D} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axes3d}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_xaxis}} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_yaxis}} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_zaxis}} \end{itemize} Use \sphinxcode{\sphinxupquote{axes3d.Axes3D.xaxis}}, \sphinxcode{\sphinxupquote{axes3d.Axes3D.and {}`.axes3d.Axes3D.zaxis}} instead. \paragraph{Testing} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:id1}}\begin{itemize} \item {} {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.switch_backend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.switch\_backend}}}}} decorator \end{itemize} Test functions should use \sphinxcode{\sphinxupquote{pytest.mark.backend(...)}}, and the mark will be picked up by the \sphinxcode{\sphinxupquote{matplotlib.testing.conftest.mpl\_test\_settings}} fixture. \paragraph{Quiver} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:quiver}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{.color}} attribute of \sphinxcode{\sphinxupquote{Quiver}} objects \end{itemize} Instead, use (as for any \sphinxcode{\sphinxupquote{Collection}}) the \sphinxcode{\sphinxupquote{get\_facecolor}} method. Note that setting to the \sphinxcode{\sphinxupquote{.color}} attribute did not update the quiver artist, whereas calling \sphinxcode{\sphinxupquote{set\_facecolor}} does. \paragraph{GUI / backend details} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:gui-backend-details}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{get\_py2exe\_datafiles{}`}} \item {} \sphinxcode{\sphinxupquote{tk\_window\_focus{}`}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.FileChooserDialog}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.NavigationToolbar2GTK3.get\_filechooser}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.SaveFigureGTK3.get\_filechooser}} \item {} \sphinxcode{\sphinxupquote{NavigationToolbar2QT.adj\_window}} attribute. This is unused and always \sphinxcode{\sphinxupquote{None}}. \item {} \sphinxcode{\sphinxupquote{backend\_wx.IDLE\_DELAY}} global variable This is unused and only relevant to the now removed wx "idling" code (note that as it is a module-level global, no deprecation warning is emitted when accessing it). \item {} {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.demean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab.demean}}}}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3cairo.FigureCanvasGTK3Cairo}}, \item {} \sphinxcode{\sphinxupquote{backend\_wx.debug\_on\_error}}, \sphinxcode{\sphinxupquote{backend\_wx.fake\_stderr}}, \sphinxcode{\sphinxupquote{backend\_wx.raise\_msg\_to\_str}}, \sphinxcode{\sphinxupquote{backend\_wx.MenuButtonWx}}, \sphinxcode{\sphinxupquote{backend\_wx.PrintoutWx}}, \item {} \sphinxcode{\sphinxupquote{matplotlib.backends.qt\_editor.formlayout}} module \end{itemize} This module is a vendored, modified version of the official \sphinxhref{https://pypi.org/project/formlayout/}{formlayout} module available on PyPI. Install that module separately if you need it. \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS.shouldstroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextPS.shouldstroke}}}}} \end{itemize} \paragraph{Transforms / scales} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:transforms-scales}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{LogTransformBase}} \item {} \sphinxcode{\sphinxupquote{Log10Transform}} \item {} \sphinxcode{\sphinxupquote{Log2Transform}}, \item {} \sphinxcode{\sphinxupquote{NaturalLogTransformLog}} \item {} \sphinxcode{\sphinxupquote{InvertedLogTransformBase}} \item {} \sphinxcode{\sphinxupquote{InvertedLog10Transform}} \item {} \sphinxcode{\sphinxupquote{InvertedLog2Transform}} \item {} \sphinxcode{\sphinxupquote{InvertedNaturalLogTransform}} \end{itemize} These classes defined in \sphinxcode{\sphinxupquote{matplotlib.scales}} are deprecated. As a replacement, use the general \sphinxcode{\sphinxupquote{LogTransform}} and \sphinxcode{\sphinxupquote{InvertedLogTransform}} classes, whose constructors take a \sphinxstyleemphasis{base} argument. \paragraph{Locators / Formatters} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:locators-formatters}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{OldScalarFormatter.pprint\_val}} \item {} \sphinxcode{\sphinxupquote{ScalarFormatter.pprint\_val}} \item {} \sphinxcode{\sphinxupquote{LogFormatter.pprint\_val}} \end{itemize} These are helper methods that do not have a consistent signature across formatter classes. \paragraph{Path tools} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:path-tools}}\begin{itemize} \item {} {\hyperref[\detokenize{api/path_api:matplotlib.path.get_paths_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path.get\_paths\_extents}}}}} \end{itemize} Use {\hyperref[\detokenize{api/path_api:matplotlib.path.get_path_collection_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_path\_collection\_extents}}}}} instead. \begin{itemize} \item {} {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.has_nonfinite}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.has\_nonfinite}}}}} attribute \end{itemize} Use \sphinxcode{\sphinxupquote{not np.isfinite(path.vertices).all()}} instead. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{bezier.find\_r\_to\_boundary\_of\_closedpath}} function is deprecated \end{itemize} This has always returned None instead of the requested radius. \paragraph{Text} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:text}}\begin{itemize} \item {} {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.TextWithDash}}}}} \item {} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.is_math_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.is\_math\_text}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath.is_math_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath.is\_math\_text}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath.text_get_vertices_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath.text\_get\_vertices\_codes}}}}} (As an alternative, construct a new \sphinxcode{\sphinxupquote{TextPath}} object.) \end{itemize} \paragraph{Unused attributes} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:unused-attributes}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{NavigationToolbar2QT.buttons}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.verticalOffset}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D.verticalOffset}}}}} \item {} \sphinxcode{\sphinxupquote{Quiver.keytext}} \item {} \sphinxcode{\sphinxupquote{Quiver.keyvec}} \item {} {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector.buttonDown}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpanSelector.buttonDown}}}}} \end{itemize} These are unused and never updated. \paragraph{Sphinx extensions} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:sphinx-extensions}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.sphinxext.mathmpl.math\_directive}} \item {} \sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.plot\_directive}} \end{itemize} This is because the \sphinxcode{\sphinxupquote{matplotlib.sphinxext.mathmpl}} and \sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive}} interfaces have changed from the (Sphinx-)deprecated function-based interface to a class-based interface; this should not affect end users. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.UnimplementedException}} \end{itemize} \paragraph{Environmental Variables} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:environmental-variables}}\begin{itemize} \item {} The \sphinxcode{\sphinxupquote{MATPLOTLIBDATA}} environment variable \end{itemize} \paragraph{Axis} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:axis}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{Axis.iter\_ticks}} \end{itemize} This only served as a helper to the private \sphinxcode{\sphinxupquote{Axis.\_update\_ticks}} \subsubsection{Undeprecations} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:undeprecations}} The following API elements have bee un-deprecated: \begin{itemize} \item {} The \sphinxstyleemphasis{obj\_type} kwarg to the \sphinxcode{\sphinxupquote{cbook.deprecated}} decorator. \item {} \sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xmax} kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xlim}}}}} and \sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ymax} kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ylim}}}}} \end{itemize} \subsubsection{New features} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:new-features}} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Text}} now has a \sphinxstyleliteralintitle{\sphinxupquote{c}} alias for the \sphinxstyleliteralintitle{\sphinxupquote{color}} property} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:text-now-has-a-c-alias-for-the-color-property}} For consistency with {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} class has gained the \sphinxcode{\sphinxupquote{c}} alias for the \sphinxcode{\sphinxupquote{color}} property. For example, one can now write \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{foo}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{\sphinxstyleliteralintitle{\sphinxupquote{Cn}} colors now support \sphinxstyleliteralintitle{\sphinxupquote{n\textgreater{}=10}}} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:cn-colors-now-support-n-10}} It is now possible to go beyond the tenth color in the property cycle using \sphinxcode{\sphinxupquote{Cn}} syntax, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C11}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} now uses the 12th color in the cycle. Note that previously, a construct such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C11}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} would be interpreted as a request to use color \sphinxcode{\sphinxupquote{C1}} and marker \sphinxcode{\sphinxupquote{1}} (an "inverted Y"). To obtain such a plot, one should now use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{1C1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} (so that the first "1" gets correctly interpreted as a marker specification), or, more explicitly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \paragraph{New \sphinxstyleliteralintitle{\sphinxupquote{Formatter.format\_ticks}} method} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:new-formatter-format-ticks-method}} The {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} class gained a new {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}} method, which takes the list of all tick locations as a single argument and returns the list of all formatted values. It is called by the axis tick handling code and, by default, first calls {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.set_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_locs}}}}} with all locations, then repeatedly calls \sphinxcode{\sphinxupquote{\_\_call\_\_}} for each location. Tick-handling code in the codebase that previously performed this sequence ({\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.set_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_locs}}}}} followed by repeated \sphinxcode{\sphinxupquote{\_\_call\_\_}}) have been updated to use {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}}. {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}} is intended to be overridden by {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} subclasses for which the formatting of a tick value depends on other tick values, such as {\hyperref[\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConciseDateFormatter}}}}}. \paragraph{Added support for RGB(A) images in pcolorfast} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:added-support-for-rgb-a-images-in-pcolorfast}} pcolorfast now accepts 3D images (RGB or RGBA) arrays if the X and Y specifications allow image or pcolorimage rendering; they remain unsupported by the more general quadmesh rendering \subsubsection{Invalid inputs} \label{\detokenize{api/prev_api_changes/api_changes_3.1.0:invalid-inputs}} Passing invalid locations to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.table:matplotlib.axes.Axes.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}} used to fallback on a default location. This behavior is deprecated and will throw an exception in a future version. {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsetbox.AnchoredText}}}}} is unable to handle the \sphinxstyleemphasis{horizontalalignment} or \sphinxstyleemphasis{verticalalignment} kwargs, and used to ignore them with a warning. This behavior is deprecated and will throw an exception in a future version. Passing steps less than 1 or greater than 10 to \sphinxcode{\sphinxupquote{MaxNLocator}} used to result in undefined behavior. It now throws a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}}. The signature of the (private) \sphinxcode{\sphinxupquote{Axis.\_update\_ticks}} has been changed to not take the renderer as argument anymore (that argument is unused). Changes for the latest version are listed below. For new features that were added to Matplotlib, see {\hyperref[\detokenize{users/whats_new:whats-new}]{\sphinxcrossref{\DUrole{std,std-ref}{Whats New}}}}. \section{API Changes for 3.1.0} \label{\detokenize{api/api_changes:api-changes-for-3-1-0}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/api_changes:id2}}{\hyperref[\detokenize{api/api_changes:behavior-changes}]{\sphinxcrossref{Behavior changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id3}}{\hyperref[\detokenize{api/api_changes:pgi-support-dropped}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pgi}} support dropped}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id4}}{\hyperref[\detokenize{api/api_changes:rcparam-changes}]{\sphinxcrossref{rcParam changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id5}}{\hyperref[\detokenize{api/api_changes:exception-changes}]{\sphinxcrossref{Exception changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id6}}{\hyperref[\detokenize{api/api_changes:removals}]{\sphinxcrossref{Removals}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id7}}{\hyperref[\detokenize{api/api_changes:matplotlib-mlab-removals}]{\sphinxcrossref{{\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} removals}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id8}}{\hyperref[\detokenize{api/api_changes:matplotlib-pylab-removals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pylab}} removals}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id9}}{\hyperref[\detokenize{api/api_changes:mplot3d-changes}]{\sphinxcrossref{mplot3d changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id10}}{\hyperref[\detokenize{api/api_changes:testing}]{\sphinxcrossref{Testing}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id11}}{\hyperref[\detokenize{api/api_changes:dependency-changes}]{\sphinxcrossref{Dependency changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id12}}{\hyperref[\detokenize{api/api_changes:mathtext-changes}]{\sphinxcrossref{Mathtext changes}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id13}}{\hyperref[\detokenize{api/api_changes:signature-deprecations}]{\sphinxcrossref{Signature deprecations}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id14}}{\hyperref[\detokenize{api/api_changes:changes-in-parameter-names}]{\sphinxcrossref{Changes in parameter names}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id15}}{\hyperref[\detokenize{api/api_changes:class-method-attribute-deprecations}]{\sphinxcrossref{Class/method/attribute deprecations}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id16}}{\hyperref[\detokenize{api/api_changes:undeprecations}]{\sphinxcrossref{Undeprecations}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id17}}{\hyperref[\detokenize{api/api_changes:new-features}]{\sphinxcrossref{New features}}} \item {} \phantomsection\label{\detokenize{api/api_changes:id18}}{\hyperref[\detokenize{api/api_changes:invalid-inputs}]{\sphinxcrossref{Invalid inputs}}} \end{itemize} \end{sphinxShadowBox} \subsection{Behavior changes} \label{\detokenize{api/api_changes:behavior-changes}} \subsubsection{Matplotlib.use} \label{\detokenize{api/api_changes:matplotlib-use}} Switching backends via {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.use}}}}} is now allowed by default, regardless of whether {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} has been imported. If the user tries to switch from an already-started interactive backend to a different interactive backend, an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ImportError}{\sphinxcode{\sphinxupquote{ImportError}}} will be raised. \subsubsection{mplot3d auto-registration} \label{\detokenize{api/api_changes:mplot3d-auto-registration}} {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d}}}}} is always registered by default now. It is no longer necessary to import mplot3d to create 3d axes with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{3d}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Invalid points in PathCollections} \label{\detokenize{api/api_changes:invalid-points-in-pathcollections}} PathCollections created with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} now keep track of invalid points. Previously, points with nonfinite (infinite or nan) coordinates would not be included in the offsets (as returned by \sphinxcode{\sphinxupquote{PathCollection.get\_offsets}}) of a \sphinxcode{\sphinxupquote{PathCollection}} created by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}, and points with nonfinite values (as specified by the \sphinxstyleemphasis{c} kwarg) would not be included in the array (as returned by \sphinxcode{\sphinxupquote{PathCollection.get\_array}}) Such points are now included, but masked out by returning a masked array. If the \sphinxstyleemphasis{plotnonfinite} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} is set, then points with nonfinite values are plotted using the bad color of the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{collections.PathCollection}}}}}'s colormap (as set by {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_bad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Colormap.set\_bad()}}}}}). \subsubsection{Alpha blending in imshow of RBGA input} \label{\detokenize{api/api_changes:alpha-blending-in-imshow-of-rbga-input}} The alpha-channel of RBGA images is now re-sampled independently of RGB channels. While this is a bug fix, it does change the output and may result in some down-stream image comparison tests to fail. \subsubsection{Autoscaling} \label{\detokenize{api/api_changes:autoscaling}} On log-axes where a single value is plotted at a "full" decade (1, 10, 100, etc.), the autoscaling now expands the axis symmetrically around that point, instead of adding a decade only to the right. \subsubsection{Log-scaled axes} \label{\detokenize{api/api_changes:log-scaled-axes}} When the default \sphinxcode{\sphinxupquote{LogLocator}} would generate no ticks for an axis (e.g., an axis with limits from 0.31 to 0.39) or only a single tick, it now instead falls back on the linear \sphinxcode{\sphinxupquote{AutoLocator}} to pick reasonable tick positions. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Figure.add\_subplot}} with no arguments} \label{\detokenize{api/api_changes:figure-add-subplot-with-no-arguments}} Calling {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot()}}}}} with no positional arguments used to do nothing; this now is equivalent to calling \sphinxcode{\sphinxupquote{add\_subplot(111)}} instead. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{bxp}} and rcparams} \label{\detokenize{api/api_changes:bxp-and-rcparams}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} now respects \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"boxplot.boxprops.linewidth"{]}}}} even when \sphinxstyleemphasis{patch\_artist} is set. Previously, when the \sphinxstyleemphasis{patch\_artist} parameter was set, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} would ignore \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"boxplot.boxprops.linewidth"{]}}}}. This was an oversight -- in particular, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} did not ignore it. \subsubsection{Major/minor tick collisions} \label{\detokenize{api/api_changes:major-minor-tick-collisions}} Minor ticks that collide with major ticks are now hidden by default. Previously, certain locator classes ({\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}}, {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoMinorLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoMinorLocator}}}}}) contained custom logic to avoid emitting tick locations that collided with major ticks when they were used as minor locators. This logic has now moved to the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is used regardless of the locator class. You can control this behavior via the \sphinxcode{\sphinxupquote{remove\_overlaping\_locs}} attribute on {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}. If you were relying on both the major and minor tick labels to appear on the same tick, you may need to update your code. For example, the following snippet \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{as} \PYG{n+nn}{mdates} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{2018\PYGZhy{}11\PYGZhy{}03}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{2018\PYGZhy{}11\PYGZhy{}06}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{dtype}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{datetime64}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{t}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{x}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(} \PYG{n}{major\PYGZus{}locator}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DayLocator}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{major\PYGZus{}formatter}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+si}{\PYGZpc{}a}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{minor\PYGZus{}locator}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{HourLocator}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{,} \PYG{l+m+mi}{18}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{minor\PYGZus{}formatter}\PYG{o}{=}\PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{H:}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{M}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{,} \PYG{p}{)} \PYG{c+c1}{\PYGZsh{} disable removing overlapping locations} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{remove\PYGZus{}overlapping\PYGZus{}locs} \PYG{o}{=} \PYG{k+kc}{False} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} labeled days using major ticks, and hours and minutes using minor ticks and added a newline to the major ticks labels to avoid them crashing into the minor tick labels. Setting the {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs:matplotlib.axis.Axis.remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_overlapping\_locs}}}}} property (also accessible via {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs:matplotlib.axis.Axis.set_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_remove\_overlapping\_locs}}}}} / {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs:matplotlib.axis.Axis.get_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_remove\_overlapping\_locs}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}}) disables removing overlapping tick locations. The major tick labels could also be adjusted include hours and minutes, as the minor ticks are gone, so the \sphinxcode{\sphinxupquote{major\_formatter}} would be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{mdates}\PYG{o}{.}\PYG{n}{DateFormatter}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{H:}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{M}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+si}{\PYGZpc{}a}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{usetex support} \label{\detokenize{api/api_changes:usetex-support}} Previously, if \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.usetex"{]}}}} was True, then constructing a \sphinxcode{\sphinxupquote{TextPath}} on a non-mathtext string with \sphinxcode{\sphinxupquote{usetex=False}} would rely on the mathtext parser (but not on usetex support!) to parse the string. The mathtext parser is not invoked anymore, which may cause slight changes in glyph positioning. \subsubsection{get\_window\_extents} \label{\detokenize{api/api_changes:get-window-extents}} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_window\_extent}}}}} used to return a bounding box that was slightly larger than the axes, presumably to take into account the ticks that may be on a spine. However, it was not scaling the tick sizes according to the dpi of the canvas, and it did not check if the ticks were visible, or on the spine. Now {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_window\_extent}}}}} just returns the axes extent with no padding for ticks. This affects {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}} in cases where there are outward ticks with no tick labels, and it also removes the (small) pad around axes in that case. {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spines.Spine.get\_window\_extent}}}}} now takes into account ticks that are on the spine. \subsubsection{Sankey} \label{\detokenize{api/api_changes:sankey}} Previously, {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.add}}}}} would only accept a single string as the \sphinxstyleemphasis{labels} argument if its length is equal to the number of flows, in which case it would use one character of the string for each flow. The behavior has been changed to match the documented one: when a single string is passed, it is used to label all the flows. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FontManager}} scores} \label{\detokenize{api/api_changes:fontmanager-scores}} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}} is now more strict with its inputs. Previously, when a weight string was passed to {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}}, \begin{itemize} \item {} if the weight was the string representation of an integer, it would be converted to that integer, \item {} otherwise, if the weight was not a standard weight name, it would be silently replaced by a value of 500 ("normal" weight). \end{itemize} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontManager.score\_weight}}}}} now raises an exception on such inputs. \subsubsection{Text alignment} \label{\detokenize{api/api_changes:text-alignment}} Text alignment was previously incorrect, in particular for multiline text objects with large descenders (i.e. subscripts) and rotated text. These have been fixed and made more consistent, but could make old code that has compensated for this no longer have the correct alignment. \subsubsection{Upper case color strings} \label{\detokenize{api/api_changes:upper-case-color-strings}} Support for passing single-letter colors (one of "rgbcmykw") as UPPERCASE characters is deprecated; these colors will become case-sensitive (lowercase) after the deprecation period has passed. The goal is to decrease the number of ambiguous cases when using the \sphinxcode{\sphinxupquote{data}} keyword to plotting methods; e.g. \sphinxcode{\sphinxupquote{plot("X", "Y", data=\{"X": ..., "Y": ...\})}} will not warn about "Y" possibly being a color anymore after the deprecation period has passed. \subsubsection{Degenerate limits} \label{\detokenize{api/api_changes:degenerate-limits}} When bounds passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} are degenerate (i.e. the lower and upper value are equal), the method used to "expand" the bounds now matches the expansion behavior of autoscaling when the plot contains a single x-value, and should in particular produce nicer limits for non-linear scales. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{plot}} format string parsing} \label{\detokenize{api/api_changes:plot-format-string-parsing}} In certain cases, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} would previously accept format strings specifying more than one linestyle (e.g. \sphinxcode{\sphinxupquote{"-{-}-."}} which specifies both \sphinxcode{\sphinxupquote{"-{-}"}} and \sphinxcode{\sphinxupquote{"-."}}); only use one of them would be used. This now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \subsubsection{HTMLWriter} \label{\detokenize{api/api_changes:htmlwriter}} The HTMLWriter constructor is more strict: it no longer normalizes unknown values of \sphinxstyleemphasis{default\_mode} to 'loop', but errors out instead. \subsubsection{AFM parsing} \label{\detokenize{api/api_changes:afm-parsing}} In accordance with the AFM spec, the AFM parser no longer truncates the \sphinxcode{\sphinxupquote{UnderlinePosition}} and \sphinxcode{\sphinxupquote{UnderlineThickness}} fields to integers. The \sphinxcode{\sphinxupquote{Notice}} field (which can only be publicly accessed by the deprecated \sphinxcode{\sphinxupquote{afm.parse\_afm}} API) is no longer decoded to a \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}, but instead kept as \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#bytes}{\sphinxcode{\sphinxupquote{bytes}}}, to support non-conformant AFM files that use non-ASCII characters in that field. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Artist.set}} keyword normalisation} \label{\detokenize{api/api_changes:artist-set-keyword-normalisation}} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib.artist.Artist.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set}}}}} now normalizes keywords before sorting them. Previously it sorted its keyword arguments in reverse alphabetical order (with a special-case to put \sphinxcode{\sphinxupquote{color}} at the end) before applying them. It now normalizes aliases (and, as above, emits a warning on duplicate properties) before doing the sorting (so \sphinxcode{\sphinxupquote{c}} goes to the end too). \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.tick\_params}} argument checking} \label{\detokenize{api/api_changes:axes-tick-params-argument-checking}} Previously {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tick\_params}}}}} silently did nothing when an invalid \sphinxstyleemphasis{axis} parameter was supplied. This behavior has been changed to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.hist}} output} \label{\detokenize{api/api_changes:axes-hist-output}} Input that consists of multiple empty lists will now return a list of histogram values for each one of the lists. For example, an input of \sphinxcode{\sphinxupquote{{[}{[}{]},{[}{]}{]}}} will return 2 lists of histogram values. Previously, a single list was returned. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{backend\_bases.Timer.remove\_callback}} future signature change} \label{\detokenize{api/api_changes:backend-bases-timer-remove-callback-future-signature-change}} Currently, \sphinxcode{\sphinxupquote{backend\_bases.Timer.remove\_callback(func, *args, **kwargs)}} removes a callback previously added by \sphinxcode{\sphinxupquote{backend\_bases.Timer.add\_callback(func, *args, **kwargs)}}, but if \sphinxcode{\sphinxupquote{*args, **kwargs}} is not passed in (ex, \sphinxcode{\sphinxupquote{Timer.remove\_callback(func)}}), then the first callback with a matching \sphinxcode{\sphinxupquote{func}} is removed, regardless of whether it was added with or without \sphinxcode{\sphinxupquote{*args, **kwargs}}. In a future version, \sphinxcode{\sphinxupquote{Timer.remove\_callback}} will always use the latter behavior (not consider \sphinxcode{\sphinxupquote{*args, **kwargs}}); to specifically consider them, add the callback as a \sphinxhref{https://docs.python.org/3/library/functools.html\#functools.partial}{\sphinxcode{\sphinxupquote{functools.partial}}} object \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cb} \PYG{o}{=} \PYG{n}{timer}\PYG{o}{.}\PYG{n}{add\PYGZus{}callback}\PYG{p}{(}\PYG{n}{functools}\PYG{o}{.}\PYG{n}{partial}\PYG{p}{(}\PYG{n}{func}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ...} \PYG{c+c1}{\PYGZsh{} later} \PYG{n}{timer}\PYG{o}{.}\PYG{n}{remove\PYGZus{}callback}\PYG{p}{(}\PYG{n}{cb}\PYG{p}{)} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{backend\_bases.Timer.add\_callback}} was modified to return \sphinxstyleemphasis{func} to simplify the above usage (previously it returned None); this also allows using it as a decorator. The new API is modelled after \sphinxhref{https://docs.python.org/3/library/atexit.html\#atexit.register}{\sphinxcode{\sphinxupquote{atexit.register}}} / \sphinxhref{https://docs.python.org/3/library/atexit.html\#atexit.unregister}{\sphinxcode{\sphinxupquote{atexit.unregister}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{StemContainer}} performance increase} \label{\detokenize{api/api_changes:stemcontainer-performance-increase}} \sphinxcode{\sphinxupquote{StemContainer}} objects can now store a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} object instead of a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects for stem lines plotted using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}}. This gives a very large performance boost to displaying and moving \sphinxcode{\sphinxupquote{stem}} plots. This will become the default behaviour in Matplotlib 3.3. To use it now, the \sphinxstyleemphasis{use\_line\_collection} keyword argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}} can be set to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{stem}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{use\PYGZus{}line\PYGZus{}collection}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} Individual line segments can be extracted from the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} using \sphinxcode{\sphinxupquote{get\_segements()}}. See the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} documentation for other methods to retrieve the collection properties. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ColorbarBase}} inheritance} \label{\detokenize{api/api_changes:colorbarbase-inheritance}} {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.ColorbarBase}}}}} is no longer a subclass of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cm.ScalarMappable}}}}}. This inheritance lead to a confusing situation where the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cm.ScalarMappable}}}}} passed to {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.Colorbar}}}}} ({\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}}) had a \sphinxcode{\sphinxupquote{set\_norm}} method, as did the colorbar. The colorbar is now purely a follower to the \sphinxcode{\sphinxupquote{ScalarMappable}} norm and colormap, and the old inherited methods \sphinxcode{\sphinxupquote{set\_norm}}, \sphinxcode{\sphinxupquote{set\_cmap}}, \sphinxcode{\sphinxupquote{set\_clim}} are deprecated, as are the getter versions of those calls. To set the norm associated with a colorbar do \sphinxcode{\sphinxupquote{colorbar.mappable.set\_norm()}} etc. \subsubsection{FreeType and libpng search paths} \label{\detokenize{api/api_changes:freetype-and-libpng-search-paths}} The \sphinxcode{\sphinxupquote{MPLBASEDIRLIST}} environment variables and \sphinxcode{\sphinxupquote{basedirlist}} entry in \sphinxcode{\sphinxupquote{setup.cfg}} have no effect anymore. Instead, if building in situations where FreeType or libpng are not in the compiler or linker's default path, set the standard environment variables \sphinxcode{\sphinxupquote{CFLAGS}}/\sphinxcode{\sphinxupquote{LDFLAGS}} on Linux or OSX, or \sphinxcode{\sphinxupquote{CL}}/\sphinxcode{\sphinxupquote{LINK}} on Windows, to indicate the relevant paths. See details in \sphinxcode{\sphinxupquote{Installing}}. \subsubsection{Setting artist properties twice or more in the same call} \label{\detokenize{api/api_changes:setting-artist-properties-twice-or-more-in-the-same-call}} Setting the same artist property multiple time via aliases is deprecated. Previously, code such as \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{blue}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} would emit a warning indicating that \sphinxcode{\sphinxupquote{c}} and \sphinxcode{\sphinxupquote{color}} are aliases of one another, and only keep the \sphinxcode{\sphinxupquote{color}} kwarg. This behavior has been deprecated; in a future version, this will raise a TypeError, similar to Python's behavior when a keyword argument is passed twice \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{blue}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} This warning is raised by {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.normalize_kwargs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{normalize\_kwargs}}}}}. \subsubsection{Path code types} \label{\detokenize{api/api_changes:path-code-types}} Path code types like \sphinxcode{\sphinxupquote{Path.MOVETO}} are now \sphinxcode{\sphinxupquote{np.uint8}} instead of \sphinxcode{\sphinxupquote{int}} \sphinxcode{\sphinxupquote{Path.STOP}}, \sphinxcode{\sphinxupquote{Path.MOVETO}}, \sphinxcode{\sphinxupquote{Path.LINETO}}, \sphinxcode{\sphinxupquote{Path.CURVE3}}, \sphinxcode{\sphinxupquote{Path.CURVE4}} and \sphinxcode{\sphinxupquote{Path.CLOSEPOLY}} are now of the type \sphinxcode{\sphinxupquote{Path.code\_type}} (\sphinxcode{\sphinxupquote{np.uint8}} by default) instead of plain \sphinxcode{\sphinxupquote{int}}. This makes their type match the array value type of the \sphinxcode{\sphinxupquote{Path.codes}} array. \subsubsection{LaTeX code in matplotlibrc file} \label{\detokenize{api/api_changes:latex-code-in-matplotlibrc-file}} Previously, the rc file keys \sphinxcode{\sphinxupquote{pgf.preamble}} and \sphinxcode{\sphinxupquote{text.latex.preamble}} were parsed using commmas as separators. This would break valid LaTeX code, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZbs{}\PYG{n}{usepackage}\PYG{p}{[}\PYG{n}{protrusion}\PYG{o}{=}\PYG{n}{true}\PYG{p}{,} \PYG{n}{expansion}\PYG{o}{=}\PYG{n}{false}\PYG{p}{]}\PYG{p}{\PYGZob{}}\PYG{n}{microtype}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The parsing has been modified to pass the complete line to the LaTeX system, keeping all commas. Passing a list of strings from within a Python script still works as it used to. Passing a list containing non-strings now fails, instead of coercing the results to strings. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.spy}}} \label{\detokenize{api/api_changes:axes-spy}} The method {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.spy}}}}} now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} for the keyword arguments \sphinxstyleemphasis{interpolation} and \sphinxstyleemphasis{linestyle} instead of silently ignoring them. Furthermore, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.spy}}}}} spy does now allow for an \sphinxstyleemphasis{extent} argument (was silently ignored so far). A bug with \sphinxcode{\sphinxupquote{Axes.spy(..., origin='lower')}} is fixed. Previously this flipped the data but not the y-axis resulting in a mismatch between axes labels and actual data indices. Now, \sphinxstyleemphasis{origin='lower'} flips both the data and the y-axis labels. \subsubsection{Boxplot tick methods} \label{\detokenize{api/api_changes:boxplot-tick-methods}} The \sphinxstyleemphasis{manage\_xticks} parameter of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bxp}}}}} has been renamed (with a deprecation period) to \sphinxstyleemphasis{manage\_ticks}, to take into account the fact that it manages either x or y ticks depending on the \sphinxstyleemphasis{vert} parameter. When \sphinxcode{\sphinxupquote{manage\_ticks=True}} (the default), these methods now attempt to take previously drawn boxplots into account when setting the axis limits, ticks, and tick labels. \subsubsection{MouseEvents} \label{\detokenize{api/api_changes:mouseevents}} MouseEvents now include the event name in their \sphinxcode{\sphinxupquote{str()}}. Previously they contained the prefix "MPL MouseEvent". \subsubsection{RGBA buffer return type} \label{\detokenize{api/api_changes:rgba-buffer-return-type}} {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.buffer_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasAgg.buffer\_rgba}}}}} and {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.buffer_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererAgg.buffer\_rgba}}}}} now return a memoryview The \sphinxcode{\sphinxupquote{buffer\_rgba}} method now allows direct access to the renderer's underlying buffer (as a \sphinxcode{\sphinxupquote{(m, n, 4)}}-shape memoryview) rather than copying the data to a new bytestring. This is consistent with the behavior on Py2, where a buffer object was returned. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.font\_manager.win32InstalledFonts}} return type} \label{\detokenize{api/api_changes:matplotlib-font-manager-win32installedfonts-return-type}} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.win32InstalledFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.win32InstalledFonts}}}}} returns an empty list instead of None if no fonts are found. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Axes.fmt\_xdata}} and \sphinxstyleliteralintitle{\sphinxupquote{Axes.fmt\_ydata}} error handling} \label{\detokenize{api/api_changes:axes-fmt-xdata-and-axes-fmt-ydata-error-handling}} Previously, if the user provided a \sphinxcode{\sphinxupquote{Axes.fmt\_xdata}} or \sphinxcode{\sphinxupquote{Axes.fmt\_ydata}} function that raised a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} (or set them to a non-callable), the exception would be silently ignored and the default formatter be used instead. This is no longer the case; the exception is now propagated out. \subsubsection{Deprecation of redundant \sphinxstyleliteralintitle{\sphinxupquote{Tick}} attributes} \label{\detokenize{api/api_changes:deprecation-of-redundant-tick-attributes}} The \sphinxcode{\sphinxupquote{gridOn}}, \sphinxcode{\sphinxupquote{tick1On}}, \sphinxcode{\sphinxupquote{tick2On}}, \sphinxcode{\sphinxupquote{label1On}}, and \sphinxcode{\sphinxupquote{label2On}} {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}} attributes have been deprecated. Directly get and set the visibility on the underlying artists, available as the \sphinxcode{\sphinxupquote{gridline}}, \sphinxcode{\sphinxupquote{tick1line}}, \sphinxcode{\sphinxupquote{tick2line}}, \sphinxcode{\sphinxupquote{label1}}, and \sphinxcode{\sphinxupquote{label2}} attributes. The \sphinxcode{\sphinxupquote{label}} attribute, which was an alias for \sphinxcode{\sphinxupquote{label1}}, has been deprecated. Subclasses that relied on setting the above visibility attributes needs to be updated; see e.g. \sphinxcode{\sphinxupquote{examples/api/skewt.py}}. \subsubsection{Passing a Line2D's drawstyle together with the linestyle is deprecated} \label{\detokenize{api/api_changes:passing-a-line2d-s-drawstyle-together-with-the-linestyle-is-deprecated}} Instead of \sphinxcode{\sphinxupquote{plt.plot(..., linestyle="steps-{-}")}}, use \sphinxcode{\sphinxupquote{plt.plot(..., linestyle="-{-}", drawstyle="steps")}}. \sphinxcode{\sphinxupquote{ds}} is now an alias for \sphinxcode{\sphinxupquote{drawstyle}}. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{pgi}} support dropped} \label{\detokenize{api/api_changes:pgi-support-dropped}} Support for \sphinxcode{\sphinxupquote{pgi}} in the GTK3 backends has been dropped. \sphinxcode{\sphinxupquote{pgi}} is an alternative implementation to \sphinxcode{\sphinxupquote{PyGObject}}. \sphinxcode{\sphinxupquote{PyGObject}} should be used instead. \subsection{rcParam changes} \label{\detokenize{api/api_changes:rcparam-changes}} \subsubsection{Removed} \label{\detokenize{api/api_changes:removed}} The following deprecated rcParams have been removed: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{text.dvipnghack}} \item {} \sphinxcode{\sphinxupquote{nbagg.transparent}} (use \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.facecolor"{]}}}} instead) \item {} \sphinxcode{\sphinxupquote{plugins.directory}} \item {} \sphinxcode{\sphinxupquote{axes.hold}} \item {} \sphinxcode{\sphinxupquote{backend.qt4}} and \sphinxcode{\sphinxupquote{backend.qt5}} (set the \index{QT\_API@\spxentry{QT\_API}}\index{environment variable@\spxentry{environment variable}!QT\_API@\spxentry{QT\_API}}\sphinxcode{\sphinxupquote{QT\_API}} environment variable instead) \end{itemize} \subsubsection{Deprecated} \label{\detokenize{api/api_changes:deprecated}} The associated validator functions \sphinxcode{\sphinxupquote{rcsetup.validate\_qt4}} and \sphinxcode{\sphinxupquote{validate\_qt5}} are deprecated. The \sphinxcode{\sphinxupquote{verbose.fileo}} and \sphinxcode{\sphinxupquote{verbose.level}} rcParams have been deprecated. These have had no effect since the switch from Matplotlib's old custom Verbose logging to the stdlib's \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} module. In addition the \sphinxcode{\sphinxupquote{rcsetup.validate\_verbose}} function is deprecated. The \sphinxcode{\sphinxupquote{text.latex.unicode}} rcParam now defaults to \sphinxcode{\sphinxupquote{True}} and is deprecated (i.e., in future versions of Matplotlib, unicode input will always be supported). Moreover, the underlying implementation now uses \sphinxcode{\sphinxupquote{\textbackslash{}usepackage{[}utf8{]}\{inputenc\}}} instead of \sphinxcode{\sphinxupquote{\textbackslash{}usepackage\{ucs\}\textbackslash{}usepackage{[}utf8x{]}\{inputenc\}}}. \subsection{Exception changes} \label{\detokenize{api/api_changes:exception-changes}}\begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper:mpl_toolkits.axes_grid1.axes_size.GetExtentHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.GetExtentHelper}}}}} now raises \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} for invalid directions instead of \sphinxhref{https://docs.python.org/3/library/exceptions.html\#KeyError}{\sphinxcode{\sphinxupquote{KeyError}}}. \item {} Previously, subprocess failures in the animation framework would raise either in a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} or a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} depending on when the error occurred. They now raise a \sphinxhref{https://docs.python.org/3/library/subprocess.html\#subprocess.CalledProcessError}{\sphinxcode{\sphinxupquote{subprocess.CalledProcessError}}} with attributes set as documented by the exception class. \item {} In certain cases, Axes methods (and pyplot functions) used to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} if they were called with a \sphinxcode{\sphinxupquote{data}} kwarg and otherwise mismatched arguments. They now raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} instead. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:matplotlib.axes.Axes.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.streamplot}}}}} does not support irregularly gridded \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} values. So far, it used to silently plot an incorrect result. This has been changed to raise a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} instead. \item {} The \sphinxcode{\sphinxupquote{streamplot.Grid}} class, which is internally used by streamplot code, also throws a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}} when irregularly gridded values are passed in. \end{itemize} \subsection{Removals} \label{\detokenize{api/api_changes:removals}} The following deprecated APIs have been removed: \subsubsection{Classes and methods} \label{\detokenize{api/api_changes:classes-and-methods}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{Verbose}} (replaced by python logging library) \item {} \sphinxcode{\sphinxupquote{artist.Artist.hitlist}} (no replacement) \item {} \sphinxcode{\sphinxupquote{artist.Artist.is\_figure\_set}} (use \sphinxcode{\sphinxupquote{artist.figure is not None}} instead) \item {} \sphinxcode{\sphinxupquote{axis.Axis.unit\_data}} (use \sphinxcode{\sphinxupquote{axis.Axis.units}} instead) \item {} \sphinxcode{\sphinxupquote{backend\_bases.FigureCanvasBase.onRemove}} (no replacement) \sphinxcode{\sphinxupquote{backend\_bases.FigureManagerBase.show\_popup}} (this never did anything) \item {} \sphinxcode{\sphinxupquote{backend\_wx.SubplotToolWx}} (no replacement) \item {} \sphinxcode{\sphinxupquote{backend\_wx.Toolbar}} (use \sphinxcode{\sphinxupquote{backend\_wx.NavigationToolbar2Wx}} instead) \item {} \sphinxcode{\sphinxupquote{cbook.align\_iterators}} (no replacment) \item {} \sphinxcode{\sphinxupquote{contour.ContourLabeler.get\_real\_label\_width}} (no replacement) \item {} \sphinxcode{\sphinxupquote{legend.Legend.draggable}} (use \sphinxcode{\sphinxupquote{legend.Legend.set\_draggable()}} instead) \item {} \sphinxcode{\sphinxupquote{texmanager.TexManager.postscriptd}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.pscnt}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.make\_ps}}, \sphinxcode{\sphinxupquote{texmanager.TexManager.get\_ps\_bbox}} (no replacements) \end{itemize} \subsubsection{Arguments} \label{\detokenize{api/api_changes:arguments}}\begin{itemize} \item {} The \sphinxstyleemphasis{fig} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.get_subplot_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec.get\_subplot\_params}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec.get_subplot_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec.get\_subplot\_params}}}}} (use the argument \sphinxstyleemphasis{figure} instead) \item {} Passing 'box-forced' to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_adjustable}}}}} (use 'box' instead) \item {} Support for the strings 'on'/'true'/'off'/'false' to mean \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} / \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} (directly use \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} / \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} instead). The following functions are affected: \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.grid}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.grid}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib.axis.Axis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_tick\_params}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib.pyplot.box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.box}}}}} \end{itemize} \item {} Using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}} with an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} type argument (use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.sca}}}}} instead) \end{itemize} \subsubsection{Other} \label{\detokenize{api/api_changes:other}} The following miscellaneous API elements have been removed \begin{itemize} \item {} svgfont support (in \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"svg.fonttype"{]}}}}) \item {} Logging is now done with the standard python \sphinxcode{\sphinxupquote{logging}} library. \sphinxcode{\sphinxupquote{matplotlib.verbose}} and the command line switches \sphinxcode{\sphinxupquote{-{-}verbose-LEVEL}} have been removed. To control the logging output use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{logging} \PYG{n}{logger} \PYG{o}{=} \PYG{n}{logging}\PYG{o}{.}\PYG{n}{getLogger}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{logger}\PYG{o}{.}\PYG{n}{set\PYGZus{}level}\PYG{p}{(}\PYG{n}{logging}\PYG{o}{.}\PYG{n}{INFO}\PYG{p}{)} \end{sphinxVerbatim} \item {} \sphinxcode{\sphinxupquote{\_\_version\_\_numpy\_\_}} \item {} \sphinxcode{\sphinxupquote{collections.CIRCLE\_AREA\_FACTOR}} \item {} \sphinxcode{\sphinxupquote{font\_manager.USE\_FONTCONFIG}} \item {} \sphinxcode{\sphinxupquote{font\_manager.cachedir}} \end{itemize} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.mlab}} removals} \label{\detokenize{api/api_changes:matplotlib-mlab-removals}} Lots of code inside the {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} module which was deprecated in Matplotlib 2.2 has been removed. See below for a list: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mlab.exp\_safe}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html\#numpy.exp}{\sphinxcode{\sphinxupquote{numpy.exp}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.amap}} \item {} \sphinxcode{\sphinxupquote{mlab.logspace}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.logspace.html\#numpy.logspace}{\sphinxcode{\sphinxupquote{numpy.logspace}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rms\_flat}} \item {} \sphinxcode{\sphinxupquote{mlab.l1norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=1)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.l2norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.norm\_flat}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a.flat, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.frange}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html\#numpy.arange}{\sphinxcode{\sphinxupquote{numpy.arange}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.identity}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.identity.html\#numpy.identity}{\sphinxcode{\sphinxupquote{numpy.identity}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.base\_repr}} \item {} \sphinxcode{\sphinxupquote{mlab.binary\_repr}} \item {} \sphinxcode{\sphinxupquote{mlab.ispower2}} \item {} \sphinxcode{\sphinxupquote{mlab.log2}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html\#numpy.log2}{\sphinxcode{\sphinxupquote{numpy.log2}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.isvector}} \item {} \sphinxcode{\sphinxupquote{mlab.movavg}} \item {} \sphinxcode{\sphinxupquote{mlab.safe\_isinf}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.isinf.html\#numpy.isinf}{\sphinxcode{\sphinxupquote{numpy.isinf}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.safe\_isnan}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.isnan.html\#numpy.isnan}{\sphinxcode{\sphinxupquote{numpy.isnan}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.cohere\_pairs}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.coherence.html\#scipy.signal.coherence}{\sphinxcode{\sphinxupquote{scipy.signal.coherence}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.entropy}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.entropy.html\#scipy.stats.entropy}{\sphinxcode{\sphinxupquote{scipy.stats.entropy}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.normpdf}} (use \sphinxcode{\sphinxupquote{scipy.stats.norm.pdf}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.find}} (use \sphinxcode{\sphinxupquote{np.nonzero(np.ravel(condition))}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.longest\_contiguous\_ones}} \item {} \sphinxcode{\sphinxupquote{mlab.longest\_ones}} \item {} \sphinxcode{\sphinxupquote{mlab.PCA}} \item {} \sphinxcode{\sphinxupquote{mlab.prctile}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html\#numpy.percentile}{\sphinxcode{\sphinxupquote{numpy.percentile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.prctile\_rank}} \item {} \sphinxcode{\sphinxupquote{mlab.center\_matrix}} \item {} \sphinxcode{\sphinxupquote{mlab.rk4}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html\#scipy.integrate.ode}{\sphinxcode{\sphinxupquote{scipy.integrate.ode}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.bivariate\_normal}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_xyz\_where}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_sparse\_matrix}} \item {} \sphinxcode{\sphinxupquote{mlab.dist}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hypot.html\#numpy.hypot}{\sphinxcode{\sphinxupquote{numpy.hypot}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.dist\_point\_to\_segment}} \item {} \sphinxcode{\sphinxupquote{mlab.griddata}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html\#scipy.interpolate.griddata}{\sphinxcode{\sphinxupquote{scipy.interpolate.griddata}}}) \item {} \sphinxcode{\sphinxupquote{mlab.less\_simple\_linear\_interpolation}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.interp.html\#numpy.interp}{\sphinxcode{\sphinxupquote{numpy.interp}}}) \item {} \sphinxcode{\sphinxupquote{mlab.slopes}} \item {} \sphinxcode{\sphinxupquote{mlab.stineman\_interp}} \item {} \sphinxcode{\sphinxupquote{mlab.segments\_intersect}} \item {} \sphinxcode{\sphinxupquote{mlab.fftsurr}} \item {} \sphinxcode{\sphinxupquote{mlab.offset\_line}} \item {} \sphinxcode{\sphinxupquote{mlab.quad2cubic}} \item {} \sphinxcode{\sphinxupquote{mlab.vector\_lengths}} \item {} \sphinxcode{\sphinxupquote{mlab.distances\_along\_curve}} \item {} \sphinxcode{\sphinxupquote{mlab.path\_length}} \item {} \sphinxcode{\sphinxupquote{mlab.cross\_from\_above}} \item {} \sphinxcode{\sphinxupquote{mlab.cross\_from\_below}} \item {} \sphinxcode{\sphinxupquote{mlab.contiguous\_regions}} (use {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.contiguous_regions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.contiguous\_regions}}}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.is\_closed\_polygon}} \item {} \sphinxcode{\sphinxupquote{mlab.poly\_between}} \item {} \sphinxcode{\sphinxupquote{mlab.poly\_below}} \item {} \sphinxcode{\sphinxupquote{mlab.inside\_poly}} \item {} \sphinxcode{\sphinxupquote{mlab.csv2rec}} \item {} \sphinxcode{\sphinxupquote{mlab.rec2csv}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rec2text}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.rec\_summarize}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_join}} \item {} \sphinxcode{\sphinxupquote{mlab.recs\_join}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_groupby}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_keep\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_drop\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.rec\_append\_fields}} \item {} \sphinxcode{\sphinxupquote{mlab.csvformat\_factory}} \item {} \sphinxcode{\sphinxupquote{mlab.get\_formatd}} \item {} \sphinxcode{\sphinxupquote{mlab.FormatDatetime}} (use \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime.strftime}{\sphinxcode{\sphinxupquote{datetime.datetime.strftime}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.FormatDate}} (use \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.date.strftime}{\sphinxcode{\sphinxupquote{datetime.date.strftime}}} instead) \item {} \sphinxcode{\sphinxupquote{mlab.FormatMillions}}, \sphinxcode{\sphinxupquote{mlab.FormatThousands}}, \sphinxcode{\sphinxupquote{mlab.FormatPercent}}, \sphinxcode{\sphinxupquote{mlab.FormatBool}}, \sphinxcode{\sphinxupquote{mlab.FormatInt}}, \sphinxcode{\sphinxupquote{mlab.FormatFloat}}, \sphinxcode{\sphinxupquote{mlab.FormatFormatStr}}, \sphinxcode{\sphinxupquote{mlab.FormatString}}, \sphinxcode{\sphinxupquote{mlab.FormatObj}} \item {} \sphinxcode{\sphinxupquote{mlab.donothing\_callback}} \end{itemize} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pylab}} removals} \label{\detokenize{api/api_changes:matplotlib-pylab-removals}} Lots of code inside the {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mlab}}}}} module which was deprecated in Matplotlib 2.2 has been removed. This means the following functions are no longer available in the \sphinxcode{\sphinxupquote{matplotlib.pylab}} module: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{amap}} \item {} \sphinxcode{\sphinxupquote{base\_repr}} \item {} \sphinxcode{\sphinxupquote{binary\_repr}} \item {} \sphinxcode{\sphinxupquote{bivariate\_normal}} \item {} \sphinxcode{\sphinxupquote{center\_matrix}} \item {} \sphinxcode{\sphinxupquote{csv2rec}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{dist}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hypot.html\#numpy.hypot}{\sphinxcode{\sphinxupquote{numpy.hypot}}} instead) \item {} \sphinxcode{\sphinxupquote{dist\_point\_to\_segment}} \item {} \sphinxcode{\sphinxupquote{distances\_along\_curve}} \item {} \sphinxcode{\sphinxupquote{entropy}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.entropy.html\#scipy.stats.entropy}{\sphinxcode{\sphinxupquote{scipy.stats.entropy}}} instead) \item {} \sphinxcode{\sphinxupquote{exp\_safe}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.exp.html\#numpy.exp}{\sphinxcode{\sphinxupquote{numpy.exp}}} instead) \item {} \sphinxcode{\sphinxupquote{fftsurr}} \item {} \sphinxcode{\sphinxupquote{find}} (use \sphinxcode{\sphinxupquote{np.nonzero(np.ravel(condition))}} instead) \item {} \sphinxcode{\sphinxupquote{frange}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.arange.html\#numpy.arange}{\sphinxcode{\sphinxupquote{numpy.arange}}} instead) \item {} \sphinxcode{\sphinxupquote{get\_sparse\_matrix}} \item {} \sphinxcode{\sphinxupquote{get\_xyz\_where}} \item {} \sphinxcode{\sphinxupquote{griddata}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html\#scipy.interpolate.griddata}{\sphinxcode{\sphinxupquote{scipy.interpolate.griddata}}} instead) \item {} \sphinxcode{\sphinxupquote{identity}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.identity.html\#numpy.identity}{\sphinxcode{\sphinxupquote{numpy.identity}}} instead) \item {} \sphinxcode{\sphinxupquote{inside\_poly}} \item {} \sphinxcode{\sphinxupquote{is\_closed\_polygon}} \item {} \sphinxcode{\sphinxupquote{ispower2}} \item {} \sphinxcode{\sphinxupquote{isvector}} \item {} \sphinxcode{\sphinxupquote{l1norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=1)}} instead) \item {} \sphinxcode{\sphinxupquote{l2norm}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{log2}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.log2.html\#numpy.log2}{\sphinxcode{\sphinxupquote{numpy.log2}}} instead) \item {} \sphinxcode{\sphinxupquote{longest\_contiguous\_ones}} \item {} \sphinxcode{\sphinxupquote{longest\_ones}} \item {} \sphinxcode{\sphinxupquote{movavg}} \item {} \sphinxcode{\sphinxupquote{norm\_flat}} (use \sphinxcode{\sphinxupquote{numpy.linalg.norm(a.flat, ord=2)}} instead) \item {} \sphinxcode{\sphinxupquote{normpdf}} (use \sphinxcode{\sphinxupquote{scipy.stats.norm.pdf}} instead) \item {} \sphinxcode{\sphinxupquote{path\_length}} \item {} \sphinxcode{\sphinxupquote{poly\_below}} \item {} \sphinxcode{\sphinxupquote{poly\_between}} \item {} \sphinxcode{\sphinxupquote{prctile}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.html\#numpy.percentile}{\sphinxcode{\sphinxupquote{numpy.percentile}}} instead) \item {} \sphinxcode{\sphinxupquote{prctile\_rank}} \item {} \sphinxcode{\sphinxupquote{rec2csv}} (use \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.recarray.tofile.html\#numpy.recarray.tofile}{\sphinxcode{\sphinxupquote{numpy.recarray.tofile}}} instead) \item {} \sphinxcode{\sphinxupquote{rec\_append\_fields}} \item {} \sphinxcode{\sphinxupquote{rec\_drop\_fields}} \item {} \sphinxcode{\sphinxupquote{rec\_join}} \item {} \sphinxcode{\sphinxupquote{rk4}} (use \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.ode.html\#scipy.integrate.ode}{\sphinxcode{\sphinxupquote{scipy.integrate.ode}}} instead) \item {} \sphinxcode{\sphinxupquote{rms\_flat}} \item {} \sphinxcode{\sphinxupquote{segments\_intersect}} \item {} \sphinxcode{\sphinxupquote{slopes}} \item {} \sphinxcode{\sphinxupquote{stineman\_interp}} \item {} \sphinxcode{\sphinxupquote{vector\_lengths}} \end{itemize} \subsection{mplot3d changes} \label{\detokenize{api/api_changes:mplot3d-changes}} \subsubsection{Voxel shading} \label{\detokenize{api/api_changes:voxel-shading}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.voxels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D.voxels}}}}} now shades the resulting voxels; for more details see What's new. The previous behavior can be achieved by passing \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{voxels}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{shade}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{Equal aspect axes disabled} \label{\detokenize{api/api_changes:equal-aspect-axes-disabled}} Setting the aspect on 3D axes previously returned non-sensical results (e.g. see \sphinxhref{https://github.com/matplotlib/matplotlib/issues/1077/}{\#1077}). Calling \sphinxcode{\sphinxupquote{ax.set\_aspect('equal')}} or \sphinxcode{\sphinxupquote{ax.set\_aspect(num)}} on a 3D axes now raises a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#NotImplementedError}{\sphinxcode{\sphinxupquote{NotImplementedError}}}. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Poly3DCollection.set\_zsort}}} \label{\detokenize{api/api_changes:poly3dcollection-set-zsort}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_zsort}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection.set\_zsort}}}}} no longer silently ignores invalid inputs, or \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} (which was always broken). Passing \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} to mean \sphinxcode{\sphinxupquote{"average"}} is deprecated. \subsection{Testing} \label{\detokenize{api/api_changes:testing}} The \sphinxcode{\sphinxupquote{-{-}no-network}} flag to \sphinxcode{\sphinxupquote{tests.py}} has been removed (no test requires internet access anymore). If it is desired to disable internet access both for old and new versions of Matplotlib, use \sphinxcode{\sphinxupquote{tests.py -m 'not network'}} (which is now a no-op). The image comparison test decorators now skip (rather than xfail) the test for uncomparable formats. The affected decorators are {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison}}}}} and {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_figures\_equal}}}}}. The deprecated {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageComparisonTest}}}}} class is likewise changed. \subsection{Dependency changes} \label{\detokenize{api/api_changes:dependency-changes}} \subsubsection{numpy} \label{\detokenize{api/api_changes:numpy}} Matplotlib 3.1 now requires numpy\textgreater{}=1.11. \subsubsection{ghostscript} \label{\detokenize{api/api_changes:ghostscript}} Support for ghostscript 8.60 (released in 2007) has been removed. The oldest supported version of ghostscript is now 9.0 (released in 2010). \subsection{Mathtext changes} \label{\detokenize{api/api_changes:mathtext-changes}}\begin{itemize} \item {} In constructs such as \sphinxcode{\sphinxupquote{"\$1\textasciitilde{}2\$"}}, mathtext now interprets the tilde as a space, consistently with TeX (this was previously a parse error). \end{itemize} \subsubsection{Deprecations} \label{\detokenize{api/api_changes:deprecations}}\begin{itemize} \item {} The \sphinxcode{\sphinxupquote{\textbackslash{}stackrel}} mathtext command hsa been deprecated (it behaved differently from LaTeX's \sphinxcode{\sphinxupquote{\textbackslash{}stackrel}}. To stack two mathtext expressions, use \sphinxcode{\sphinxupquote{\textbackslash{}genfrac\{left-delim\}\{right-delim\}\{fraction-bar-thickness\}\{\}\{top\}\{bottom\}}}. \item {} The \sphinxcode{\sphinxupquote{mathcircled}} mathtext command (which is not a real TeX command) is deprecated. Directly use unicode characters (e.g. \sphinxcode{\sphinxupquote{"\textbackslash{}N\{CIRCLED LATIN CAPITAL LETTER A\}"}} or \sphinxcode{\sphinxupquote{"\textbackslash{}u24b6"}}) instead. \item {} Support for setting \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"mathtext.default"{]}}}} to circled is deprecated. \end{itemize} \subsection{Signature deprecations} \label{\detokenize{api/api_changes:signature-deprecations}} The following signature related behaviours are deprecated: \begin{itemize} \item {} The \sphinxstyleemphasis{withdash} keyword argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.text()}}}}}. Consider using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.annotate()}}}}} instead. \item {} Passing (n, 1)-shaped error arrays to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.errorbar()}}}}}, which was not documented and did not work for \sphinxcode{\sphinxupquote{n = 2}}. Pass a 1D array instead. \item {} The \sphinxstyleemphasis{frameon} kwarg to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig}}}}} and the \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.frameon"{]}}}} rcParam. To emulate \sphinxcode{\sphinxupquote{frameon = False}}, set \sphinxstyleemphasis{facecolor} to fully transparent (\sphinxcode{\sphinxupquote{"none"}}, or \sphinxcode{\sphinxupquote{(0, 0, 0, 0)}}). \item {} Passing a non-1D (typically, (n, 1)-shaped) input to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:matplotlib.axes.Axes.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pie}}}}}. Pass a 1D array instead. \item {} The {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath}}}}} constructor used to silently drop ignored arguments; this behavior is deprecated. \item {} The \sphinxstyleemphasis{usetex} parameter of {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_text_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextToPath.get\_text\_path}}}}} is deprecated and folded into the \sphinxstyleemphasis{ismath} parameter, which can now take the values \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, and \sphinxcode{\sphinxupquote{"TeX"}}, consistently with other low-level text processing functions. \item {} Passing \sphinxcode{\sphinxupquote{'normal'}} to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib.axes.Axes.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.axis()}}}}} is deprecated, use \sphinxcode{\sphinxupquote{ax.axis('auto')}} instead. \item {} Passing the \sphinxstyleemphasis{block} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.show}}}}} positionally is deprecated; it should be passed by keyword. \item {} When using the nbagg backend, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.show}}}}} used to silently accept and ignore all combinations of positional and keyword arguments. This behavior is deprecated. \item {} The unused \sphinxstyleemphasis{shape} and \sphinxstyleemphasis{imlim} parameters to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.imshow}}}}} are deprecated. To avoid triggering the deprecation warning, the \sphinxstyleemphasis{filternorm}, \sphinxstyleemphasis{filterrad}, \sphinxstyleemphasis{resample}, and \sphinxstyleemphasis{url} arguments should be passed by keyword. \item {} The \sphinxstyleemphasis{interp\_at\_native} parameter to {\hyperref[\detokenize{api/image_api:matplotlib.image.BboxImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxImage}}}}}, which has had no effect since Matplotlib 2.0, is deprecated. \item {} All arguments to the \sphinxcode{\sphinxupquote{cbook.deprecated}} decorator and \sphinxcode{\sphinxupquote{cbook.warn\_deprecated}} function, except the first one (the version where the deprecation occurred), are now keyword-only. The goal is to avoid accidentally setting the "message" argument when the "name" (or "alternative") argument was intended, as this has repeatedly occurred in the past. \item {} The arguments of \sphinxcode{\sphinxupquote{matplotlib.testing.compare.calculate\_rms}} have been renamed from \sphinxcode{\sphinxupquote{expectedImage, actualImage}}, to \sphinxcode{\sphinxupquote{expected\_image, actual\_image}}. \item {} Passing positional arguments to {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels:matplotlib.axis.Axis.set_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_ticklabels}}}}} beyond \sphinxstyleemphasis{ticklabels} itself has no effect, and support for them is deprecated. \item {} Passing \sphinxcode{\sphinxupquote{shade=None}} to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_surface}}}}} is deprecated. This was an unintended implementation detail with the same semantics as \sphinxcode{\sphinxupquote{shade=False}}. Please use the latter code instead. \item {} {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} and its \sphinxstyleemphasis{set\_params} method will issue a warning on unknown keyword arguments instead of silently ignoring them. Future versions will raise an error. \end{itemize} \subsection{Changes in parameter names} \label{\detokenize{api/api_changes:changes-in-parameter-names}}\begin{itemize} \item {} The \sphinxstyleemphasis{arg} parameter to {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.use}}}}} has been renamed to \sphinxstyleemphasis{backend}. This will only affect cases where that parameter has been set as a keyword argument. The common usage pattern as a positional argument \sphinxcode{\sphinxupquote{matplotlib.use('Qt5Agg')}} is not affected. \item {} The \sphinxstyleemphasis{normed} parameter to \sphinxcode{\sphinxupquote{Axes.hist2d}} has been renamed to \sphinxstyleemphasis{density}. \item {} The \sphinxstyleemphasis{s} parameter to \sphinxcode{\sphinxupquote{Annotation}} (and indirectly \sphinxcode{\sphinxupquote{Axes.annotation}}) has been renamed to \sphinxstyleemphasis{text}. \item {} The \sphinxstyleemphasis{tolerence} parameter to \sphinxcode{\sphinxupquote{bezier.find\_bezier\_t\_intersecting\_with\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.split\_bezier\_intersecting\_with\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.find\_r\_to\_boundary\_of\_closedpath}}, \sphinxcode{\sphinxupquote{bezier.split\_path\_inout}} and \sphinxcode{\sphinxupquote{bezier.check\_if\_parallel}} has been renamed to \sphinxstyleemphasis{tolerance}. \end{itemize} In each case, the old parameter name remains supported (it cannot be used simultaneously with the new name), but support for it will be dropped in Matplotlib 3.3. \subsection{Class/method/attribute deprecations} \label{\detokenize{api/api_changes:class-method-attribute-deprecations}} Support for custom backends that do not provide a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_hatch_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase.set\_hatch\_color}}}}} method is deprecated. We suggest that custom backends let their \sphinxcode{\sphinxupquote{GraphicsContext}} class inherit from {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}, to at least provide stubs for all required methods. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{spine.Spine.is\_frame\_like}} \end{itemize} This has not been used in the codebase since its addition in 2009. \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_tick_positions}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis3d.Axis.get\_tick\_positions}}}}} This has never been used internally, there is no equivalent method exists on the 2D Axis classes, and despite the similar name, it has a completely different behavior from the 2D Axis' \sphinxcode{\sphinxupquote{axis.Axis.get\_ticks\_position}} method. \item {} {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManagerFactory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_pgf.LatexManagerFactory}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects:mpl_toolkits.axisartist.axislines.SimpleChainedObjects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.SimpleChainedObjects}}}}} \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.Axes.AxisDict}} \end{itemize} \subsubsection{Internal Helper Functions} \label{\detokenize{api/api_changes:internal-helper-functions}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{checkdep\_dvipng}} \item {} \sphinxcode{\sphinxupquote{checkdep\_ghostscript}} \item {} \sphinxcode{\sphinxupquote{checkdep\_pdftops}} \item {} \sphinxcode{\sphinxupquote{checkdep\_inkscape}} \item {} \sphinxcode{\sphinxupquote{ticker.decade\_up}} \item {} \sphinxcode{\sphinxupquote{ticker.decade\_down}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.dedent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.dedent}}}}} \item {} \sphinxcode{\sphinxupquote{docstring.Appender}} \item {} \sphinxcode{\sphinxupquote{docstring.dedent}} \item {} \sphinxcode{\sphinxupquote{docstring.copy\_dedent}} \end{itemize} Use the standard library's docstring manipulation tools instead, such as \sphinxhref{https://docs.python.org/3/library/inspect.html\#inspect.cleandoc}{\sphinxcode{\sphinxupquote{inspect.cleandoc}}} and \sphinxhref{https://docs.python.org/3/library/inspect.html\#inspect.getdoc}{\sphinxcode{\sphinxupquote{inspect.getdoc}}}. \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.get_scale_docs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.get\_scale\_docs()}}}}} \item {} \sphinxcode{\sphinxupquote{matplotlib.pyplot.get\_scale\_docs()}} \end{itemize} These are considered internal and will be removed from the public API in a future version. \begin{itemize} \item {} {\hyperref[\detokenize{api/projections_api:matplotlib.projections.process_projection_requirements}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.process\_projection\_requirements}}}}} \item {} \sphinxcode{\sphinxupquote{backend\_ps.PsBackendHelper{}`}} \item {} \sphinxcode{\sphinxupquote{backend\_ps.ps\_backend\_helper{}`}}, \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.iterable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.iterable}}}}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.get\_label}}}}} \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.safezip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.safezip}}}}} Manually check the lengths of the inputs instead, or rely on numpy to do it. \item {} {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.is_hashable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.is\_hashable}}}}} Use \sphinxcode{\sphinxupquote{isinstance(..., collections.abc.Hashable)}} instead. \item {} The {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.strip_math}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_bases.RendererBase.strip\_math}}}}}. Use {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.strip_math}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cbook.strip\_math}}}}} instead. \end{itemize} Multiple internal functions that were exposed as part of the public API of {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d}}}}} are deprecated, \sphinxstylestrong{mpl\_toolkits.mplot3d.art3d} \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle:mpl_toolkits.mplot3d.art3d.norm_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.norm\_angle()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle:mpl_toolkits.mplot3d.art3d.norm_text_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.norm\_text\_angle()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment:mpl_toolkits.mplot3d.art3d.path_to_3d_segment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes:mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment\_with\_codes()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments\_with\_codes()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts:mpl_toolkits.mplot3d.art3d.get_patch_verts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.get\_patch\_verts()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors:mpl_toolkits.mplot3d.art3d.get_colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.get\_colors()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha:mpl_toolkits.mplot3d.art3d.zalpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.zalpha()}}}}} \end{itemize} \sphinxstylestrong{mpl\_toolkits.mplot3d.proj3d} \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d:mpl_toolkits.mplot3d.proj3d.line2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist:mpl_toolkits.mplot3d.proj3d.line2d_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d\_dist()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist:mpl_toolkits.mplot3d.proj3d.line2d_seg_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.line2d\_seg\_dist()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod:mpl_toolkits.mplot3d.proj3d.mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.mod()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec:mpl_toolkits.mplot3d.proj3d.proj_transform_vec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec\_clip()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones:mpl_toolkits.mplot3d.proj3d.vec_pad_ones}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.vec\_pad\_ones()}}}}} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points:mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.proj\_trans\_clip\_points()}}}}} \end{itemize} If your project relies on these functions, consider vendoring them. \subsubsection{Font Handling} \label{\detokenize{api/api_changes:font-handling}}\begin{itemize} \item {} {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.afm_font_cache}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_pdf.RendererPdf.afm\_font\_cache}}}}} \item {} {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.afmfontd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backend\_ps.RendererPS.afmfontd}}}}} \item {} {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.OSXInstalledFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.OSXInstalledFonts}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.glyph_to_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextToPath.glyph\_to\_path}}}}} (Instead call \sphinxcode{\sphinxupquote{font.get\_path()}} and manually transform the path.) \end{itemize} \subsubsection{Date related functions} \label{\detokenize{api/api_changes:date-related-functions}}\begin{itemize} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.seconds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.seconds()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.minutes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.minutes()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.hours}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.hours()}}}}} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.weeks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.weeks()}}}}} \item {} \sphinxcode{\sphinxupquote{dates.strpdate2num}} \item {} \sphinxcode{\sphinxupquote{dates.bytespdate2num}} \end{itemize} These are brittle in the presence of locale changes. Use standard datetime parsers such as \sphinxhref{https://docs.python.org/3/library/time.html\#time.strptime}{\sphinxcode{\sphinxupquote{time.strptime}}} or \sphinxhref{https://dateutil.readthedocs.io/en/stable/parser.html\#dateutil.parser.parse}{\sphinxcode{\sphinxupquote{dateutil.parser.parse}}}, and additionally call {\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.date2num}}}}} if you need to convert to Matplotlib's internal datetime representation; or use \sphinxcode{\sphinxupquote{dates.datestr2num}}. \subsubsection{Axes3D} \label{\detokenize{api/api_changes:axes3d}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_xaxis}} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_yaxis}} \item {} \sphinxcode{\sphinxupquote{axes3d.Axes3D.w\_zaxis}} \end{itemize} Use \sphinxcode{\sphinxupquote{axes3d.Axes3D.xaxis}}, \sphinxcode{\sphinxupquote{axes3d.Axes3D.and {}`.axes3d.Axes3D.zaxis}} instead. \subsubsection{Testing} \label{\detokenize{api/api_changes:id1}}\begin{itemize} \item {} {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.switch_backend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.switch\_backend}}}}} decorator \end{itemize} Test functions should use \sphinxcode{\sphinxupquote{pytest.mark.backend(...)}}, and the mark will be picked up by the \sphinxcode{\sphinxupquote{matplotlib.testing.conftest.mpl\_test\_settings}} fixture. \subsubsection{Quiver} \label{\detokenize{api/api_changes:quiver}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{.color}} attribute of \sphinxcode{\sphinxupquote{Quiver}} objects \end{itemize} Instead, use (as for any \sphinxcode{\sphinxupquote{Collection}}) the \sphinxcode{\sphinxupquote{get\_facecolor}} method. Note that setting to the \sphinxcode{\sphinxupquote{.color}} attribute did not update the quiver artist, whereas calling \sphinxcode{\sphinxupquote{set\_facecolor}} does. \subsubsection{GUI / backend details} \label{\detokenize{api/api_changes:gui-backend-details}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{get\_py2exe\_datafiles{}`}} \item {} \sphinxcode{\sphinxupquote{tk\_window\_focus{}`}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.FileChooserDialog}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.NavigationToolbar2GTK3.get\_filechooser}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3.SaveFigureGTK3.get\_filechooser}} \item {} \sphinxcode{\sphinxupquote{NavigationToolbar2QT.adj\_window}} attribute. This is unused and always \sphinxcode{\sphinxupquote{None}}. \item {} \sphinxcode{\sphinxupquote{backend\_wx.IDLE\_DELAY}} global variable This is unused and only relevant to the now removed wx "idling" code (note that as it is a module-level global, no deprecation warning is emitted when accessing it). \item {} {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.demean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab.demean}}}}} \item {} \sphinxcode{\sphinxupquote{backend\_gtk3cairo.FigureCanvasGTK3Cairo}}, \item {} \sphinxcode{\sphinxupquote{backend\_wx.debug\_on\_error}}, \sphinxcode{\sphinxupquote{backend\_wx.fake\_stderr}}, \sphinxcode{\sphinxupquote{backend\_wx.raise\_msg\_to\_str}}, \sphinxcode{\sphinxupquote{backend\_wx.MenuButtonWx}}, \sphinxcode{\sphinxupquote{backend\_wx.PrintoutWx}}, \item {} \sphinxcode{\sphinxupquote{matplotlib.backends.qt\_editor.formlayout}} module \end{itemize} This module is a vendored, modified version of the official \sphinxhref{https://pypi.org/project/formlayout/}{formlayout} module available on PyPI. Install that module separately if you need it. \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS.shouldstroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextPS.shouldstroke}}}}} \end{itemize} \subsubsection{Transforms / scales} \label{\detokenize{api/api_changes:transforms-scales}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{LogTransformBase}} \item {} \sphinxcode{\sphinxupquote{Log10Transform}} \item {} \sphinxcode{\sphinxupquote{Log2Transform}}, \item {} \sphinxcode{\sphinxupquote{NaturalLogTransformLog}} \item {} \sphinxcode{\sphinxupquote{InvertedLogTransformBase}} \item {} \sphinxcode{\sphinxupquote{InvertedLog10Transform}} \item {} \sphinxcode{\sphinxupquote{InvertedLog2Transform}} \item {} \sphinxcode{\sphinxupquote{InvertedNaturalLogTransform}} \end{itemize} These classes defined in \sphinxcode{\sphinxupquote{matplotlib.scales}} are deprecated. As a replacement, use the general \sphinxcode{\sphinxupquote{LogTransform}} and \sphinxcode{\sphinxupquote{InvertedLogTransform}} classes, whose constructors take a \sphinxstyleemphasis{base} argument. \subsubsection{Locators / Formatters} \label{\detokenize{api/api_changes:locators-formatters}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{OldScalarFormatter.pprint\_val}} \item {} \sphinxcode{\sphinxupquote{ScalarFormatter.pprint\_val}} \item {} \sphinxcode{\sphinxupquote{LogFormatter.pprint\_val}} \end{itemize} These are helper methods that do not have a consistent signature across formatter classes. \subsubsection{Path tools} \label{\detokenize{api/api_changes:path-tools}}\begin{itemize} \item {} {\hyperref[\detokenize{api/path_api:matplotlib.path.get_paths_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path.get\_paths\_extents}}}}} \end{itemize} Use {\hyperref[\detokenize{api/path_api:matplotlib.path.get_path_collection_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_path\_collection\_extents}}}}} instead. \begin{itemize} \item {} {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.has_nonfinite}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.has\_nonfinite}}}}} attribute \end{itemize} Use \sphinxcode{\sphinxupquote{not np.isfinite(path.vertices).all()}} instead. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{bezier.find\_r\_to\_boundary\_of\_closedpath}} function is deprecated \end{itemize} This has always returned None instead of the requested radius. \subsubsection{Text} \label{\detokenize{api/api_changes:text}}\begin{itemize} \item {} {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.TextWithDash}}}}} \item {} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.is_math_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.is\_math\_text}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath.is_math_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath.is\_math\_text}}}}} \item {} {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath.text_get_vertices_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath.text\_get\_vertices\_codes}}}}} (As an alternative, construct a new \sphinxcode{\sphinxupquote{TextPath}} object.) \end{itemize} \subsubsection{Unused attributes} \label{\detokenize{api/api_changes:unused-attributes}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{NavigationToolbar2QT.buttons}} \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.verticalOffset}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D.verticalOffset}}}}} \item {} \sphinxcode{\sphinxupquote{Quiver.keytext}} \item {} \sphinxcode{\sphinxupquote{Quiver.keyvec}} \item {} {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector.buttonDown}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpanSelector.buttonDown}}}}} \end{itemize} These are unused and never updated. \subsubsection{Sphinx extensions} \label{\detokenize{api/api_changes:sphinx-extensions}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib.sphinxext.mathmpl.math\_directive}} \item {} \sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.plot\_directive}} \end{itemize} This is because the \sphinxcode{\sphinxupquote{matplotlib.sphinxext.mathmpl}} and \sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive}} interfaces have changed from the (Sphinx-)deprecated function-based interface to a class-based interface; this should not affect end users. \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.UnimplementedException}} \end{itemize} \subsubsection{Environmental Variables} \label{\detokenize{api/api_changes:environmental-variables}}\begin{itemize} \item {} The \sphinxcode{\sphinxupquote{MATPLOTLIBDATA}} environment variable \end{itemize} \subsubsection{Axis} \label{\detokenize{api/api_changes:axis}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{Axis.iter\_ticks}} \end{itemize} This only served as a helper to the private \sphinxcode{\sphinxupquote{Axis.\_update\_ticks}} \subsection{Undeprecations} \label{\detokenize{api/api_changes:undeprecations}} The following API elements have bee un-deprecated: \begin{itemize} \item {} The \sphinxstyleemphasis{obj\_type} kwarg to the \sphinxcode{\sphinxupquote{cbook.deprecated}} decorator. \item {} \sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xmax} kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xlim}}}}} and \sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ymax} kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ylim}}}}} \end{itemize} \subsection{New features} \label{\detokenize{api/api_changes:new-features}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Text}} now has a \sphinxstyleliteralintitle{\sphinxupquote{c}} alias for the \sphinxstyleliteralintitle{\sphinxupquote{color}} property} \label{\detokenize{api/api_changes:text-now-has-a-c-alias-for-the-color-property}} For consistency with {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} class has gained the \sphinxcode{\sphinxupquote{c}} alias for the \sphinxcode{\sphinxupquote{color}} property. For example, one can now write \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{foo}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{red}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{Cn}} colors now support \sphinxstyleliteralintitle{\sphinxupquote{n\textgreater{}=10}}} \label{\detokenize{api/api_changes:cn-colors-now-support-n-10}} It is now possible to go beyond the tenth color in the property cycle using \sphinxcode{\sphinxupquote{Cn}} syntax, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C11}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} now uses the 12th color in the cycle. Note that previously, a construct such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C11}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} would be interpreted as a request to use color \sphinxcode{\sphinxupquote{C1}} and marker \sphinxcode{\sphinxupquote{1}} (an "inverted Y"). To obtain such a plot, one should now use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{1C1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} (so that the first "1" gets correctly interpreted as a marker specification), or, more explicitly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{C1}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} \subsubsection{New \sphinxstyleliteralintitle{\sphinxupquote{Formatter.format\_ticks}} method} \label{\detokenize{api/api_changes:new-formatter-format-ticks-method}} The {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} class gained a new {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}} method, which takes the list of all tick locations as a single argument and returns the list of all formatted values. It is called by the axis tick handling code and, by default, first calls {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.set_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_locs}}}}} with all locations, then repeatedly calls \sphinxcode{\sphinxupquote{\_\_call\_\_}} for each location. Tick-handling code in the codebase that previously performed this sequence ({\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.set_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_locs}}}}} followed by repeated \sphinxcode{\sphinxupquote{\_\_call\_\_}}) have been updated to use {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}}. {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_ticks}}}}} is intended to be overridden by {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} subclasses for which the formatting of a tick value depends on other tick values, such as {\hyperref[\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConciseDateFormatter}}}}}. \subsubsection{Added support for RGB(A) images in pcolorfast} \label{\detokenize{api/api_changes:added-support-for-rgb-a-images-in-pcolorfast}} pcolorfast now accepts 3D images (RGB or RGBA) arrays if the X and Y specifications allow image or pcolorimage rendering; they remain unsupported by the more general quadmesh rendering \subsection{Invalid inputs} \label{\detokenize{api/api_changes:invalid-inputs}} Passing invalid locations to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.table:matplotlib.axes.Axes.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}} used to fallback on a default location. This behavior is deprecated and will throw an exception in a future version. {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsetbox.AnchoredText}}}}} is unable to handle the \sphinxstyleemphasis{horizontalalignment} or \sphinxstyleemphasis{verticalalignment} kwargs, and used to ignore them with a warning. This behavior is deprecated and will throw an exception in a future version. Passing steps less than 1 or greater than 10 to \sphinxcode{\sphinxupquote{MaxNLocator}} used to result in undefined behavior. It now throws a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#ValueError}{\sphinxcode{\sphinxupquote{ValueError}}}. The signature of the (private) \sphinxcode{\sphinxupquote{Axis.\_update\_ticks}} has been changed to not take the renderer as argument anymore (that argument is unused). \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/index:id1}}{\hyperref[\detokenize{api/index:usage-patterns}]{\sphinxcrossref{Usage patterns}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/index:id2}}{\hyperref[\detokenize{api/index:the-pyplot-api}]{\sphinxcrossref{The pyplot API}}} \item {} \phantomsection\label{\detokenize{api/index:id3}}{\hyperref[\detokenize{api/index:the-object-oriented-api}]{\sphinxcrossref{The object-oriented API}}} \item {} \phantomsection\label{\detokenize{api/index:id4}}{\hyperref[\detokenize{api/index:the-pylab-api-disapproved}]{\sphinxcrossref{The pylab API (disapproved)}}} \end{itemize} \item {} \phantomsection\label{\detokenize{api/index:id5}}{\hyperref[\detokenize{api/index:modules}]{\sphinxcrossref{Modules}}} \item {} \phantomsection\label{\detokenize{api/index:id6}}{\hyperref[\detokenize{api/index:toolkits}]{\sphinxcrossref{Toolkits}}} \end{itemize} \end{sphinxShadowBox} See also the {\hyperref[\detokenize{api/api_changes::doc}]{\sphinxcrossref{\DUrole{doc}{API Changes}}}}. \chapter{Usage patterns} \label{\detokenize{api/index:usage-patterns}} Below we describe several common approaches to plotting with Matplotlib. \section{The pyplot API} \label{\detokenize{api/index:the-pyplot-api}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} is a collection of command style functions that make Matplotlib work like MATLAB. Each pyplot function makes some change to a figure: e.g., creates a figure, creates a plotting area in a figure, plots some lines in a plotting area, decorates the plot with labels, etc. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} is mainly intended for interactive plots and simple cases of programmatic plot generation. Further reading: \begin{itemize} \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} function reference \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot::doc}]{\sphinxcrossref{\DUrole{doc}{Pyplot tutorial}}}} \item {} \DUrole{xref,std,std-ref}{Pyplot examples} \end{itemize} \section{The object-oriented API} \label{\detokenize{api/index:the-object-oriented-api}}\label{\detokenize{api/index:api-index}} At its core, Matplotlib is object-oriented. We recommend directly working with the objects, if you need more control and customization of your plots. In many cases you will create a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} and one or more {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots}}}}} and from then on only work on these objects. However, it's also possible to create {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}s explicitly (e.g. when including them in GUI applications). Further reading: \begin{itemize} \item {} {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} for an overview of plotting functions. \item {} Most of the \DUrole{xref,std,std-ref}{examples} use the object-oriented approach (except for the pyplot section) \end{itemize} \section{The pylab API (disapproved)} \label{\detokenize{api/index:the-pylab-api-disapproved}} \begin{sphinxadmonition}{warning}{Warning:} Since heavily importing into the global namespace may result in unexpected behavior, the use of pylab is strongly discouraged. Use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} instead. \end{sphinxadmonition} \sphinxcode{\sphinxupquote{pylab}} is a module that includes {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/index.html\#module-numpy}{\sphinxcode{\sphinxupquote{numpy}}} and some additional functions within a single namespace. Its original purpose was to mimic a MATLAB-like way of working by importing all functions into the global namespace. This is considered bad style nowadays. \chapter{Modules} \label{\detokenize{api/index:modules}} Matplotlib consists of the following submodules: \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib}}} \label{\detokenize{api/matplotlib_configuration_api:matplotlib}}\label{\detokenize{api/matplotlib_configuration_api::doc}}\index{use() (in module matplotlib)@\spxentry{use()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.use}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{use}}}{\emph{backend}, \emph{warn=False}, \emph{force=True}}{} Select the backend used for rendering and GUI integration. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{backend}}] \leavevmode{[}str{]} The backend to switch to. This can either be one of the standard backend names, which are case-insensitive: \begin{itemize} \item {} interactive backends: GTK3Agg, GTK3Cairo, MacOSX, nbAgg, Qt4Agg, Qt4Cairo, Qt5Agg, Qt5Cairo, TkAgg, TkCairo, WebAgg, WX, WXAgg, WXCairo \item {} non-interactive backends: agg, cairo, pdf, pgf, ps, svg, template \end{itemize} or a string of the form: \sphinxcode{\sphinxupquote{module://my.module.name}}. \item[{\sphinxstylestrong{warn}}] \leavevmode{[}bool, optional, default: False{]} If True and not \sphinxstyleemphasis{force}, warn that the call will have no effect if this is called after pyplot has been imported and a backend is set up. \item[{\sphinxstylestrong{force}}] \leavevmode{[}bool, optional, default: True{]} If True, attempt to switch the backend. An ImportError is raised if an interactive backend is selected, but another interactive backend has already started. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{tutorials/introductory/usage:backends}]{\sphinxcrossref{\DUrole{std,std-ref}{Backends}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.get_backend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.get\_backend}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_backend() (in module matplotlib)@\spxentry{get\_backend()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.get_backend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{get\_backend}}}{}{} Return the name of the current backend. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.use}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{rcParams (in module matplotlib)@\spxentry{rcParams}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rcParams}}} An instance of {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RcParams}}}}} for handling default matplotlib values. \end{fulllineitems} \index{rc\_context() (in module matplotlib)@\spxentry{rc\_context()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc_context}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc\_context}}}{\emph{rc=None}, \emph{fname=None}}{} Return a context manager for managing rc settings. This allows one to do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{screen.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{a}\PYG{p}{)} \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{print.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{b}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{c}\PYG{p}{)} \end{sphinxVerbatim} The 'a' vs 'x' and 'c' vs 'x' plots would have settings from 'screen.rc', while the 'b' vs 'x' plot would have settings from 'print.rc'. A dictionary can also be passed to the context manager: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{rc}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{text.usetex}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{True}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{screen.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{a}\PYG{p}{)} \end{sphinxVerbatim} The 'rc' dictionary takes precedence over the settings loaded from 'fname'. Passing a dictionary only is also valid. For example a common usage is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{rc}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{interactive}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{False}\PYG{p}{\PYGZcb{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{rc() (in module matplotlib)@\spxentry{rc()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc}}}{\emph{group}, \emph{**kwargs}}{} Set the current rc params. \sphinxstyleemphasis{group} is the grouping for the rc, e.g., for \sphinxcode{\sphinxupquote{lines.linewidth}} the group is \sphinxcode{\sphinxupquote{lines}}, for \sphinxcode{\sphinxupquote{axes.facecolor}}, the group is \sphinxcode{\sphinxupquote{axes}}, and so on. Group may also be a list or tuple of group names, e.g., (\sphinxstyleemphasis{xtick}, \sphinxstyleemphasis{ytick}). \sphinxstyleemphasis{kwargs} is a dictionary attribute name/value pairs, e.g.,: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} sets the current rc params and is equivalent to: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} The following aliases are available to save typing for interactive users: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Alias &\sphinxstyletheadfamily Property \\ \hline 'lw' & 'linewidth' \\ \hline 'ls' & 'linestyle' \\ \hline 'c' & 'color' \\ \hline 'fc' & 'facecolor' \\ \hline 'ec' & 'edgecolor' \\ \hline 'mew' & 'markeredgewidth' \\ \hline 'aa' & 'antialiased' \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Thus you could abbreviate the above rc command as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{font} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{family}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{monospace}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{weight}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{larger}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{font}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} pass in the font dict as kwargs} \end{sphinxVerbatim} This enables you to easily switch between several configurations. Use \sphinxcode{\sphinxupquote{matplotlib.style.use('default')}} or {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcdefaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rcdefaults()}}}}} to restore the default rc params after changes. \end{fulllineitems} \index{rc\_file() (in module matplotlib)@\spxentry{rc\_file()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc_file}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc\_file}}}{\emph{fname}, \emph{*}, \emph{use\_default\_template=True}}{} Update rc params from file. Style-blacklisted rc params (defined in \sphinxcode{\sphinxupquote{matplotlib.style.core.STYLE\_BLACKLIST}}) are not updated. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str{]} Name of file parsed for matplotlib settings. \item[{\sphinxstylestrong{use\_default\_template}}] \leavevmode{[}bool{]} If True, initialize with default parameters before updating with those in the given file. If False, the current configuration persists and only the parameters specified in the file are updated. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{rcdefaults() (in module matplotlib)@\spxentry{rcdefaults()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rcdefaults}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rcdefaults}}}{}{} Restore the rc params from Matplotlib's internal default style. Style-blacklisted rc params (defined in \sphinxcode{\sphinxupquote{matplotlib.style.core.STYLE\_BLACKLIST}}) are not updated. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rc_file_defaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc\_file\_defaults}}}}}}] \leavevmode Restore the rc params from the rc file originally loaded by Matplotlib. \item[{{\hyperref[\detokenize{api/style_api:matplotlib.style.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.style.use}}}}}}] \leavevmode Use a specific style file. Call \sphinxcode{\sphinxupquote{style.use('default')}} to restore the default style. \end{description} \end{fulllineitems} \index{rc\_file\_defaults() (in module matplotlib)@\spxentry{rc\_file\_defaults()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc_file_defaults}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc\_file\_defaults}}}{}{} Restore the rc params from the original rc file loaded by Matplotlib. Style-blacklisted rc params (defined in \sphinxcode{\sphinxupquote{matplotlib.style.core.STYLE\_BLACKLIST}}) are not updated. \end{fulllineitems} \index{RcParams (class in matplotlib)@\spxentry{RcParams}\spxextra{class in matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{RcParams}}}{\emph{*args}, \emph{**kwargs}}{} A dictionary object including validation validating functions are defined and associated with rc parameters in {\hyperref[\detokenize{api/rcsetup_api:module-matplotlib.rcsetup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcsetup}}}}} \index{copy() (matplotlib.RcParams method)@\spxentry{copy()}\spxextra{matplotlib.RcParams method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy}}}{\emph{self}}{}~ \end{fulllineitems} \index{find\_all() (matplotlib.RcParams method)@\spxentry{find\_all()}\spxextra{matplotlib.RcParams method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.find_all}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{find\_all}}}{\emph{self}, \emph{pattern}}{} Return the subset of this RcParams dictionary whose keys match, using \sphinxhref{https://docs.python.org/3/library/re.html\#re.search}{\sphinxcode{\sphinxupquote{re.search()}}}, the given \sphinxcode{\sphinxupquote{pattern}}. \begin{sphinxadmonition}{note}{Note:} Changes to the returned dictionary are \sphinxstyleemphasis{not} propagated to the parent RcParams dictionary. \end{sphinxadmonition} \end{fulllineitems} \index{msg\_backend\_obsolete (matplotlib.RcParams attribute)@\spxentry{msg\_backend\_obsolete}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.msg_backend_obsolete}}\pysigline{\sphinxbfcode{\sphinxupquote{msg\_backend\_obsolete}}}~ \end{fulllineitems} \index{msg\_depr (matplotlib.RcParams attribute)@\spxentry{msg\_depr}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.msg_depr}}\pysigline{\sphinxbfcode{\sphinxupquote{msg\_depr}}}~ \end{fulllineitems} \index{msg\_depr\_ignore (matplotlib.RcParams attribute)@\spxentry{msg\_depr\_ignore}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.msg_depr_ignore}}\pysigline{\sphinxbfcode{\sphinxupquote{msg\_depr\_ignore}}}~ \end{fulllineitems} \index{msg\_depr\_set (matplotlib.RcParams attribute)@\spxentry{msg\_depr\_set}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.msg_depr_set}}\pysigline{\sphinxbfcode{\sphinxupquote{msg\_depr\_set}}}~ \end{fulllineitems} \index{msg\_obsolete (matplotlib.RcParams attribute)@\spxentry{msg\_obsolete}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.msg_obsolete}}\pysigline{\sphinxbfcode{\sphinxupquote{msg\_obsolete}}}~ \end{fulllineitems} \index{validate (matplotlib.RcParams attribute)@\spxentry{validate}\spxextra{matplotlib.RcParams attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams.validate}}\pysigline{\sphinxbfcode{\sphinxupquote{validate}}\sphinxbfcode{\sphinxupquote{ = \{'\_internal.classic\_mode': \textless{}function validate\_bool\textgreater{}, 'agg.path.chunksize': \textless{}function validate\_int\textgreater{}, 'animation.avconv\_args': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'animation.avconv\_path': \textless{}function validate\_animation\_writer\_path\textgreater{}, 'animation.bitrate': \textless{}function validate\_int\textgreater{}, 'animation.codec': \textless{}function validate\_string\textgreater{}, 'animation.convert\_args': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'animation.convert\_path': \textless{}function validate\_animation\_writer\_path\textgreater{}, 'animation.embed\_limit': \textless{}function validate\_float\textgreater{}, 'animation.ffmpeg\_args': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'animation.ffmpeg\_path': \textless{}function validate\_animation\_writer\_path\textgreater{}, 'animation.frame\_format': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'animation.html': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'animation.html\_args': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'animation.writer': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'axes.autolimit\_mode': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'axes.axisbelow': \textless{}function validate\_axisbelow\textgreater{}, 'axes.edgecolor': \textless{}function validate\_color\textgreater{}, 'axes.facecolor': \textless{}function validate\_color\textgreater{}, 'axes.formatter.limits': \textless{}matplotlib.rcsetup.validate\_nseq\_int object\textgreater{}, 'axes.formatter.min\_exponent': \textless{}function validate\_int\textgreater{}, 'axes.formatter.offset\_threshold': \textless{}function validate\_int\textgreater{}, 'axes.formatter.use\_locale': \textless{}function validate\_bool\textgreater{}, 'axes.formatter.use\_mathtext': \textless{}function validate\_bool\textgreater{}, 'axes.formatter.useoffset': \textless{}function validate\_bool\textgreater{}, 'axes.grid': \textless{}function validate\_bool\textgreater{}, 'axes.grid.axis': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'axes.grid.which': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'axes.labelcolor': \textless{}function validate\_color\textgreater{}, 'axes.labelpad': \textless{}function validate\_float\textgreater{}, 'axes.labelsize': \textless{}function validate\_fontsize\textgreater{}, 'axes.labelweight': \textless{}function validate\_string\textgreater{}, 'axes.linewidth': \textless{}function validate\_float\textgreater{}, 'axes.prop\_cycle': \textless{}function validate\_cycler\textgreater{}, 'axes.spines.bottom': \textless{}function validate\_bool\textgreater{}, 'axes.spines.left': \textless{}function validate\_bool\textgreater{}, 'axes.spines.right': \textless{}function validate\_bool\textgreater{}, 'axes.spines.top': \textless{}function validate\_bool\textgreater{}, 'axes.titlepad': \textless{}function validate\_float\textgreater{}, 'axes.titlesize': \textless{}function validate\_fontsize\textgreater{}, 'axes.titleweight': \textless{}function validate\_string\textgreater{}, 'axes.unicode\_minus': \textless{}function validate\_bool\textgreater{}, 'axes.xmargin': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'axes.ymargin': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'axes3d.grid': \textless{}function validate\_bool\textgreater{}, 'backend': \textless{}function validate\_backend\textgreater{}, 'backend\_fallback': \textless{}function validate\_bool\textgreater{}, 'boxplot.bootstrap': \textless{}function validate\_int\_or\_None\textgreater{}, 'boxplot.boxprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.boxprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.boxprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.capprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.capprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.capprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.flierprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.flierprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.flierprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.flierprops.marker': \textless{}function validate\_string\textgreater{}, 'boxplot.flierprops.markeredgecolor': \textless{}function validate\_color\textgreater{}, 'boxplot.flierprops.markeredgewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.flierprops.markerfacecolor': \textless{}function validate\_color\_or\_auto\textgreater{}, 'boxplot.flierprops.markersize': \textless{}function validate\_float\textgreater{}, 'boxplot.meanline': \textless{}function validate\_bool\textgreater{}, 'boxplot.meanprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.meanprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.meanprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.meanprops.marker': \textless{}function validate\_string\textgreater{}, 'boxplot.meanprops.markeredgecolor': \textless{}function validate\_color\textgreater{}, 'boxplot.meanprops.markerfacecolor': \textless{}function validate\_color\textgreater{}, 'boxplot.meanprops.markersize': \textless{}function validate\_float\textgreater{}, 'boxplot.medianprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.medianprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.medianprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.notch': \textless{}function validate\_bool\textgreater{}, 'boxplot.patchartist': \textless{}function validate\_bool\textgreater{}, 'boxplot.showbox': \textless{}function validate\_bool\textgreater{}, 'boxplot.showcaps': \textless{}function validate\_bool\textgreater{}, 'boxplot.showfliers': \textless{}function validate\_bool\textgreater{}, 'boxplot.showmeans': \textless{}function validate\_bool\textgreater{}, 'boxplot.vertical': \textless{}function validate\_bool\textgreater{}, 'boxplot.whiskerprops.color': \textless{}function validate\_color\textgreater{}, 'boxplot.whiskerprops.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'boxplot.whiskerprops.linewidth': \textless{}function validate\_float\textgreater{}, 'boxplot.whiskers': \textless{}function validate\_whiskers\textgreater{}, 'contour.corner\_mask': \textless{}function validate\_bool\textgreater{}, 'contour.negative\_linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'datapath': \textless{}function validate\_path\_exists\textgreater{}, 'date.autoformatter.day': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.hour': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.microsecond': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.minute': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.month': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.second': \textless{}function validate\_string\textgreater{}, 'date.autoformatter.year': \textless{}function validate\_string\textgreater{}, 'docstring.hardcopy': \textless{}function validate\_bool\textgreater{}, 'errorbar.capsize': \textless{}function validate\_float\textgreater{}, 'examples.directory': \textless{}function validate\_string\textgreater{}, 'figure.autolayout': \textless{}function validate\_bool\textgreater{}, 'figure.constrained\_layout.h\_pad': \textless{}function validate\_float\textgreater{}, 'figure.constrained\_layout.hspace': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.constrained\_layout.use': \textless{}function validate\_bool\textgreater{}, 'figure.constrained\_layout.w\_pad': \textless{}function validate\_float\textgreater{}, 'figure.constrained\_layout.wspace': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.dpi': \textless{}function validate\_float\textgreater{}, 'figure.edgecolor': \textless{}function validate\_color\textgreater{}, 'figure.facecolor': \textless{}function validate\_color\textgreater{}, 'figure.figsize': \textless{}matplotlib.rcsetup.validate\_nseq\_float object\textgreater{}, 'figure.frameon': \textless{}function validate\_bool\textgreater{}, 'figure.max\_open\_warning': \textless{}function validate\_int\textgreater{}, 'figure.subplot.bottom': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.subplot.hspace': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.subplot.left': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.subplot.right': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.subplot.top': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.subplot.wspace': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'figure.titlesize': \textless{}function validate\_fontsize\textgreater{}, 'figure.titleweight': \textless{}function validate\_string\textgreater{}, 'font.cursive': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.family': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.fantasy': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.monospace': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.sans-serif': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.serif': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'font.size': \textless{}function validate\_float\textgreater{}, 'font.stretch': \textless{}function validate\_string\textgreater{}, 'font.style': \textless{}function validate\_string\textgreater{}, 'font.variant': \textless{}function validate\_string\textgreater{}, 'font.weight': \textless{}function validate\_string\textgreater{}, 'grid.alpha': \textless{}function validate\_float\textgreater{}, 'grid.color': \textless{}function validate\_color\textgreater{}, 'grid.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'grid.linewidth': \textless{}function validate\_float\textgreater{}, 'hatch.color': \textless{}function validate\_color\textgreater{}, 'hatch.linewidth': \textless{}function validate\_float\textgreater{}, 'hist.bins': \textless{}function validate\_hist\_bins\textgreater{}, 'image.aspect': \textless{}function validate\_aspect\textgreater{}, 'image.cmap': \textless{}function validate\_string\textgreater{}, 'image.composite\_image': \textless{}function validate\_bool\textgreater{}, 'image.interpolation': \textless{}function validate\_string\textgreater{}, 'image.lut': \textless{}function validate\_int\textgreater{}, 'image.origin': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'image.resample': \textless{}function validate\_bool\textgreater{}, 'interactive': \textless{}function validate\_bool\textgreater{}, 'keymap.all\_axes': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.back': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.copy': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.forward': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.fullscreen': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.grid': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.grid\_minor': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.help': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.home': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.pan': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.quit': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.quit\_all': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.save': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.xscale': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.yscale': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'keymap.zoom': \textless{}function \_listify\_validator.\textless{}locals\textgreater{}.f\textgreater{}, 'legend.borderaxespad': \textless{}function validate\_float\textgreater{}, 'legend.borderpad': \textless{}function validate\_float\textgreater{}, 'legend.columnspacing': \textless{}function validate\_float\textgreater{}, 'legend.edgecolor': \textless{}function validate\_color\_or\_inherit\textgreater{}, 'legend.facecolor': \textless{}function validate\_color\_or\_inherit\textgreater{}, 'legend.fancybox': \textless{}function validate\_bool\textgreater{}, 'legend.fontsize': \textless{}function validate\_fontsize\textgreater{}, 'legend.framealpha': \textless{}function validate\_float\_or\_None\textgreater{}, 'legend.frameon': \textless{}function validate\_bool\textgreater{}, 'legend.handleheight': \textless{}function validate\_float\textgreater{}, 'legend.handlelength': \textless{}function validate\_float\textgreater{}, 'legend.handletextpad': \textless{}function validate\_float\textgreater{}, 'legend.labelspacing': \textless{}function validate\_float\textgreater{}, 'legend.loc': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'legend.markerscale': \textless{}function validate\_float\textgreater{}, 'legend.numpoints': \textless{}function validate\_int\textgreater{}, 'legend.scatterpoints': \textless{}function validate\_int\textgreater{}, 'legend.shadow': \textless{}function validate\_bool\textgreater{}, 'legend.title\_fontsize': \textless{}function validate\_fontsize\_None\textgreater{}, 'lines.antialiased': \textless{}function validate\_bool\textgreater{}, 'lines.color': \textless{}function validate\_color\textgreater{}, 'lines.dash\_capstyle': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'lines.dash\_joinstyle': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'lines.dashdot\_pattern': \textless{}matplotlib.rcsetup.validate\_nseq\_float object\textgreater{}, 'lines.dashed\_pattern': \textless{}matplotlib.rcsetup.validate\_nseq\_float object\textgreater{}, 'lines.dotted\_pattern': \textless{}matplotlib.rcsetup.validate\_nseq\_float object\textgreater{}, 'lines.linestyle': \textless{}function \_validate\_linestyle\textgreater{}, 'lines.linewidth': \textless{}function validate\_float\textgreater{}, 'lines.marker': \textless{}function validate\_string\textgreater{}, 'lines.markeredgecolor': \textless{}function validate\_color\_or\_auto\textgreater{}, 'lines.markeredgewidth': \textless{}function validate\_float\textgreater{}, 'lines.markerfacecolor': \textless{}function validate\_color\_or\_auto\textgreater{}, 'lines.markersize': \textless{}function validate\_float\textgreater{}, 'lines.scale\_dashes': \textless{}function validate\_bool\textgreater{}, 'lines.solid\_capstyle': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'lines.solid\_joinstyle': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'markers.fillstyle': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'mathtext.bf': \textless{}function validate\_font\_properties\textgreater{}, 'mathtext.cal': \textless{}function validate\_font\_properties\textgreater{}, 'mathtext.default': \textless{}function validate\_mathtext\_default\textgreater{}, 'mathtext.fallback\_to\_cm': \textless{}function validate\_bool\textgreater{}, 'mathtext.fontset': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'mathtext.it': \textless{}function validate\_font\_properties\textgreater{}, 'mathtext.rm': \textless{}function validate\_font\_properties\textgreater{}, 'mathtext.sf': \textless{}function validate\_font\_properties\textgreater{}, 'mathtext.tt': \textless{}function validate\_font\_properties\textgreater{}, 'patch.antialiased': \textless{}function validate\_bool\textgreater{}, 'patch.edgecolor': \textless{}function validate\_color\textgreater{}, 'patch.facecolor': \textless{}function validate\_color\textgreater{}, 'patch.force\_edgecolor': \textless{}function validate\_bool\textgreater{}, 'patch.linewidth': \textless{}function validate\_float\textgreater{}, 'path.effects': \textless{}function validate\_any\textgreater{}, 'path.simplify': \textless{}function validate\_bool\textgreater{}, 'path.simplify\_threshold': \textless{}matplotlib.rcsetup.ValidateInterval object\textgreater{}, 'path.sketch': \textless{}function validate\_sketch\textgreater{}, 'path.snap': \textless{}function validate\_bool\textgreater{}, 'pdf.compression': \textless{}function validate\_int\textgreater{}, 'pdf.fonttype': \textless{}function validate\_fonttype\textgreater{}, 'pdf.inheritcolor': \textless{}function validate\_bool\textgreater{}, 'pdf.use14corefonts': \textless{}function validate\_bool\textgreater{}, 'pgf.preamble': \textless{}function \_validate\_tex\_preamble\textgreater{}, 'pgf.rcfonts': \textless{}function validate\_bool\textgreater{}, 'pgf.texsystem': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'polaraxes.grid': \textless{}function validate\_bool\textgreater{}, 'ps.distiller.res': \textless{}function validate\_int\textgreater{}, 'ps.fonttype': \textless{}function validate\_fonttype\textgreater{}, 'ps.papersize': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'ps.useafm': \textless{}function validate\_bool\textgreater{}, 'ps.usedistiller': \textless{}function validate\_ps\_distiller\textgreater{}, 'savefig.bbox': \textless{}function validate\_bbox\textgreater{}, 'savefig.directory': \textless{}function validate\_string\textgreater{}, 'savefig.dpi': \textless{}function validate\_dpi\textgreater{}, 'savefig.edgecolor': \textless{}function validate\_color\textgreater{}, 'savefig.facecolor': \textless{}function validate\_color\textgreater{}, 'savefig.format': \textless{}function update\_savefig\_format\textgreater{}, 'savefig.frameon': \textless{}function validate\_bool\textgreater{}, 'savefig.jpeg\_quality': \textless{}function validate\_int\textgreater{}, 'savefig.orientation': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'savefig.pad\_inches': \textless{}function validate\_float\textgreater{}, 'savefig.transparent': \textless{}function validate\_bool\textgreater{}, 'scatter.edgecolors': \textless{}function validate\_string\textgreater{}, 'scatter.marker': \textless{}function validate\_string\textgreater{}, 'svg.fonttype': \textless{}function validate\_svg\_fonttype\textgreater{}, 'svg.hashsalt': \textless{}function validate\_string\_or\_None\textgreater{}, 'svg.image\_inline': \textless{}function validate\_bool\textgreater{}, 'text.antialiased': \textless{}function validate\_bool\textgreater{}, 'text.color': \textless{}function validate\_color\textgreater{}, 'text.hinting': \textless{}function validate\_hinting\textgreater{}, 'text.hinting\_factor': \textless{}function validate\_int\textgreater{}, 'text.latex.preamble': \textless{}function \_validate\_tex\_preamble\textgreater{}, 'text.latex.preview': \textless{}function validate\_bool\textgreater{}, 'text.latex.unicode': \textless{}function validate\_bool\textgreater{}, 'text.usetex': \textless{}function validate\_bool\textgreater{}, 'timezone': \textless{}function validate\_string\textgreater{}, 'tk.window\_focus': \textless{}function validate\_bool\textgreater{}, 'toolbar': \textless{}function validate\_toolbar\textgreater{}, 'verbose.fileo': \textless{}function validate\_string\textgreater{}, 'verbose.level': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'webagg.address': \textless{}function validate\_webagg\_address\textgreater{}, 'webagg.open\_in\_browser': \textless{}function validate\_bool\textgreater{}, 'webagg.port': \textless{}function validate\_int\textgreater{}, 'webagg.port\_retries': \textless{}function validate\_int\textgreater{}, 'xtick.alignment': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'xtick.bottom': \textless{}function validate\_bool\textgreater{}, 'xtick.color': \textless{}function validate\_color\textgreater{}, 'xtick.direction': \textless{}function validate\_string\textgreater{}, 'xtick.labelbottom': \textless{}function validate\_bool\textgreater{}, 'xtick.labelsize': \textless{}function validate\_fontsize\textgreater{}, 'xtick.labeltop': \textless{}function validate\_bool\textgreater{}, 'xtick.major.bottom': \textless{}function validate\_bool\textgreater{}, 'xtick.major.pad': \textless{}function validate\_float\textgreater{}, 'xtick.major.size': \textless{}function validate\_float\textgreater{}, 'xtick.major.top': \textless{}function validate\_bool\textgreater{}, 'xtick.major.width': \textless{}function validate\_float\textgreater{}, 'xtick.minor.bottom': \textless{}function validate\_bool\textgreater{}, 'xtick.minor.pad': \textless{}function validate\_float\textgreater{}, 'xtick.minor.size': \textless{}function validate\_float\textgreater{}, 'xtick.minor.top': \textless{}function validate\_bool\textgreater{}, 'xtick.minor.visible': \textless{}function validate\_bool\textgreater{}, 'xtick.minor.width': \textless{}function validate\_float\textgreater{}, 'xtick.top': \textless{}function validate\_bool\textgreater{}, 'ytick.alignment': \textless{}matplotlib.rcsetup.ValidateInStrings object\textgreater{}, 'ytick.color': \textless{}function validate\_color\textgreater{}, 'ytick.direction': \textless{}function validate\_string\textgreater{}, 'ytick.labelleft': \textless{}function validate\_bool\textgreater{}, 'ytick.labelright': \textless{}function validate\_bool\textgreater{}, 'ytick.labelsize': \textless{}function validate\_fontsize\textgreater{}, 'ytick.left': \textless{}function validate\_bool\textgreater{}, 'ytick.major.left': \textless{}function validate\_bool\textgreater{}, 'ytick.major.pad': \textless{}function validate\_float\textgreater{}, 'ytick.major.right': \textless{}function validate\_bool\textgreater{}, 'ytick.major.size': \textless{}function validate\_float\textgreater{}, 'ytick.major.width': \textless{}function validate\_float\textgreater{}, 'ytick.minor.left': \textless{}function validate\_bool\textgreater{}, 'ytick.minor.pad': \textless{}function validate\_float\textgreater{}, 'ytick.minor.right': \textless{}function validate\_bool\textgreater{}, 'ytick.minor.size': \textless{}function validate\_float\textgreater{}, 'ytick.minor.visible': \textless{}function validate\_bool\textgreater{}, 'ytick.minor.width': \textless{}function validate\_float\textgreater{}, 'ytick.right': \textless{}function validate\_bool\textgreater{}\}}}} \end{fulllineitems} \end{fulllineitems} \index{rc\_params() (in module matplotlib)@\spxentry{rc\_params()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc\_params}}}{\emph{fail\_on\_error=False}}{} Return a {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.RcParams}}}}} instance from the default matplotlib rc file. \end{fulllineitems} \index{rc\_params\_from\_file() (in module matplotlib)@\spxentry{rc\_params\_from\_file()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.rc_params_from_file}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{rc\_params\_from\_file}}}{\emph{fname}, \emph{fail\_on\_error=False}, \emph{use\_default\_template=True}}{} Return {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.RcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.RcParams}}}}} from the contents of the given file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str{]} Name of file parsed for matplotlib settings. \item[{\sphinxstylestrong{fail\_on\_error}}] \leavevmode{[}bool{]} If True, raise an error when the parser fails to convert a parameter. \item[{\sphinxstylestrong{use\_default\_template}}] \leavevmode{[}bool{]} If True, initialize with default parameters before updating with those in the given file. If False, the configuration class only contains the parameters specified in the file. (Useful for updating dicts.) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{matplotlib\_fname() (in module matplotlib)@\spxentry{matplotlib\_fname()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.matplotlib_fname}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{matplotlib\_fname}}}{}{} Get the location of the config file. The file location is determined in the following order \begin{itemize} \item {} \sphinxcode{\sphinxupquote{\$PWD/matplotlibrc}} \item {} \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC}} if it is not a directory \item {} \sphinxcode{\sphinxupquote{\$MATPLOTLIBRC/matplotlibrc}} \item {} \sphinxcode{\sphinxupquote{\$MPLCONFIGDIR/matplotlibrc}} \item {} \begin{description} \item[{On Linux,}] \leavevmode\begin{itemize} \item {} \sphinxcode{\sphinxupquote{\$XDG\_CONFIG\_HOME/matplotlib/matplotlibrc}} (if \sphinxcode{\sphinxupquote{\$XDG\_CONFIG\_HOME}} is defined) \item {} or \sphinxcode{\sphinxupquote{\$HOME/.config/matplotlib/matplotlibrc}} (if \sphinxcode{\sphinxupquote{\$XDG\_CONFIG\_HOME}} is not defined) \end{itemize} \end{description} \item {} \begin{description} \item[{On other platforms,}] \leavevmode\begin{itemize} \item {} \sphinxcode{\sphinxupquote{\$HOME/.matplotlib/matplotlibrc}} if \sphinxcode{\sphinxupquote{\$HOME}} is defined \end{itemize} \end{description} \item {} Lastly, it looks in \sphinxcode{\sphinxupquote{\$MATPLOTLIBDATA/matplotlibrc}}, which should always exist. \end{itemize} \end{fulllineitems} \index{interactive() (in module matplotlib)@\spxentry{interactive()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.interactive}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{interactive}}}{\emph{b}}{} Set interactive mode to boolean b. If b is True, then draw after every plotting command, e.g., after xlabel \end{fulllineitems} \index{is\_interactive() (in module matplotlib)@\spxentry{is\_interactive()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.is_interactive}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{is\_interactive}}}{}{} Return true if plot mode is interactive \end{fulllineitems} \index{set\_loglevel() (in module matplotlib)@\spxentry{set\_loglevel()}\spxextra{in module matplotlib}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/matplotlib_configuration_api:matplotlib.set_loglevel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.}}\sphinxbfcode{\sphinxupquote{set\_loglevel}}}{\emph{level}}{} Sets the Matplotlib's root logger and root logger handler level, creating the handler if it does not exist yet. Typically, one should call \sphinxcode{\sphinxupquote{set\_loglevel("info")}} or \sphinxcode{\sphinxupquote{set\_loglevel("debug")}} to get additional debugging information. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}\{"notset", "debug", "info", "warning", "error", "critical"\}{]} The log level of the handler. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The first time this function is called, an additional handler is attached to Matplotlib's root handler; this handler is reused every time and this function simply manipulates the logger and handler's level. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.afm}}} \label{\detokenize{api/afm_api:module-matplotlib.afm}}\label{\detokenize{api/afm_api:matplotlib-afm}}\label{\detokenize{api/afm_api::doc}}\index{matplotlib.afm (module)@\spxentry{matplotlib.afm}\spxextra{module}} This is a python interface to Adobe Font Metrics Files. Although a number of other python implementations exist, and may be more complete than this, it was decided not to go with them because they were either: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \item {} copyrighted or used a non-BSD compatible license \item {} had too many dependencies and a free standing lib was needed \item {} Did more than needed and it was easier to write afresh rather than figure out how to get just what was needed. \end{enumerate} It is pretty easy to use, and requires only built-in python libs: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{rcParams} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{os}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm\PYGZus{}fname} \PYG{o}{=} \PYG{n}{os}\PYG{o}{.}\PYG{n}{path}\PYG{o}{.}\PYG{n}{join}\PYG{p}{(}\PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{datapath}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{g+gp}{... } \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fonts}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{afm}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ptmr8a.afm}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{\PYGZgt{}\PYGZgt{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{afm} \PYG{k}{import} \PYG{n}{AFM} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n+nb}{open}\PYG{p}{(}\PYG{n}{afm\PYGZus{}fname}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rb}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{fh}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n}{afm} \PYG{o}{=} \PYG{n}{AFM}\PYG{p}{(}\PYG{n}{fh}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm}\PYG{o}{.}\PYG{n}{string\PYGZus{}width\PYGZus{}height}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{What the heck?}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{(6220.0, 694)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm}\PYG{o}{.}\PYG{n}{get\PYGZus{}fontname}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}Times\PYGZhy{}Roman\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm}\PYG{o}{.}\PYG{n}{get\PYGZus{}kern\PYGZus{}dist}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{0} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm}\PYG{o}{.}\PYG{n}{get\PYGZus{}kern\PYGZus{}dist}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{\PYGZhy{}92.0} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{afm}\PYG{o}{.}\PYG{n}{get\PYGZus{}bbox\PYGZus{}char}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{!}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{[130, \PYGZhy{}9, 238, 676]} \end{sphinxVerbatim} As in the Adobe Font Metrics File Format Specification, all dimensions are given in units of 1/1000 of the scale factor (point size) of the font being used. \index{AFM (class in matplotlib.afm)@\spxentry{AFM}\spxextra{class in matplotlib.afm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.afm.}}\sphinxbfcode{\sphinxupquote{AFM}}}{\emph{fh}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Parse the AFM file in file object \sphinxstyleemphasis{fh}. \index{family\_name (matplotlib.afm.AFM attribute)@\spxentry{family\_name}\spxextra{matplotlib.afm.AFM attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.family_name}}\pysigline{\sphinxbfcode{\sphinxupquote{family\_name}}} The font family name, e.g., 'Times'. \end{fulllineitems} \index{get\_angle() (matplotlib.afm.AFM method)@\spxentry{get\_angle()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_angle}}}{\emph{self}}{} Return the fontangle as float. \end{fulllineitems} \index{get\_bbox\_char() (matplotlib.afm.AFM method)@\spxentry{get\_bbox\_char()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_bbox_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox\_char}}}{\emph{self}, \emph{c}, \emph{isord=False}}{}~ \end{fulllineitems} \index{get\_capheight() (matplotlib.afm.AFM method)@\spxentry{get\_capheight()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_capheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capheight}}}{\emph{self}}{} Return the cap height as float. \end{fulllineitems} \index{get\_familyname() (matplotlib.afm.AFM method)@\spxentry{get\_familyname()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_familyname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_familyname}}}{\emph{self}}{} Return the font family name, e.g., 'Times'. \end{fulllineitems} \index{get\_fontname() (matplotlib.afm.AFM method)@\spxentry{get\_fontname()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_fontname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontname}}}{\emph{self}}{} Return the font name, e.g., 'Times-Roman'. \end{fulllineitems} \index{get\_fullname() (matplotlib.afm.AFM method)@\spxentry{get\_fullname()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_fullname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fullname}}}{\emph{self}}{} Return the font full name, e.g., 'Times-Roman'. \end{fulllineitems} \index{get\_height\_char() (matplotlib.afm.AFM method)@\spxentry{get\_height\_char()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_height_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_height\_char}}}{\emph{self}, \emph{c}, \emph{isord=False}}{} Get the bounding box (ink) height of character \sphinxstyleemphasis{c} (space is 0). \end{fulllineitems} \index{get\_horizontal\_stem\_width() (matplotlib.afm.AFM method)@\spxentry{get\_horizontal\_stem\_width()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_horizontal_stem_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_horizontal\_stem\_width}}}{\emph{self}}{} Return the standard horizontal stem width as float, or \sphinxstyleemphasis{None} if not specified in AFM file. \end{fulllineitems} \index{get\_kern\_dist() (matplotlib.afm.AFM method)@\spxentry{get\_kern\_dist()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_kern_dist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kern\_dist}}}{\emph{self}, \emph{c1}, \emph{c2}}{} Return the kerning pair distance (possibly 0) for chars \sphinxstyleemphasis{c1} and \sphinxstyleemphasis{c2}. \end{fulllineitems} \index{get\_kern\_dist\_from\_name() (matplotlib.afm.AFM method)@\spxentry{get\_kern\_dist\_from\_name()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_kern_dist_from_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kern\_dist\_from\_name}}}{\emph{self}, \emph{name1}, \emph{name2}}{} Return the kerning pair distance (possibly 0) for chars \sphinxstyleemphasis{name1} and \sphinxstyleemphasis{name2}. \end{fulllineitems} \index{get\_name\_char() (matplotlib.afm.AFM method)@\spxentry{get\_name\_char()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_name_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_name\_char}}}{\emph{self}, \emph{c}, \emph{isord=False}}{} Get the name of the character, i.e., ';' is 'semicolon'. \end{fulllineitems} \index{get\_str\_bbox() (matplotlib.afm.AFM method)@\spxentry{get\_str\_bbox()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_str_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_str\_bbox}}}{\emph{self}, \emph{s}}{} Return the string bounding box. \end{fulllineitems} \index{get\_str\_bbox\_and\_descent() (matplotlib.afm.AFM method)@\spxentry{get\_str\_bbox\_and\_descent()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_str_bbox_and_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_str\_bbox\_and\_descent}}}{\emph{self}, \emph{s}}{} Return the string bounding box and the maximal descent. \end{fulllineitems} \index{get\_underline\_thickness() (matplotlib.afm.AFM method)@\spxentry{get\_underline\_thickness()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_underline_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_underline\_thickness}}}{\emph{self}}{} Return the underline thickness as float. \end{fulllineitems} \index{get\_vertical\_stem\_width() (matplotlib.afm.AFM method)@\spxentry{get\_vertical\_stem\_width()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_vertical_stem_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vertical\_stem\_width}}}{\emph{self}}{} Return the standard vertical stem width as float, or \sphinxstyleemphasis{None} if not specified in AFM file. \end{fulllineitems} \index{get\_weight() (matplotlib.afm.AFM method)@\spxentry{get\_weight()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_weight}}}{\emph{self}}{} Return the font weight, e.g., 'Bold' or 'Roman'. \end{fulllineitems} \index{get\_width\_char() (matplotlib.afm.AFM method)@\spxentry{get\_width\_char()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_width_char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width\_char}}}{\emph{self}, \emph{c}, \emph{isord=False}}{} Get the width of the character from the character metric WX field. \end{fulllineitems} \index{get\_width\_from\_char\_name() (matplotlib.afm.AFM method)@\spxentry{get\_width\_from\_char\_name()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_width_from_char_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width\_from\_char\_name}}}{\emph{self}, \emph{name}}{} Get the width of the character from a type1 character name. \end{fulllineitems} \index{get\_xheight() (matplotlib.afm.AFM method)@\spxentry{get\_xheight()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.get_xheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xheight}}}{\emph{self}}{} Return the xheight as float. \end{fulllineitems} \index{string\_width\_height() (matplotlib.afm.AFM method)@\spxentry{string\_width\_height()}\spxextra{matplotlib.afm.AFM method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.AFM.string_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{string\_width\_height}}}{\emph{self}, \emph{s}}{} Return the string width (including kerning) and string height as a (\sphinxstyleemphasis{w}, \sphinxstyleemphasis{h}) tuple. \end{fulllineitems} \end{fulllineitems} \index{CharMetrics (class in matplotlib.afm)@\spxentry{CharMetrics}\spxextra{class in matplotlib.afm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CharMetrics}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.afm.}}\sphinxbfcode{\sphinxupquote{CharMetrics}}} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#tuple}{\sphinxcode{\sphinxupquote{tuple}}} Represents the character metrics of a single character. \subsubsection*{Notes} The fields do currently only describe a subset of character metrics information defined in the AFM standard. Create new instance of CharMetrics(width, name, bbox) \index{bbox (matplotlib.afm.CharMetrics attribute)@\spxentry{bbox}\spxextra{matplotlib.afm.CharMetrics attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CharMetrics.bbox}}\pysigline{\sphinxbfcode{\sphinxupquote{bbox}}} The bbox of the character (B) as a tuple (\sphinxstyleemphasis{llx}, \sphinxstyleemphasis{lly}, \sphinxstyleemphasis{urx}, \sphinxstyleemphasis{ury}). \end{fulllineitems} \index{name (matplotlib.afm.CharMetrics attribute)@\spxentry{name}\spxextra{matplotlib.afm.CharMetrics attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CharMetrics.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}} The character name (N). \end{fulllineitems} \index{width (matplotlib.afm.CharMetrics attribute)@\spxentry{width}\spxextra{matplotlib.afm.CharMetrics attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CharMetrics.width}}\pysigline{\sphinxbfcode{\sphinxupquote{width}}} The character width (WX). \end{fulllineitems} \end{fulllineitems} \index{CompositePart (class in matplotlib.afm)@\spxentry{CompositePart}\spxextra{class in matplotlib.afm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CompositePart}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.afm.}}\sphinxbfcode{\sphinxupquote{CompositePart}}} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#tuple}{\sphinxcode{\sphinxupquote{tuple}}} Represents the information on a composite element of a composite char. Create new instance of CompositePart(name, dx, dy) \index{dx (matplotlib.afm.CompositePart attribute)@\spxentry{dx}\spxextra{matplotlib.afm.CompositePart attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CompositePart.dx}}\pysigline{\sphinxbfcode{\sphinxupquote{dx}}} x-displacement of the part from the origin. \end{fulllineitems} \index{dy (matplotlib.afm.CompositePart attribute)@\spxentry{dy}\spxextra{matplotlib.afm.CompositePart attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CompositePart.dy}}\pysigline{\sphinxbfcode{\sphinxupquote{dy}}} y-displacement of the part from the origin. \end{fulllineitems} \index{name (matplotlib.afm.CompositePart attribute)@\spxentry{name}\spxextra{matplotlib.afm.CompositePart attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.CompositePart.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}} Name of the part, e.g. 'acute'. \end{fulllineitems} \end{fulllineitems} \index{parse\_afm() (in module matplotlib.afm)@\spxentry{parse\_afm()}\spxextra{in module matplotlib.afm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/afm_api:matplotlib.afm.parse_afm}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.afm.}}\sphinxbfcode{\sphinxupquote{parse\_afm}}}{\emph{fh}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.animation}}} \label{\detokenize{api/animation_api:module-matplotlib.animation}}\label{\detokenize{api/animation_api:matplotlib-animation}}\label{\detokenize{api/animation_api::doc}}\index{matplotlib.animation (module)@\spxentry{matplotlib.animation}\spxextra{module}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/animation_api:id3}}{\hyperref[\detokenize{api/animation_api:animation}]{\sphinxcrossref{Animation}}} \item {} \phantomsection\label{\detokenize{api/animation_api:id4}}{\hyperref[\detokenize{api/animation_api:writer-classes}]{\sphinxcrossref{Writer Classes}}} \item {} \phantomsection\label{\detokenize{api/animation_api:id5}}{\hyperref[\detokenize{api/animation_api:helper-classes}]{\sphinxcrossref{Helper Classes}}} \item {} \phantomsection\label{\detokenize{api/animation_api:id6}}{\hyperref[\detokenize{api/animation_api:inheritance-diagrams}]{\sphinxcrossref{Inheritance Diagrams}}} \end{itemize} \end{sphinxShadowBox} \subsection{Animation} \label{\detokenize{api/animation_api:animation}} The easiest way to make a live animation in matplotlib is to use one of the {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} classes. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} & This class wraps the creation of an animation using matplotlib. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} & Makes an animation by repeatedly calling a function \sphinxstyleemphasis{func}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib.animation.ArtistAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistAnimation}}}}} & Animation using a fixed set of \sphinxcode{\sphinxupquote{Artist}} objects. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.animation.Animation} \label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib-animation-animation}}\label{\detokenize{api/_as_gen/matplotlib.animation.Animation::doc}}\index{Animation (class in matplotlib.animation)@\spxentry{Animation}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{Animation}}}{\emph{fig}, \emph{event\_source=None}, \emph{blit=False}}{} This class wraps the creation of an animation using matplotlib. It is only a base class which should be subclassed to provide needed behavior. This class is not typically used directly. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that is used to get draw, resize, and any other needed events. \item[{\sphinxstylestrong{event\_source}}] \leavevmode{[}object, optional{]} A class that can run a callback when desired events are generated, as well as be stopped and started. Examples include timers (see {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib.animation.TimedAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TimedAnimation}}}}}) and file system notifications. \item[{\sphinxstylestrong{blit}}] \leavevmode{[}bool, optional{]} controls whether blitting is used to optimize drawing. Defaults to \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib.animation.ArtistAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistAnimation}}}}}}] \leavevmode \end{description} \index{\_\_init\_\_() (matplotlib.animation.Animation method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fig}, \emph{event\_source=None}, \emph{blit=False}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, fig{[}, event\_source, blit{]}) & Initialize self. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.new_frame_seq}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_frame\_seq}}}}}(self) & Return a new sequence of frame information. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.new_saved_frame_seq}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_saved\_frame\_seq}}}}}(self) & Return a new sequence of saved/cached frame information. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save}}}}}(self, filename{[}, writer, fps, dpi, ...{]}) & Save the animation as a movie file by drawing every frame. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_html5_video}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_html5\_video}}}}}(self{[}, embed\_limit{]}) & Convert the animation to an HTML5 \sphinxcode{\sphinxupquote{\textless{}video\textgreater{}}} tag. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_jshtml}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_jshtml}}}}}(self{[}, fps, embed\_frames, ...{]}) & Generate HTML representation of the animation \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{new\_frame\_seq() (matplotlib.animation.Animation method)@\spxentry{new\_frame\_seq()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.new_frame_seq}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_frame\_seq}}}{\emph{self}}{} Return a new sequence of frame information. \end{fulllineitems} \index{new\_saved\_frame\_seq() (matplotlib.animation.Animation method)@\spxentry{new\_saved\_frame\_seq()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.new_saved_frame_seq}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_saved\_frame\_seq}}}{\emph{self}}{} Return a new sequence of saved/cached frame information. \end{fulllineitems} \index{save() (matplotlib.animation.Animation method)@\spxentry{save()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{save}}}{\emph{self}, \emph{filename}, \emph{writer=None}, \emph{fps=None}, \emph{dpi=None}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}, \emph{extra\_anim=None}, \emph{savefig\_kwargs=None}, \emph{*}, \emph{progress\_callback=None}}{} Save the animation as a movie file by drawing every frame. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}str{]} The output filename, e.g., \sphinxcode{\sphinxupquote{mymovie.mp4}}. \item[{\sphinxstylestrong{writer}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} or str, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} instance to use or a key that identifies a class to use, such as 'ffmpeg'. If \sphinxcode{\sphinxupquote{None}}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"animation.writer"{]}}}} = 'ffmpeg'. \item[{\sphinxstylestrong{fps}}] \leavevmode{[}number, optional{]} Frames per second in the movie. Defaults to \sphinxcode{\sphinxupquote{None}}, which will use the animation's specified interval to set the frames per second. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}number, optional{]} Controls the dots per inch for the movie frames. This combined with the figure's size in inches controls the size of the movie. If \sphinxcode{\sphinxupquote{None}}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.dpi"{]}}}}. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}str, optional{]} The video codec to be used. Not all codecs are supported by a given {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}}. If \sphinxcode{\sphinxupquote{None}}, default to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"animation.codec"{]}}}} = 'h264'. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}number, optional{]} Specifies the number of bits used per second in the compressed movie, in kilobits per second. A higher number means a higher quality movie, but at the cost of increased file size. If \sphinxcode{\sphinxupquote{None}}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"animation.bitrate"{]}}}} = -1. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list, optional{]} List of extra string arguments to be passed to the underlying movie utility. If \sphinxcode{\sphinxupquote{None}}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"animation.extra\_args"{]}}}}. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]}, optional{]} Dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \item[{\sphinxstylestrong{extra\_anim}}] \leavevmode{[}list, optional{]} Additional {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} objects that should be included in the saved movie file. These need to be from the same {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} instance. Also, animation frames will just be simply combined, so there should be a 1:1 correspondence between the frames from the different animations. \item[{\sphinxstylestrong{savefig\_kwargs}}] \leavevmode{[}dict, optional{]} Is a dictionary containing keyword arguments to be passed on to the \sphinxcode{\sphinxupquote{savefig}} command which is called repeatedly to save the individual frames. \item[{\sphinxstylestrong{progress\_callback}}] \leavevmode{[}function, optional{]} A callback function that will be called for every frame to notify the saving progress. It must have the signature \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{current\PYGZus{}frame}\PYG{p}{:} \PYG{n+nb}{int}\PYG{p}{,} \PYG{n}{total\PYGZus{}frames}\PYG{p}{:} \PYG{n+nb}{int}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{current\_frame} is the current frame number and \sphinxstyleemphasis{total\_frames} is the total number of frames to be saved. \sphinxstyleemphasis{total\_frames} is set to None, if the total number of frames can not be determined. Return values may exist but are ignored. Example code to write the progress to stdout: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{progress\PYGZus{}callback} \PYG{o}{=} \PYG{k}{lambda} \PYG{n}{i}\PYG{p}{,} \PYG{n}{n}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{f}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Saving frame }\PYG{l+s+si}{\PYGZob{}i\PYGZcb{}}\PYG{l+s+s1}{ of }\PYG{l+s+si}{\PYGZob{}n\PYGZcb{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstyleemphasis{fps}, \sphinxstyleemphasis{codec}, \sphinxstyleemphasis{bitrate}, \sphinxstyleemphasis{extra\_args} and \sphinxstyleemphasis{metadata} are used to construct a {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} instance and can only be passed if \sphinxstyleemphasis{writer} is a string. If they are passed as non-\sphinxstyleemphasis{None} and \sphinxstyleemphasis{writer} is a {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}}, a \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} will be raised. \end{fulllineitems} \index{to\_html5\_video() (matplotlib.animation.Animation method)@\spxentry{to\_html5\_video()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_html5_video}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_html5\_video}}}{\emph{self}, \emph{embed\_limit=None}}{} Convert the animation to an HTML5 \sphinxcode{\sphinxupquote{\textless{}video\textgreater{}}} tag. This saves the animation as an h264 video, encoded in base64 directly into the HTML5 video tag. This respects the rc parameters for the writer as well as the bitrate. This also makes use of the \sphinxcode{\sphinxupquote{interval}} to control the speed, and uses the \sphinxcode{\sphinxupquote{repeat}} parameter to decide whether to loop. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{embed\_limit}}] \leavevmode{[}float, optional{]} Limit, in MB, of the returned animation. No animation is created if the limit is exceeded. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"animation.embed\_limit"{]}}}} = 20.0. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{video\_tag}}] \leavevmode{[}str{]} An HTML5 video tag with the animation embedded as base64 encoded h264 video. If the \sphinxstyleemphasis{embed\_limit} is exceeded, this returns the string "Video too large to embed." \end{description} \end{description}\end{quote} \end{fulllineitems} \index{to\_jshtml() (matplotlib.animation.Animation method)@\spxentry{to\_jshtml()}\spxextra{matplotlib.animation.Animation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_jshtml}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_jshtml}}}{\emph{self}, \emph{fps=None}, \emph{embed\_frames=True}, \emph{default\_mode=None}}{} Generate HTML representation of the animation \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.animation.FuncAnimation} \label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib-animation-funcanimation}}\label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation::doc}}\index{FuncAnimation (class in matplotlib.animation)@\spxentry{FuncAnimation}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{FuncAnimation}}}{\emph{fig}, \emph{func}, \emph{frames=None}, \emph{init\_func=None}, \emph{fargs=None}, \emph{save\_count=None}, \emph{*}, \emph{cache\_frame\_data=True}, \emph{**kwargs}}{} Makes an animation by repeatedly calling a function \sphinxstyleemphasis{func}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that is used to get draw, resize, and any other needed events. \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The function to call at each frame. The first argument will be the next value in \sphinxstyleemphasis{frames}. Any additional positional arguments can be supplied via the \sphinxstyleemphasis{fargs} parameter. The required signature is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{frame}\PYG{p}{,} \PYG{o}{*}\PYG{n}{fargs}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{iterable\PYGZus{}of\PYGZus{}artists} \end{sphinxVerbatim} If \sphinxcode{\sphinxupquote{blit == True}}, \sphinxstyleemphasis{func} must return an iterable of all artists that were modified or created. This information is used by the blitting algorithm to determine which parts of the figure have to be updated. The return value is unused if \sphinxcode{\sphinxupquote{blit == False}} and may be omitted in that case. \item[{\sphinxstylestrong{frames}}] \leavevmode{[}iterable, int, generator function, or None, optional{]} Source of data to pass \sphinxstyleemphasis{func} and each frame of the animation \begin{itemize} \item {} If an iterable, then simply use the values provided. If the iterable has a length, it will override the \sphinxstyleemphasis{save\_count} kwarg. \item {} If an integer, then equivalent to passing \sphinxcode{\sphinxupquote{range(frames)}} \item {} If a generator function, then must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{gen\PYGZus{}function}\PYG{p}{(}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{obj} \end{sphinxVerbatim} \item {} If \sphinxstyleemphasis{None}, then equivalent to passing \sphinxcode{\sphinxupquote{itertools.count}}. \end{itemize} In all of these cases, the values in \sphinxstyleemphasis{frames} is simply passed through to the user-supplied \sphinxstyleemphasis{func} and thus can be of any type. \item[{\sphinxstylestrong{init\_func}}] \leavevmode{[}callable, optional{]} A function used to draw a clear frame. If not given, the results of drawing from the first item in the frames sequence will be used. This function will be called once before the first frame. The required signature is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{init\PYGZus{}func}\PYG{p}{(}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{iterable\PYGZus{}of\PYGZus{}artists} \end{sphinxVerbatim} If \sphinxcode{\sphinxupquote{blit == True}}, \sphinxstyleemphasis{init\_func} must return an iterable of artists to be re-drawn. This information is used by the blitting algorithm to determine which parts of the figure have to be updated. The return value is unused if \sphinxcode{\sphinxupquote{blit == False}} and may be omitted in that case. \item[{\sphinxstylestrong{fargs}}] \leavevmode{[}tuple or None, optional{]} Additional arguments to pass to each call to \sphinxstyleemphasis{func}. \item[{\sphinxstylestrong{save\_count}}] \leavevmode{[}int, optional{]} The number of values from \sphinxstyleemphasis{frames} to cache. \item[{\sphinxstylestrong{interval}}] \leavevmode{[}number, optional{]} Delay between frames in milliseconds. Defaults to 200. \item[{\sphinxstylestrong{repeat\_delay}}] \leavevmode{[}number, optional{]} If the animation in repeated, adds a delay in milliseconds before repeating the animation. Defaults to \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{repeat}}] \leavevmode{[}bool, optional{]} Controls whether the animation should repeat when the sequence of frames is completed. Defaults to \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{blit}}] \leavevmode{[}bool, optional{]} Controls whether blitting is used to optimize drawing. Note: when using blitting any animated artists will be drawn according to their zorder. However, they will be drawn on top of any previous artists, regardless of their zorder. Defaults to \sphinxstyleemphasis{False}. \item[{\sphinxstylestrong{cache\_frame\_data}}] \leavevmode{[}bool, optional{]} Controls whether frame data is cached. Defaults to \sphinxstyleemphasis{True}. Disabling cache might be helpful when frames contain large objects. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.FuncAnimation method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.FuncAnimation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fig}, \emph{func}, \emph{frames=None}, \emph{init\_func=None}, \emph{fargs=None}, \emph{save\_count=None}, \emph{*}, \emph{cache\_frame\_data=True}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, fig, func{[}, frames, ...{]}) & Initialize self. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.new_frame_seq}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_frame\_seq}}}}}(self) & Return a new sequence of frame information. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.new_saved_frame_seq}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_saved\_frame\_seq}}}}}(self) & Return a new sequence of saved/cached frame information. \\ \hline \sphinxcode{\sphinxupquote{save}}(self, filename{[}, writer, fps, dpi, ...{]}) & Save the animation as a movie file by drawing every frame. \\ \hline \sphinxcode{\sphinxupquote{to\_html5\_video}}(self{[}, embed\_limit{]}) & Convert the animation to an HTML5 \sphinxcode{\sphinxupquote{\textless{}video\textgreater{}}} tag. \\ \hline \sphinxcode{\sphinxupquote{to\_jshtml}}(self{[}, fps, embed\_frames, ...{]}) & Generate HTML representation of the animation \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{new\_frame\_seq() (matplotlib.animation.FuncAnimation method)@\spxentry{new\_frame\_seq()}\spxextra{matplotlib.animation.FuncAnimation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.new_frame_seq}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_frame\_seq}}}{\emph{self}}{} Return a new sequence of frame information. \end{fulllineitems} \index{new\_saved\_frame\_seq() (matplotlib.animation.FuncAnimation method)@\spxentry{new\_saved\_frame\_seq()}\spxextra{matplotlib.animation.FuncAnimation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation.new_saved_frame_seq}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_saved\_frame\_seq}}}{\emph{self}}{} Return a new sequence of saved/cached frame information. \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.animation.ArtistAnimation} \label{\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib-animation-artistanimation}}\label{\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation::doc}}\index{ArtistAnimation (class in matplotlib.animation)@\spxentry{ArtistAnimation}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib.animation.ArtistAnimation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{ArtistAnimation}}}{\emph{fig}, \emph{artists}, \emph{*args}, \emph{**kwargs}}{} Animation using a fixed set of \sphinxcode{\sphinxupquote{Artist}} objects. Before creating an instance, all plotting should have taken place and the relevant artists saved. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that is used to get draw, resize, and any other needed events. \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list{]} Each list entry a collection of artists that represent what needs to be enabled on each frame. These will be disabled for other frames. \item[{\sphinxstylestrong{interval}}] \leavevmode{[}number, optional{]} Delay between frames in milliseconds. Defaults to 200. \item[{\sphinxstylestrong{repeat\_delay}}] \leavevmode{[}number, optional{]} If the animation in repeated, adds a delay in milliseconds before repeating the animation. Defaults to \sphinxcode{\sphinxupquote{None}}. \item[{\sphinxstylestrong{repeat}}] \leavevmode{[}bool, optional{]} Controls whether the animation should repeat when the sequence of frames is completed. Defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{blit}}] \leavevmode{[}bool, optional{]} Controls whether blitting is used to optimize drawing. Defaults to \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.ArtistAnimation method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.ArtistAnimation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib.animation.ArtistAnimation.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fig}, \emph{artists}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ArtistAnimation:matplotlib.animation.ArtistAnimation.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, fig, artists, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Initialize self. \\ \hline \sphinxcode{\sphinxupquote{new\_frame\_seq}}(self) & Return a new sequence of frame information. \\ \hline \sphinxcode{\sphinxupquote{new\_saved\_frame\_seq}}(self) & Return a new sequence of saved/cached frame information. \\ \hline \sphinxcode{\sphinxupquote{save}}(self, filename{[}, writer, fps, dpi, ...{]}) & Save the animation as a movie file by drawing every frame. \\ \hline \sphinxcode{\sphinxupquote{to\_html5\_video}}(self{[}, embed\_limit{]}) & Convert the animation to an HTML5 \sphinxcode{\sphinxupquote{\textless{}video\textgreater{}}} tag. \\ \hline \sphinxcode{\sphinxupquote{to\_jshtml}}(self{[}, fps, embed\_frames, ...{]}) & Generate HTML representation of the animation \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} In both cases it is critical to keep a reference to the instance object. The animation is advanced by a timer (typically from the host GUI framework) which the {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} object holds the only reference to. If you do not hold a reference to the {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} object, it (and hence the timers), will be garbage collected which will stop the animation. To save an animation to disk use {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.to_html5_video}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.to\_html5\_video}}}}} See {\hyperref[\detokenize{api/animation_api:ani-writer-classes}]{\sphinxcrossref{\DUrole{std,std-ref}{Helper Classes}}}} below for details about what movie formats are supported. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FuncAnimation}}} \label{\detokenize{api/animation_api:funcanimation}}\label{\detokenize{api/animation_api:func-animation}} The inner workings of {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} is more-or-less: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{d} \PYG{o+ow}{in} \PYG{n}{frames}\PYG{p}{:} \PYG{n}{artists} \PYG{o}{=} \PYG{n}{func}\PYG{p}{(}\PYG{n}{d}\PYG{p}{,} \PYG{o}{*}\PYG{n}{fargs}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw\PYGZus{}idle}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{start\PYGZus{}event\PYGZus{}loop}\PYG{p}{(}\PYG{n}{interval}\PYG{p}{)} \end{sphinxVerbatim} with details to handle 'blitting' (to dramatically improve the live performance), to be non-blocking, not repeatedly start/stop the GUI event loop, handle repeats, multiple animated axes, and easily save the animation to a movie file. 'Blitting' is a \sphinxhref{https://en.wikipedia.org/wiki/Bit\_blit}{old technique} in computer graphics. The general gist is to take an existing bit map (in our case a mostly rasterized figure) and then 'blit' one more artist on top. Thus, by managing a saved 'clean' bitmap, we can only re-draw the few artists that are changing at each frame and possibly save significant amounts of time. When we use blitting (by passing \sphinxcode{\sphinxupquote{blit=True}}), the core loop of {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} gets a bit more complicated: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{update\PYGZus{}blit}\PYG{p}{(}\PYG{n}{artists}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{restore\PYGZus{}region}\PYG{p}{(}\PYG{n}{bg\PYGZus{}cache}\PYG{p}{)} \PYG{k}{for} \PYG{n}{a} \PYG{o+ow}{in} \PYG{n}{artists}\PYG{p}{:} \PYG{n}{a}\PYG{o}{.}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{draw\PYGZus{}artist}\PYG{p}{(}\PYG{n}{a}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{blit}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{n}{artists} \PYG{o}{=} \PYG{n}{init\PYGZus{}func}\PYG{p}{(}\PYG{p}{)} \PYG{k}{for} \PYG{n}{a} \PYG{o+ow}{in} \PYG{n}{artists}\PYG{p}{:} \PYG{n}{a}\PYG{o}{.}\PYG{n}{set\PYGZus{}animated}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{bg\PYGZus{}cache} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{copy\PYGZus{}from\PYGZus{}bbox}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{k}{for} \PYG{n}{f} \PYG{o+ow}{in} \PYG{n}{frames}\PYG{p}{:} \PYG{n}{artists} \PYG{o}{=} \PYG{n}{func}\PYG{p}{(}\PYG{n}{f}\PYG{p}{,} \PYG{o}{*}\PYG{n}{fargs}\PYG{p}{)} \PYG{n}{update\PYGZus{}blit}\PYG{p}{(}\PYG{n}{artists}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{start\PYGZus{}event\PYGZus{}loop}\PYG{p}{(}\PYG{n}{interval}\PYG{p}{)} \end{sphinxVerbatim} This is of course leaving out many details (such as updating the background when the figure is resized or fully re-drawn). However, this hopefully minimalist example gives a sense of how \sphinxcode{\sphinxupquote{init\_func}} and \sphinxcode{\sphinxupquote{func}} are used inside of {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} and the theory of how 'blitting' works. The expected signature on \sphinxcode{\sphinxupquote{func}} and \sphinxcode{\sphinxupquote{init\_func}} is very simple to keep {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FuncAnimation:matplotlib.animation.FuncAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncAnimation}}}}} out of your book keeping and plotting logic, but this means that the callable objects you pass in must know what artists they should be working on. There are several approaches to handling this, of varying complexity and encapsulation. The simplest approach, which works quite well in the case of a script, is to define the artist at a global scope and let Python sort things out. For example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{import} \PYG{n}{FuncAnimation} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]} \PYG{n}{ln}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ro}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{init}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{return} \PYG{n}{ln}\PYG{p}{,} \PYG{k}{def} \PYG{n+nf}{update}\PYG{p}{(}\PYG{n}{frame}\PYG{p}{)}\PYG{p}{:} \PYG{n}{xdata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{frame}\PYG{p}{)} \PYG{n}{ydata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{frame}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ln}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)} \PYG{k}{return} \PYG{n}{ln}\PYG{p}{,} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{update}\PYG{p}{,} \PYG{n}{frames}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{128}\PYG{p}{)}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{init}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The second method is to use \sphinxhref{https://docs.python.org/3/library/functools.html\#functools.partial}{\sphinxcode{\sphinxupquote{functools.partial}}} to 'bind' artists to function. A third method is to use closures to build up the required artists and functions. A fourth method is to create a class. \paragraph{Examples} \label{\detokenize{api/animation_api:examples}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/animate_decay:sphx-glr-download-gallery-animation-animate-decay-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Decay} \label{\detokenize{gallery/animation/animate_decay:decay}}\label{\detokenize{gallery/animation/animate_decay:sphx-glr-gallery-animation-animate-decay-py}}\label{\detokenize{gallery/animation/animate_decay::doc}} This example showcases: - using a generator to drive an animation, - changing axes limits during an animation. \noindent\sphinxincludegraphics{{sphx_glr_animate_decay_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{k}{def} \PYG{n+nf}{data\PYGZus{}gen}\PYG{p}{(}\PYG{n}{t}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{:} \PYG{n}{cnt} \PYG{o}{=} \PYG{l+m+mi}{0} \PYG{k}{while} \PYG{n}{cnt} \PYG{o}{\PYGZlt{}} \PYG{l+m+mi}{1000}\PYG{p}{:} \PYG{n}{cnt} \PYG{o}{+}\PYG{o}{=} \PYG{l+m+mi}{1} \PYG{n}{t} \PYG{o}{+}\PYG{o}{=} \PYG{l+m+mf}{0.1} \PYG{k}{yield} \PYG{n}{t}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{n}{t}\PYG{o}{/}\PYG{l+m+mf}{10.}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{init}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.1}\PYG{p}{,} \PYG{l+m+mf}{1.1}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{k}{del} \PYG{n}{xdata}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{k}{del} \PYG{n}{ydata}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]} \PYG{k}{def} \PYG{n+nf}{run}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} update the data} \PYG{n}{t}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{data} \PYG{n}{xdata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{t}\PYG{p}{)} \PYG{n}{ydata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)} \PYG{k}{if} \PYG{n}{t} \PYG{o}{\PYGZgt{}}\PYG{o}{=} \PYG{n}{xmax}\PYG{p}{:} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{xmax}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{)} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{run}\PYG{p}{,} \PYG{n}{data\PYGZus{}gen}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{repeat}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{init}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/animate_decay:sphx-glr-download-gallery-animation-animate-decay-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/bayes_update:sphx-glr-download-gallery-animation-bayes-update-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{The Bayes update} \label{\detokenize{gallery/animation/bayes_update:the-bayes-update}}\label{\detokenize{gallery/animation/bayes_update:sphx-glr-gallery-animation-bayes-update-py}}\label{\detokenize{gallery/animation/bayes_update::doc}} This animation displays the posterior estimate updates as it is refitted when new data arrives. The vertical line represents the theoretical value to which the plotted distribution should converge. \noindent\sphinxincludegraphics{{sphx_glr_bayes_update_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{math} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{import} \PYG{n}{FuncAnimation} \PYG{k}{def} \PYG{n+nf}{beta\PYGZus{}pdf}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{o}{*}\PYG{p}{(}\PYG{n}{a}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{o}{*} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{o}{\PYGZhy{}}\PYG{n}{x}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{p}{(}\PYG{n}{b}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{o}{*} \PYG{n}{math}\PYG{o}{.}\PYG{n}{gamma}\PYG{p}{(}\PYG{n}{a} \PYG{o}{+} \PYG{n}{b}\PYG{p}{)} \PYG{o}{/} \PYG{p}{(}\PYG{n}{math}\PYG{o}{.}\PYG{n}{gamma}\PYG{p}{(}\PYG{n}{a}\PYG{p}{)} \PYG{o}{*} \PYG{n}{math}\PYG{o}{.}\PYG{n}{gamma}\PYG{p}{(}\PYG{n}{b}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{k}{class} \PYG{n+nc}{UpdateDist}\PYG{p}{(}\PYG{n+nb}{object}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{prob}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{success} \PYG{o}{=} \PYG{l+m+mi}{0} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{prob} \PYG{o}{=} \PYG{n}{prob} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{200}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax} \PYG{o}{=} \PYG{n}{ax} \PYG{c+c1}{\PYGZsh{} Set up plot parameters} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} This vertical line represents the theoretical value, to} \PYG{c+c1}{\PYGZsh{} which the plotted distribution should converge.} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{prob}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{init}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{success} \PYG{o}{=} \PYG{l+m+mi}{0} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{p}{,} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{i}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} This way the plot can continuously run and we just keep} \PYG{c+c1}{\PYGZsh{} watching new realizations of the process} \PYG{k}{if} \PYG{n}{i} \PYG{o}{==} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{init}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Choose success based on exceed a threshold with a uniform pick} \PYG{k}{if} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{p}{)} \PYG{o}{\PYGZlt{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{prob}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{success} \PYG{o}{+}\PYG{o}{=} \PYG{l+m+mi}{1} \PYG{n}{y} \PYG{o}{=} \PYG{n}{beta\PYGZus{}pdf}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{x}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{success} \PYG{o}{+} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{(}\PYG{n}{i} \PYG{o}{\PYGZhy{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{success}\PYG{p}{)} \PYG{o}{+} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ud} \PYG{o}{=} \PYG{n}{UpdateDist}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{prob}\PYG{o}{=}\PYG{l+m+mf}{0.7}\PYG{p}{)} \PYG{n}{anim} \PYG{o}{=} \PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ud}\PYG{p}{,} \PYG{n}{frames}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{ud}\PYG{o}{.}\PYG{n}{init}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/bayes_update:sphx-glr-download-gallery-animation-bayes-update-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/double_pendulum_sgskip:sphx-glr-download-gallery-animation-double-pendulum-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{The double pendulum problem} \label{\detokenize{gallery/animation/double_pendulum_sgskip:the-double-pendulum-problem}}\label{\detokenize{gallery/animation/double_pendulum_sgskip:sphx-glr-gallery-animation-double-pendulum-sgskip-py}}\label{\detokenize{gallery/animation/double_pendulum_sgskip::doc}} This animation illustrates the double pendulum problem. Double pendulum formula translated from the C code at \sphinxurl{http://www.physics.usyd.edu.au/~wheat/dpend\_html/solve\_dpend.c} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{numpy} \PYG{k}{import} \PYG{n}{sin}\PYG{p}{,} \PYG{n}{cos} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{scipy}\PYG{n+nn}{.}\PYG{n+nn}{integrate} \PYG{k}{as} \PYG{n+nn}{integrate} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{n}{G} \PYG{o}{=} \PYG{l+m+mf}{9.8} \PYG{c+c1}{\PYGZsh{} acceleration due to gravity, in m/s\PYGZca{}2} \PYG{n}{L1} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} length of pendulum 1 in m} \PYG{n}{L2} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} length of pendulum 2 in m} \PYG{n}{M1} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} mass of pendulum 1 in kg} \PYG{n}{M2} \PYG{o}{=} \PYG{l+m+mf}{1.0} \PYG{c+c1}{\PYGZsh{} mass of pendulum 2 in kg} \PYG{k}{def} \PYG{n+nf}{derivs}\PYG{p}{(}\PYG{n}{state}\PYG{p}{,} \PYG{n}{t}\PYG{p}{)}\PYG{p}{:} \PYG{n}{dydx} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros\PYGZus{}like}\PYG{p}{(}\PYG{n}{state}\PYG{p}{)} \PYG{n}{dydx}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{n}{delta} \PYG{o}{=} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]} \PYG{o}{\PYGZhy{}} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n}{den1} \PYG{o}{=} \PYG{p}{(}\PYG{n}{M1}\PYG{o}{+}\PYG{n}{M2}\PYG{p}{)} \PYG{o}{*} \PYG{n}{L1} \PYG{o}{\PYGZhy{}} \PYG{n}{M2} \PYG{o}{*} \PYG{n}{L1} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{n}{dydx}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{p}{(}\PYG{n}{M2} \PYG{o}{*} \PYG{n}{L1} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{+} \PYG{n}{M2} \PYG{o}{*} \PYG{n}{G} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{+} \PYG{n}{M2} \PYG{o}{*} \PYG{n}{L2} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{M1}\PYG{o}{+}\PYG{n}{M2}\PYG{p}{)} \PYG{o}{*} \PYG{n}{G} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{o}{/} \PYG{n}{den1}\PYG{p}{)} \PYG{n}{dydx}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]} \PYG{o}{=} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{n}{den2} \PYG{o}{=} \PYG{p}{(}\PYG{n}{L2}\PYG{o}{/}\PYG{n}{L1}\PYG{p}{)} \PYG{o}{*} \PYG{n}{den1} \PYG{n}{dydx}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{p}{(}\PYG{o}{\PYGZhy{}} \PYG{n}{M2} \PYG{o}{*} \PYG{n}{L2} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{+} \PYG{p}{(}\PYG{n}{M1}\PYG{o}{+}\PYG{n}{M2}\PYG{p}{)} \PYG{o}{*} \PYG{n}{G} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{o}{*} \PYG{n}{cos}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{M1}\PYG{o}{+}\PYG{n}{M2}\PYG{p}{)} \PYG{o}{*} \PYG{n}{L1} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{*} \PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{delta}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{p}{(}\PYG{n}{M1}\PYG{o}{+}\PYG{n}{M2}\PYG{p}{)} \PYG{o}{*} \PYG{n}{G} \PYG{o}{*} \PYG{n}{sin}\PYG{p}{(}\PYG{n}{state}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)}\PYG{p}{)} \PYG{o}{/} \PYG{n}{den2}\PYG{p}{)} \PYG{k}{return} \PYG{n}{dydx} \PYG{c+c1}{\PYGZsh{} create a time array from 0..100 sampled at 0.05 second steps} \PYG{n}{dt} \PYG{o}{=} \PYG{l+m+mf}{0.05} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{dt}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} th1 and th2 are the initial angles (degrees)} \PYG{c+c1}{\PYGZsh{} w10 and w20 are the initial angular velocities (degrees per second)} \PYG{n}{th1} \PYG{o}{=} \PYG{l+m+mf}{120.0} \PYG{n}{w1} \PYG{o}{=} \PYG{l+m+mf}{0.0} \PYG{n}{th2} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{10.0} \PYG{n}{w2} \PYG{o}{=} \PYG{l+m+mf}{0.0} \PYG{c+c1}{\PYGZsh{} initial state} \PYG{n}{state} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{radians}\PYG{p}{(}\PYG{p}{[}\PYG{n}{th1}\PYG{p}{,} \PYG{n}{w1}\PYG{p}{,} \PYG{n}{th2}\PYG{p}{,} \PYG{n}{w2}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} integrate your ODE using scipy.integrate.} \PYG{n}{y} \PYG{o}{=} \PYG{n}{integrate}\PYG{o}{.}\PYG{n}{odeint}\PYG{p}{(}\PYG{n}{derivs}\PYG{p}{,} \PYG{n}{state}\PYG{p}{,} \PYG{n}{t}\PYG{p}{)} \PYG{n}{x1} \PYG{o}{=} \PYG{n}{L1}\PYG{o}{*}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{y1} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{n}{L1}\PYG{o}{*}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{x2} \PYG{o}{=} \PYG{n}{L2}\PYG{o}{*}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+} \PYG{n}{x1} \PYG{n}{y2} \PYG{o}{=} \PYG{o}{\PYGZhy{}}\PYG{n}{L2}\PYG{o}{*}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+} \PYG{n}{y1} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{autoscale\PYGZus{}on}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{xlim}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ylim}\PYG{o}{=}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}aspect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{equal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{time\PYGZus{}template} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time = }\PYG{l+s+si}{\PYGZpc{}.1f}\PYG{l+s+s1}{s}\PYG{l+s+s1}{\PYGZsq{}} \PYG{n}{time\PYGZus{}text} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.05}\PYG{p}{,} \PYG{l+m+mf}{0.9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{init}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{n}{time\PYGZus{}text}\PYG{o}{.}\PYG{n}{set\PYGZus{}text}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{n}{time\PYGZus{}text} \PYG{k}{def} \PYG{n+nf}{animate}\PYG{p}{(}\PYG{n}{i}\PYG{p}{)}\PYG{p}{:} \PYG{n}{thisx} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{x1}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{]} \PYG{n}{thisy} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{]} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{thisx}\PYG{p}{,} \PYG{n}{thisy}\PYG{p}{)} \PYG{n}{time\PYGZus{}text}\PYG{o}{.}\PYG{n}{set\PYGZus{}text}\PYG{p}{(}\PYG{n}{time\PYGZus{}template} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{i}\PYG{o}{*}\PYG{n}{dt}\PYG{p}{)}\PYG{p}{)} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{n}{time\PYGZus{}text} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{animate}\PYG{p}{,} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{n}{dt}\PYG{o}{*}\PYG{l+m+mi}{1000}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{init}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/double_pendulum_sgskip:sphx-glr-download-gallery-animation-double-pendulum-sgskip-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/animated_histogram:sphx-glr-download-gallery-animation-animated-histogram-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Animated histogram} \label{\detokenize{gallery/animation/animated_histogram:animated-histogram}}\label{\detokenize{gallery/animation/animated_histogram:sphx-glr-gallery-animation-animated-histogram-py}}\label{\detokenize{gallery/animation/animated_histogram::doc}} Use a path patch to draw a bunch of rectangles for an animated histogram. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{patches} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{k}{as} \PYG{n+nn}{path} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} histogram our data with numpy} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get the corners of the rectangles for the histogram} \PYG{n}{left} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{right} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \PYG{n}{bottom} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{left}\PYG{p}{)}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{n} \PYG{n}{nrects} \PYG{o}{=} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{left}\PYG{p}{)} \end{sphinxVerbatim} Here comes the tricky part -- we have to set up the vertex and path codes arrays using \sphinxcode{\sphinxupquote{plt.Path.MOVETO}}, \sphinxcode{\sphinxupquote{plt.Path.LINETO}} and \sphinxcode{\sphinxupquote{plt.Path.CLOSEPOLY}} for each rect. \begin{itemize} \item {} We need 1 \sphinxcode{\sphinxupquote{MOVETO}} per rectangle, which sets the initial point. \item {} We need 3 \sphinxcode{\sphinxupquote{LINETO}}'s, which tell Matplotlib to draw lines from vertex 1 to vertex 2, v2 to v3, and v3 to v4. \item {} We then need one \sphinxcode{\sphinxupquote{CLOSEPOLY}} which tells Matplotlib to draw a line from the v4 to our initial vertex (the \sphinxcode{\sphinxupquote{MOVETO}} vertex), in order to close the polygon. \end{itemize} \begin{sphinxadmonition}{note}{Note:} The vertex for \sphinxcode{\sphinxupquote{CLOSEPOLY}} is ignored, but we still need a placeholder in the \sphinxcode{\sphinxupquote{verts}} array to keep the codes aligned with the vertices. \end{sphinxadmonition} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{nverts} \PYG{o}{=} \PYG{n}{nrects} \PYG{o}{*} \PYG{p}{(}\PYG{l+m+mi}{1} \PYG{o}{+} \PYG{l+m+mi}{3} \PYG{o}{+} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{verts} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{codes} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{ones}\PYG{p}{(}\PYG{n}{nverts}\PYG{p}{,} \PYG{n+nb}{int}\PYG{p}{)} \PYG{o}{*} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{LINETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{MOVETO} \PYG{n}{codes}\PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{]} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{o}{.}\PYG{n}{CLOSEPOLY} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{bottom} \end{sphinxVerbatim} To animate the histogram, we need an \sphinxcode{\sphinxupquote{animate}} function, which generates a random set of numbers and updates the locations of the vertices for the histogram (in this case, only the heights of each rectangle). \sphinxcode{\sphinxupquote{patch}} will eventually be a \sphinxcode{\sphinxupquote{Patch}} object. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{patch} \PYG{o}{=} \PYG{k+kc}{None} \PYG{k}{def} \PYG{n+nf}{animate}\PYG{p}{(}\PYG{n}{i}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} simulate new data coming in} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{n}{n}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)} \PYG{n}{top} \PYG{o}{=} \PYG{n}{bottom} \PYG{o}{+} \PYG{n}{n} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{n}{verts}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{:}\PYG{p}{:}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{top} \PYG{k}{return} \PYG{p}{[}\PYG{n}{patch}\PYG{p}{,} \PYG{p}{]} \end{sphinxVerbatim} And now we build the \sphinxcode{\sphinxupquote{Path}} and \sphinxcode{\sphinxupquote{Patch}} instances for the histogram using our vertices and codes. We add the patch to the \sphinxcode{\sphinxupquote{Axes}} instance, and setup the \sphinxcode{\sphinxupquote{FuncAnimation}} with our animate function. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{barpath} \PYG{o}{=} \PYG{n}{path}\PYG{o}{.}\PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{)} \PYG{n}{patch} \PYG{o}{=} \PYG{n}{patches}\PYG{o}{.}\PYG{n}{PathPatch}\PYG{p}{(} \PYG{n}{barpath}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{yellow}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}patch}\PYG{p}{(}\PYG{n}{patch}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{right}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{.}\PYG{n}{min}\PYG{p}{(}\PYG{p}{)}\PYG{p}{,} \PYG{n}{top}\PYG{o}{.}\PYG{n}{max}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{animate}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{,} \PYG{n}{repeat}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \noindent\sphinxincludegraphics{{sphx_glr_animated_histogram_001}.png} \phantomsection\label{\detokenize{gallery/animation/animated_histogram:sphx-glr-download-gallery-animation-animated-histogram-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/rain:sphx-glr-download-gallery-animation-rain-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Rain simulation} \label{\detokenize{gallery/animation/rain:rain-simulation}}\label{\detokenize{gallery/animation/rain:sphx-glr-gallery-animation-rain-py}}\label{\detokenize{gallery/animation/rain::doc}} Simulates rain drops on a surface by animating the scale and opacity of 50 scatter points. Author: Nicolas P. Rougier \noindent\sphinxincludegraphics{{sphx_glr_rain_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{import} \PYG{n}{FuncAnimation} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create new Figure and an Axes which fills it.} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mi}{7}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create rain data} \PYG{n}{n\PYGZus{}drops} \PYG{o}{=} \PYG{l+m+mi}{50} \PYG{n}{rain\PYGZus{}drops} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{zeros}\PYG{p}{(}\PYG{n}{n\PYGZus{}drops}\PYG{p}{,} \PYG{n}{dtype}\PYG{o}{=}\PYG{p}{[}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{float}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{float}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{growth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{float}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{float}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Initialize the raindrops in random positions and with} \PYG{c+c1}{\PYGZsh{} random growth rates.} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{(}\PYG{n}{n\PYGZus{}drops}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{growth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{200}\PYG{p}{,} \PYG{n}{n\PYGZus{}drops}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Construct the scatter which we will update during animation} \PYG{c+c1}{\PYGZsh{} as the raindrops develop.} \PYG{n}{scat} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{s}\PYG{o}{=}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{o}{=}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{facecolors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{none}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{update}\PYG{p}{(}\PYG{n}{frame\PYGZus{}number}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Get an index which we can use to re\PYGZhy{}spawn the oldest raindrop.} \PYG{n}{current\PYGZus{}index} \PYG{o}{=} \PYG{n}{frame\PYGZus{}number} \PYG{o}{\PYGZpc{}} \PYG{n}{n\PYGZus{}drops} \PYG{c+c1}{\PYGZsh{} Make all colors more transparent as time progresses.} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{\PYGZhy{}}\PYG{o}{=} \PYG{l+m+mf}{1.0}\PYG{o}{/}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{)} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{clip}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Make all circles bigger.} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{+}\PYG{o}{=} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{growth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} Pick a new position for oldest rain drop, resetting its size,} \PYG{c+c1}{\PYGZsh{} color and growth factor.} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{n}{current\PYGZus{}index}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{n}{current\PYGZus{}index}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{5} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{n}{current\PYGZus{}index}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{growth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{[}\PYG{n}{current\PYGZus{}index}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{200}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Update the scatter collection, with the new colors, sizes and positions.} \PYG{n}{scat}\PYG{o}{.}\PYG{n}{set\PYGZus{}edgecolors}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n}{scat}\PYG{o}{.}\PYG{n}{set\PYGZus{}sizes}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n}{scat}\PYG{o}{.}\PYG{n}{set\PYGZus{}offsets}\PYG{p}{(}\PYG{n}{rain\PYGZus{}drops}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{position}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Construct the animation, using the update function as the animation director.} \PYG{n}{animation} \PYG{o}{=} \PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{update}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/rain:sphx-glr-download-gallery-animation-rain-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/random_walk:sphx-glr-download-gallery-animation-random-walk-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Animated 3D random walk} \label{\detokenize{gallery/animation/random_walk:animated-3d-random-walk}}\label{\detokenize{gallery/animation/random_walk:sphx-glr-gallery-animation-random-walk-py}}\label{\detokenize{gallery/animation/random_walk::doc}} \noindent\sphinxincludegraphics{{sphx_glr_random_walk_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{mplot3d}\PYG{n+nn}{.}\PYG{n+nn}{axes3d} \PYG{k}{as} \PYG{n+nn}{p3} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{Gen\PYGZus{}RandLine}\PYG{p}{(}\PYG{n}{length}\PYG{p}{,} \PYG{n}{dims}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Create a line using a random walk algorithm} \PYG{l+s+sd}{ length is the number of points for the line.} \PYG{l+s+sd}{ dims is the number of dimensions the line has.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{n}{lineData} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{empty}\PYG{p}{(}\PYG{p}{(}\PYG{n}{dims}\PYG{p}{,} \PYG{n}{length}\PYG{p}{)}\PYG{p}{)} \PYG{n}{lineData}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{dims}\PYG{p}{)} \PYG{k}{for} \PYG{n}{index} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{length}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} scaling the random numbers by 0.1 so} \PYG{c+c1}{\PYGZsh{} movement is small compared to position.} \PYG{c+c1}{\PYGZsh{} subtraction by 0.5 is to change the range to [\PYGZhy{}0.5, 0.5]} \PYG{c+c1}{\PYGZsh{} to allow a line to move backwards.} \PYG{n}{step} \PYG{o}{=} \PYG{p}{(}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{dims}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{o}{*} \PYG{l+m+mf}{0.1}\PYG{p}{)} \PYG{n}{lineData}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{n}{index}\PYG{p}{]} \PYG{o}{=} \PYG{n}{lineData}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{n}{index} \PYG{o}{\PYGZhy{}} \PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{+} \PYG{n}{step} \PYG{k}{return} \PYG{n}{lineData} \PYG{k}{def} \PYG{n+nf}{update\PYGZus{}lines}\PYG{p}{(}\PYG{n}{num}\PYG{p}{,} \PYG{n}{dataLines}\PYG{p}{,} \PYG{n}{lines}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{line}\PYG{p}{,} \PYG{n}{data} \PYG{o+ow}{in} \PYG{n+nb}{zip}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{dataLines}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} NOTE: there is no .set\PYGZus{}data() for 3 dim data...} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{p}{:}\PYG{n}{num}\PYG{p}{]}\PYG{p}{)} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}3d\PYGZus{}properties}\PYG{p}{(}\PYG{n}{data}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{p}{:}\PYG{n}{num}\PYG{p}{]}\PYG{p}{)} \PYG{k}{return} \PYG{n}{lines} \PYG{c+c1}{\PYGZsh{} Attaching 3D axis to the figure} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{p3}\PYG{o}{.}\PYG{n}{Axes3D}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Fifty lines of random 3\PYGZhy{}D lines} \PYG{n}{data} \PYG{o}{=} \PYG{p}{[}\PYG{n}{Gen\PYGZus{}RandLine}\PYG{p}{(}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{k}{for} \PYG{n}{index} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} Creating fifty line objects.} \PYG{c+c1}{\PYGZsh{} NOTE: Can\PYGZsq{}t pass empty arrays into 3d version of plot()} \PYG{n}{lines} \PYG{o}{=} \PYG{p}{[}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{dat}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{dat}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{dat}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{:}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{k}{for} \PYG{n}{dat} \PYG{o+ow}{in} \PYG{n}{data}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} Setting the axes properties} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim3d}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{X}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim3d}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}zlim3d}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}zlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Z}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3D Test}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creating the Animation object} \PYG{n}{line\PYGZus{}ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{update\PYGZus{}lines}\PYG{p}{,} \PYG{l+m+mi}{25}\PYG{p}{,} \PYG{n}{fargs}\PYG{o}{=}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{lines}\PYG{p}{)}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{50}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/random_walk:sphx-glr-download-gallery-animation-random-walk-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/simple_anim:sphx-glr-download-gallery-animation-simple-anim-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Animated line plot} \label{\detokenize{gallery/animation/simple_anim:animated-line-plot}}\label{\detokenize{gallery/animation/simple_anim:sphx-glr-gallery-animation-simple-anim-py}}\label{\detokenize{gallery/animation/simple_anim::doc}} \noindent\sphinxincludegraphics{{sphx_glr_simple_anim_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{init}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} only required for blitting to give a clean slate.} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}ydata}\PYG{p}{(}\PYG{p}{[}\PYG{n}{np}\PYG{o}{.}\PYG{n}{nan}\PYG{p}{]} \PYG{o}{*} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{)} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{k}{def} \PYG{n+nf}{animate}\PYG{p}{(}\PYG{n}{i}\PYG{p}{)}\PYG{p}{:} \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}ydata}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x} \PYG{o}{+} \PYG{n}{i} \PYG{o}{/} \PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} update the data.} \PYG{k}{return} \PYG{n}{line}\PYG{p}{,} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{animate}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{init}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{save\PYGZus{}count}\PYG{o}{=}\PYG{l+m+mi}{50}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} To save the animation, use e.g.} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} ani.save(\PYGZdq{}movie.mp4\PYGZdq{})} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} or} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} from matplotlib.animation import FFMpegWriter} \PYG{c+c1}{\PYGZsh{} writer = FFMpegWriter(fps=15, metadata=dict(artist=\PYGZsq{}Me\PYGZsq{}), bitrate=1800)} \PYG{c+c1}{\PYGZsh{} ani.save(\PYGZdq{}movie.mp4\PYGZdq{}, writer=writer)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/simple_anim:sphx-glr-download-gallery-animation-simple-anim-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/strip_chart:sphx-glr-download-gallery-animation-strip-chart-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Oscilloscope} \label{\detokenize{gallery/animation/strip_chart:oscilloscope}}\label{\detokenize{gallery/animation/strip_chart:sphx-glr-gallery-animation-strip-chart-py}}\label{\detokenize{gallery/animation/strip_chart::doc}} Emulates an oscilloscope. \noindent\sphinxincludegraphics{{sphx_glr_strip_chart_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{lines} \PYG{k}{import} \PYG{n}{Line2D} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{k}{class} \PYG{n+nc}{Scope}\PYG{p}{(}\PYG{n+nb}{object}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{ax}\PYG{p}{,} \PYG{n}{maxt}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{dt}\PYG{o}{=}\PYG{l+m+mf}{0.02}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax} \PYG{o}{=} \PYG{n}{ax} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{dt} \PYG{o}{=} \PYG{n}{dt} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{maxt} \PYG{o}{=} \PYG{n}{maxt} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line} \PYG{o}{=} \PYG{n}{Line2D}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}line}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{o}{.}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mf}{1.1}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{maxt}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{update}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{:} \PYG{n}{lastt} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{k}{if} \PYG{n}{lastt} \PYG{o}{\PYGZgt{}} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{maxt}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} reset the arrays} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata} \PYG{o}{=} \PYG{p}{[}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata} \PYG{o}{=} \PYG{p}{[}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{]} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{maxt}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{+} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{dt} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{t}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{tdata}\PYG{p}{,} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{line}\PYG{p}{,} \PYG{k}{def} \PYG{n+nf}{emitter}\PYG{p}{(}\PYG{n}{p}\PYG{o}{=}\PYG{l+m+mf}{0.03}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{return a random value with probability p, else 0}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{while} \PYG{k+kc}{True}\PYG{p}{:} \PYG{n}{v} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{if} \PYG{n}{v} \PYG{o}{\PYGZgt{}} \PYG{n}{p}\PYG{p}{:} \PYG{k}{yield} \PYG{l+m+mf}{0.} \PYG{k}{else}\PYG{p}{:} \PYG{k}{yield} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{scope} \PYG{o}{=} \PYG{n}{Scope}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} pass a generator in \PYGZdq{}emitter\PYGZdq{} to produce data for the update func} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{scope}\PYG{o}{.}\PYG{n}{update}\PYG{p}{,} \PYG{n}{emitter}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/strip_chart:sphx-glr-download-gallery-animation-strip-chart-py}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/unchained:sphx-glr-download-gallery-animation-unchained-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{MATPLOTLIB \sphinxstylestrong{UNCHAINED}} \label{\detokenize{gallery/animation/unchained:matplotlib-unchained}}\label{\detokenize{gallery/animation/unchained:sphx-glr-gallery-animation-unchained-py}}\label{\detokenize{gallery/animation/unchained::doc}} Comparative path demonstration of frequency from a fake signal of a pulsar (mostly known because of the cover for Joy Division's Unknown Pleasures). Author: Nicolas P. Rougier \noindent\sphinxincludegraphics{{sphx_glr_unchained_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create new Figure with black background} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+m+mi}{8}\PYG{p}{)}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Add a subplot with no frame} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Generate random data} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{64}\PYG{p}{,} \PYG{l+m+mi}{75}\PYG{p}{)}\PYG{p}{)} \PYG{n}{X} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{data}\PYG{o}{.}\PYG{n}{shape}\PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{G} \PYG{o}{=} \PYG{l+m+mf}{1.5} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{4} \PYG{o}{*} \PYG{n}{X} \PYG{o}{*}\PYG{o}{*} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Generate line plots} \PYG{n}{lines} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Small reduction of the X extents to get a cheap perspective effect} \PYG{n}{xscale} \PYG{o}{=} \PYG{l+m+mi}{1} \PYG{o}{\PYGZhy{}} \PYG{n}{i} \PYG{o}{/} \PYG{l+m+mf}{200.} \PYG{c+c1}{\PYGZsh{} Same for linewidth (thicker strokes on bottom)} \PYG{n}{lw} \PYG{o}{=} \PYG{l+m+mf}{1.5} \PYG{o}{\PYGZhy{}} \PYG{n}{i} \PYG{o}{/} \PYG{l+m+mf}{100.0} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{xscale} \PYG{o}{*} \PYG{n}{X}\PYG{p}{,} \PYG{n}{i} \PYG{o}{+} \PYG{n}{G} \PYG{o}{*} \PYG{n}{data}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{n}{lw}\PYG{p}{)} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set y limit (or first line is cropped because of thickness)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{70}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} No ticks} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}xticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 2 part titles to get different font weights} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{MATPLOTLIB }\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{right}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontweight}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{light}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{16}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{UNCHAINED}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{n}{ha}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{left}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{va}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{w}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sans\PYGZhy{}serif}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontweight}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bold}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{16}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{update}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Shift all data to the right} \PYG{n}{data}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{n}{data}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} Fill\PYGZhy{}in new values} \PYG{n}{data}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{uniform}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Update data} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)}\PYG{p}{)}\PYG{p}{:} \PYG{n}{lines}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}ydata}\PYG{p}{(}\PYG{n}{i} \PYG{o}{+} \PYG{n}{G} \PYG{o}{*} \PYG{n}{data}\PYG{p}{[}\PYG{n}{i}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Return modified artists} \PYG{k}{return} \PYG{n}{lines} \PYG{c+c1}{\PYGZsh{} Construct the animation, using the update function as the animation director.} \PYG{n}{anim} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{update}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/unchained:sphx-glr-download-gallery-animation-unchained-py}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{ArtistAnimation}}} \label{\detokenize{api/animation_api:artistanimation}} \paragraph{Examples} \label{\detokenize{api/animation_api:id1}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/dynamic_image:sphx-glr-download-gallery-animation-dynamic-image-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \subparagraph{Animated image using a precomputed list of images} \label{\detokenize{gallery/animation/dynamic_image:animated-image-using-a-precomputed-list-of-images}}\label{\detokenize{gallery/animation/dynamic_image:sphx-glr-gallery-animation-dynamic-image-py}}\label{\detokenize{gallery/animation/dynamic_image::doc}} \noindent\sphinxincludegraphics{{sphx_glr_dynamic_image_001}.png} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{as} \PYG{n+nn}{animation} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{f}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{o}{+} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{120}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ims is a list of lists, each row is a list of artists to draw in the} \PYG{c+c1}{\PYGZsh{} current frame; here we are just animating one artist, the image, in} \PYG{c+c1}{\PYGZsh{} each frame} \PYG{n}{ims} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{60}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x} \PYG{o}{+}\PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi} \PYG{o}{/} \PYG{l+m+mf}{15.} \PYG{n}{y} \PYG{o}{+}\PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi} \PYG{o}{/} \PYG{l+m+mf}{20.} \PYG{n}{im} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{f}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{,} \PYG{n}{animated}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ims}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{p}{[}\PYG{n}{im}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{ArtistAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ims}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{50}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{repeat\PYGZus{}delay}\PYG{o}{=}\PYG{l+m+mi}{1000}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} To save the animation, use e.g.} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} ani.save(\PYGZdq{}movie.mp4\PYGZdq{})} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} or} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} from matplotlib.animation import FFMpegWriter} \PYG{c+c1}{\PYGZsh{} writer = FFMpegWriter(fps=15, metadata=dict(artist=\PYGZsq{}Me\PYGZsq{}), bitrate=1800)} \PYG{c+c1}{\PYGZsh{} ani.save(\PYGZdq{}movie.mp4\PYGZdq{}, writer=writer)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/dynamic_image:sphx-glr-download-gallery-animation-dynamic-image-py}} \subsection{Writer Classes} \label{\detokenize{api/animation_api:writer-classes}} The provided writers fall into a few broad categories. The Pillow writer relies on the Pillow library to write the animation, keeping all data in memory. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PillowWriter}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.animation.PillowWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib-animation-pillowwriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter::doc}}\index{PillowWriter (class in matplotlib.animation)@\spxentry{PillowWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{PillowWriter}}}{\emph{*args}, \emph{**kwargs}}{}~\index{\_\_init\_\_() (matplotlib.animation.PillowWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.PillowWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{finish}}}}}(self) & Finish any processing for writing the movie. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.grab_frame}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grab\_frame}}}}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.isAvailable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isAvailable}}}}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup}}}}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{finish() (matplotlib.animation.PillowWriter method)@\spxentry{finish()}\spxextra{matplotlib.animation.PillowWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.finish}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finish}}}{\emph{self}}{} Finish any processing for writing the movie. \end{fulllineitems} \index{grab\_frame() (matplotlib.animation.PillowWriter method)@\spxentry{grab\_frame()}\spxextra{matplotlib.animation.PillowWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.grab_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grab\_frame}}}{\emph{self}, \emph{**savefig\_kwargs}}{} Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig\_kwargs are passed on to the \sphinxcode{\sphinxupquote{savefig}} command that saves the figure. \end{fulllineitems} \index{isAvailable() (matplotlib.animation.PillowWriter class method)@\spxentry{isAvailable()}\spxextra{matplotlib.animation.PillowWriter class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.isAvailable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{isAvailable}}}{}{} Check to see if a MovieWriter subclass is actually available. \end{fulllineitems} \index{setup() (matplotlib.animation.PillowWriter method)@\spxentry{setup()}\spxextra{matplotlib.animation.PillowWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.PillowWriter:matplotlib.animation.PillowWriter.setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{setup}}}{\emph{self}, \emph{fig}, \emph{outfile}, \emph{dpi=None}}{} Perform setup for writing the movie file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that contains the information for frames \item[{\sphinxstylestrong{outfile}}] \leavevmode{[}string{]} The filename of the resulting movie file \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}int, optional{]} The DPI (or resolution) for the file. This controls the size in pixels of the resulting movie file. Default is fig.dpi. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} The pipe-based writers stream the captured frames over a pipe to an external process. The pipe-based variants tend to be more performant, but may not work on all systems. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter:matplotlib.animation.FFMpegWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FFMpegWriter}}}}} & Pipe-based ffmpeg writer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter:matplotlib.animation.ImageMagickWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageMagickWriter}}}}} & Pipe-based animated gif. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter:matplotlib.animation.AVConvWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AVConvWriter}}}}} & Pipe-based avconv writer. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.animation.FFMpegWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter:matplotlib-animation-ffmpegwriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter::doc}}\index{FFMpegWriter (class in matplotlib.animation)@\spxentry{FFMpegWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter:matplotlib.animation.FFMpegWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{FFMpegWriter}}}{\emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} Pipe-based ffmpeg writer. Frames are streamed directly to ffmpeg via a pipe and written in a single pass. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.FFMpegWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.FFMpegWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter:matplotlib.animation.FFMpegWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegWriter:matplotlib.animation.FFMpegWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self{[}, fps, codec, bitrate, ...{]}) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} \subsubsection{matplotlib.animation.ImageMagickWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter:matplotlib-animation-imagemagickwriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter::doc}}\index{ImageMagickWriter (class in matplotlib.animation)@\spxentry{ImageMagickWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter:matplotlib.animation.ImageMagickWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{ImageMagickWriter}}}{\emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} Pipe-based animated gif. Frames are streamed directly to ImageMagick via a pipe and written in a single pass. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.ImageMagickWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.ImageMagickWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter:matplotlib.animation.ImageMagickWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickWriter:matplotlib.animation.ImageMagickWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self{[}, fps, codec, bitrate, ...{]}) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{delay}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} \subsubsection{matplotlib.animation.AVConvWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter:matplotlib-animation-avconvwriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter::doc}}\index{AVConvWriter (class in matplotlib.animation)@\spxentry{AVConvWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter:matplotlib.animation.AVConvWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{AVConvWriter}}}{\emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} Pipe-based avconv writer. Frames are streamed directly to avconv via a pipe and written in a single pass. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.AVConvWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.AVConvWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter:matplotlib.animation.AVConvWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvWriter:matplotlib.animation.AVConvWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self{[}, fps, codec, bitrate, ...{]}) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} The file-based writers save temporary files for each frame which are stitched into a single file at the end. Although slower, these writers can be easier to debug. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FFMpegFileWriter}}}}} & File-based ffmpeg writer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageMagickFileWriter}}}}} & File-based animated gif writer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter:matplotlib.animation.AVConvFileWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AVConvFileWriter}}}}} & File-based avconv writer. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.animation.FFMpegFileWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib-animation-ffmpegfilewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter::doc}}\index{FFMpegFileWriter (class in matplotlib.animation)@\spxentry{FFMpegFileWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{FFMpegFileWriter}}}{\emph{*args}, \emph{**kwargs}}{} File-based ffmpeg writer. Frames are written to temporary files on disk and then stitched together at the end. \index{\_\_init\_\_() (matplotlib.animation.FFMpegFileWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.FFMpegFileWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi, ...{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_format}} & Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses. \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter.supported_formats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supported\_formats}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{supported\_formats (matplotlib.animation.FFMpegFileWriter attribute)@\spxentry{supported\_formats}\spxextra{matplotlib.animation.FFMpegFileWriter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegFileWriter:matplotlib.animation.FFMpegFileWriter.supported_formats}}\pysigline{\sphinxbfcode{\sphinxupquote{supported\_formats}}\sphinxbfcode{\sphinxupquote{ = {[}'png', 'jpeg', 'ppm', 'tiff', 'sgi', 'bmp', 'pbm', 'raw', 'rgba'{]}}}} \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.animation.ImageMagickFileWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib-animation-imagemagickfilewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter::doc}}\index{ImageMagickFileWriter (class in matplotlib.animation)@\spxentry{ImageMagickFileWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{ImageMagickFileWriter}}}{\emph{*args}, \emph{**kwargs}}{} File-based animated gif writer. Frames are written to temporary files on disk and then stitched together at the end. \index{\_\_init\_\_() (matplotlib.animation.ImageMagickFileWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.ImageMagickFileWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi, ...{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{delay}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_format}} & Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses. \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter.supported_formats}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{supported\_formats}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{supported\_formats (matplotlib.animation.ImageMagickFileWriter attribute)@\spxentry{supported\_formats}\spxextra{matplotlib.animation.ImageMagickFileWriter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickFileWriter:matplotlib.animation.ImageMagickFileWriter.supported_formats}}\pysigline{\sphinxbfcode{\sphinxupquote{supported\_formats}}\sphinxbfcode{\sphinxupquote{ = {[}'png', 'jpeg', 'ppm', 'tiff', 'sgi', 'bmp', 'pbm', 'raw', 'rgba'{]}}}} \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.animation.AVConvFileWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter:matplotlib-animation-avconvfilewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter::doc}}\index{AVConvFileWriter (class in matplotlib.animation)@\spxentry{AVConvFileWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter:matplotlib.animation.AVConvFileWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{AVConvFileWriter}}}{\emph{*args}, \emph{**kwargs}}{} File-based avconv writer. Frames are written to temporary files on disk and then stitched together at the end. \index{\_\_init\_\_() (matplotlib.animation.AVConvFileWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.AVConvFileWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter:matplotlib.animation.AVConvFileWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvFileWriter:matplotlib.animation.AVConvFileWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline \sphinxcode{\sphinxupquote{cleanup}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline \sphinxcode{\sphinxupquote{finish}}(self) & Finish any processing for writing the movie. \\ \hline \sphinxcode{\sphinxupquote{grab\_frame}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline \sphinxcode{\sphinxupquote{setup}}(self, fig, outfile{[}, dpi, ...{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{args\_key}} & \\ \hline \sphinxcode{\sphinxupquote{exec\_key}} & \\ \hline \sphinxcode{\sphinxupquote{frame\_format}} & Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses. \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline \sphinxcode{\sphinxupquote{supported\_formats}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} Fundamentally, a {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} provides a way to grab sequential frames from the same underlying {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} object. The base class {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} implements 3 methods and a context manager. The only difference between the pipe-based and file-based writers is in the arguments to their respective \sphinxcode{\sphinxupquote{setup}} methods. The \sphinxcode{\sphinxupquote{setup()}} method is used to prepare the writer (possibly opening a pipe), successive calls to \sphinxcode{\sphinxupquote{grab\_frame()}} capture a single frame at a time and \sphinxcode{\sphinxupquote{finish()}} finalizes the movie and writes the output file to disk. For example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{moviewriter} \PYG{o}{=} \PYG{n}{MovieWriter}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{setup}\PYG{p}{(}\PYG{n}{fig}\PYG{o}{=}\PYG{n}{fig}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my\PYGZus{}movie.ext}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)}\PYG{p}{:} \PYG{n}{update\PYGZus{}figure}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{grab\PYGZus{}frame}\PYG{p}{(}\PYG{p}{)} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{finish}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} If using the writer classes directly (not through {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save}}}}}), it is strongly encouraged to use the \sphinxcode{\sphinxupquote{saving}} context manager \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{saving}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{myfile.mp4}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)}\PYG{p}{:} \PYG{n}{update\PYGZus{}figure}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{grab\PYGZus{}frame}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} to ensures that setup and cleanup are performed as necessary. \subsubsection{Examples} \label{\detokenize{api/animation_api:id2}} \begin{sphinxadmonition}{note}{Note:} Click {\hyperref[\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-download-gallery-animation-frame-grabbing-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to download the full example code \end{sphinxadmonition} \paragraph{Frame grabbing} \label{\detokenize{gallery/animation/frame_grabbing_sgskip:frame-grabbing}}\label{\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-gallery-animation-frame-grabbing-sgskip-py}}\label{\detokenize{gallery/animation/frame_grabbing_sgskip::doc}} Use a MovieWriter directly to grab individual frames and write them to a file. This avoids any event loop integration, and thus works even with the Agg backend. This is not recommended for use in an interactive setting. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Agg}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{animation} \PYG{k}{import} \PYG{n}{FFMpegWriter} \PYG{c+c1}{\PYGZsh{} Fixing random state for reproducibility} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \PYG{n}{metadata} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Movie Test}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{artist}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{comment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Movie support!}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{writer} \PYG{o}{=} \PYG{n}{FFMpegWriter}\PYG{p}{(}\PYG{n}{fps}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{,} \PYG{n}{metadata}\PYG{o}{=}\PYG{n}{metadata}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{l}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k\PYGZhy{}o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xlim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{ylim}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{)} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0} \PYG{o}{=} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0} \PYG{k}{with} \PYG{n}{writer}\PYG{o}{.}\PYG{n}{saving}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{writer\PYGZus{}test.mp4}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{:} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x0} \PYG{o}{+}\PYG{o}{=} \PYG{l+m+mf}{0.1} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{p}{)} \PYG{n}{y0} \PYG{o}{+}\PYG{o}{=} \PYG{l+m+mf}{0.1} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{randn}\PYG{p}{(}\PYG{p}{)} \PYG{n}{l}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{)} \PYG{n}{writer}\PYG{o}{.}\PYG{n}{grab\PYGZus{}frame}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \phantomsection\label{\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-download-gallery-animation-frame-grabbing-sgskip-py}} \subsection{Helper Classes} \label{\detokenize{api/animation_api:helper-classes}}\label{\detokenize{api/animation_api:ani-writer-classes}} \subsubsection{Animation Base Classes} \label{\detokenize{api/animation_api:animation-base-classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} & This class wraps the creation of an animation using matplotlib. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib.animation.TimedAnimation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TimedAnimation}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} subclass for time-based animation. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.animation.TimedAnimation} \label{\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib-animation-timedanimation}}\label{\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation::doc}}\index{TimedAnimation (class in matplotlib.animation)@\spxentry{TimedAnimation}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib.animation.TimedAnimation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{TimedAnimation}}}{\emph{fig}, \emph{interval=200}, \emph{repeat\_delay=None}, \emph{repeat=True}, \emph{event\_source=None}, \emph{*args}, \emph{**kwargs}}{} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation}}}}} subclass for time-based animation. A new frame is drawn every \sphinxstyleemphasis{interval} milliseconds. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that is used to get draw, resize, and any other needed events. \item[{\sphinxstylestrong{interval}}] \leavevmode{[}number, optional{]} Delay between frames in milliseconds. Defaults to 200. \item[{\sphinxstylestrong{repeat\_delay}}] \leavevmode{[}number, optional{]} If the animation in repeated, adds a delay in milliseconds before repeating the animation. Defaults to \sphinxcode{\sphinxupquote{None}}. \item[{\sphinxstylestrong{repeat}}] \leavevmode{[}bool, optional{]} Controls whether the animation should repeat when the sequence of frames is completed. Defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{blit}}] \leavevmode{[}bool, optional{]} Controls whether blitting is used to optimize drawing. Defaults to \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.TimedAnimation method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.TimedAnimation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib.animation.TimedAnimation.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fig}, \emph{interval=200}, \emph{repeat\_delay=None}, \emph{repeat=True}, \emph{event\_source=None}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.TimedAnimation:matplotlib.animation.TimedAnimation.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, fig{[}, interval, ...{]}) & Initialize self. \\ \hline \sphinxcode{\sphinxupquote{new\_frame\_seq}}(self) & Return a new sequence of frame information. \\ \hline \sphinxcode{\sphinxupquote{new\_saved\_frame\_seq}}(self) & Return a new sequence of saved/cached frame information. \\ \hline \sphinxcode{\sphinxupquote{save}}(self, filename{[}, writer, fps, dpi, ...{]}) & Save the animation as a movie file by drawing every frame. \\ \hline \sphinxcode{\sphinxupquote{to\_html5\_video}}(self{[}, embed\_limit{]}) & Convert the animation to an HTML5 \sphinxcode{\sphinxupquote{\textless{}video\textgreater{}}} tag. \\ \hline \sphinxcode{\sphinxupquote{to\_jshtml}}(self{[}, fps, embed\_frames, ...{]}) & Generate HTML representation of the animation \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} \subsubsection{Writer Registry} \label{\detokenize{api/animation_api:writer-registry}} A module-level registry is provided to map between the name of the writer and the class to allow a string to be passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save}}}}} instead of a writer instance. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriterRegistry}}}}} & Registry of available writer classes by human readable name. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.animation.MovieWriterRegistry} \label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib-animation-moviewriterregistry}}\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry::doc}}\index{MovieWriterRegistry (class in matplotlib.animation)@\spxentry{MovieWriterRegistry}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{MovieWriterRegistry}}} Registry of available writer classes by human readable name. \index{\_\_init\_\_() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self) & Initialize self. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.ensure_not_dirty}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ensure\_not\_dirty}}}}}(self) & If dirty, reasks the writers if they are available \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.is_available}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_available}}}}}(self, name) & Check if given writer is available by name. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{list}}}}}(self) & Get a list of available MovieWriters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.register}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register}}}}}(self, name) & Decorator for registering a class under a name. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.reset_available_writers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{reset\_available\_writers}}}}}(self) & Reset the available state of all registered writers \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.set_dirty}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dirty}}}}}(self) & Sets a flag to re-setup the writers. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{ensure\_not\_dirty() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{ensure\_not\_dirty()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.ensure_not_dirty}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ensure\_not\_dirty}}}{\emph{self}}{} If dirty, reasks the writers if they are available \end{fulllineitems} \index{is\_available() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{is\_available()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.is_available}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_available}}}{\emph{self}, \emph{name}}{} Check if given writer is available by name. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{available}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{list() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{list()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{list}}}{\emph{self}}{} Get a list of available MovieWriters. \end{fulllineitems} \index{register() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{register()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.register}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{register}}}{\emph{self}, \emph{name}}{} Decorator for registering a class under a name. Example use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nd}{@registry}\PYG{o}{.}\PYG{n}{register}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)} \PYG{k}{class} \PYG{n+nc}{Foo}\PYG{p}{:} \PYG{k}{pass} \end{sphinxVerbatim} \end{fulllineitems} \index{reset\_available\_writers() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{reset\_available\_writers()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.reset_available_writers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reset\_available\_writers}}}{\emph{self}}{} Reset the available state of all registered writers \end{fulllineitems} \index{set\_dirty() (matplotlib.animation.MovieWriterRegistry method)@\spxentry{set\_dirty()}\spxextra{matplotlib.animation.MovieWriterRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriterRegistry:matplotlib.animation.MovieWriterRegistry.set_dirty}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dirty}}}{\emph{self}}{} Sets a flag to re-setup the writers. \end{fulllineitems} \end{fulllineitems} \subsubsection{Writer Base Classes} \label{\detokenize{api/animation_api:writer-base-classes}} To reduce code duplication base classes \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractMovieWriter}}}}} & Abstract base class for writing movies. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} & Base class for writing movies. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FileMovieWriter}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} for writing to individual files and stitching at the end. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.animation.AbstractMovieWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib-animation-abstractmoviewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter::doc}}\index{AbstractMovieWriter (class in matplotlib.animation)@\spxentry{AbstractMovieWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{AbstractMovieWriter}}} Abstract base class for writing movies. Fundamentally, what a MovieWriter does is provide is a way to grab frames by calling grab\_frame(). setup() is called to start the process and finish() is called afterwards. This class is set up to provide for writing movie frame data to a pipe. saving() is provided as a context manager to facilitate this process as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{saving}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{outfile}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{myfile.mp4}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} Iterate over frames} \PYG{n}{moviewriter}\PYG{o}{.}\PYG{n}{grab\PYGZus{}frame}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{savefig\PYGZus{}kwargs}\PYG{p}{)} \end{sphinxVerbatim} The use of the context manager ensures that setup() and finish() are performed as necessary. An instance of a concrete subclass of this class can be given as the \sphinxcode{\sphinxupquote{writer}} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Animation.save()}}}}}. \index{\_\_init\_\_() (matplotlib.animation.AbstractMovieWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.AbstractMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{/}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{finish}}}}}(self) & Finish any processing for writing the movie. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.grab_frame}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grab\_frame}}}}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.saving}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{saving}}}}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup}}}}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{finish() (matplotlib.animation.AbstractMovieWriter method)@\spxentry{finish()}\spxextra{matplotlib.animation.AbstractMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.finish}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finish}}}{\emph{self}}{} Finish any processing for writing the movie. \end{fulllineitems} \index{grab\_frame() (matplotlib.animation.AbstractMovieWriter method)@\spxentry{grab\_frame()}\spxextra{matplotlib.animation.AbstractMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.grab_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grab\_frame}}}{\emph{self}, \emph{**savefig\_kwargs}}{} Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig\_kwargs are passed on to the \sphinxcode{\sphinxupquote{savefig}} command that saves the figure. \end{fulllineitems} \index{saving() (matplotlib.animation.AbstractMovieWriter method)@\spxentry{saving()}\spxextra{matplotlib.animation.AbstractMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.saving}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{saving}}}{\emph{self}, \emph{fig}, \emph{outfile}, \emph{dpi}, \emph{*args}, \emph{**kwargs}}{} Context manager to facilitate writing the movie file. \sphinxcode{\sphinxupquote{*args, **kw}} are any parameters that should be passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup}}}}}. \end{fulllineitems} \index{setup() (matplotlib.animation.AbstractMovieWriter method)@\spxentry{setup()}\spxextra{matplotlib.animation.AbstractMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AbstractMovieWriter:matplotlib.animation.AbstractMovieWriter.setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{setup}}}{\emph{self}, \emph{fig}, \emph{outfile}, \emph{dpi=None}}{} Perform setup for writing the movie file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} instance{]} The figure object that contains the information for frames \item[{\sphinxstylestrong{outfile}}] \leavevmode{[}string{]} The filename of the resulting movie file \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}int, optional{]} The DPI (or resolution) for the file. This controls the size in pixels of the resulting movie file. Default is \sphinxcode{\sphinxupquote{fig.dpi}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{matplotlib.animation.MovieWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib-animation-moviewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter::doc}}\index{MovieWriter (class in matplotlib.animation)@\spxentry{MovieWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{MovieWriter}}}{\emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} Base class for writing movies. This is a base class for MovieWriter subclasses that write a movie frame data to a pipe. You cannot instantiate this class directly. See examples for how to use its subclasses. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{frame\_format}}] \leavevmode{[}str{]} The format used in writing frame data, defaults to 'rgba' \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The figure to capture data from. This must be provided by the sub-classes. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \index{\_\_init\_\_() (matplotlib.animation.MovieWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.MovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{fps=5}, \emph{codec=None}, \emph{bitrate=None}, \emph{extra\_args=None}, \emph{metadata=None}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self{[}, fps, codec, bitrate, ...{]}) & MovieWriter \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.bin_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bin\_path}}}}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.cleanup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cleanup}}}}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{finish}}}}}(self) & Finish any processing for writing the movie. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.grab_frame}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grab\_frame}}}}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.isAvailable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isAvailable}}}}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup}}}}}(self, fig, outfile{[}, dpi{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.frame_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_size}}}}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{bin\_path() (matplotlib.animation.MovieWriter class method)@\spxentry{bin\_path()}\spxextra{matplotlib.animation.MovieWriter class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.bin_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{bin\_path}}}{}{} Return the binary path to the commandline tool used by a specific subclass. This is a class method so that the tool can be looked for before making a particular MovieWriter subclass available. \end{fulllineitems} \index{cleanup() (matplotlib.animation.MovieWriter method)@\spxentry{cleanup()}\spxextra{matplotlib.animation.MovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.cleanup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cleanup}}}{\emph{self}}{} Clean-up and collect the process used to write the movie file. \end{fulllineitems} \index{finish() (matplotlib.animation.MovieWriter method)@\spxentry{finish()}\spxextra{matplotlib.animation.MovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.finish}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finish}}}{\emph{self}}{} Finish any processing for writing the movie. \end{fulllineitems} \index{frame\_size (matplotlib.animation.MovieWriter attribute)@\spxentry{frame\_size}\spxextra{matplotlib.animation.MovieWriter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.frame_size}}\pysigline{\sphinxbfcode{\sphinxupquote{frame\_size}}} A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \end{fulllineitems} \index{grab\_frame() (matplotlib.animation.MovieWriter method)@\spxentry{grab\_frame()}\spxextra{matplotlib.animation.MovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.grab_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grab\_frame}}}{\emph{self}, \emph{**savefig\_kwargs}}{} Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig\_kwargs are passed on to the \sphinxcode{\sphinxupquote{savefig}} command that saves the figure. \end{fulllineitems} \index{isAvailable() (matplotlib.animation.MovieWriter class method)@\spxentry{isAvailable()}\spxextra{matplotlib.animation.MovieWriter class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.isAvailable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{isAvailable}}}{}{} Check to see if a MovieWriter subclass is actually available. \end{fulllineitems} \index{setup() (matplotlib.animation.MovieWriter method)@\spxentry{setup()}\spxextra{matplotlib.animation.MovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter.setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{setup}}}{\emph{self}, \emph{fig}, \emph{outfile}, \emph{dpi=None}}{} Perform setup for writing the movie file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure object that contains the information for frames \item[{\sphinxstylestrong{outfile}}] \leavevmode{[}string{]} The filename of the resulting movie file \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}int, optional{]} The DPI (or resolution) for the file. This controls the size in pixels of the resulting movie file. Default is fig.dpi. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{matplotlib.animation.FileMovieWriter} \label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib-animation-filemoviewriter}}\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter::doc}}\index{FileMovieWriter (class in matplotlib.animation)@\spxentry{FileMovieWriter}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{FileMovieWriter}}}{\emph{*args}, \emph{**kwargs}}{} {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} for writing to individual files and stitching at the end. This must be sub-classed to be useful. \index{\_\_init\_\_() (matplotlib.animation.FileMovieWriter method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.FileMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} MovieWriter \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fps}}] \leavevmode{[}int{]} Framerate for movie. \item[{\sphinxstylestrong{codec}}] \leavevmode{[}string or None, optional{]} The codec to use. If \sphinxcode{\sphinxupquote{None}} (the default) the \sphinxcode{\sphinxupquote{animation.codec}} rcParam is used. \item[{\sphinxstylestrong{bitrate}}] \leavevmode{[}int or None, optional{]} The bitrate for the saved movie file, which is one way to control the output file size and quality. The default value is \sphinxcode{\sphinxupquote{None}}, which uses the \sphinxcode{\sphinxupquote{animation.bitrate}} rcParam. A value of -1 implies that the bitrate should be determined automatically by the underlying utility. \item[{\sphinxstylestrong{extra\_args}}] \leavevmode{[}list of strings or None, optional{]} A list of extra string arguments to be passed to the underlying movie utility. The default is \sphinxcode{\sphinxupquote{None}}, which passes the additional arguments in the \sphinxcode{\sphinxupquote{animation.extra\_args}} rcParam. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}Dict{[}str, str{]} or None{]} A dictionary of keys and values for metadata to include in the output file. Some keys that may be of use include: title, artist, genre, subject, copyright, srcform, comment. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & MovieWriter \\ \hline \sphinxcode{\sphinxupquote{bin\_path}}() & Return the binary path to the commandline tool used by a specific subclass. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.cleanup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cleanup}}}}}(self) & Clean-up and collect the process used to write the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{finish}}}}}(self) & Finish any processing for writing the movie. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.grab_frame}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grab\_frame}}}}}(self, \textbackslash{}*\textbackslash{}*savefig\_kwargs) & Grab the image information from the figure and save as a movie frame. \\ \hline \sphinxcode{\sphinxupquote{isAvailable}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \sphinxcode{\sphinxupquote{saving}}(self, fig, outfile, dpi, \textbackslash{}*args, ...) & Context manager to facilitate writing the movie file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.setup}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setup}}}}}(self, fig, outfile{[}, dpi, ...{]}) & Perform setup for writing the movie file. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.frame_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_format}}}}} & Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses. \\ \hline \sphinxcode{\sphinxupquote{frame\_size}} & A tuple \sphinxcode{\sphinxupquote{(width, height)}} in pixels of a movie frame. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{cleanup() (matplotlib.animation.FileMovieWriter method)@\spxentry{cleanup()}\spxextra{matplotlib.animation.FileMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.cleanup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cleanup}}}{\emph{self}}{} Clean-up and collect the process used to write the movie file. \end{fulllineitems} \index{finish() (matplotlib.animation.FileMovieWriter method)@\spxentry{finish()}\spxextra{matplotlib.animation.FileMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.finish}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finish}}}{\emph{self}}{} Finish any processing for writing the movie. \end{fulllineitems} \index{frame\_format (matplotlib.animation.FileMovieWriter attribute)@\spxentry{frame\_format}\spxextra{matplotlib.animation.FileMovieWriter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.frame_format}}\pysigline{\sphinxbfcode{\sphinxupquote{frame\_format}}} Format (png, jpeg, etc.) to use for saving the frames, which can be decided by the individual subclasses. \end{fulllineitems} \index{grab\_frame() (matplotlib.animation.FileMovieWriter method)@\spxentry{grab\_frame()}\spxextra{matplotlib.animation.FileMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.grab_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grab\_frame}}}{\emph{self}, \emph{**savefig\_kwargs}}{} Grab the image information from the figure and save as a movie frame. All keyword arguments in savefig\_kwargs are passed on to the \sphinxcode{\sphinxupquote{savefig}} command that saves the figure. \end{fulllineitems} \index{setup() (matplotlib.animation.FileMovieWriter method)@\spxentry{setup()}\spxextra{matplotlib.animation.FileMovieWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FileMovieWriter:matplotlib.animation.FileMovieWriter.setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{setup}}}{\emph{self}, \emph{fig}, \emph{outfile}, \emph{dpi=None}, \emph{frame\_prefix='\_tmp'}, \emph{clear\_temp=True}}{} Perform setup for writing the movie file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} The figure to grab the rendered frames from. \item[{\sphinxstylestrong{outfile}}] \leavevmode{[}str{]} The filename of the resulting movie file. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}number, optional{]} The dpi of the output file. This, with the figure size, controls the size in pixels of the resulting movie file. Default is fig.dpi. \item[{\sphinxstylestrong{frame\_prefix}}] \leavevmode{[}str, optional{]} The filename prefix to use for temporary files. Defaults to \sphinxcode{\sphinxupquote{'\_tmp'}}. \item[{\sphinxstylestrong{clear\_temp}}] \leavevmode{[}bool, optional{]} If the temporary files should be deleted after stitching the final result. Setting this to \sphinxcode{\sphinxupquote{False}} can be useful for debugging. Defaults to \sphinxcode{\sphinxupquote{True}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} and mixins \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AVConvBase}}}}} & Mixin class for avconv output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FFMpegBase}}}}} & Mixin class for FFMpeg output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageMagickBase}}}}} & Mixin class for ImageMagick output. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.animation.AVConvBase} \label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib-animation-avconvbase}}\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase::doc}}\index{AVConvBase (class in matplotlib.animation)@\spxentry{AVConvBase}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{AVConvBase}}} Mixin class for avconv output. To be useful this must be multiply-inherited from with a \sphinxcode{\sphinxupquote{MovieWriterBase}} sub-class. \index{\_\_init\_\_() (matplotlib.animation.AVConvBase method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.AVConvBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{/}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.isAvailable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isAvailable}}}}}() & Check to see if a MovieWriter subclass is actually available. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.args_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{args\_key}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.exec_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{exec\_key}}}}} & \\ \hline \sphinxcode{\sphinxupquote{output\_args}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{args\_key (matplotlib.animation.AVConvBase attribute)@\spxentry{args\_key}\spxextra{matplotlib.animation.AVConvBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.args_key}}\pysigline{\sphinxbfcode{\sphinxupquote{args\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.avconv\_args'}}} \end{fulllineitems} \index{exec\_key (matplotlib.animation.AVConvBase attribute)@\spxentry{exec\_key}\spxextra{matplotlib.animation.AVConvBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.exec_key}}\pysigline{\sphinxbfcode{\sphinxupquote{exec\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.avconv\_path'}}} \end{fulllineitems} \index{isAvailable() (matplotlib.animation.AVConvBase class method)@\spxentry{isAvailable()}\spxextra{matplotlib.animation.AVConvBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.AVConvBase:matplotlib.animation.AVConvBase.isAvailable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{isAvailable}}}{}{} Check to see if a MovieWriter subclass is actually available. \end{fulllineitems} \end{fulllineitems} \paragraph{matplotlib.animation.FFMpegBase} \label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib-animation-ffmpegbase}}\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase::doc}}\index{FFMpegBase (class in matplotlib.animation)@\spxentry{FFMpegBase}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{FFMpegBase}}} Mixin class for FFMpeg output. To be useful this must be multiply-inherited from with a \sphinxcode{\sphinxupquote{MovieWriterBase}} sub-class. \index{\_\_init\_\_() (matplotlib.animation.FFMpegBase method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.FFMpegBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{/}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.isAvailable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isAvailable}}}}}() & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.args_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{args\_key}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.exec_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{exec\_key}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.output_args}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_args}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{args\_key (matplotlib.animation.FFMpegBase attribute)@\spxentry{args\_key}\spxextra{matplotlib.animation.FFMpegBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.args_key}}\pysigline{\sphinxbfcode{\sphinxupquote{args\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.ffmpeg\_args'}}} \end{fulllineitems} \index{exec\_key (matplotlib.animation.FFMpegBase attribute)@\spxentry{exec\_key}\spxextra{matplotlib.animation.FFMpegBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.exec_key}}\pysigline{\sphinxbfcode{\sphinxupquote{exec\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.ffmpeg\_path'}}} \end{fulllineitems} \index{isAvailable() (matplotlib.animation.FFMpegBase class method)@\spxentry{isAvailable()}\spxextra{matplotlib.animation.FFMpegBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.isAvailable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{isAvailable}}}{}{}~ \end{fulllineitems} \index{output\_args (matplotlib.animation.FFMpegBase attribute)@\spxentry{output\_args}\spxextra{matplotlib.animation.FFMpegBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.FFMpegBase:matplotlib.animation.FFMpegBase.output_args}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_args}}}~ \end{fulllineitems} \end{fulllineitems} \paragraph{matplotlib.animation.ImageMagickBase} \label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib-animation-imagemagickbase}}\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase::doc}}\index{ImageMagickBase (class in matplotlib.animation)@\spxentry{ImageMagickBase}\spxextra{class in matplotlib.animation}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.animation.}}\sphinxbfcode{\sphinxupquote{ImageMagickBase}}} Mixin class for ImageMagick output. To be useful this must be multiply-inherited from with a \sphinxcode{\sphinxupquote{MovieWriterBase}} sub-class. \index{\_\_init\_\_() (matplotlib.animation.ImageMagickBase method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.animation.ImageMagickBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{/}, \emph{*args}, \emph{**kwargs}}{} Initialize self. See help(type(self)) for accurate signature. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.bin_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bin\_path}}}}}() & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.isAvailable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isAvailable}}}}}() & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection*{Attributes} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.args_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{args\_key}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.delay}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delay}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.exec_key}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{exec\_key}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.output_args}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_args}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{args\_key (matplotlib.animation.ImageMagickBase attribute)@\spxentry{args\_key}\spxextra{matplotlib.animation.ImageMagickBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.args_key}}\pysigline{\sphinxbfcode{\sphinxupquote{args\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.convert\_args'}}} \end{fulllineitems} \index{bin\_path() (matplotlib.animation.ImageMagickBase class method)@\spxentry{bin\_path()}\spxextra{matplotlib.animation.ImageMagickBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.bin_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{bin\_path}}}{}{}~ \end{fulllineitems} \index{delay (matplotlib.animation.ImageMagickBase attribute)@\spxentry{delay}\spxextra{matplotlib.animation.ImageMagickBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.delay}}\pysigline{\sphinxbfcode{\sphinxupquote{delay}}}~ \end{fulllineitems} \index{exec\_key (matplotlib.animation.ImageMagickBase attribute)@\spxentry{exec\_key}\spxextra{matplotlib.animation.ImageMagickBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.exec_key}}\pysigline{\sphinxbfcode{\sphinxupquote{exec\_key}}\sphinxbfcode{\sphinxupquote{ = 'animation.convert\_path'}}} \end{fulllineitems} \index{isAvailable() (matplotlib.animation.ImageMagickBase class method)@\spxentry{isAvailable()}\spxextra{matplotlib.animation.ImageMagickBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.isAvailable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{isAvailable}}}{}{}~ \end{fulllineitems} \index{output\_args (matplotlib.animation.ImageMagickBase attribute)@\spxentry{output\_args}\spxextra{matplotlib.animation.ImageMagickBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.animation.ImageMagickBase:matplotlib.animation.ImageMagickBase.output_args}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_args}}}~ \end{fulllineitems} \end{fulllineitems} are provided. See the source code for how to easily implement new {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.MovieWriter:matplotlib.animation.MovieWriter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MovieWriter}}}}} classes. \subsection{Inheritance Diagrams} \label{\detokenize{api/animation_api:inheritance-diagrams}} \sphinxincludegraphics[]{inheritance-a9c836a5f50cc52194eaaa0eecbde0e04e00f8bf.pdf} \sphinxincludegraphics[]{inheritance-03fd756f481093aed19aee32f92c1da816d33a5e.pdf} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.artist}}} \label{\detokenize{api/artist_api:matplotlib-artist}}\label{\detokenize{api/artist_api:artist-api}}\label{\detokenize{api/artist_api::doc}} \sphinxincludegraphics[]{inheritance-1114ace5eb4df8e29d3d7e38289ea1ff440e19e9.pdf} \phantomsection\label{\detokenize{api/artist_api:module-matplotlib.artist}}\index{matplotlib.artist (module)@\spxentry{matplotlib.artist}\spxextra{module}} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{Artist}} class} \label{\detokenize{api/artist_api:artist-class}}\index{Artist (class in matplotlib.artist)@\spxentry{Artist}\spxextra{class in matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/artist_api:matplotlib.artist.Artist}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{Artist}}} Abstract base class for objects that render into a FigureCanvas. Typically, all visible elements in a figure are subclasses of Artist. \end{fulllineitems} \subsubsection{Interactive} \label{\detokenize{api/artist_api:interactive}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback:matplotlib.artist.Artist.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib.artist.Artist.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pchanged:matplotlib.artist.Artist.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib.artist.Artist.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data:matplotlib.artist.Artist.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.mouseover:matplotlib.artist.Artist.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.contains:matplotlib.artist.Artist.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.contains}}}}} & Test whether the artist contains the mouse event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_contains:matplotlib.artist.Artist.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pick:matplotlib.artist.Artist.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable:matplotlib.artist.Artist.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker:matplotlib.artist.Artist.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback:matplotlib-artist-artist-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback::doc}}\index{add\_callback() (matplotlib.artist.Artist method)@\spxentry{add\_callback()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback:matplotlib.artist.Artist.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib.artist.Artist.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib.artist.Artist.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib-artist-artist-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback::doc}}\index{remove\_callback() (matplotlib.artist.Artist method)@\spxentry{remove\_callback()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib.artist.Artist.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback:matplotlib.artist.Artist.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.pchanged} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pchanged:matplotlib-artist-artist-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pchanged::doc}}\index{pchanged() (matplotlib.artist.Artist method)@\spxentry{pchanged()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pchanged:matplotlib.artist.Artist.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.add_callback:matplotlib.artist.Artist.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.remove_callback:matplotlib.artist.Artist.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib-artist-artist-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.artist.Artist method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib.artist.Artist.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data:matplotlib.artist.Artist.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data:matplotlib.artist.Artist.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data:matplotlib-artist-artist-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.artist.Artist method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.format_cursor_data:matplotlib.artist.Artist.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib.artist.Artist.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.mouseover} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.mouseover:matplotlib-artist-artist-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.mouseover::doc}}\index{mouseover (matplotlib.artist.Artist attribute)@\spxentry{mouseover}\spxextra{matplotlib.artist.Artist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.mouseover:matplotlib.artist.Artist.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \paragraph{matplotlib.artist.Artist.contains} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.contains:matplotlib-artist-artist-contains}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.contains::doc}}\index{contains() (matplotlib.artist.Artist method)@\spxentry{contains()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.contains:matplotlib.artist.Artist.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_contains:matplotlib.artist.Artist.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib-artist-artist-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains::doc}}\index{set\_contains() (matplotlib.artist.Artist method)@\spxentry{set\_contains()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.contains:matplotlib.artist.Artist.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_contains:matplotlib-artist-artist-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_contains::doc}}\index{get\_contains() (matplotlib.artist.Artist method)@\spxentry{get\_contains()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_contains:matplotlib.artist.Artist.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.pick} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pick:matplotlib-artist-artist-pick}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pick::doc}}\index{pick() (matplotlib.artist.Artist method)@\spxentry{pick()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pick:matplotlib.artist.Artist.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker:matplotlib.artist.Artist.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable:matplotlib.artist.Artist.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.pickable} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable:matplotlib-artist-artist-pickable}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable::doc}}\index{pickable() (matplotlib.artist.Artist method)@\spxentry{pickable()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable:matplotlib.artist.Artist.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker:matplotlib.artist.Artist.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pick:matplotlib.artist.Artist.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib-artist-artist-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker::doc}}\index{set\_picker() (matplotlib.artist.Artist method)@\spxentry{set\_picker()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker:matplotlib-artist-artist-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker::doc}}\index{get\_picker() (matplotlib.artist.Artist method)@\spxentry{get\_picker()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_picker:matplotlib.artist.Artist.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pickable:matplotlib.artist.Artist.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.pick:matplotlib.artist.Artist.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{Clipping} \label{\detokenize{api/artist_api:clipping}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_on:matplotlib.artist.Artist.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_box:matplotlib.artist.Artist.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_path:matplotlib.artist.Artist.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_clip\_path}}}}} & Return the clip path. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib-artist-artist-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.artist.Artist method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_on:matplotlib-artist-artist-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.artist.Artist method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_on:matplotlib.artist.Artist.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib-artist-artist-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.artist.Artist method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_box:matplotlib-artist-artist-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.artist.Artist method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_box:matplotlib.artist.Artist.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib-artist-artist-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.artist.Artist method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_path:matplotlib-artist-artist-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.artist.Artist method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_clip_path:matplotlib.artist.Artist.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subsubsection{Bulk Properties} \label{\detokenize{api/artist_api:bulk-properties}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.update:matplotlib.artist.Artist.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.update_from:matplotlib.artist.Artist.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.properties:matplotlib.artist.Artist.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib.artist.Artist.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set}}}}} & A property batch setter. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.update} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update:matplotlib-artist-artist-update}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update::doc}}\index{update() (matplotlib.artist.Artist method)@\spxentry{update()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update:matplotlib.artist.Artist.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.update\_from} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update_from:matplotlib-artist-artist-update-from}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update_from::doc}}\index{update\_from() (matplotlib.artist.Artist method)@\spxentry{update\_from()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.update_from:matplotlib.artist.Artist.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.properties} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.properties:matplotlib-artist-artist-properties}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.properties::doc}}\index{properties() (matplotlib.artist.Artist method)@\spxentry{properties()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.properties:matplotlib.artist.Artist.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib-artist-artist-set}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set::doc}}\index{set() (matplotlib.artist.Artist method)@\spxentry{set()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set:matplotlib.artist.Artist.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subsubsection{Drawing} \label{\detokenize{api/artist_api:drawing}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.draw:matplotlib.artist.Artist.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.draw}}}}} & Draw the Artist using the given renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_animated:matplotlib.artist.Artist.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_alpha:matplotlib.artist.Artist.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_snap:matplotlib.artist.Artist.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.zorder:matplotlib.artist.Artist.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_zorder:matplotlib.artist.Artist.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_sketch_params:matplotlib.artist.Artist.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_rasterized:matplotlib.artist.Artist.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_path_effects:matplotlib.artist.Artist.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_agg_filter:matplotlib.artist.Artist.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transformed_clip_path_and_affine:matplotlib.artist.Artist.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.draw} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.draw:matplotlib-artist-artist-draw}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.draw::doc}}\index{draw() (matplotlib.artist.Artist method)@\spxentry{draw()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.draw:matplotlib.artist.Artist.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}, \emph{*args}, \emph{**kwargs}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib-artist-artist-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated::doc}}\index{set\_animated() (matplotlib.artist.Artist method)@\spxentry{set\_animated()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_animated:matplotlib-artist-artist-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_animated::doc}}\index{get\_animated() (matplotlib.artist.Artist method)@\spxentry{get\_animated()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_animated:matplotlib.artist.Artist.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib-artist-artist-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha::doc}}\index{set\_alpha() (matplotlib.artist.Artist method)@\spxentry{set\_alpha()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_alpha:matplotlib-artist-artist-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_alpha::doc}}\index{get\_alpha() (matplotlib.artist.Artist method)@\spxentry{get\_alpha()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_alpha:matplotlib.artist.Artist.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib-artist-artist-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap::doc}}\index{set\_snap() (matplotlib.artist.Artist method)@\spxentry{set\_snap()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_snap:matplotlib-artist-artist-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_snap::doc}}\index{get\_snap() (matplotlib.artist.Artist method)@\spxentry{get\_snap()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_snap:matplotlib.artist.Artist.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib-artist-artist-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible::doc}}\index{set\_visible() (matplotlib.artist.Artist method)@\spxentry{set\_visible()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib-artist-artist-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible::doc}}\index{get\_visible() (matplotlib.artist.Artist method)@\spxentry{get\_visible()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.zorder} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.zorder:matplotlib-artist-artist-zorder}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.zorder::doc}}\index{zorder (matplotlib.artist.Artist attribute)@\spxentry{zorder}\spxextra{matplotlib.artist.Artist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.zorder:matplotlib.artist.Artist.zorder}}\pysigline{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib-artist-artist-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder::doc}}\index{set\_zorder() (matplotlib.artist.Artist method)@\spxentry{set\_zorder()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_zorder:matplotlib-artist-artist-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_zorder::doc}}\index{get\_zorder() (matplotlib.artist.Artist method)@\spxentry{get\_zorder()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_zorder:matplotlib.artist.Artist.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib-artist-artist-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.artist.Artist method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib-artist-artist-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.artist.Artist method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_sketch_params:matplotlib-artist-artist-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.artist.Artist method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_sketch_params:matplotlib.artist.Artist.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib-artist-artist-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.artist.Artist method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_rasterized:matplotlib-artist-artist-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.artist.Artist method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_rasterized:matplotlib.artist.Artist.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib-artist-artist-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.artist.Artist method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_path_effects:matplotlib-artist-artist-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.artist.Artist method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_path_effects:matplotlib.artist.Artist.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_agg_filter:matplotlib-artist-artist-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.artist.Artist method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_agg_filter:matplotlib.artist.Artist.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib-artist-artist-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.artist.Artist method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transformed_clip_path_and_affine:matplotlib-artist-artist-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.artist.Artist method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transformed_clip_path_and_affine:matplotlib.artist.Artist.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subsubsection{Figure and Axes} \label{\detokenize{api/artist_api:figure-and-axes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.remove:matplotlib.artist.Artist.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.axes:matplotlib.artist.Artist.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_figure:matplotlib.artist.Artist.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.remove} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove:matplotlib-artist-artist-remove}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove::doc}}\index{remove() (matplotlib.artist.Artist method)@\spxentry{remove()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.remove:matplotlib.artist.Artist.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.axes} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.axes:matplotlib-artist-artist-axes}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.axes::doc}}\index{axes (matplotlib.artist.Artist attribute)@\spxentry{axes}\spxextra{matplotlib.artist.Artist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.axes:matplotlib.artist.Artist.axes}}\pysigline{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib-artist-artist-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure::doc}}\index{set\_figure() (matplotlib.artist.Artist method)@\spxentry{set\_figure()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_figure:matplotlib-artist-artist-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_figure::doc}}\index{get\_figure() (matplotlib.artist.Artist method)@\spxentry{get\_figure()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_figure:matplotlib.artist.Artist.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subsubsection{Children} \label{\detokenize{api/artist_api:children}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_children:matplotlib.artist.Artist.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.findobj:matplotlib.artist.Artist.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.findobj}}}}} & Find artist objects. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.get\_children} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_children:matplotlib-artist-artist-get-children}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_children::doc}}\index{get\_children() (matplotlib.artist.Artist method)@\spxentry{get\_children()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_children:matplotlib.artist.Artist.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.findobj} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.findobj:matplotlib-artist-artist-findobj}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.findobj::doc}}\index{findobj() (matplotlib.artist.Artist method)@\spxentry{findobj()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.findobj:matplotlib.artist.Artist.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{Transform} \label{\detokenize{api/artist_api:transform}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transform:matplotlib.artist.Artist.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.is_transform_set:matplotlib.artist.Artist.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib-artist-artist-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform::doc}}\index{set\_transform() (matplotlib.artist.Artist method)@\spxentry{set\_transform()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transform:matplotlib-artist-artist-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transform::doc}}\index{get\_transform() (matplotlib.artist.Artist method)@\spxentry{get\_transform()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_transform:matplotlib.artist.Artist.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.is_transform_set:matplotlib-artist-artist-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.artist.Artist method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.is_transform_set:matplotlib.artist.Artist.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subsubsection{Units} \label{\detokenize{api/artist_api:units}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_xunits:matplotlib.artist.Artist.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_yunits:matplotlib.artist.Artist.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.have_units:matplotlib.artist.Artist.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_xunits:matplotlib-artist-artist-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.artist.Artist method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_xunits:matplotlib.artist.Artist.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_yunits:matplotlib-artist-artist-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.artist.Artist method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.convert_yunits:matplotlib.artist.Artist.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.have\_units} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.have_units:matplotlib-artist-artist-have-units}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.have_units::doc}}\index{have\_units() (matplotlib.artist.Artist method)@\spxentry{have\_units()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.have_units:matplotlib.artist.Artist.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subsubsection{Metadata} \label{\detokenize{api/artist_api:metadata}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_gid:matplotlib.artist.Artist.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_label}}}}} & Set a label that will be displayed in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_label:matplotlib.artist.Artist.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_label}}}}} & Return the label used for this artist in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_url:matplotlib.artist.Artist.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_url}}}}} & Return the url. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib-artist-artist-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid::doc}}\index{set\_gid() (matplotlib.artist.Artist method)@\spxentry{set\_gid()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_gid:matplotlib-artist-artist-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_gid::doc}}\index{get\_gid() (matplotlib.artist.Artist method)@\spxentry{get\_gid()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_gid:matplotlib.artist.Artist.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_label} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib-artist-artist-set-label}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label::doc}}\index{set\_label() (matplotlib.artist.Artist method)@\spxentry{set\_label()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_label} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_label:matplotlib-artist-artist-get-label}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_label::doc}}\index{get\_label() (matplotlib.artist.Artist method)@\spxentry{get\_label()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_label:matplotlib.artist.Artist.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_url} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib-artist-artist-set-url}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url::doc}}\index{set\_url() (matplotlib.artist.Artist method)@\spxentry{set\_url()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_url} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_url:matplotlib-artist-artist-get-url}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_url::doc}}\index{get\_url() (matplotlib.artist.Artist method)@\spxentry{get\_url()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_url:matplotlib.artist.Artist.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subsubsection{Miscellaneous} \label{\detokenize{api/artist_api:miscellaneous}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.sticky_edges:matplotlib.artist.Artist.sticky_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.sticky\_edges}}}}} & \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_in\_layout}}}}} & Set if artist is to be included in layout calculations, E.g. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_in_layout:matplotlib.artist.Artist.get_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_in\_layout}}}}} & Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.stale:matplotlib.artist.Artist.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.artist.Artist.sticky\_edges} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.sticky_edges:matplotlib-artist-artist-sticky-edges}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.sticky_edges::doc}}\index{sticky\_edges (matplotlib.artist.Artist attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.artist.Artist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.sticky_edges:matplotlib.artist.Artist.sticky_edges}}\pysigline{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.set\_in\_layout} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib-artist-artist-set-in-layout}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout::doc}}\index{set\_in\_layout() (matplotlib.artist.Artist method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.artist.Artist.get\_in\_layout} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_in_layout:matplotlib-artist-artist-get-in-layout}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_in_layout::doc}}\index{get\_in\_layout() (matplotlib.artist.Artist method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.artist.Artist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.get_in_layout:matplotlib.artist.Artist.get_in_layout}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \paragraph{matplotlib.artist.Artist.stale} \label{\detokenize{api/_as_gen/matplotlib.artist.Artist.stale:matplotlib-artist-artist-stale}}\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.stale::doc}}\index{stale (matplotlib.artist.Artist attribute)@\spxentry{stale}\spxextra{matplotlib.artist.Artist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.Artist.stale:matplotlib.artist.Artist.stale}}\pysigline{\sphinxcode{\sphinxupquote{Artist.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subsection{Functions} \label{\detokenize{api/artist_api:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.allow_rasterization:matplotlib.artist.allow_rasterization}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{allow\_rasterization}}}}} & Decorator for Artist.draw method. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.get:matplotlib.artist.get}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get}}}}} & Return the value of object's property. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getp}}}}} & Return the value of object's property. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}} & Set a property on an artist object. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.kwdoc:matplotlib.artist.kwdoc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{kwdoc}}}}} & Inspect an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} class (using {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector}}}}}) and return information about its settable properties and their current values. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector}}}}} & A helper class to inspect an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} and return information about its settable properties and their current values. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.artist.allow\_rasterization} \label{\detokenize{api/_as_gen/matplotlib.artist.allow_rasterization:matplotlib-artist-allow-rasterization}}\label{\detokenize{api/_as_gen/matplotlib.artist.allow_rasterization::doc}}\index{allow\_rasterization() (in module matplotlib.artist)@\spxentry{allow\_rasterization()}\spxextra{in module matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.allow_rasterization:matplotlib.artist.allow_rasterization}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{allow\_rasterization}}}{\emph{draw}}{} Decorator for Artist.draw method. Provides routines that run before and after the draw call. The before and after functions are useful for changing artist-dependent renderer attributes or making other setup function calls, such as starting and flushing a mixed-mode renderer. \end{fulllineitems} \subsubsection{matplotlib.artist.get} \label{\detokenize{api/_as_gen/matplotlib.artist.get:matplotlib-artist-get}}\label{\detokenize{api/_as_gen/matplotlib.artist.get::doc}}\index{get() (in module matplotlib.artist)@\spxentry{get()}\spxextra{in module matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.get:matplotlib.artist.get}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{get}}}{\emph{obj}, \emph{property=None}}{} Return the value of object's property. \sphinxstyleemphasis{property} is an optional string for the property you want to return Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{getp}\PYG{p}{(}\PYG{n}{obj}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get all the object properties} \PYG{n}{getp}\PYG{p}{(}\PYG{n}{obj}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get the linestyle property} \end{sphinxVerbatim} \sphinxstyleemphasis{obj} is a {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instance, e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or an instance of a {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} or {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}. If the \sphinxstyleemphasis{property} is 'somename', this function returns \begin{quote} obj.get\_somename() \end{quote} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getp()}}}}} can be used to query all the gettable properties with \sphinxcode{\sphinxupquote{getp(obj)}}. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: \begin{quote} property or alias = value \end{quote} e.g.: \begin{quote} linewidth or lw = 2 \end{quote} \end{fulllineitems} \subsubsection{matplotlib.artist.getp} \label{\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib-artist-getp}}\label{\detokenize{api/_as_gen/matplotlib.artist.getp::doc}}\index{getp() (in module matplotlib.artist)@\spxentry{getp()}\spxextra{in module matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{getp}}}{\emph{obj}, \emph{property=None}}{} Return the value of object's property. \sphinxstyleemphasis{property} is an optional string for the property you want to return Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{getp}\PYG{p}{(}\PYG{n}{obj}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get all the object properties} \PYG{n}{getp}\PYG{p}{(}\PYG{n}{obj}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} get the linestyle property} \end{sphinxVerbatim} \sphinxstyleemphasis{obj} is a {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instance, e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or an instance of a {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} or {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}. If the \sphinxstyleemphasis{property} is 'somename', this function returns \begin{quote} obj.get\_somename() \end{quote} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getp()}}}}} can be used to query all the gettable properties with \sphinxcode{\sphinxupquote{getp(obj)}}. Many properties have aliases for shorter typing, e.g. 'lw' is an alias for 'linewidth'. In the output, aliases and full property names will be listed as: \begin{quote} property or alias = value \end{quote} e.g.: \begin{quote} linewidth or lw = 2 \end{quote} \end{fulllineitems} \subsubsection{matplotlib.artist.setp} \label{\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib-artist-setp}}\label{\detokenize{api/_as_gen/matplotlib.artist.setp::doc}}\index{setp() (in module matplotlib.artist)@\spxentry{setp()}\spxextra{in module matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{setp}}}{\emph{obj}, \emph{*args}, \emph{**kwargs}}{} Set a property on an artist object. matplotlib supports the use of {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} ("set property") and {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.getp:matplotlib.artist.getp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{getp()}}}}} to set and get object properties, as well as to do introspection on the object. For example, to set the linestyle of a line to be dashed, you can do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} If you want to know the valid types of arguments, you can provide the name of the property you want to set without a value: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{ linestyle: [ \PYGZsq{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}.\PYGZsq{} \textbar{} \PYGZsq{}:\PYGZsq{} \textbar{} \PYGZsq{}steps\PYGZsq{} \textbar{} \PYGZsq{}None\PYGZsq{} ]} \end{sphinxVerbatim} If you want to see all the properties that can be set, and their possible values, you can do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{g+go}{ ... long output listing omitted} \end{sphinxVerbatim} You may specify another output file to {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}} if \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.stdout}{\sphinxcode{\sphinxupquote{sys.stdout}}} is not acceptable for some reason using the \sphinxcode{\sphinxupquote{file}} keyword-only argument: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{fopen}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{output.log}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{f}\PYG{p}{:} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} } \PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{n}{file}\PYG{o}{=}\PYG{n}{f}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} operates on a single instance or a iterable of instances. If you are in query mode introspecting the possible values, only the first instance in the sequence is used. When actually setting values, all the instances will be set. e.g., suppose you have a list of two lines, the following will make both lines thicker and red: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{x} \PYG{o}{=} \PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mf}{1.0}\PYG{p}{,}\PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{y1} \PYG{o}{=} \PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{y2} \PYG{o}{=} \PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{o}{*}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{lines} \PYG{o}{=} \PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.setp:matplotlib.artist.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} works with the MATLAB style string/value pairs or with python kwargs. For example, the following are equivalent: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} MATLAB style} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} python style} \end{sphinxVerbatim} \end{fulllineitems} \subsubsection{matplotlib.artist.kwdoc} \label{\detokenize{api/_as_gen/matplotlib.artist.kwdoc:matplotlib-artist-kwdoc}}\label{\detokenize{api/_as_gen/matplotlib.artist.kwdoc::doc}}\index{kwdoc() (in module matplotlib.artist)@\spxentry{kwdoc()}\spxextra{in module matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.kwdoc:matplotlib.artist.kwdoc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{kwdoc}}}{\emph{artist}}{} Inspect an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} class (using {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector}}}}}) and return information about its settable properties and their current values. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artist}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or an iterable of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{string}] \leavevmode The settable properties of \sphinxstyleemphasis{artist}, as plain text if \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"docstring.hardcopy"{]}}}} is False and as a rst table (intended for use in Sphinx) if it is True. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.artist.ArtistInspector} \label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib-artist-artistinspector}}\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector::doc}}\index{ArtistInspector (class in matplotlib.artist)@\spxentry{ArtistInspector}\spxextra{class in matplotlib.artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.artist.}}\sphinxbfcode{\sphinxupquote{ArtistInspector}}}{\emph{o}}{} A helper class to inspect an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} and return information about its settable properties and their current values. Initialize the artist inspector with an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or an iterable of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s. If an iterable is used, we assume it is a homogeneous sequence (all \sphinxcode{\sphinxupquote{Artists}} are of the same type) and it is your responsibility to make sure this is so. \index{\_\_init\_\_() (matplotlib.artist.ArtistInspector method)@\spxentry{\_\_init\_\_()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.__init__}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{\_\_init\_\_}}}{\emph{self}, \emph{o}}{} Initialize the artist inspector with an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or an iterable of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s. If an iterable is used, we assume it is a homogeneous sequence (all \sphinxcode{\sphinxupquote{Artists}} are of the same type) and it is your responsibility to make sure this is so. \end{fulllineitems} \subsubsection*{Methods} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.__init__}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{\_\_init\_\_}}}}}(self, o) & Initialize the artist inspector with an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or an iterable of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.aliased_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aliased\_name}}}}}(self, s) & Return 'PROPNAME or alias' if \sphinxstyleemphasis{s} has an alias, else return 'PROPNAME'. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.aliased_name_rest}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aliased\_name\_rest}}}}}(self, s, target) & Return 'PROPNAME or alias' if \sphinxstyleemphasis{s} has an alias, else return 'PROPNAME', formatted for ReST. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_aliases}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_aliases}}}}}(self) & Get a dict mapping property fullnames to sets of aliases for each alias in the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_setters}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_setters}}}}}(self) & Get the attribute strings with setters for object. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_valid_values}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_valid\_values}}}}}(self, attr) & Get the legal arguments for the setter associated with \sphinxstyleemphasis{attr}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.is_alias}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_alias}}}}}(self, o) & Return whether method object \sphinxstyleemphasis{o} is an alias for another method. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_getters}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pprint\_getters}}}}}(self) & Return the getters and actual values as list of strings. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_setters}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pprint\_setters}}}}}(self{[}, prop, leadingspace{]}) & If \sphinxstyleemphasis{prop} is \sphinxstyleemphasis{None}, return a list of strings of all settable properties and their valid values. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_setters_rest}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pprint\_setters\_rest}}}}}(self{[}, prop, leadingspace{]}) & If \sphinxstyleemphasis{prop} is \sphinxstyleemphasis{None}, return a list of strings of all settable properties and their valid values. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{properties}}}}}(self) & Return a dictionary mapping property name -\textgreater{} value. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{aliased\_name() (matplotlib.artist.ArtistInspector method)@\spxentry{aliased\_name()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.aliased_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{aliased\_name}}}{\emph{self}, \emph{s}}{} Return 'PROPNAME or alias' if \sphinxstyleemphasis{s} has an alias, else return 'PROPNAME'. e.g., for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform'. \end{fulllineitems} \index{aliased\_name\_rest() (matplotlib.artist.ArtistInspector method)@\spxentry{aliased\_name\_rest()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.aliased_name_rest}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{aliased\_name\_rest}}}{\emph{self}, \emph{s}, \emph{target}}{} Return 'PROPNAME or alias' if \sphinxstyleemphasis{s} has an alias, else return 'PROPNAME', formatted for ReST. e.g., for the line markerfacecolor property, which has an alias, return 'markerfacecolor or mfc' and for the transform property, which does not, return 'transform'. \end{fulllineitems} \index{get\_aliases() (matplotlib.artist.ArtistInspector method)@\spxentry{get\_aliases()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_aliases}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aliases}}}{\emph{self}}{} Get a dict mapping property fullnames to sets of aliases for each alias in the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArtistInspector}}}}}. e.g., for lines: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{markerfacecolor}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mfc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linewidth}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lw}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \end{fulllineitems} \index{get\_setters() (matplotlib.artist.ArtistInspector method)@\spxentry{get\_setters()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_setters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_setters}}}{\emph{self}}{} Get the attribute strings with setters for object. e.g., for a line, return \sphinxcode{\sphinxupquote{{[}'markerfacecolor', 'linewidth', ....{]}}}. \end{fulllineitems} \index{get\_valid\_values() (matplotlib.artist.ArtistInspector method)@\spxentry{get\_valid\_values()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.get_valid_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_valid\_values}}}{\emph{self}, \emph{attr}}{} Get the legal arguments for the setter associated with \sphinxstyleemphasis{attr}. This is done by querying the docstring of the setter for a line that begins with "ACCEPTS:" or ".. ACCEPTS:", and then by looking for a numpydoc-style documentation for the setter's first argument. \end{fulllineitems} \index{is\_alias() (matplotlib.artist.ArtistInspector method)@\spxentry{is\_alias()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.is_alias}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_alias}}}{\emph{self}, \emph{o}}{} Return whether method object \sphinxstyleemphasis{o} is an alias for another method. \end{fulllineitems} \index{pprint\_getters() (matplotlib.artist.ArtistInspector method)@\spxentry{pprint\_getters()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_getters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pprint\_getters}}}{\emph{self}}{} Return the getters and actual values as list of strings. \end{fulllineitems} \index{pprint\_setters() (matplotlib.artist.ArtistInspector method)@\spxentry{pprint\_setters()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_setters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pprint\_setters}}}{\emph{self}, \emph{prop=None}, \emph{leadingspace=2}}{} If \sphinxstyleemphasis{prop} is \sphinxstyleemphasis{None}, return a list of strings of all settable properties and their valid values. If \sphinxstyleemphasis{prop} is not \sphinxstyleemphasis{None}, it is a valid property name and that property will be returned as a string of property : valid values. \end{fulllineitems} \index{pprint\_setters\_rest() (matplotlib.artist.ArtistInspector method)@\spxentry{pprint\_setters\_rest()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.pprint_setters_rest}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pprint\_setters\_rest}}}{\emph{self}, \emph{prop=None}, \emph{leadingspace=4}}{} If \sphinxstyleemphasis{prop} is \sphinxstyleemphasis{None}, return a list of strings of all settable properties and their valid values. Format the output for ReST If \sphinxstyleemphasis{prop} is not \sphinxstyleemphasis{None}, it is a valid property name and that property will be returned as a string of property : valid values. \end{fulllineitems} \index{properties() (matplotlib.artist.ArtistInspector method)@\spxentry{properties()}\spxextra{matplotlib.artist.ArtistInspector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.artist.ArtistInspector:matplotlib.artist.ArtistInspector.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary mapping property name -\textgreater{} value. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes}}} \label{\detokenize{api/axes_api:matplotlib-axes}}\label{\detokenize{api/axes_api::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axes_api:id1}}{\hyperref[\detokenize{api/axes_api:the-axes-class}]{\sphinxcrossref{The Axes class}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id2}}{\hyperref[\detokenize{api/axes_api:subplots}]{\sphinxcrossref{Subplots}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id3}}{\hyperref[\detokenize{api/axes_api:plotting}]{\sphinxcrossref{Plotting}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axes_api:id4}}{\hyperref[\detokenize{api/axes_api:basic}]{\sphinxcrossref{Basic}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id5}}{\hyperref[\detokenize{api/axes_api:spans}]{\sphinxcrossref{Spans}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id6}}{\hyperref[\detokenize{api/axes_api:spectral}]{\sphinxcrossref{Spectral}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id7}}{\hyperref[\detokenize{api/axes_api:statistics}]{\sphinxcrossref{Statistics}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id8}}{\hyperref[\detokenize{api/axes_api:binned}]{\sphinxcrossref{Binned}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id9}}{\hyperref[\detokenize{api/axes_api:contours}]{\sphinxcrossref{Contours}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id10}}{\hyperref[\detokenize{api/axes_api:array}]{\sphinxcrossref{Array}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id11}}{\hyperref[\detokenize{api/axes_api:unstructured-triangles}]{\sphinxcrossref{Unstructured Triangles}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id12}}{\hyperref[\detokenize{api/axes_api:text-and-annotations}]{\sphinxcrossref{Text and Annotations}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id13}}{\hyperref[\detokenize{api/axes_api:fields}]{\sphinxcrossref{Fields}}} \end{itemize} \item {} \phantomsection\label{\detokenize{api/axes_api:id14}}{\hyperref[\detokenize{api/axes_api:clearing}]{\sphinxcrossref{Clearing}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id15}}{\hyperref[\detokenize{api/axes_api:appearance}]{\sphinxcrossref{Appearance}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id16}}{\hyperref[\detokenize{api/axes_api:property-cycle}]{\sphinxcrossref{Property cycle}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id17}}{\hyperref[\detokenize{api/axes_api:axis-limits}]{\sphinxcrossref{Axis / limits}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axes_api:id18}}{\hyperref[\detokenize{api/axes_api:axis-limits-and-direction}]{\sphinxcrossref{Axis Limits and direction}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id19}}{\hyperref[\detokenize{api/axes_api:axis-labels-title-and-legend}]{\sphinxcrossref{Axis Labels, title, and legend}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id20}}{\hyperref[\detokenize{api/axes_api:axis-scales}]{\sphinxcrossref{Axis scales}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id21}}{\hyperref[\detokenize{api/axes_api:autoscaling-and-margins}]{\sphinxcrossref{Autoscaling and margins}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id22}}{\hyperref[\detokenize{api/axes_api:aspect-ratio}]{\sphinxcrossref{Aspect ratio}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id23}}{\hyperref[\detokenize{api/axes_api:ticks-and-tick-labels}]{\sphinxcrossref{Ticks and tick labels}}} \end{itemize} \item {} \phantomsection\label{\detokenize{api/axes_api:id24}}{\hyperref[\detokenize{api/axes_api:units}]{\sphinxcrossref{Units}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id25}}{\hyperref[\detokenize{api/axes_api:adding-artists}]{\sphinxcrossref{Adding Artists}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id26}}{\hyperref[\detokenize{api/axes_api:twinning}]{\sphinxcrossref{Twinning}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id27}}{\hyperref[\detokenize{api/axes_api:axes-position}]{\sphinxcrossref{Axes Position}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id28}}{\hyperref[\detokenize{api/axes_api:async-event-based}]{\sphinxcrossref{Async/Event based}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id29}}{\hyperref[\detokenize{api/axes_api:interactive}]{\sphinxcrossref{Interactive}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id30}}{\hyperref[\detokenize{api/axes_api:children}]{\sphinxcrossref{Children}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id31}}{\hyperref[\detokenize{api/axes_api:drawing}]{\sphinxcrossref{Drawing}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id32}}{\hyperref[\detokenize{api/axes_api:bulk-property-manipulation}]{\sphinxcrossref{Bulk property manipulation}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id33}}{\hyperref[\detokenize{api/axes_api:general-artist-properties}]{\sphinxcrossref{General Artist Properties}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id34}}{\hyperref[\detokenize{api/axes_api:artist-methods}]{\sphinxcrossref{Artist Methods}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id35}}{\hyperref[\detokenize{api/axes_api:projection}]{\sphinxcrossref{Projection}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id36}}{\hyperref[\detokenize{api/axes_api:other}]{\sphinxcrossref{Other}}} \item {} \phantomsection\label{\detokenize{api/axes_api:id37}}{\hyperref[\detokenize{api/axes_api:inheritance}]{\sphinxcrossref{Inheritance}}} \end{itemize} \end{sphinxShadowBox} \phantomsection\label{\detokenize{api/axes_api:module-matplotlib.axes}}\index{matplotlib.axes (module)@\spxentry{matplotlib.axes}\spxextra{module}} \subsection{The Axes class} \label{\detokenize{api/axes_api:the-axes-class}}\index{Axes (class in matplotlib.axes)@\spxentry{Axes}\spxextra{class in matplotlib.axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axes_api:matplotlib.axes.Axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axes.}}\sphinxbfcode{\sphinxupquote{Axes}}}{\emph{fig}, \emph{rect}, \emph{facecolor=None}, \emph{frameon=True}, \emph{sharex=None}, \emph{sharey=None}, \emph{label=''}, \emph{xscale=None}, \emph{yscale=None}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.axes.\_base.\_AxesBase}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} contains most of the figure elements: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}, {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}, {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}, etc., and sets the coordinate system. The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance supports callbacks through a callbacks attribute which is a {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry}}}}} instance. The events you can connect to are 'xlim\_changed' and 'ylim\_changed' and the callback will be called with func(\sphinxstyleemphasis{ax}) where \sphinxstyleemphasis{ax} is the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dataLim}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The bounding box enclosing all data displayed in the Axes. \item[{\sphinxstylestrong{viewLim}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The view limits in data coordinates. \end{description} \end{description}\end{quote} Build an axes in a figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The axes is build in the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \sphinxstyleemphasis{fig}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}{[}left, bottom, width, height{]}{]} The axes is build in the rectangle \sphinxstyleemphasis{rect}. \sphinxstyleemphasis{rect} is in {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} coordinates. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} The x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} is shared with the x or y axis in the input {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} True means that the axes frame is visible. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other optional keyword arguments: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The new {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsection{Subplots} \label{\detokenize{api/axes_api:subplots}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotBase}}}}} & Base class for subplots, which are {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instances with additional methods to facilitate generating and manipulating a set of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} within a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.subplot_class_factory:matplotlib.axes.subplot_class_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot\_class\_factory}}}}} & This makes a new class that inherits from {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotBase}}}}} and the given axes\_class (which is assumed to be a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}}). \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.SubplotBase} \label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib-axes-subplotbase}}\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase::doc}}\index{SubplotBase (class in matplotlib.axes)@\spxentry{SubplotBase}\spxextra{class in matplotlib.axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axes.}}\sphinxbfcode{\sphinxupquote{SubplotBase}}}{\emph{fig}, \emph{*args}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Base class for subplots, which are {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instances with additional methods to facilitate generating and manipulating a set of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} within a figure. \sphinxstyleemphasis{fig} is a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} instance. \sphinxstyleemphasis{args} is the tuple (\sphinxstyleemphasis{numRows}, \sphinxstyleemphasis{numCols}, \sphinxstyleemphasis{plotNum}), where the array of subplots in the figure has dimensions \sphinxstyleemphasis{numRows}, \sphinxstyleemphasis{numCols}, and where \sphinxstyleemphasis{plotNum} is the number of the subplot being created. \sphinxstyleemphasis{plotNum} starts at 1 in the upper left corner and increases to the right. If \sphinxstyleemphasis{numRows} \textless{}= \sphinxstyleemphasis{numCols} \textless{}= \sphinxstyleemphasis{plotNum} \textless{} 10, \sphinxstyleemphasis{args} can be the decimal integer \sphinxstyleemphasis{numRows} * 100 + \sphinxstyleemphasis{numCols} * 10 + \sphinxstyleemphasis{plotNum}. \index{change\_geometry() (matplotlib.axes.SubplotBase method)@\spxentry{change\_geometry()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.change_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{change\_geometry}}}{\emph{self}, \emph{numrows}, \emph{numcols}, \emph{num}}{} change subplot geometry, e.g., from 1,1,1 to 2,2,3 \end{fulllineitems} \index{get\_geometry() (matplotlib.axes.SubplotBase method)@\spxentry{get\_geometry()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.get_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_geometry}}}{\emph{self}}{} get the subplot geometry, e.g., 2,2,3 \end{fulllineitems} \index{get\_gridspec() (matplotlib.axes.SubplotBase method)@\spxentry{get\_gridspec()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.get_gridspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridspec}}}{\emph{self}}{} get the GridSpec instance associated with the subplot \end{fulllineitems} \index{get\_subplotspec() (matplotlib.axes.SubplotBase method)@\spxentry{get\_subplotspec()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.get_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplotspec}}}{\emph{self}}{} get the SubplotSpec instance associated with the subplot \end{fulllineitems} \index{is\_first\_col() (matplotlib.axes.SubplotBase method)@\spxentry{is\_first\_col()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.is_first_col}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_first\_col}}}{\emph{self}}{}~ \end{fulllineitems} \index{is\_first\_row() (matplotlib.axes.SubplotBase method)@\spxentry{is\_first\_row()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.is_first_row}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_first\_row}}}{\emph{self}}{}~ \end{fulllineitems} \index{is\_last\_col() (matplotlib.axes.SubplotBase method)@\spxentry{is\_last\_col()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.is_last_col}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_last\_col}}}{\emph{self}}{}~ \end{fulllineitems} \index{is\_last\_row() (matplotlib.axes.SubplotBase method)@\spxentry{is\_last\_row()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.is_last_row}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_last\_row}}}{\emph{self}}{}~ \end{fulllineitems} \index{label\_outer() (matplotlib.axes.SubplotBase method)@\spxentry{label\_outer()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.label_outer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{label\_outer}}}{\emph{self}}{} Only show "outer" labels and tick labels. x-labels are only kept for subplots on the last row; y-labels only for subplots on the first column. \end{fulllineitems} \index{set\_subplotspec() (matplotlib.axes.SubplotBase method)@\spxentry{set\_subplotspec()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.set_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_subplotspec}}}{\emph{self}, \emph{subplotspec}}{} set the SubplotSpec instance associated with the subplot \end{fulllineitems} \index{update\_params() (matplotlib.axes.SubplotBase method)@\spxentry{update\_params()}\spxextra{matplotlib.axes.SubplotBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase.update_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_params}}}{\emph{self}}{} update the subplot position from fig.subplotpars \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.axes.subplot\_class\_factory} \label{\detokenize{api/_as_gen/matplotlib.axes.subplot_class_factory:matplotlib-axes-subplot-class-factory}}\label{\detokenize{api/_as_gen/matplotlib.axes.subplot_class_factory::doc}}\index{subplot\_class\_factory (matplotlib.axes attribute)@\spxentry{subplot\_class\_factory}\spxextra{matplotlib.axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.subplot_class_factory:matplotlib.axes.subplot_class_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{axes.}}\sphinxbfcode{\sphinxupquote{subplot\_class\_factory}}}{\emph{axes\_class=None}}{} This makes a new class that inherits from {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotBase}}}}} and the given axes\_class (which is assumed to be a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}}). This is perhaps a little bit roundabout to make a new class on the fly like this, but it means that a new Subplot class does not have to be created for every type of Axes. \end{fulllineitems} \subsection{Plotting} \label{\detokenize{api/axes_api:plotting}} \subsubsection{Basic} \label{\detokenize{api/axes_api:basic}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.plot}}}}} & Plot y versus x as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.errorbar}}}}} & Plot y versus x as lines and/or markers with attached errorbars. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.scatter}}}}} & A scatter plot of \sphinxstyleemphasis{y} vs \sphinxstyleemphasis{x} with varying marker size and/or color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib.axes.Axes.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.plot\_date}}}}} & Plot data that contains dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.step:matplotlib.axes.Axes.step}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.step}}}}} & Make a step plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.loglog:matplotlib.axes.Axes.loglog}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.loglog}}}}} & Make a plot with log scaling on both the x and y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogx:matplotlib.axes.Axes.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.semilogx}}}}} & Make a plot with log scaling on the x axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogy:matplotlib.axes.Axes.semilogy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.semilogy}}}}} & Make a plot with log scaling on the y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.fill\_between}}}}} & Fill the area between two horizontal curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib.axes.Axes.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.fill\_betweenx}}}}} & Fill the area between two vertical curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.bar}}}}} & Make a bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.barh}}}}} & Make a horizontal bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.stem}}}}} & Create a stem plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.eventplot:matplotlib.axes.Axes.eventplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.eventplot}}}}} & Plot identical parallel lines at the given positions. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:matplotlib.axes.Axes.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pie}}}}} & Plot a pie chart. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot:matplotlib.axes.Axes.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.stackplot}}}}} & Draw a stacked area plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.broken_barh:matplotlib.axes.Axes.broken_barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.broken\_barh}}}}} & Plot a horizontal sequence of rectangles. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.vlines}}}}} & Plot vertical lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib.axes.Axes.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.hlines}}}}} & Plot horizontal lines at each \sphinxstyleemphasis{y} from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmax}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill:matplotlib.axes.Axes.fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.fill}}}}} & Plot filled polygons. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.plot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib-axes-axes-plot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot::doc}}\index{plot() (matplotlib.axes.Axes method)@\spxentry{plot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{plot}}}{\emph{self}, \emph{*args}, \emph{scalex=True}, \emph{scaley=True}, \emph{data=None}, \emph{**kwargs}}{} Plot y versus x as lines and/or markers. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} The coordinates of the points or line nodes are given by \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}. The optional parameter \sphinxstyleemphasis{fmt} is a convenient way for defining basic formatting like color, marker and linestyle. It's a shortcut string notation described in the \sphinxstyleemphasis{Notes} section below. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot x and y using default line style and color} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot x and y using blue circle markers} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot y using x as index array 0..N\PYGZhy{}1} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r+}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ditto, but with red plusses} \end{sphinxVerbatim} You can use {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties as keyword arguments for more control on the appearance. Line properties and \sphinxstyleemphasis{fmt} can be mixed. The following two calls yield identical results: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dashed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} When conflicting with \sphinxstyleemphasis{fmt}, keyword arguments take precedence. \sphinxstylestrong{Plotting labelled data} There's a convenient way for plotting objects with labelled data (i.e. data that can be accessed by index \sphinxcode{\sphinxupquote{obj{[}'y'{]}}}). Instead of giving the data in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, you can provide the object in the \sphinxstyleemphasis{data} parameter and just give the labels for \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xlabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ylabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{obj}\PYG{p}{)} \end{sphinxVerbatim} All indexable objects are supported. This could e.g. be a \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}}, a \sphinxcode{\sphinxupquote{pandas.DataFame}} or a structured numpy array. \sphinxstylestrong{Plotting multiple sets of data} There are various ways to plot multiple sets of data. \begin{itemize} \item {} The most straight forward way is just to call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} multiple times. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} Alternatively, if your data is already a 2d array, you can pass it directly to \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}. A separate data set will be drawn for every column. Example: an array \sphinxcode{\sphinxupquote{a}} where the first column represents the \sphinxstyleemphasis{x} values and the other columns are the \sphinxstyleemphasis{y} columns: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{a}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{a}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \item {} The third way is to specify multiple sets of \sphinxstyleemphasis{{[}x{]}}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{{[}fmt{]}} groups: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g\PYGZca{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} In this case, any additional keyword argument applies to all datasets. Also this syntax cannot be combined with the \sphinxstyleemphasis{data} parameter. \end{itemize} By default, each line is assigned a different style specified by a 'style cycle'. The \sphinxstyleemphasis{fmt} and line property parameters are only necessary if you want explicit deviations from these defaults. Alternatively, you can also change the style cycle using the 'axes.prop\_cycle' rcParam. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like or scalar{]} The horizontal / vertical coordinates of the data points. \sphinxstyleemphasis{x} values are optional and default to \sphinxcode{\sphinxupquote{range(len(y))}}. Commonly, these parameters are 1D arrays. They can also be scalars, or two-dimensional (in that case, the columns represent separate data sets). These arguments cannot be passed as keywords. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} A format string, e.g. 'ro' for red circles. See the \sphinxstyleemphasis{Notes} section for a full description of the format strings. Format strings are just an abbreviation for quickly setting basic line properties. All of these and more can also be controlled by keyword arguments. This argument cannot be passed as keyword. \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \begin{sphinxadmonition}{note}{Note:} Technically there's a slight ambiguity in calls where the second label is a valid \sphinxstyleemphasis{fmt}. \sphinxcode{\sphinxupquote{plot('n', 'o', data=obj)}} could be \sphinxcode{\sphinxupquote{plt(x, y)}} or \sphinxcode{\sphinxupquote{plt(y, fmt)}}. In such cases, the former interpretation is chosen, but a warning is issued. You may suppress the warning by adding an empty format string \sphinxcode{\sphinxupquote{plot('n', 'o', '{'}, data=obj)}}. \end{sphinxadmonition} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scalex, scaley}}] \leavevmode{[}bool, optional, default: True{]} These parameters determined if the view limits are adapted to the data limits. The values are passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, optional{]} \sphinxstyleemphasis{kwargs} are used to specify properties like a line label (for auto legends), linewidth, antialiasing, marker face color. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{9}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rs}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line 2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} If you make multiple lines with one plot command, the kwargs apply to all those lines. Here is a list of available {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}}] \leavevmode XY scatter plot with markers of varying size and/or color ( sometimes also called bubble chart). \end{description} \subsubsection*{Notes} \sphinxstylestrong{Format Strings} A format string consists of a part for color, marker and line: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fmt} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{[marker][line][color]}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} Each of them is optional. If not provided, the value from the style cycle is used. Exception: If \sphinxcode{\sphinxupquote{line}} is given, but no \sphinxcode{\sphinxupquote{marker}}, the data will be a line without markers. Other combinations such as \sphinxcode{\sphinxupquote{{[}color{]}{[}marker{]}{[}line{]}}} are also supported, but note that their parsing may be ambiguous. \sphinxstylestrong{Markers} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'.'}} & point marker \\ \hline \sphinxcode{\sphinxupquote{','}} & pixel marker \\ \hline \sphinxcode{\sphinxupquote{'o'}} & circle marker \\ \hline \sphinxcode{\sphinxupquote{'v'}} & triangle\_down marker \\ \hline \sphinxcode{\sphinxupquote{'\textasciicircum{}'}} & triangle\_up marker \\ \hline \sphinxcode{\sphinxupquote{'\textless{}'}} & triangle\_left marker \\ \hline \sphinxcode{\sphinxupquote{'\textgreater{}'}} & triangle\_right marker \\ \hline \sphinxcode{\sphinxupquote{'1'}} & tri\_down marker \\ \hline \sphinxcode{\sphinxupquote{'2'}} & tri\_up marker \\ \hline \sphinxcode{\sphinxupquote{'3'}} & tri\_left marker \\ \hline \sphinxcode{\sphinxupquote{'4'}} & tri\_right marker \\ \hline \sphinxcode{\sphinxupquote{'s'}} & square marker \\ \hline \sphinxcode{\sphinxupquote{'p'}} & pentagon marker \\ \hline \sphinxcode{\sphinxupquote{'*'}} & star marker \\ \hline \sphinxcode{\sphinxupquote{'h'}} & hexagon1 marker \\ \hline \sphinxcode{\sphinxupquote{'H'}} & hexagon2 marker \\ \hline \sphinxcode{\sphinxupquote{'+'}} & plus marker \\ \hline \sphinxcode{\sphinxupquote{'x'}} & x marker \\ \hline \sphinxcode{\sphinxupquote{'D'}} & diamond marker \\ \hline \sphinxcode{\sphinxupquote{'d'}} & thin\_diamond marker \\ \hline \sphinxcode{\sphinxupquote{'\textbar{}'}} & vline marker \\ \hline \sphinxcode{\sphinxupquote{'\_'}} & hline marker \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \sphinxstylestrong{Line Styles} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} & solid line style \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} & dashed line style \\ \hline \sphinxcode{\sphinxupquote{'-.'}} & dash-dot line style \\ \hline \sphinxcode{\sphinxupquote{':'}} & dotted line style \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Example format strings: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} blue markers with default shape} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{or}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} red circles} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}g}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} green solid line} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} dashed line with default color} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZca{}k:}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} black triangle\PYGZus{}up markers connected by a dotted line} \end{sphinxVerbatim} \sphinxstylestrong{Colors} The supported color abbreviations are the single letter codes \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily color \\ \hline \sphinxcode{\sphinxupquote{'b'}} & blue \\ \hline \sphinxcode{\sphinxupquote{'g'}} & green \\ \hline \sphinxcode{\sphinxupquote{'r'}} & red \\ \hline \sphinxcode{\sphinxupquote{'c'}} & cyan \\ \hline \sphinxcode{\sphinxupquote{'m'}} & magenta \\ \hline \sphinxcode{\sphinxupquote{'y'}} & yellow \\ \hline \sphinxcode{\sphinxupquote{'k'}} & black \\ \hline \sphinxcode{\sphinxupquote{'w'}} & white \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} and the \sphinxcode{\sphinxupquote{'CN'}} colors that index into the default property cycle. If the color is the only part of the format string, you can additionally use any {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors}}}}} spec, e.g. full names (\sphinxcode{\sphinxupquote{'green'}}) or hex strings (\sphinxcode{\sphinxupquote{'\#008000'}}). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.plot}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:examples-using-matplotlib-axes-axes-plot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_joinstyle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_simple\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_formatstr.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_three.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_by\_yvalue.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycler.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_marker\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_canvasagg.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \paragraph{matplotlib.axes.Axes.errorbar} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib-axes-axes-errorbar}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar::doc}}\index{errorbar() (matplotlib.axes.Axes method)@\spxentry{errorbar()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{errorbar}}}{\emph{self}, \emph{x}, \emph{y}, \emph{yerr=None}, \emph{xerr=None}, \emph{fmt=''}, \emph{ecolor=None}, \emph{elinewidth=None}, \emph{capsize=None}, \emph{barsabove=False}, \emph{lolims=False}, \emph{uplims=False}, \emph{xlolims=False}, \emph{xuplims=False}, \emph{errorevery=1}, \emph{capthick=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot y versus x as lines and/or markers with attached errorbars. \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} define the data locations, \sphinxstyleemphasis{xerr}, \sphinxstyleemphasis{yerr} define the errorbar sizes. By default, this draws the data markers/lines as well the errorbars. Use fmt='none' to draw errorbars without any data markers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}scalar or array-like{]} The data positions. \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like, shape(N,) or shape(2,N), optional{]} The errorbar sizes: \begin{itemize} \item {} scalar: Symmetric +/- values for all data points. \item {} shape(N,): Symmetric +/-values for each data point. \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. \end{itemize} Note that all error arrays should have \sphinxstyleemphasis{positive} values. See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}plot format string, optional, default: ''{]} The format for the data points / data lines. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} for details. Use 'none' (case insensitive) to plot errorbars without any data markers. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}mpl color, optional, default: None{]} A matplotlib color arg which gives the color the errorbar lines. If None, use the color of the line connecting the markers. \item[{\sphinxstylestrong{elinewidth}}] \leavevmode{[}scalar, optional, default: None{]} The linewidth of the errorbar lines. If None, the linewidth of the current style is used. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional, default: None{]} The length of the error bar caps in points. If None, it will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{capthick}}] \leavevmode{[}scalar, optional, default: None{]} An alias to the keyword argument \sphinxstyleemphasis{markeredgewidth} (a.k.a. \sphinxstyleemphasis{mew}). This setting is a more sensible name for the property that controls the thickness of the error bar cap in points. For backwards compatibility, if \sphinxstyleemphasis{mew} or \sphinxstyleemphasis{markeredgewidth} are given, then they will over-ride \sphinxstyleemphasis{capthick}. This may change in future releases. \item[{\sphinxstylestrong{barsabove}}] \leavevmode{[}bool, optional, default: False{]} If True, will plot the errorbars above the plot symbols. Default is below. \item[{\sphinxstylestrong{lolims, uplims, xlolims, xuplims}}] \leavevmode{[}bool, optional, default: None{]} These arguments can be used to indicate that a value gives only upper/lower limits. In that case a caret symbol is used to indicate this. \sphinxstyleemphasis{lims}-arguments may be of the same type as \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr}. To use limits with inverted axes, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} must be called before {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}. \item[{\sphinxstylestrong{errorevery}}] \leavevmode{[}positive integer, optional, default: 1{]} Subsamples the errorbars. e.g., if errorevery=5, errorbars for every 5-th datapoint will be plotted. The data plot itself still shows all data points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.ErrorbarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ErrorbarContainer}}}}}{]} The container contains: \begin{itemize} \item {} plotline: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance of x, y plot markers and/or line. \item {} caplines: A tuple of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances of the error bar caps. \item {} barlinecols: A tuple of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} with the horizontal and vertical error ranges. \end{itemize} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to the plot command for the markers. For example, this code makes big red squares with thick green edges: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x}\PYG{p}{,}\PYG{n}{y}\PYG{p}{,}\PYG{n}{yerr} \PYG{o}{=} \PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{errorbar}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{yerr}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{mfc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{mec}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ms}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{mew}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{mfc}, \sphinxstyleemphasis{mec}, \sphinxstyleemphasis{ms} and \sphinxstyleemphasis{mew} are aliases for the longer property names, \sphinxstyleemphasis{markerfacecolor}, \sphinxstyleemphasis{markeredgecolor}, \sphinxstyleemphasis{markersize} and \sphinxstyleemphasis{markeredgewidth}. Valid kwargs for the marker properties are \sphinxcode{\sphinxupquote{Lines2D}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'xerr', 'y', 'yerr'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.errorbar}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:examples-using-matplotlib-axes-axes-errorbar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_limits\_simple.py} \end{itemize} \paragraph{matplotlib.axes.Axes.scatter} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib-axes-axes-scatter}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter::doc}}\index{scatter() (matplotlib.axes.Axes method)@\spxentry{scatter()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{scatter}}}{\emph{self}, \emph{x}, \emph{y}, \emph{s=None}, \emph{c=None}, \emph{marker=None}, \emph{cmap=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{alpha=None}, \emph{linewidths=None}, \emph{verts=None}, \emph{edgecolors=None}, \emph{*}, \emph{plotnonfinite=False}, \emph{data=None}, \emph{**kwargs}}{} A scatter plot of \sphinxstyleemphasis{y} vs \sphinxstyleemphasis{x} with varying marker size and/or color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array\_like, shape (n, ){]} The data positions. \item[{\sphinxstylestrong{s}}] \leavevmode{[}scalar or array\_like, shape (n, ), optional{]} The marker size in points**2. Default is \sphinxcode{\sphinxupquote{rcParams{[}'lines.markersize'{]} ** 2}}. \item[{\sphinxstylestrong{c}}] \leavevmode{[}color, sequence, or sequence of color, optional{]} The marker color. Possible values: \begin{itemize} \item {} A single color format string. \item {} A sequence of color specifications of length n. \item {} A sequence of n numbers to be mapped to colors using \sphinxstyleemphasis{cmap} and \sphinxstyleemphasis{norm}. \item {} A 2-D array in which the rows are RGB or RGBA. \end{itemize} Note that \sphinxstyleemphasis{c} should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped. If you want to specify the same RGB or RGBA value for all points, use a 2-D array with a single row. Otherwise, value- matching will have precedence in case of a size matching with \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Defaults to \sphinxcode{\sphinxupquote{None}}. In that case the marker color is determined by the value of \sphinxcode{\sphinxupquote{color}}, \sphinxcode{\sphinxupquote{facecolor}} or \sphinxcode{\sphinxupquote{facecolors}}. In case those are not specified or \sphinxcode{\sphinxupquote{None}}, the marker color is determined by the next color of the \sphinxcode{\sphinxupquote{Axes}}' current "shape and fill" color cycle. This cycle defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.prop\_cycle"{]}}}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MarkerStyle}}}}}, optional{]} The marker style. \sphinxstyleemphasis{marker} can be either an instance of the class or the text shorthand for a particular marker. Defaults to \sphinxcode{\sphinxupquote{None}}, in which case it takes the value of \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"scatter.marker"{]}}}} = 'o'. See {\hyperref[\detokenize{api/markers_api:module-matplotlib.markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markers}}}}} for more information about marker styles. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional, default: None{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. \sphinxstyleemphasis{cmap} is only used if \sphinxstyleemphasis{c} is an array of floats. If \sphinxcode{\sphinxupquote{None}}, defaults to rc \sphinxcode{\sphinxupquote{image.cmap}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional, default: None{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance is used to scale luminance data to 0, 1. \sphinxstyleemphasis{norm} is only used if \sphinxstyleemphasis{c} is an array of floats. If \sphinxstyleemphasis{None}, use the default {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize}}}}}. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are used in conjunction with \sphinxstyleemphasis{norm} to normalize luminance data. If None, the respective min and max of the color array is used. \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are ignored if you pass a \sphinxstyleemphasis{norm} instance. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar or array\_like, optional, default: None{]} The linewidth of the marker edges. Note: The default \sphinxstyleemphasis{edgecolors} is 'face'. You may want to change this as well. If \sphinxstyleemphasis{None}, defaults to rcParams \sphinxcode{\sphinxupquote{lines.linewidth}}. \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'face', 'none', \sphinxstyleemphasis{None}\} or color or sequence of color, optional.{]} The edge color of the marker. Possible values: \begin{itemize} \item {} 'face': The edge color will always be the same as the face color. \item {} 'none': No patch boundary will be drawn. \item {} A Matplotlib color or sequence of color. \end{itemize} Defaults to \sphinxcode{\sphinxupquote{None}}, in which case it takes the value of \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"scatter.edgecolors"{]}}}} = 'face'. For non-filled markers, the \sphinxstyleemphasis{edgecolors} kwarg is ignored and forced to 'face' internally. \item[{\sphinxstylestrong{plotnonfinite}}] \leavevmode{[}boolean, optional, default: False{]} Set to plot points with nonfinite \sphinxstyleemphasis{c}, in conjunction with {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_bad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_bad}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{paths}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} properties{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}}] \leavevmode To plot scatter plots when markers are identical in size and color. \end{description} \subsubsection*{Notes} \begin{itemize} \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} function will be faster for scatterplots where markers don't vary in size or color. \item {} Any or all of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{s}, and \sphinxstyleemphasis{c} may be masked arrays, in which case all masks will be combined and only unmasked points will be plotted. \item {} Fundamentally, scatter works with 1-D arrays; \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{s}, and \sphinxstyleemphasis{c} may be input as 2-D arrays, but within scatter they will be flattened. The exception is \sphinxstyleemphasis{c}, which will be flattened only if its size matches the size of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \end{itemize} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'c', 'color', 'edgecolors', 'facecolor', 'facecolors', 'linewidths', 's', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.scatter}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:examples-using-matplotlib-axes-axes-scatter}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_piecharts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_scatter.py} \end{itemize} \paragraph{matplotlib.axes.Axes.plot\_date} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib-axes-axes-plot-date}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date::doc}}\index{plot\_date() (matplotlib.axes.Axes method)@\spxentry{plot\_date()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib.axes.Axes.plot_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{plot\_date}}}{\emph{self}, \emph{x}, \emph{y}, \emph{fmt='o'}, \emph{tz=None}, \emph{xdate=True}, \emph{ydate=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot data that contains dates. Similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}, this plots \sphinxstyleemphasis{y} vs. \sphinxstyleemphasis{x} as lines or markers. However, the axis labels are formatted as dates depending on \sphinxstyleemphasis{xdate} and \sphinxstyleemphasis{ydate}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like{]} The coordinates of the data points. If \sphinxstyleemphasis{xdate} or \sphinxstyleemphasis{ydate} is \sphinxstyleemphasis{True}, the respective values \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} are interpreted as {\hyperref[\detokenize{api/dates_api:date-format}]{\sphinxcrossref{\DUrole{std,std-ref}{Matplotlib dates}}}}. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} The plot format string. For details, see the corresponding parameter in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \item[{\sphinxstylestrong{tz}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} timezone string \textbar{} \sphinxcode{\sphinxupquote{tzinfo}} instance{]}{]} The time zone to use in labeling dates. If \sphinxstyleemphasis{None}, defaults to rcParam \sphinxcode{\sphinxupquote{timezone}}. \item[{\sphinxstylestrong{xdate}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxstyleemphasis{True}, the \sphinxstyleemphasis{x}-axis will be interpreted as Matplotlib dates. \item[{\sphinxstylestrong{ydate}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxstyleemphasis{True}, the \sphinxstyleemphasis{y}-axis will be interpreted as Matplotlib dates. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}}}] \leavevmode Helper functions on dates. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.date2num}}}}}}] \leavevmode Convert dates to num. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.num2date}}}}}}] \leavevmode Convert num to dates. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.drange}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.drange}}}}}}] \leavevmode Create an equally spaced sequence of dates. \end{description} \subsubsection*{Notes} If you are using custom date tickers and formatters, it may be necessary to set the formatters/locators after the call to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib.axes.Axes.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}}. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot_date:matplotlib.axes.Axes.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}} will set the default tick locator to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}} (if the tick locator is not already set to a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateLocator}}}}} instance) and the default tick formatter to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateFormatter}}}}} (if the tick formatter is not already set to a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateFormatter}}}}} instance). \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.step} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.step:matplotlib-axes-axes-step}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.step::doc}}\index{step() (matplotlib.axes.Axes method)@\spxentry{step()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.step:matplotlib.axes.Axes.step}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{step}}}{\emph{self}, \emph{x}, \emph{y}, \emph{*args}, \emph{where='pre'}, \emph{data=None}, \emph{**kwargs}}{} Make a step plot. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{step}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{where}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pre}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{step}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{where}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pre}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which changes some formatting options. Most of the concepts and parameters of plot can be used here as well. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array\_like{]} 1-D sequence of x positions. It is assumed, but not checked, that it is uniformly increasing. \item[{\sphinxstylestrong{y}}] \leavevmode{[}array\_like{]} 1-D sequence of y levels. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} A format string, e.g. 'g' for a green line. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} for a more detailed description. Note: While full format strings are accepted, it is recommended to only specify the color. Line styles are currently ignored (use the keyword argument \sphinxstyleemphasis{linestyle} instead). Markers are accepted and plotted on the given positions, however, this is a rarely needed feature for step plots. \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \item[{\sphinxstylestrong{where}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional, default 'pre'{]} Define where the steps should be placed: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional parameters are the same as those for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.step}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.step:examples-using-matplotlib-axes-axes-step}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_step\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.loglog} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.loglog:matplotlib-axes-axes-loglog}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.loglog::doc}}\index{loglog() (matplotlib.axes.Axes method)@\spxentry{loglog()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.loglog:matplotlib.axes.Axes.loglog}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{loglog}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on both the x and y axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loglog}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{loglog}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes both the x-axis and the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basex/y}, \sphinxstyleemphasis{subsx/y} and \sphinxstyleemphasis{nonposx/y} control the x/y-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basex, basey}}] \leavevmode{[}scalar, optional, default 10{]} Base of the x/y logarithm. \item[{\sphinxstylestrong{subsx, subsy}}] \leavevmode{[}sequence, optional{]} The location of the minor x/y ticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} / {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}} for details. \item[{\sphinxstylestrong{nonposx, nonposy}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in x or y can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.semilogx} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogx:matplotlib-axes-axes-semilogx}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogx::doc}}\index{semilogx() (matplotlib.axes.Axes method)@\spxentry{semilogx()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogx:matplotlib.axes.Axes.semilogx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{semilogx}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on the x axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{semilogx}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{semilogx}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes the x-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basex}, \sphinxstyleemphasis{subsx} and \sphinxstyleemphasis{nonposx} control the x-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basex}}] \leavevmode{[}scalar, optional, default 10{]} Base of the x logarithm. \item[{\sphinxstylestrong{subsx}}] \leavevmode{[}array\_like, optional{]} The location of the minor xticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} for details. \item[{\sphinxstylestrong{nonposx}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in x can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.semilogy} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogy:matplotlib-axes-axes-semilogy}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogy::doc}}\index{semilogy() (matplotlib.axes.Axes method)@\spxentry{semilogy()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.semilogy:matplotlib.axes.Axes.semilogy}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{semilogy}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on the y axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{semilogy}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{semilogy}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basey}, \sphinxstyleemphasis{subsy} and \sphinxstyleemphasis{nonposy} control the y-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basey}}] \leavevmode{[}scalar, optional, default 10{]} Base of the y logarithm. \item[{\sphinxstylestrong{subsy}}] \leavevmode{[}array\_like, optional{]} The location of the minor yticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}} for details. \item[{\sphinxstylestrong{nonposy}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in y can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.fill\_between} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib-axes-axes-fill-between}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between::doc}}\index{fill\_between() (matplotlib.axes.Axes method)@\spxentry{fill\_between()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{fill\_between}}}{\emph{self}, \emph{x}, \emph{y1}, \emph{y2=0}, \emph{where=None}, \emph{interpolate=False}, \emph{step=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Fill the area between two horizontal curves. The curves are defined by the points (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y1}) and (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y2}). This creates one or multiple polygons describing the filled area. You may exclude some horizontal sections from filling using \sphinxstyleemphasis{where}. By default, the edges connect the given points directly. Use \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{x}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array (length N){]} The x coordinates of the nodes defining the curves. \item[{\sphinxstylestrong{y1}}] \leavevmode{[}array (length N) or scalar{]} The y coordinates of the nodes defining the first curve. \item[{\sphinxstylestrong{y2}}] \leavevmode{[}array (length N) or scalar, optional, default: 0{]} The y coordinates of the nodes defining the second curve. \item[{\sphinxstylestrong{where}}] \leavevmode{[}array of bool (length N), optional, default: None{]} Define \sphinxstyleemphasis{where} to exclude some horizontal regions from being filled. The filled regions are defined by the coordinates \sphinxcode{\sphinxupquote{x{[}where{]}}}. More precisely, fill between \sphinxcode{\sphinxupquote{x{[}i{]}}} and \sphinxcode{\sphinxupquote{x{[}i+1{]}}} if \sphinxcode{\sphinxupquote{where{[}i{]} and where{[}i+1{]}}}. Note that this definition implies that an isolated \sphinxstyleemphasis{True} value between two \sphinxstyleemphasis{False} values in \sphinxstyleemphasis{where} will not result in filling. Both sides of the \sphinxstyleemphasis{True} position remain unfilled due to the adjacent \sphinxstyleemphasis{False} values. \item[{\sphinxstylestrong{interpolate}}] \leavevmode{[}bool, optional{]} This option is only relevant if \sphinxstyleemphasis{where} is used and the two curves are crossing each other. Semantically, \sphinxstyleemphasis{where} is often used for \sphinxstyleemphasis{y1} \textgreater{} \sphinxstyleemphasis{y2} or similar. By default, the nodes of the polygon defining the filled region will only be placed at the positions in the \sphinxstyleemphasis{x} array. Such a polygon cannot describe the above semantics close to the intersection. The x-sections containing the intersection are simply clipped. Setting \sphinxstyleemphasis{interpolate} to \sphinxstyleemphasis{True} will calculate the actual intersection point and extend the filled region up to this point. \item[{\sphinxstylestrong{step}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional{]} Define \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{x}. The value determines where the step will occur: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} containing the plotted polygons. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}. They control the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib.axes.Axes.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx}}}}}}] \leavevmode Fill between two sets of x-values. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'where', 'x', 'y1', 'y2'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.fill\_between}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:examples-using-matplotlib-axes-axes-fill-between}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_filled\_step.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fill\_between.py} \end{itemize} \paragraph{matplotlib.axes.Axes.fill\_betweenx} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib-axes-axes-fill-betweenx}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx::doc}}\index{fill\_betweenx() (matplotlib.axes.Axes method)@\spxentry{fill\_betweenx()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:matplotlib.axes.Axes.fill_betweenx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{fill\_betweenx}}}{\emph{self}, \emph{y}, \emph{x1}, \emph{x2=0}, \emph{where=None}, \emph{step=None}, \emph{interpolate=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Fill the area between two vertical curves. The curves are defined by the points (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y}) and (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y}). This creates one or multiple polygons describing the filled area. You may exclude some vertical sections from filling using \sphinxstyleemphasis{where}. By default, the edges connect the given points directly. Use \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{y}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}array (length N){]} The y coordinates of the nodes defining the curves. \item[{\sphinxstylestrong{x1}}] \leavevmode{[}array (length N) or scalar{]} The x coordinates of the nodes defining the first curve. \item[{\sphinxstylestrong{x2}}] \leavevmode{[}array (length N) or scalar, optional, default: 0{]} The x coordinates of the nodes defining the second curve. \item[{\sphinxstylestrong{where}}] \leavevmode{[}array of bool (length N), optional, default: None{]} Define \sphinxstyleemphasis{where} to exclude some vertical regions from being filled. The filled regions are defined by the coordinates \sphinxcode{\sphinxupquote{y{[}where{]}}}. More precisely, fill between \sphinxcode{\sphinxupquote{y{[}i{]}}} and \sphinxcode{\sphinxupquote{y{[}i+1{]}}} if \sphinxcode{\sphinxupquote{where{[}i{]} and where{[}i+1{]}}}. Note that this definition implies that an isolated \sphinxstyleemphasis{True} value between two \sphinxstyleemphasis{False} values in \sphinxstyleemphasis{where} will not result in filling. Both sides of the \sphinxstyleemphasis{True} position remain unfilled due to the adjacent \sphinxstyleemphasis{False} values. \item[{\sphinxstylestrong{interpolate}}] \leavevmode{[}bool, optional{]} This option is only relevant if \sphinxstyleemphasis{where} is used and the two curves are crossing each other. Semantically, \sphinxstyleemphasis{where} is often used for \sphinxstyleemphasis{x1} \textgreater{} \sphinxstyleemphasis{x2} or similar. By default, the nodes of the polygon defining the filled region will only be placed at the positions in the \sphinxstyleemphasis{y} array. Such a polygon cannot describe the above semantics close to the intersection. The y-sections containing the intersection are simply clipped. Setting \sphinxstyleemphasis{interpolate} to \sphinxstyleemphasis{True} will calculate the actual intersection point and extend the filled region up to this point. \item[{\sphinxstylestrong{step}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional{]} Define \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{y}. The value determines where the step will occur: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} containing the plotted polygons. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}. They control the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}}}] \leavevmode Fill between two sets of y-values. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'where', 'x1', 'x2', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.fill\_betweenx}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_betweenx:examples-using-matplotlib-axes-axes-fill-betweenx}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_filled\_step.py} \end{itemize} \paragraph{matplotlib.axes.Axes.bar} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib-axes-axes-bar}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bar::doc}}\index{bar() (matplotlib.axes.Axes method)@\spxentry{bar()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{bar}}}{\emph{self}, \emph{x}, \emph{height}, \emph{width=0.8}, \emph{bottom=None}, \emph{*}, \emph{align='center'}, \emph{data=None}, \emph{**kwargs}}{} Make a bar plot. The bars are positioned at \sphinxstyleemphasis{x} with the given \sphinxstyleemphasis{align}ment. Their dimensions are given by \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}. The vertical baseline is \sphinxstyleemphasis{bottom} (default 0). Each of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{height}, \sphinxstyleemphasis{width}, and \sphinxstyleemphasis{bottom} may either be a scalar applying to all bars, or it may be a sequence of length N providing a separate value for each bar. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}sequence of scalars{]} The x coordinates of the bars. See also \sphinxstyleemphasis{align} for the alignment of the bars to the coordinates. \item[{\sphinxstylestrong{height}}] \leavevmode{[}scalar or sequence of scalars{]} The height(s) of the bars. \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar or array-like, optional{]} The width(s) of the bars (default: 0.8). \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}scalar or array-like, optional{]} The y coordinate(s) of the bars bases (default: 0). \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'edge'\}, optional, default: 'center'{]} Alignment of the bars to the \sphinxstyleemphasis{x} coordinates: \begin{itemize} \item {} 'center': Center the base on the \sphinxstyleemphasis{x} positions. \item {} 'edge': Align the left edges of the bars with the \sphinxstyleemphasis{x} positions. \end{itemize} To align the bars on the right edge pass a negative \sphinxstyleemphasis{width} and \sphinxcode{\sphinxupquote{align='edge'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.BarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BarContainer}}}}}{]} Container with all the bars and optionally errorbars. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar faces. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar edges. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}scalar or array-like, optional{]} Width of the bar edge(s). If 0, don't draw edges. \item[{\sphinxstylestrong{tick\_label}}] \leavevmode{[}string or array-like, optional{]} The tick labels of the bars. Default: None (Use default numeric labels.) \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like of shape(N,) or shape(2,N), optional{]} If not \sphinxstyleemphasis{None}, add horizontal / vertical errorbars to the bar tips. The values are +/- sizes relative to the data: \begin{itemize} \item {} scalar: symmetric +/- values for all bars \item {} shape(N,): symmetric +/- values for each bar \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. (Default) \end{itemize} See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}scalar or array-like, optional, default: 'black'{]} The line color of the errorbars. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional{]} The length of the error bar caps in points. Default: None, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{error\_kw}}] \leavevmode{[}dict, optional{]} Dictionary of kwargs to be passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} method. Values of \sphinxstyleemphasis{ecolor} or \sphinxstyleemphasis{capsize} defined here take precedence over the independent kwargs. \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxstyleemphasis{True}, set the y-axis to be log scale. \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'vertical', 'horizontal'\}, optional{]} \sphinxstyleemphasis{This is for internal use only.} Please use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}} for horizontal bar plots. Default: 'vertical'. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}}}] \leavevmode Plot a horizontal bar plot. \end{description} \subsubsection*{Notes} The optional arguments \sphinxstyleemphasis{color}, \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{linewidth}, \sphinxstyleemphasis{xerr}, and \sphinxstyleemphasis{yerr} can be either scalars or sequences of length equal to the number of bars. This enables you to use bar as the basis for stacked bar charts, or candlestick plots. Detail: \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr} are passed directly to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}, so they can also have shape 2xN for independent specification of lower and upper errors. Other optional kwargs: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.bar}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:examples-using-matplotlib-axes-axes-bar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_bar\_of\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.barh} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib-axes-axes-barh}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barh::doc}}\index{barh() (matplotlib.axes.Axes method)@\spxentry{barh()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barh:matplotlib.axes.Axes.barh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{barh}}}{\emph{self}, \emph{y}, \emph{width}, \emph{height=0.8}, \emph{left=None}, \emph{*}, \emph{align='center'}, \emph{**kwargs}}{} Make a horizontal bar plot. The bars are positioned at \sphinxstyleemphasis{y} with the given \sphinxstyleemphasis{align}ment. Their dimensions are given by \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}. The horizontal baseline is \sphinxstyleemphasis{left} (default 0). Each of \sphinxstyleemphasis{y}, \sphinxstyleemphasis{width}, \sphinxstyleemphasis{height}, and \sphinxstyleemphasis{left} may either be a scalar applying to all bars, or it may be a sequence of length N providing a separate value for each bar. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar or array-like{]} The y coordinates of the bars. See also \sphinxstyleemphasis{align} for the alignment of the bars to the coordinates. \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar or array-like{]} The width(s) of the bars. \item[{\sphinxstylestrong{height}}] \leavevmode{[}sequence of scalars, optional, default: 0.8{]} The heights of the bars. \item[{\sphinxstylestrong{left}}] \leavevmode{[}sequence of scalars{]} The x coordinates of the left sides of the bars (default: 0). \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'edge'\}, optional, default: 'center'{]} Alignment of the base to the \sphinxstyleemphasis{y} coordinates*: \begin{itemize} \item {} 'center': Center the bars on the \sphinxstyleemphasis{y} positions. \item {} 'edge': Align the bottom edges of the bars with the \sphinxstyleemphasis{y} positions. \end{itemize} To align the bars on the top edge pass a negative \sphinxstyleemphasis{height} and \sphinxcode{\sphinxupquote{align='edge'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.BarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BarContainer}}}}}{]} Container with all the bars and optionally errorbars. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar faces. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar edges. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}scalar or array-like, optional{]} Width of the bar edge(s). If 0, don't draw edges. \item[{\sphinxstylestrong{tick\_label}}] \leavevmode{[}string or array-like, optional{]} The tick labels of the bars. Default: None (Use default numeric labels.) \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like of shape(N,) or shape(2,N), optional{]} If not \sphinxcode{\sphinxupquote{None}}, add horizontal / vertical errorbars to the bar tips. The values are +/- sizes relative to the data: \begin{itemize} \item {} scalar: symmetric +/- values for all bars \item {} shape(N,): symmetric +/- values for each bar \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. (default) \end{itemize} See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}scalar or array-like, optional, default: 'black'{]} The line color of the errorbars. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional{]} The length of the error bar caps in points. Default: None, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{error\_kw}}] \leavevmode{[}dict, optional{]} Dictionary of kwargs to be passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} method. Values of \sphinxstyleemphasis{ecolor} or \sphinxstyleemphasis{capsize} defined here take precedence over the independent kwargs. \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxcode{\sphinxupquote{True}}, set the x-axis to be log scale. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}}}}}}] \leavevmode Plot a vertical bar plot. \end{description} \subsubsection*{Notes} The optional arguments \sphinxstyleemphasis{color}, \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{linewidth}, \sphinxstyleemphasis{xerr}, and \sphinxstyleemphasis{yerr} can be either scalars or sequences of length equal to the number of bars. This enables you to use bar as the basis for stacked bar charts, or candlestick plots. Detail: \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr} are passed directly to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}, so they can also have shape 2xN for independent specification of lower and upper errors. Other optional kwargs: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.stem} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib-axes-axes-stem}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stem::doc}}\index{stem() (matplotlib.axes.Axes method)@\spxentry{stem()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{stem}}}{\emph{self}, \emph{*args}, \emph{linefmt=None}, \emph{markerfmt=None}, \emph{basefmt=None}, \emph{bottom=0}, \emph{label=None}, \emph{use\_line\_collection=False}, \emph{data=None}}{} Create a stem plot. A stem plot plots vertical lines at each \sphinxstyleemphasis{x} location from the baseline to \sphinxstyleemphasis{y}, and places a marker there. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{stem}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{,}\PYG{p}{]} \PYG{n}{y}\PYG{p}{,} \PYG{n}{linefmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{markerfmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{basefmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \end{sphinxVerbatim} The x-positions are optional. The formats may be provided either as positional or as keyword-arguments. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like, optional{]} The x-positions of the stems. Default: (0, 1, ..., len(y) - 1). \item[{\sphinxstylestrong{y}}] \leavevmode{[}array-like{]} The y-values of the stem heads. \item[{\sphinxstylestrong{linefmt}}] \leavevmode{[}str, optional{]} A string defining the properties of the vertical lines. Usually, this will be a color or a color and a linestyle: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Character &\sphinxstyletheadfamily Line Style \\ \hline \sphinxcode{\sphinxupquote{'-'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} & dash-dot line \\ \hline \sphinxcode{\sphinxupquote{':'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Default: 'C0-', i.e. solid line with the first color of the color cycle. Note: While it is technically possible to specify valid formats other than color or color and linestyle (e.g. 'rx' or '-.'), this is beyond the intention of the method and will most likely not result in a reasonable reasonable plot. \item[{\sphinxstylestrong{markerfmt}}] \leavevmode{[}str, optional{]} A string defining the properties of the markers at the stem heads. Default: 'C0o', i.e. filled circles with the first color of the color cycle. \item[{\sphinxstylestrong{basefmt}}] \leavevmode{[}str, optional{]} A format string defining the properties of the baseline. Default: 'C3-' ('C2-' in classic mode). \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}float, optional, default: 0{]} The y-position of the baseline. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str, optional, default: None{]} The label to use for the stems in legends. \item[{\sphinxstylestrong{use\_line\_collection}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxcode{\sphinxupquote{True}}, store and plot the stem lines as a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} instead of individual lines. This significantly increases performance, and will become the default option in Matplotlib 3.3. If \sphinxcode{\sphinxupquote{False}}, defaults to the old behavior of using a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.StemContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StemContainer}}}}}{]} The container may be treated like a tuple (\sphinxstyleemphasis{markerline}, \sphinxstyleemphasis{stemlines}, \sphinxstyleemphasis{baseline}) \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstrong{See also:} The MATLAB function \sphinxhref{http://www.mathworks.com/help/techdoc/ref/stem.html}{stem} which inspired this method. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.stem}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:examples-using-matplotlib-axes-axes-stem}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_stem\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \paragraph{matplotlib.axes.Axes.eventplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.eventplot:matplotlib-axes-axes-eventplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.eventplot::doc}}\index{eventplot() (matplotlib.axes.Axes method)@\spxentry{eventplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.eventplot:matplotlib.axes.Axes.eventplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{eventplot}}}{\emph{self}, \emph{positions}, \emph{orientation='horizontal'}, \emph{lineoffsets=1}, \emph{linelengths=1}, \emph{linewidths=None}, \emph{colors=None}, \emph{linestyles='solid'}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot identical parallel lines at the given positions. \sphinxstyleemphasis{positions} should be a 1D or 2D array-like object, with each row corresponding to a row or column of lines. This type of plot is commonly used in neuroscience for representing neural events, where it is usually called a spike raster, dot raster, or raster plot. However, it is useful in any situation where you wish to show the timing or position of multiple sets of discrete events, such as the arrival times of people to a business on each day of the month or the date of hurricanes each year of the last century. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{positions}}] \leavevmode{[}1D or 2D array-like object{]} Each value is an event. If \sphinxstyleemphasis{positions} is a 2D array-like, each row corresponds to a row or a column of lines (depending on the \sphinxstyleemphasis{orientation} parameter). \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'horizontal', 'vertical'\}, optional{]} Controls the direction of the event collections: \begin{itemize} \item {} 'horizontal' : the lines are arranged horizontally in rows, and are vertical. \item {} 'vertical' : the lines are arranged vertically in columns, and are horizontal. \end{itemize} \item[{\sphinxstylestrong{lineoffsets}}] \leavevmode{[}scalar or sequence of scalars, optional, default: 1{]} The offset of the center of the lines from the origin, in the direction orthogonal to \sphinxstyleemphasis{orientation}. \item[{\sphinxstylestrong{linelengths}}] \leavevmode{[}scalar or sequence of scalars, optional, default: 1{]} The total height of the lines (i.e. the lines stretches from \sphinxcode{\sphinxupquote{lineoffset - linelength/2}} to \sphinxcode{\sphinxupquote{lineoffset + linelength/2}}). \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar, scalar sequence or None, optional, default: None{]} The line width(s) of the event lines, in points. If it is None, defaults to its rcParams setting. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color, sequence of colors or None, optional, default: None{]} The color(s) of the event lines. If it is None, defaults to its rcParams setting. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}str or tuple or a sequence of such values, optional{]} Default is 'solid'. Valid strings are {[}'solid', 'dashed', 'dashdot', 'dotted', '-', '--', '-.', ':'{]}. Dash tuples should be of the form: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxstyleemphasis{onoffseq} is an even length tuple of on and off ink in points. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}optional{]} Other keyword arguments are line collection properties. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} for a list of the valid properties. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{list}}] \leavevmode{[}A list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EventCollection}}}}} objects.{]} Contains the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EventCollection}}}}} that were added. \end{description} \end{description}\end{quote} \subsubsection*{Notes} For \sphinxstyleemphasis{linelengths}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{colors}, and \sphinxstyleemphasis{linestyles}, if only a single value is given, that value is applied to all lines. If an array-like is given, it must have the same length as \sphinxstyleemphasis{positions}, and each value will be applied to the corresponding row of the array. \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{eventplot_demo}.pdf} \end{figure} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'linelengths', 'lineoffsets', 'linestyles', 'linewidths', 'positions'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.pie} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:matplotlib-axes-axes-pie}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pie::doc}}\index{pie() (matplotlib.axes.Axes method)@\spxentry{pie()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:matplotlib.axes.Axes.pie}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pie}}}{\emph{self}, \emph{x}, \emph{explode=None}, \emph{labels=None}, \emph{colors=None}, \emph{autopct=None}, \emph{pctdistance=0.6}, \emph{shadow=False}, \emph{labeldistance=1.1}, \emph{startangle=None}, \emph{radius=None}, \emph{counterclock=True}, \emph{wedgeprops=None}, \emph{textprops=None}, \emph{center=(0}, \emph{0)}, \emph{frame=False}, \emph{rotatelabels=False}, \emph{*}, \emph{data=None}}{} Plot a pie chart. Make a pie chart of array \sphinxstyleemphasis{x}. The fractional area of each wedge is given by \sphinxcode{\sphinxupquote{x/sum(x)}}. If \sphinxcode{\sphinxupquote{sum(x) \textless{} 1}}, then the values of \sphinxstyleemphasis{x} give the fractional area directly and the array will not be normalized. The resulting pie will have an empty wedge of size \sphinxcode{\sphinxupquote{1 - sum(x)}}. The wedges are plotted counterclockwise, by default starting from the x-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like{]} The wedge sizes. \item[{\sphinxstylestrong{explode}}] \leavevmode{[}array-like, optional, default: None{]} If not \sphinxstyleemphasis{None}, is a \sphinxcode{\sphinxupquote{len(x)}} array which specifies the fraction of the radius with which to offset each wedge. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list, optional, default: None{]} A sequence of strings providing the labels for each wedge \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array-like, optional, default: None{]} A sequence of matplotlib color args through which the pie chart will cycle. If \sphinxstyleemphasis{None}, will use the colors in the currently active cycle. \item[{\sphinxstylestrong{autopct}}] \leavevmode{[}None (default), string, or function, optional{]} If not \sphinxstyleemphasis{None}, is a string or function used to label the wedges with their numeric value. The label will be placed inside the wedge. If it is a format string, the label will be \sphinxcode{\sphinxupquote{fmt\%pct}}. If it is a function, it will be called. \item[{\sphinxstylestrong{pctdistance}}] \leavevmode{[}float, optional, default: 0.6{]} The ratio between the center of each pie slice and the start of the text generated by \sphinxstyleemphasis{autopct}. Ignored if \sphinxstyleemphasis{autopct} is \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}bool, optional, default: False{]} Draw a shadow beneath the pie. \item[{\sphinxstylestrong{labeldistance}}] \leavevmode{[}float or None, optional, default: 1.1{]} The radial distance at which the pie labels are drawn. If set to \sphinxcode{\sphinxupquote{None}}, label are not drawn, but are stored for use in \sphinxcode{\sphinxupquote{legend()}} \item[{\sphinxstylestrong{startangle}}] \leavevmode{[}float, optional, default: None{]} If not \sphinxstyleemphasis{None}, rotates the start of the pie chart by \sphinxstyleemphasis{angle} degrees counterclockwise from the x-axis. \item[{\sphinxstylestrong{radius}}] \leavevmode{[}float, optional, default: None{]} The radius of the pie, if \sphinxstyleemphasis{radius} is \sphinxstyleemphasis{None} it will be set to 1. \item[{\sphinxstylestrong{counterclock}}] \leavevmode{[}bool, optional, default: True{]} Specify fractions direction, clockwise or counterclockwise. \item[{\sphinxstylestrong{wedgeprops}}] \leavevmode{[}dict, optional, default: None{]} Dict of arguments passed to the wedge objects making the pie. For example, you can pass in \sphinxcode{\sphinxupquote{wedgeprops = \{'linewidth': 3\}}} to set the width of the wedge border lines equal to 3. For more details, look at the doc/arguments of the wedge object. By default \sphinxcode{\sphinxupquote{clip\_on=False}}. \item[{\sphinxstylestrong{textprops}}] \leavevmode{[}dict, optional, default: None{]} Dict of arguments to pass to the text objects. \item[{\sphinxstylestrong{center}}] \leavevmode{[}list of float, optional, default: (0, 0){]} Center position of the chart. Takes value (0, 0) or is a sequence of 2 scalars. \item[{\sphinxstylestrong{frame}}] \leavevmode{[}bool, optional, default: False{]} Plot axes frame with the chart if true. \item[{\sphinxstylestrong{rotatelabels}}] \leavevmode{[}bool, optional, default: False{]} Rotate each label to the angle of the corresponding slice if true. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patches}}] \leavevmode{[}list{]} A sequence of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Wedge}}}}} instances \item[{\sphinxstylestrong{texts}}] \leavevmode{[}list{]} A list of the label {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instances. \item[{\sphinxstylestrong{autotexts}}] \leavevmode{[}list{]} A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the numeric labels. This will only be returned if the parameter \sphinxstyleemphasis{autopct} is not \sphinxstyleemphasis{None}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. This method sets the aspect ratio of the axis to "equal". The axes aspect ratio can be controlled with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'explode', 'labels', 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.pie}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pie:examples-using-matplotlib-axes-axes-pie}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_bar\_of\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \paragraph{matplotlib.axes.Axes.stackplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot:matplotlib-axes-axes-stackplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot::doc}}\index{stackplot() (matplotlib.axes.Axes method)@\spxentry{stackplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot:matplotlib.axes.Axes.stackplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{stackplot}}}{\emph{axes}, \emph{x}, \emph{*args}, \emph{labels=()}, \emph{colors=None}, \emph{baseline='zero'}, \emph{data=None}, \emph{**kwargs}}{} Draw a stacked area plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1d array of dimension N{]} \item[{\sphinxstylestrong{y}}] \leavevmode{[}2d array (dimension MxN), or sequence of 1d arrays (each dimension 1xN){]} The data is assumed to be unstacked. Each of the following calls is legal: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{stackplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} where y is MxN} \PYG{n}{stackplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{n}{y3}\PYG{p}{,} \PYG{n}{y4}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} where y1, y2, y3, y4, are all 1xNm} \end{sphinxVerbatim} \item[{\sphinxstylestrong{baseline}}] \leavevmode{[}\{'zero', 'sym', 'wiggle', 'weighted\_wiggle'\}{]} Method used to calculate the baseline: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{'zero'}}: Constant zero baseline, i.e. a simple stacked plot. \item {} \sphinxcode{\sphinxupquote{'sym'}}: Symmetric around zero and is sometimes called 'ThemeRiver'. \item {} \sphinxcode{\sphinxupquote{'wiggle'}}: Minimizes the sum of the squared slopes. \item {} \sphinxcode{\sphinxupquote{'weighted\_wiggle'}}: Does the same but weights to account for size of each layer. It is also called 'Streamgraph'-layout. More details can be found at \sphinxurl{http://leebyron.com/streamgraph/}. \end{itemize} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}Length N sequence of strings{]} Labels to assign to each data series. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}Length N sequence of colors{]} A list or tuple of colors. These will be cycled through and used to colour the stacked areas. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.fill\_between()}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{list}}] \leavevmode{[}list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}{]} A list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} instances, one for each element in the stacked area plot. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.broken\_barh} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.broken_barh:matplotlib-axes-axes-broken-barh}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.broken_barh::doc}}\index{broken\_barh() (matplotlib.axes.Axes method)@\spxentry{broken\_barh()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.broken_barh:matplotlib.axes.Axes.broken_barh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{broken\_barh}}}{\emph{self}, \emph{xranges}, \emph{yrange}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a horizontal sequence of rectangles. A rectangle is drawn for each element of \sphinxstyleemphasis{xranges}. All rectangles have the same vertical position and size defined by \sphinxstyleemphasis{yrange}. This is a convenience function for instantiating a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}}, adding it to the axes and autoscaling the view. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xranges}}] \leavevmode{[}sequence of tuples (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xwidth}){]} The x-positions and extends of the rectangles. For each tuple (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xwidth}) a rectangle is drawn from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmin} + \sphinxstyleemphasis{xwidth}. \item[{\sphinxstylestrong{yranges}}] \leavevmode{[}(\sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ymax}){]} The y-position and extend for all the rectangles. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{collection}}] \leavevmode{[}A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}} properties{]} Each \sphinxstyleemphasis{kwarg} can be either a single argument applying to all rectangles, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{facecolors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or a sequence of arguments over which is cycled, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{facecolors}\PYG{o}{=}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} would create interleaving black and blue rectangles. Supported keywords: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.vlines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib-axes-axes-vlines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines::doc}}\index{vlines() (matplotlib.axes.Axes method)@\spxentry{vlines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{vlines}}}{\emph{self}, \emph{x}, \emph{ymin}, \emph{ymax}, \emph{colors='k'}, \emph{linestyles='solid'}, \emph{label=''}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot vertical lines. Plot vertical lines at each \sphinxstyleemphasis{x} from \sphinxstyleemphasis{ymin} to \sphinxstyleemphasis{ymax}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar or 1D array\_like{]} x-indexes where to plot the lines. \item[{\sphinxstylestrong{ymin, ymax}}] \leavevmode{[}scalar or 1D array\_like{]} Respective beginning and end of each line. If scalars are provided, all lines will have same length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like of colors, optional, default: 'k'{]} \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \item[{\sphinxstylestrong{label}}] \leavevmode{[}string, optional, default: ''{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} properties.{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib.axes.Axes.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}}}] \leavevmode horizontal lines \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:matplotlib.axes.Axes.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvline}}}}}}] \leavevmode vertical line across the axes \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'x', 'ymax', 'ymin'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.hlines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib-axes-axes-hlines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines::doc}}\index{hlines() (matplotlib.axes.Axes method)@\spxentry{hlines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib.axes.Axes.hlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{hlines}}}{\emph{self}, \emph{y}, \emph{xmin}, \emph{xmax}, \emph{colors='k'}, \emph{linestyles='solid'}, \emph{label=''}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot horizontal lines at each \sphinxstyleemphasis{y} from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmax}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar or sequence of scalar{]} y-indexes where to plot the lines. \item[{\sphinxstylestrong{xmin, xmax}}] \leavevmode{[}scalar or 1D array\_like{]} Respective beginning and end of each line. If scalars are provided, all lines will have same length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like of colors, optional, default: 'k'{]} \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \item[{\sphinxstylestrong{label}}] \leavevmode{[}string, optional, default: ''{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} properties.{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}}}] \leavevmode vertical lines \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline}}}}}}] \leavevmode horizontal line across the axes \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'xmax', 'xmin', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.hlines}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:examples-using-matplotlib-axes-axes-hlines}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \paragraph{matplotlib.axes.Axes.fill} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill:matplotlib-axes-axes-fill}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill::doc}}\index{fill() (matplotlib.axes.Axes method)@\spxentry{fill()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill:matplotlib.axes.Axes.fill}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{fill}}}{\emph{self}, \emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot filled polygons. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*args}}] \leavevmode{[}sequence of x, y, {[}color{]}{]} Each polygon is defined by the lists of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} positions of its nodes, optionally followed by a \sphinxstyleemphasis{color} specifier. See {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors}}}}} for supported color specifiers. The standard color cycle is used for polygons without a color specifier. You can plot multiple polygons by providing multiple \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{{[}color{]}} groups. For example, each of the following is legal: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a polygon with default color} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a blue polygon} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} two polygons} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a blue and a red polygon} \end{sphinxVerbatim} \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{signal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{signal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between()}}}}} if you would like to fill the region between two curves. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.fill}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.fill:examples-using-matplotlib-axes-axes-fill}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \subsubsection{Spans} \label{\detokenize{api/axes_api:spans}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axhline}}}}} & Add a horizontal line across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib.axes.Axes.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axhspan}}}}} & Add a horizontal span (rectangle) across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:matplotlib.axes.Axes.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axvline}}}}} & Add a vertical line across the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib.axes.Axes.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axvspan}}}}} & Add a vertical span (rectangle) across the axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.axhline} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib-axes-axes-axhline}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline::doc}}\index{axhline() (matplotlib.axes.Axes method)@\spxentry{axhline()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axhline}}}{\emph{self}, \emph{y=0}, \emph{xmin=0}, \emph{xmax=1}, \emph{**kwargs}}{} Add a horizontal line across the axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar, optional, default: 0{]} y position in data coordinates of the horizontal line. \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}scalar, optional, default: 0{]} Should be between 0 and 1, 0 being the far left of the plot, 1 the far right of the plot. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}scalar, optional, default: 1{]} Should be between 0 and 1, 0 being the far left of the plot, 1 the far right of the plot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Valid kwargs are {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, with the exception of 'transform': \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib.axes.Axes.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}}}] \leavevmode Add horizontal lines in data coordinates. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib.axes.Axes.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}}}] \leavevmode Add a horizontal span (rectangle) across the axis. \end{description} \subsubsection*{Examples} \begin{itemize} \item {} draw a thick red hline at 'y' = 0 that spans the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default hline at 'y' = 1 that spans the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{y}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default hline at 'y' = .5 that spans the middle half of the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{y}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{xmin}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{xmax}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.axhline}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:examples-using-matplotlib-axes-axes-axhline}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_span\_regions.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \paragraph{matplotlib.axes.Axes.axhspan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib-axes-axes-axhspan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan::doc}}\index{axhspan() (matplotlib.axes.Axes method)@\spxentry{axhspan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib.axes.Axes.axhspan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axhspan}}}{\emph{self}, \emph{ymin}, \emph{ymax}, \emph{xmin=0}, \emph{xmax=1}, \emph{**kwargs}}{} Add a horizontal span (rectangle) across the axis. Draw a horizontal span (rectangle) from \sphinxstyleemphasis{ymin} to \sphinxstyleemphasis{ymax}. With the default values of \sphinxstyleemphasis{xmin} = 0 and \sphinxstyleemphasis{xmax} = 1, this always spans the xrange, regardless of the xlim settings, even if you change them, e.g., with the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim()}}}}} command. That is, the horizontal extent is in axes coords: 0=left, 0.5=middle, 1.0=right but the \sphinxstyleemphasis{y} location is in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}float{]} Lower limit of the horizontal span in data units. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}float{]} Upper limit of the horizontal span in data units. \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}float, optional, default: 0{]} Lower limit of the vertical span in axes (relative 0-1) units. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}float, optional, default: 1{]} Upper limit of the vertical span in axes (relative 0-1) units. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Polygon}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties.{]} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib.axes.Axes.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}}}] \leavevmode Add a vertical span across the axes. \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.axvline} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:matplotlib-axes-axes-axvline}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline::doc}}\index{axvline() (matplotlib.axes.Axes method)@\spxentry{axvline()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:matplotlib.axes.Axes.axvline}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axvline}}}{\emph{self}, \emph{x=0}, \emph{ymin=0}, \emph{ymax=1}, \emph{**kwargs}}{} Add a vertical line across the axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar, optional, default: 0{]} x position in data coordinates of the vertical line. \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}scalar, optional, default: 0{]} Should be between 0 and 1, 0 being the bottom of the plot, 1 the top of the plot. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}scalar, optional, default: 1{]} Should be between 0 and 1, 0 being the bottom of the plot, 1 the top of the plot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Valid kwargs are {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, with the exception of 'transform': \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}}}] \leavevmode Add vertical lines in data coordinates. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib.axes.Axes.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}}}] \leavevmode Add a vertical span (rectangle) across the axis. \end{description} \subsubsection*{Examples} \begin{itemize} \item {} draw a thick red vline at \sphinxstyleemphasis{x} = 0 that spans the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default vline at \sphinxstyleemphasis{x} = 1 that spans the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default vline at \sphinxstyleemphasis{x} = .5 that spans the middle half of the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{ymin}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{ymax}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.axvline}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvline:examples-using-matplotlib-axes-axes-axvline}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \paragraph{matplotlib.axes.Axes.axvspan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib-axes-axes-axvspan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan::doc}}\index{axvspan() (matplotlib.axes.Axes method)@\spxentry{axvspan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axvspan:matplotlib.axes.Axes.axvspan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axvspan}}}{\emph{self}, \emph{xmin}, \emph{xmax}, \emph{ymin=0}, \emph{ymax=1}, \emph{**kwargs}}{} Add a vertical span (rectangle) across the axes. Draw a vertical span (rectangle) from \sphinxcode{\sphinxupquote{xmin}} to \sphinxcode{\sphinxupquote{xmax}}. With the default values of \sphinxcode{\sphinxupquote{ymin}} = 0 and \sphinxcode{\sphinxupquote{ymax}} = 1. This always spans the yrange, regardless of the ylim settings, even if you change them, e.g., with the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim()}}}}} command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the x location is in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}scalar{]} Number indicating the first X-axis coordinate of the vertical span rectangle in data units. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}scalar{]} Number indicating the second X-axis coordinate of the vertical span rectangle in data units. \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}scalar, optional{]} Number indicating the first Y-axis coordinate of the vertical span rectangle in relative Y-axis units (0-1). Default to 0. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}scalar, optional{]} Number indicating the second Y-axis coordinate of the vertical span rectangle in relative Y-axis units (0-1). Default to 1. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rectangle}}] \leavevmode{[}matplotlib.patches.Polygon{]} Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax). \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Optional parameters are properties of the class matplotlib.patches.Polygon. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhspan:matplotlib.axes.Axes.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}}}] \leavevmode Add a horizontal span across the axes. \end{description} \subsubsection*{Examples} Draw a vertical, green, translucent rectangle from x = 1.25 to x = 1.55 that spans the yrange of the axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvspan}\PYG{p}{(}\PYG{l+m+mf}{1.25}\PYG{p}{,} \PYG{l+m+mf}{1.55}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subsubsection{Spectral} \label{\detokenize{api/axes_api:spectral}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.acorr:matplotlib.axes.Axes.acorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.acorr}}}}} & Plot the autocorrelation of \sphinxstyleemphasis{x}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.angle\_spectrum}}}}} & Plot the angle spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.cohere:matplotlib.axes.Axes.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.cohere}}}}} & Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.csd:matplotlib.axes.Axes.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.csd}}}}} & Plot the cross-spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.magnitude\_spectrum}}}}} & Plot the magnitude spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.phase\_spectrum}}}}} & Plot the phase spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.psd}}}}} & Plot the power spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.specgram}}}}} & Plot a spectrogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xcorr:matplotlib.axes.Axes.xcorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.xcorr}}}}} & Plot the cross correlation between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.acorr} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.acorr:matplotlib-axes-axes-acorr}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.acorr::doc}}\index{acorr() (matplotlib.axes.Axes method)@\spxentry{acorr()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.acorr:matplotlib.axes.Axes.acorr}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{acorr}}}{\emph{self}, \emph{x}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the autocorrelation of \sphinxstyleemphasis{x}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like{]} \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}callable, optional, default: \sphinxcode{\sphinxupquote{mlab.detrend\_none}}{]} \sphinxstyleemphasis{x} is detrended by the \sphinxstyleemphasis{detrend} callable. This must be a function \sphinxcode{\sphinxupquote{x = detrend(x)}} accepting and returning an \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html\#numpy.array}{\sphinxcode{\sphinxupquote{numpy.array}}}. Default is no normalization. \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxcode{\sphinxupquote{True}}, input vectors are normalised to unit length. \item[{\sphinxstylestrong{usevlines}}] \leavevmode{[}bool, optional, default: True{]} Determines the plot style. If \sphinxcode{\sphinxupquote{True}}, vertical lines are plotted from 0 to the acorr value using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.vlines}}}}}. Additionally, a horizontal line is plotted at y=0 using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axhline}}}}}. If \sphinxcode{\sphinxupquote{False}}, markers are plotted at the acorr values using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.plot}}}}}. \item[{\sphinxstylestrong{maxlags}}] \leavevmode{[}int, optional, default: 10{]} Number of lags to show. If \sphinxcode{\sphinxupquote{None}}, will return all \sphinxcode{\sphinxupquote{2 * len(x) - 1}} lags. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lags}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The lag vector. \item[{\sphinxstylestrong{c}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The auto correlation vector. \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} added to the axes of the correlation: \begin{itemize} \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} if \sphinxstyleemphasis{usevlines} is True. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} if \sphinxstyleemphasis{usevlines} is False. \end{itemize} \item[{\sphinxstylestrong{b}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or None{]} Horizontal line at 0 if \sphinxstyleemphasis{usevlines} is True None \sphinxstyleemphasis{usevlines} is False. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{linestyle}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property, optional{]} The linestyle for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}str, optional, default: 'o'{]} The marker for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The cross correlation is performed with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html\#numpy.correlate}{\sphinxcode{\sphinxupquote{numpy.correlate()}}} with \sphinxcode{\sphinxupquote{mode = "full"}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.acorr}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.acorr:examples-using-matplotlib-axes-axes-acorr}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.angle\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib-axes-axes-angle-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum::doc}}\index{angle\_spectrum() (matplotlib.axes.Axes method)@\spxentry{angle\_spectrum()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{angle\_spectrum}}}{\emph{self}, \emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the angle spectrum. Compute the angle spectrum (wrapped phase spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the angle spectrum in radians (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}} plots the unwrapped version of this function. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the angle spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.cohere} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cohere:matplotlib-axes-axes-cohere}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cohere::doc}}\index{cohere() (matplotlib.axes.Axes method)@\spxentry{cohere()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cohere:matplotlib.axes.Axes.cohere}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{cohere}}}{\emph{self}, \emph{x}, \emph{y}, \emph{NFFT=256}, \emph{Fs=2}, \emph{Fc=0}, \emph{detrend=\textless{}function detrend\_none at 0x7ff96bc60a60\textgreater{}}, \emph{window=\textless{}function window\_hanning at 0x7ff96bc60400\textgreater{}}, \emph{noverlap=0}, \emph{pad\_to=None}, \emph{sides='default'}, \emph{scale\_by\_freq=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Coherence is the normalized cross spectral density: \begin{equation*} \begin{split}C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}\end{split} \end{equation*}\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between blocks. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Cxy}}] \leavevmode{[}1-D array{]} The coherence vector. \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies for the elements in \sphinxstyleemphasis{Cxy}. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \end{fulllineitems} \paragraph{matplotlib.axes.Axes.csd} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.csd:matplotlib-axes-axes-csd}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.csd::doc}}\index{csd() (matplotlib.axes.Axes method)@\spxentry{csd()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.csd:matplotlib.axes.Axes.csd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{csd}}}{\emph{self}, \emph{x}, \emph{y}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{return\_line=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the cross-spectral density. The cross spectral density \(P_{xy}\) by Welch's average periodogram method. The vectors \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The product of the direct FFTs of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are averaged over each segment to compute \(P_{xy}\), with a scaling to correct for power loss due to windowing. If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT} or len(\sphinxstyleemphasis{y}) \textless{} \sphinxstyleemphasis{NFFT}, they will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1-D arrays or sequences{]} Arrays or sequences containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between segments. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{return\_line}}] \leavevmode{[}bool{]} Whether to include the line object plotted in the returned values. Default is False. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxy}}] \leavevmode{[}1-D array{]} The values for the cross spectrum \sphinxcode{\sphinxupquote{P\_\{xy\}}} before scaling (complex valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxy}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. Only returned if \sphinxstyleemphasis{return\_line} is True. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} is the equivalent to setting y=x. \end{description} \subsubsection*{Notes} For plotting, the power is plotted as \(10\log_{10}(P_{xy})\) for decibels, though \sphinxcode{\sphinxupquote{P\_\{xy\}}} itself is returned. \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.magnitude\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib-axes-axes-magnitude-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum::doc}}\index{magnitude\_spectrum() (matplotlib.axes.Axes method)@\spxentry{magnitude\_spectrum()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{magnitude\_spectrum}}}{\emph{self}, \emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the magnitude spectrum. Compute the magnitude spectrum of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{scale}}] \leavevmode{[}\{'default', 'linear', 'dB'\}{]} The scaling of the values in the \sphinxstyleemphasis{spec}. 'linear' is no scaling. 'dB' returns the values in dB scale, i.e., the dB amplitude (20 * log10). 'default' is 'linear'. \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the magnitude spectrum before scaling (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} plots the power spectral density.{}`. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the angles of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}} plots the phase (unwrapped angle) of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the magnitude spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.phase\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib-axes-axes-phase-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum::doc}}\index{phase\_spectrum() (matplotlib.axes.Axes method)@\spxentry{phase\_spectrum()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{phase\_spectrum}}}{\emph{self}, \emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the phase spectrum. Compute the phase spectrum (unwrapped angle spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the phase spectrum in radians (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}} plots the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the wrapped version of this function. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the phase spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.psd} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib-axes-axes-psd}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.psd::doc}}\index{psd() (matplotlib.axes.Axes method)@\spxentry{psd()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{psd}}}{\emph{self}, \emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{return\_line=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the power spectral density. The power spectral density \(P_{xx}\) by Welch's average periodogram method. The vector \sphinxstyleemphasis{x} is divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The \(|\mathrm{fft}(i)|^2\) of each segment \(i\) are averaged to compute \(P_{xx}\), with a scaling to correct for power loss due to windowing. If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT}, it will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between segments. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{return\_line}}] \leavevmode{[}bool{]} Whether to include the line object plotted in the returned values. Default is False. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxx}}] \leavevmode{[}1-D array{]} The values for the power spectrum \sphinxcode{\sphinxupquote{P\_\{xx\}}} before scaling (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxx}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. Only returned if \sphinxstyleemphasis{return\_line} is True. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} differs in the default overlap; in not returning the mean of the segment periodograms; in returning the times of the segments; and in plotting a colormap instead of a line. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}} plots the magnitude spectrum. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.csd:matplotlib.axes.Axes.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.csd:matplotlib.axes.Axes.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd()}}}}} plots the spectral density between two signals. \end{description} \subsubsection*{Notes} For plotting, the power is plotted as \(10\log_{10}(P_{xx})\) for decibels, though \sphinxstyleemphasis{Pxx} itself is returned. \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.specgram} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib-axes-axes-specgram}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram::doc}}\index{specgram() (matplotlib.axes.Axes method)@\spxentry{specgram()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:matplotlib.axes.Axes.specgram}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{specgram}}}{\emph{self}, \emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{cmap=None}, \emph{xextent=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{mode=None}, \emph{scale=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a spectrogram. Compute and plot a spectrogram of data in \sphinxstyleemphasis{x}. Data are split into \sphinxstyleemphasis{NFFT} length segments and the spectrum of each section is computed. The windowing function \sphinxstyleemphasis{window} is applied to each segment, and the amount of overlap of each segment is specified with \sphinxstyleemphasis{noverlap}. The spectrogram is plotted as a colormap (using imshow). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{'default', 'psd', 'magnitude', 'angle', 'phase'\}{]} What sort of spectrum to use. Default is 'psd', which takes the power spectral density. 'magnitude' returns the magnitude spectrum. 'angle' returns the phase spectrum without unwrapping. 'phase' returns the phase spectrum with unwrapping. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between blocks. The default value is 128. \item[{\sphinxstylestrong{scale}}] \leavevmode{[}\{'default', 'linear', 'dB'\}{]} The scaling of the values in the \sphinxstyleemphasis{spec}. 'linear' is no scaling. 'dB' returns the values in dB scale. When \sphinxstyleemphasis{mode} is 'psd', this is dB power (10 * log10). Otherwise this is dB amplitude (20 * log10). 'default' is 'dB' if \sphinxstyleemphasis{mode} is 'psd' or 'magnitude' and 'linear' otherwise. This must be 'linear' if \sphinxstyleemphasis{mode} is 'angle' or 'phase'. \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{cmap}}] \leavevmode A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance; if \sphinxstyleemphasis{None}, use default determined by rc \item[{\sphinxstylestrong{xextent}}] \leavevmode{[}\sphinxstyleemphasis{None} or (xmin, xmax){]} The image extent along the x-axis. The default sets \sphinxstyleemphasis{xmin} to the left border of the first bin (\sphinxstyleemphasis{spectrum} column) and \sphinxstyleemphasis{xmax} to the right border of the last bin. Note that for \sphinxstyleemphasis{noverlap\textgreater{}0} the width of the bins is smaller than those of the segments. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are passed on to imshow which makes the specgram image. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}2-D array{]} Columns are the periodograms of successive segments. \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the rows in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{t}}] \leavevmode{[}1-D array{]} The times corresponding to midpoints of segments (i.e., the columns in \sphinxstyleemphasis{spectrum}). \item[{\sphinxstylestrong{im}}] \leavevmode{[}instance of class {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} The image created by imshow containing the spectrogram \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.psd:matplotlib.axes.Axes.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} differs in the default overlap; in returning the mean of the segment periodograms; in not returning times; and in generating a line plot instead of colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.magnitude_spectrum:matplotlib.axes.Axes.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'magnitude'. Plots a line instead of a colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.angle_spectrum:matplotlib.axes.Axes.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'angle'. Plots a line instead of a colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.phase_spectrum:matplotlib.axes.Axes.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'phase'. Plots a line instead of a colormap. \end{description} \subsubsection*{Notes} The parameters \sphinxstyleemphasis{detrend} and \sphinxstyleemphasis{scale\_by\_freq} do only apply when \sphinxstyleemphasis{mode} is set to 'psd'. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.specgram}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.specgram:examples-using-matplotlib-axes-axes-specgram}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_specgram\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.xcorr} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xcorr:matplotlib-axes-axes-xcorr}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xcorr::doc}}\index{xcorr() (matplotlib.axes.Axes method)@\spxentry{xcorr()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xcorr:matplotlib.axes.Axes.xcorr}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{xcorr}}}{\emph{self}, \emph{x}, \emph{y}, \emph{normed=True}, \emph{detrend=\textless{}function detrend\_none at 0x7ff96bc60a60\textgreater{}}, \emph{usevlines=True}, \emph{maxlags=10}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the cross correlation between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. The correlation with lag k is defined as \(\sum_n x[n+k] \cdot y^*[n]\), where \(y^*\) is the complex conjugate of \(y\). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like of length n{]} \item[{\sphinxstylestrong{y}}] \leavevmode{[}array-like of length n{]} \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}callable, optional, default: \sphinxcode{\sphinxupquote{mlab.detrend\_none}}{]} \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are detrended by the \sphinxstyleemphasis{detrend} callable. This must be a function \sphinxcode{\sphinxupquote{x = detrend(x)}} accepting and returning an \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html\#numpy.array}{\sphinxcode{\sphinxupquote{numpy.array}}}. Default is no normalization. \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxcode{\sphinxupquote{True}}, input vectors are normalised to unit length. \item[{\sphinxstylestrong{usevlines}}] \leavevmode{[}bool, optional, default: True{]} Determines the plot style. If \sphinxcode{\sphinxupquote{True}}, vertical lines are plotted from 0 to the xcorr value using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.vlines:matplotlib.axes.Axes.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.vlines}}}}}. Additionally, a horizontal line is plotted at y=0 using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axhline}}}}}. If \sphinxcode{\sphinxupquote{False}}, markers are plotted at the xcorr values using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.plot}}}}}. \item[{\sphinxstylestrong{maxlags}}] \leavevmode{[}int, optional, default: 10{]} Number of lags to show. If None, will return all \sphinxcode{\sphinxupquote{2 * len(x) - 1}} lags. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lags}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The lag vector. \item[{\sphinxstylestrong{c}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The auto correlation vector. \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} added to the axes of the correlation: \begin{itemize} \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} if \sphinxstyleemphasis{usevlines} is True. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} if \sphinxstyleemphasis{usevlines} is False. \end{itemize} \item[{\sphinxstylestrong{b}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or None{]} Horizontal line at 0 if \sphinxstyleemphasis{usevlines} is True None \sphinxstyleemphasis{usevlines} is False. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{linestyle}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property, optional{]} The linestyle for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}str, optional, default: 'o'{]} The marker for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The cross correlation is performed with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html\#numpy.correlate}{\sphinxcode{\sphinxupquote{numpy.correlate()}}} with \sphinxcode{\sphinxupquote{mode = "full"}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.xcorr}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xcorr:examples-using-matplotlib-axes-axes-xcorr}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \subsubsection{Statistics} \label{\detokenize{api/axes_api:statistics}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.boxplot}}}}} & Make a box and whisker plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.violinplot:matplotlib.axes.Axes.violinplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.violinplot}}}}} & Make a violin plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.violin:matplotlib.axes.Axes.violin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.violin}}}}} & Drawing function for violin plots. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.bxp}}}}} & Drawing function for box and whisker plots. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.boxplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib-axes-axes-boxplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot::doc}}\index{boxplot() (matplotlib.axes.Axes method)@\spxentry{boxplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:matplotlib.axes.Axes.boxplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{boxplot}}}{\emph{self}, \emph{x}, \emph{notch=None}, \emph{sym=None}, \emph{vert=None}, \emph{whis=None}, \emph{positions=None}, \emph{widths=None}, \emph{patch\_artist=None}, \emph{bootstrap=None}, \emph{usermedians=None}, \emph{conf\_intervals=None}, \emph{meanline=None}, \emph{showmeans=None}, \emph{showcaps=None}, \emph{showbox=None}, \emph{showfliers=None}, \emph{boxprops=None}, \emph{labels=None}, \emph{flierprops=None}, \emph{medianprops=None}, \emph{meanprops=None}, \emph{capprops=None}, \emph{whiskerprops=None}, \emph{manage\_ticks=True}, \emph{autorange=False}, \emph{zorder=None}, \emph{*}, \emph{data=None}}{} Make a box and whisker plot. Make a box and whisker plot for each column of \sphinxcode{\sphinxupquote{x}} or each vector in sequence \sphinxcode{\sphinxupquote{x}}. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}Array or a sequence of vectors.{]} The input data. \item[{\sphinxstylestrong{notch}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will produce a notched box plot. Otherwise, a rectangular boxplot is produced. The notches represent the confidence interval (CI) around the median. See the entry for the \sphinxcode{\sphinxupquote{bootstrap}} parameter for information regarding how the locations of the notches are computed. \begin{sphinxadmonition}{note}{Note:} In cases where the values of the CI are less than the lower quartile or greater than the upper quartile, the notches will extend beyond the box, giving it a distinctive "flipped" appearance. This is expected behavior and consistent with other statistical visualization packages. \end{sphinxadmonition} \item[{\sphinxstylestrong{sym}}] \leavevmode{[}str, optional{]} The default symbol for flier points. Enter an empty string ('') if you don't want to show fliers. If \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, then the fliers default to 'b+' If you want more control use the flierprops kwarg. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, optional (True){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (default), makes the boxes vertical. If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, everything is drawn horizontally. \item[{\sphinxstylestrong{whis}}] \leavevmode{[}float, sequence, or string (default = 1.5){]} As a float, determines the reach of the whiskers to the beyond the first and third quartiles. In other words, where IQR is the interquartile range (\sphinxcode{\sphinxupquote{Q3-Q1}}), the upper whisker will extend to last datum less than \sphinxcode{\sphinxupquote{Q3 + whis*IQR}}). Similarly, the lower whisker will extend to the first datum greater than \sphinxcode{\sphinxupquote{Q1 - whis*IQR}}. Beyond the whiskers, data are considered outliers and are plotted as individual points. Set this to an unreasonably high value to force the whiskers to show the min and max values. Alternatively, set this to an ascending sequence of percentile (e.g., {[}5, 95{]}) to set the whiskers at specific percentiles of the data. Finally, \sphinxcode{\sphinxupquote{whis}} can be the string \sphinxcode{\sphinxupquote{'range'}} to force the whiskers to the min and max of the data. \item[{\sphinxstylestrong{bootstrap}}] \leavevmode{[}int, optional{]} Specifies whether to bootstrap the confidence intervals around the median for notched boxplots. If \sphinxcode{\sphinxupquote{bootstrap}} is None, no bootstrapping is performed, and notches are calculated using a Gaussian-based asymptotic approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, 1967). Otherwise, bootstrap specifies the number of times to bootstrap the median to determine its 95\% confidence intervals. Values between 1000 and 10000 are recommended. \item[{\sphinxstylestrong{usermedians}}] \leavevmode{[}array-like, optional{]} An array or sequence whose first dimension (or length) is compatible with \sphinxcode{\sphinxupquote{x}}. This overrides the medians computed by matplotlib for each element of \sphinxcode{\sphinxupquote{usermedians}} that is not \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. When an element of \sphinxcode{\sphinxupquote{usermedians}} is None, the median will be computed by matplotlib as normal. \item[{\sphinxstylestrong{conf\_intervals}}] \leavevmode{[}array-like, optional{]} Array or sequence whose first dimension (or length) is compatible with \sphinxcode{\sphinxupquote{x}} and whose second dimension is 2. When the an element of \sphinxcode{\sphinxupquote{conf\_intervals}} is not None, the notch locations computed by matplotlib are overridden (provided \sphinxcode{\sphinxupquote{notch}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}). When an element of \sphinxcode{\sphinxupquote{conf\_intervals}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, the notches are computed by the method specified by the other kwargs (e.g., \sphinxcode{\sphinxupquote{bootstrap}}). \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, optional{]} Sets the positions of the boxes. The ticks and limits are automatically set to match the positions. Defaults to \sphinxcode{\sphinxupquote{range(1, N+1)}} where N is the number of boxes to be drawn. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}scalar or array-like{]} Sets the width of each box either with a scalar or a sequence. The default is 0.5, or \sphinxcode{\sphinxupquote{0.15*(distance between extreme positions)}}, if that is smaller. \item[{\sphinxstylestrong{patch\_artist}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} produces boxes with the Line2D artist. Otherwise, boxes and drawn with Patch artists. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence, optional{]} Labels for each dataset. Length must be compatible with dimensions of \sphinxcode{\sphinxupquote{x}}. \item[{\sphinxstylestrong{manage\_ticks}}] \leavevmode{[}bool, optional (True){]} If True, the tick locations and labels will be adjusted to match the boxplot positions. \item[{\sphinxstylestrong{autorange}}] \leavevmode{[}bool, optional (False){]} When \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} and the data are distributed such that the 25th and 75th percentiles are equal, \sphinxcode{\sphinxupquote{whis}} is set to \sphinxcode{\sphinxupquote{'range'}} such that the whisker ends are at the minimum and maximum of the data. \item[{\sphinxstylestrong{meanline}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (and \sphinxcode{\sphinxupquote{showmeans}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}), will try to render the mean as a line spanning the full width of the box according to \sphinxcode{\sphinxupquote{meanprops}} (see below). Not recommended if \sphinxcode{\sphinxupquote{shownotches}} is also True. Otherwise, means will be shown as points. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}scalar, optional (None){]} Sets the zorder of the boxplot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the boxplot to a list of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} instances created. That dictionary has the following keys (assuming vertical boxplots): \begin{itemize} \item {} \sphinxcode{\sphinxupquote{boxes}}: the main body of the boxplot showing the quartiles and the median's confidence intervals if enabled. \item {} \sphinxcode{\sphinxupquote{medians}}: horizontal lines at the median of each box. \item {} \sphinxcode{\sphinxupquote{whiskers}}: the vertical lines extending to the most extreme, non-outlier data points. \item {} \sphinxcode{\sphinxupquote{caps}}: the horizontal lines at the ends of the whiskers. \item {} \sphinxcode{\sphinxupquote{fliers}}: points representing data that extend beyond the whiskers (fliers). \item {} \sphinxcode{\sphinxupquote{means}}: points or lines representing the means. \end{itemize} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{showcaps}}] \leavevmode{[}bool, optional (True){]} Show the caps on the ends of whiskers. \item[{\sphinxstylestrong{showbox}}] \leavevmode{[}bool, optional (True){]} Show the central box. \item[{\sphinxstylestrong{showfliers}}] \leavevmode{[}bool, optional (True){]} Show the outliers beyond the caps. \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, optional (False){]} Show the arithmetic means. \item[{\sphinxstylestrong{capprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the caps. \item[{\sphinxstylestrong{boxprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the box. \item[{\sphinxstylestrong{whiskerprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the whiskers. \item[{\sphinxstylestrong{flierprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the fliers. \item[{\sphinxstylestrong{medianprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the median. \item[{\sphinxstylestrong{meanprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the mean. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.boxplot}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.boxplot:examples-using-matplotlib-axes-axes-boxplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_boxplot\_demo\_pyplot.py} \end{itemize} \paragraph{matplotlib.axes.Axes.violinplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violinplot:matplotlib-axes-axes-violinplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violinplot::doc}}\index{violinplot() (matplotlib.axes.Axes method)@\spxentry{violinplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violinplot:matplotlib.axes.Axes.violinplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{violinplot}}}{\emph{self}, \emph{dataset}, \emph{positions=None}, \emph{vert=True}, \emph{widths=0.5}, \emph{showmeans=False}, \emph{showextrema=True}, \emph{showmedians=False}, \emph{points=100}, \emph{bw\_method=None}, \emph{*}, \emph{data=None}}{} Make a violin plot. Make a violin plot for each column of \sphinxstyleemphasis{dataset} or each vector in sequence \sphinxstyleemphasis{dataset}. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, and the maximum. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dataset}}] \leavevmode{[}Array or a sequence of vectors.{]} The input data. \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, default = {[}1, 2, ..., n{]}{]} Sets the positions of the violins. The ticks and limits are automatically set to match the positions. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, default = True.{]} If true, creates a vertical violin plot. Otherwise, creates a horizontal violin plot. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}array-like, default = 0.5{]} Either a scalar or a vector that sets the maximal width of each violin. The default is 0.5, which uses about half of the available horizontal space. \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the means. \item[{\sphinxstylestrong{showextrema}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the extrema. \item[{\sphinxstylestrong{showmedians}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the medians. \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar, default = 100{]} Defines the number of points to evaluate each of the gaussian kernel density estimations at. \item[{\sphinxstylestrong{bw\_method}}] \leavevmode{[}str, scalar or callable, optional{]} The method used to calculate the estimator bandwidth. This can be 'scott', 'silverman', a scalar constant or a callable. If a scalar, this will be used directly as \sphinxcode{\sphinxupquote{kde.factor}}. If a callable, it should take a \sphinxcode{\sphinxupquote{GaussianKDE}} instance as its only parameter and return a scalar. If None (default), 'scott' is used. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the violinplot to a list of the corresponding collection instances created. The dictionary has the following keys: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{bodies}}: A list of the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PolyCollection}}}}} instances containing the filled area of each violin. \item {} \sphinxcode{\sphinxupquote{cmeans}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the mean values of each of the violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmins}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the bottom of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmaxes}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the top of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cbars}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the centers of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmedians}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the median values of each of the violin's distribution. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'dataset'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.violin} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violin:matplotlib-axes-axes-violin}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violin::doc}}\index{violin() (matplotlib.axes.Axes method)@\spxentry{violin()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.violin:matplotlib.axes.Axes.violin}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{violin}}}{\emph{self}, \emph{vpstats}, \emph{positions=None}, \emph{vert=True}, \emph{widths=0.5}, \emph{showmeans=False}, \emph{showextrema=True}, \emph{showmedians=False}}{} Drawing function for violin plots. Draw a violin plot for each column of \sphinxcode{\sphinxupquote{vpstats}}. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, and the maximum. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vpstats}}] \leavevmode{[}list of dicts{]} A list of dictionaries containing stats for each violin plot. Required keys are: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{coords}}: A list of scalars containing the coordinates that the violin's kernel density estimate were evaluated at. \item {} \sphinxcode{\sphinxupquote{vals}}: A list of scalars containing the values of the kernel density estimate at each of the coordinates given in \sphinxstyleemphasis{coords}. \item {} \sphinxcode{\sphinxupquote{mean}}: The mean value for this violin's dataset. \item {} \sphinxcode{\sphinxupquote{median}}: The median value for this violin's dataset. \item {} \sphinxcode{\sphinxupquote{min}}: The minimum value for this violin's dataset. \item {} \sphinxcode{\sphinxupquote{max}}: The maximum value for this violin's dataset. \end{itemize} \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, default = {[}1, 2, ..., n{]}{]} Sets the positions of the violins. The ticks and limits are automatically set to match the positions. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, default = True.{]} If true, plots the violins vertically. Otherwise, plots the violins horizontally. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}array-like, default = 0.5{]} Either a scalar or a vector that sets the maximal width of each violin. The default is 0.5, which uses about half of the available horizontal space. \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, default = False{]} If true, will toggle rendering of the means. \item[{\sphinxstylestrong{showextrema}}] \leavevmode{[}bool, default = True{]} If true, will toggle rendering of the extrema. \item[{\sphinxstylestrong{showmedians}}] \leavevmode{[}bool, default = False{]} If true, will toggle rendering of the medians. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the violinplot to a list of the corresponding collection instances created. The dictionary has the following keys: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{bodies}}: A list of the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PolyCollection}}}}} instances containing the filled area of each violin. \item {} \sphinxcode{\sphinxupquote{cmeans}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the mean values of each of the violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmins}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the bottom of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmaxes}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the top of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cbars}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the centers of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmedians}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the median values of each of the violin's distribution. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.bxp} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib-axes-axes-bxp}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp::doc}}\index{bxp() (matplotlib.axes.Axes method)@\spxentry{bxp()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.bxp:matplotlib.axes.Axes.bxp}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{bxp}}}{\emph{self}, \emph{bxpstats}, \emph{positions=None}, \emph{widths=None}, \emph{vert=True}, \emph{patch\_artist=False}, \emph{shownotches=False}, \emph{showmeans=False}, \emph{showcaps=True}, \emph{showbox=True}, \emph{showfliers=True}, \emph{boxprops=None}, \emph{whiskerprops=None}, \emph{flierprops=None}, \emph{medianprops=None}, \emph{capprops=None}, \emph{meanprops=None}, \emph{meanline=False}, \emph{manage\_ticks=True}, \emph{zorder=None}}{} Drawing function for box and whisker plots. Make a box and whisker plot for each column of \sphinxstyleemphasis{x} or each vector in sequence \sphinxstyleemphasis{x}. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bxpstats}}] \leavevmode{[}list of dicts{]} A list of dictionaries containing stats for each boxplot. Required keys are: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{med}}: The median (scalar float). \item {} \sphinxcode{\sphinxupquote{q1}}: The first quartile (25th percentile) (scalar float). \item {} \sphinxcode{\sphinxupquote{q3}}: The third quartile (75th percentile) (scalar float). \item {} \sphinxcode{\sphinxupquote{whislo}}: Lower bound of the lower whisker (scalar float). \item {} \sphinxcode{\sphinxupquote{whishi}}: Upper bound of the upper whisker (scalar float). \end{itemize} Optional keys are: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{mean}}: The mean (scalar float). Needed if \sphinxcode{\sphinxupquote{showmeans=True}}. \item {} \sphinxcode{\sphinxupquote{fliers}}: Data beyond the whiskers (sequence of floats). Needed if \sphinxcode{\sphinxupquote{showfliers=True}}. \item {} \sphinxcode{\sphinxupquote{cilo}} \& \sphinxcode{\sphinxupquote{cihi}}: Lower and upper confidence intervals about the median. Needed if \sphinxcode{\sphinxupquote{shownotches=True}}. \item {} \sphinxcode{\sphinxupquote{label}}: Name of the dataset (string). If available, this will be used a tick label for the boxplot \end{itemize} \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, default = {[}1, 2, ..., n{]}{]} Sets the positions of the boxes. The ticks and limits are automatically set to match the positions. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}array-like, default = None{]} Either a scalar or a vector and sets the width of each box. The default is \sphinxcode{\sphinxupquote{0.15*(distance between extreme positions)}}, clipped to no less than 0.15 and no more than 0.5. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (default), makes the boxes vertical. If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, makes horizontal boxes. \item[{\sphinxstylestrong{patch\_artist}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} produces boxes with the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} artist. If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} produces boxes with the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} artist. \item[{\sphinxstylestrong{shownotches}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} (default), produces a rectangular box plot. If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will produce a notched box plot \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle on the rendering of the means \item[{\sphinxstylestrong{showcaps}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle on the rendering of the caps \item[{\sphinxstylestrong{showbox}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle on the rendering of the box \item[{\sphinxstylestrong{showfliers}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle on the rendering of the fliers \item[{\sphinxstylestrong{boxprops}}] \leavevmode{[}dict or None (default){]} If provided, will set the plotting style of the boxes \item[{\sphinxstylestrong{whiskerprops}}] \leavevmode{[}dict or None (default){]} If provided, will set the plotting style of the whiskers \item[{\sphinxstylestrong{capprops}}] \leavevmode{[}dict or None (default){]} If provided, will set the plotting style of the caps \item[{\sphinxstylestrong{flierprops}}] \leavevmode{[}dict or None (default){]} If provided will set the plotting style of the fliers \item[{\sphinxstylestrong{medianprops}}] \leavevmode{[}dict or None (default){]} If provided, will set the plotting style of the medians \item[{\sphinxstylestrong{meanprops}}] \leavevmode{[}dict or None (default){]} If provided, will set the plotting style of the means \item[{\sphinxstylestrong{meanline}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (and \sphinxstyleemphasis{showmeans} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}), will try to render the mean as a line spanning the full width of the box according to \sphinxstyleemphasis{meanprops}. Not recommended if \sphinxstyleemphasis{shownotches} is also True. Otherwise, means will be shown as points. \item[{\sphinxstylestrong{manage\_ticks}}] \leavevmode{[}bool, default = True{]} If True, the tick locations and labels will be adjusted to match the boxplot positions. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}scalar, default = None{]} The zorder of the resulting boxplot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the boxplot to a list of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} instances created. That dictionary has the following keys (assuming vertical boxplots): \begin{itemize} \item {} \sphinxcode{\sphinxupquote{boxes}}: the main body of the boxplot showing the quartiles and the median's confidence intervals if enabled. \item {} \sphinxcode{\sphinxupquote{medians}}: horizontal lines at the median of each box. \item {} \sphinxcode{\sphinxupquote{whiskers}}: the vertical lines extending to the most extreme, non-outlier data points. \item {} \sphinxcode{\sphinxupquote{caps}}: the horizontal lines at the ends of the whiskers. \item {} \sphinxcode{\sphinxupquote{fliers}}: points representing data that extend beyond the whiskers (fliers). \item {} \sphinxcode{\sphinxupquote{means}}: points or lines representing the means. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{bxp_00_00}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{bxp_01_00}.pdf} \end{figure} \end{fulllineitems} \subsubsection{Binned} \label{\detokenize{api/axes_api:binned}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hexbin:matplotlib.axes.Axes.hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.hexbin}}}}} & Make a hexagonal binning plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.hist}}}}} & Plot a histogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:matplotlib.axes.Axes.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.hist2d}}}}} & Make a 2D histogram plot. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.hexbin} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hexbin:matplotlib-axes-axes-hexbin}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hexbin::doc}}\index{hexbin() (matplotlib.axes.Axes method)@\spxentry{hexbin()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hexbin:matplotlib.axes.Axes.hexbin}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{hexbin}}}{\emph{self}, \emph{x}, \emph{y}, \emph{C=None}, \emph{gridsize=100}, \emph{bins=None}, \emph{xscale='linear'}, \emph{yscale='linear'}, \emph{extent=None}, \emph{cmap=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{alpha=None}, \emph{linewidths=None}, \emph{edgecolors='face'}, \emph{reduce\_C\_function=\textless{}function mean at 0x7ff96ffe86a8\textgreater{}}, \emph{mincnt=None}, \emph{marginals=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Make a hexagonal binning plot. Make a hexagonal binning plot of \sphinxstyleemphasis{x} versus \sphinxstyleemphasis{y}, where \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are 1-D sequences of the same length, \sphinxstyleemphasis{N}. If \sphinxstyleemphasis{C} is \sphinxstyleemphasis{None} (the default), this is a histogram of the number of occurrences of the observations at (x{[}i{]},y{[}i{]}). If \sphinxstyleemphasis{C} is specified, it specifies values at the coordinate (x{[}i{]}, y{[}i{]}). These values are accumulated for each hexagonal bin and then reduced according to \sphinxstyleemphasis{reduce\_C\_function}, which defaults to \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html\#numpy.mean}{\sphinxcode{\sphinxupquote{numpy.mean}}}. (If \sphinxstyleemphasis{C} is specified, it must also be a 1-D sequence of the same length as \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}.) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array or masked array{]} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array or masked array, optional, default is \sphinxstyleemphasis{None}{]} \item[{\sphinxstylestrong{gridsize}}] \leavevmode{[}int or (int, int), optional, default is 100{]} The number of hexagons in the \sphinxstyleemphasis{x}-direction, default is 100. The corresponding number of hexagons in the \sphinxstyleemphasis{y}-direction is chosen such that the hexagons are approximately regular. Alternatively, gridsize can be a tuple with two elements specifying the number of hexagons in the \sphinxstyleemphasis{x}-direction and the \sphinxstyleemphasis{y}-direction. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}'log' or int or sequence, optional, default is \sphinxstyleemphasis{None}{]} If \sphinxstyleemphasis{None}, no binning is applied; the color of each hexagon directly corresponds to its count value. If 'log', use a logarithmic scale for the color map. Internally, \(log_{10}(i+1)\) is used to determine the hexagon color. If an integer, divide the counts in the specified number of bins, and color the hexagons accordingly. If a sequence of values, the values of the lower bound of the bins to be used. \item[{\sphinxstylestrong{xscale}}] \leavevmode{[}\{'linear', 'log'\}, optional, default is 'linear'{]} Use a linear or log10 scale on the horizontal axis. \item[{\sphinxstylestrong{yscale}}] \leavevmode{[}\{'linear', 'log'\}, optional, default is 'linear'{]} Use a linear or log10 scale on the vertical axis. \item[{\sphinxstylestrong{mincnt}}] \leavevmode{[}int \textgreater{} 0, optional, default is \sphinxstyleemphasis{None}{]} If not \sphinxstyleemphasis{None}, only display cells with more than \sphinxstyleemphasis{mincnt} number of points in the cell \item[{\sphinxstylestrong{marginals}}] \leavevmode{[}bool, optional, default is \sphinxstyleemphasis{False}{]} if marginals is \sphinxstyleemphasis{True}, plot the marginal density as colormapped rectangles along the bottom of the x-axis and left of the y-axis \item[{\sphinxstylestrong{extent}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} The limits of the bins. The default assigns the limits based on \sphinxstyleemphasis{gridsize}, \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{xscale} and \sphinxstyleemphasis{yscale}. If \sphinxstyleemphasis{xscale} or \sphinxstyleemphasis{yscale} is set to 'log', the limits are expected to be the exponent for a power of 10. E.g. for x-limits of 1 and 50 in 'linear' scale and y-limits of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3). Order of scalars is (left, right, bottom, top). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{polycollection}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} instance; use {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection.get\_array}}}}} on this to get the counts in each hexagon. If \sphinxstyleemphasis{marginals} is \sphinxstyleemphasis{True}, horizontal bar and vertical bar (both PolyCollections) will be attached to the return collection as attributes \sphinxstyleemphasis{hbar} and \sphinxstyleemphasis{vbar}. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}object, optional, default is \sphinxstyleemphasis{None}{]} a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance. If \sphinxstyleemphasis{None}, defaults to rc \sphinxcode{\sphinxupquote{image.cmap}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}object, optional, default is \sphinxstyleemphasis{None}{]} {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance is used to scale luminance data to 0,1. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are used in conjunction with \sphinxstyleemphasis{norm} to normalize luminance data. If \sphinxstyleemphasis{None}, the min and max of the color array \sphinxstyleemphasis{C} are used. Note if you pass a norm instance your settings for \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} will be ignored. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar between 0 and 1, optional, default is \sphinxstyleemphasis{None}{]} the alpha value for the patches \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} If \sphinxstyleemphasis{None}, defaults to 1.0. \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'face', 'none', \sphinxstyleemphasis{None}\} or color, optional{]} If 'face' (the default), draws the edges in the same color as the fill color. If 'none', no edge is drawn; this can sometimes lead to unsightly unpainted pixels between the hexagons. If \sphinxstyleemphasis{None}, draws outlines in the default color. If a matplotlib color arg, draws outlines in the specified color. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The standard descriptions of all the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} parameters: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.hist} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib-axes-axes-hist}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist::doc}}\index{hist() (matplotlib.axes.Axes method)@\spxentry{hist()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{hist}}}{\emph{self}, \emph{x}, \emph{bins=None}, \emph{range=None}, \emph{density=None}, \emph{weights=None}, \emph{cumulative=False}, \emph{bottom=None}, \emph{histtype='bar'}, \emph{align='mid'}, \emph{orientation='vertical'}, \emph{rwidth=None}, \emph{log=False}, \emph{color=None}, \emph{label=None}, \emph{stacked=False}, \emph{normed=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a histogram. Compute and draw the histogram of \sphinxstyleemphasis{x}. The return value is a tuple (\sphinxstyleemphasis{n}, \sphinxstyleemphasis{bins}, \sphinxstyleemphasis{patches}) or ({[}\sphinxstyleemphasis{n0}, \sphinxstyleemphasis{n1}, ...{]}, \sphinxstyleemphasis{bins}, {[}\sphinxstyleemphasis{patches0}, \sphinxstyleemphasis{patches1},...{]}) if the input contains multiple data. See the documentation of the \sphinxstyleemphasis{weights} parameter to draw a histogram of already-binned data. Multiple data can be provided via \sphinxstyleemphasis{x} as a list of datasets of potentially different length ({[}\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{x1}, ...{]}), or as a 2-D ndarray in which each column is a dataset. Note that the ndarray form is transposed relative to the list form. Masked arrays are not supported at present. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}(n,) array or sequence of (n,) arrays{]} Input values, this takes either a single array or a sequence of arrays which are not required to be of the same length. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}int or sequence or str, optional{]} If an integer is given, \sphinxcode{\sphinxupquote{bins + 1}} bin edges are calculated and returned, consistent with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html\#numpy.histogram}{\sphinxcode{\sphinxupquote{numpy.histogram}}}. If \sphinxcode{\sphinxupquote{bins}} is a sequence, gives bin edges, including left edge of first bin and right edge of last bin. In this case, \sphinxcode{\sphinxupquote{bins}} is returned unmodified. All but the last (righthand-most) bin is half-open. In other words, if \sphinxcode{\sphinxupquote{bins}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]} \end{sphinxVerbatim} then the first bin is \sphinxcode{\sphinxupquote{{[}1, 2)}} (including 1, but excluding 2) and the second \sphinxcode{\sphinxupquote{{[}2, 3)}}. The last bin, however, is \sphinxcode{\sphinxupquote{{[}3, 4{]}}}, which \sphinxstyleemphasis{includes} 4. Unequally spaced bins are supported if \sphinxstyleemphasis{bins} is a sequence. With Numpy 1.11 or newer, you can alternatively provide a string describing a binning strategy, such as 'auto', 'sturges', 'fd', 'doane', 'scott', 'rice' or 'sqrt', see \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html\#numpy.histogram}{\sphinxcode{\sphinxupquote{numpy.histogram}}}. The default is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"hist.bins"{]}}}}. \item[{\sphinxstylestrong{range}}] \leavevmode{[}tuple or None, optional{]} The lower and upper range of the bins. Lower and upper outliers are ignored. If not provided, \sphinxstyleemphasis{range} is \sphinxcode{\sphinxupquote{(x.min(), x.max())}}. Range has no effect if \sphinxstyleemphasis{bins} is a sequence. If \sphinxstyleemphasis{bins} is a sequence or \sphinxstyleemphasis{range} is specified, autoscaling is based on the specified bin range instead of the range of x. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{density}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, the first element of the return tuple will be the counts normalized to form a probability density, i.e., the area (or integral) under the histogram will sum to 1. This is achieved by dividing the count by the number of observations times the bin width and not dividing by the total number of observations. If \sphinxstyleemphasis{stacked} is also \sphinxcode{\sphinxupquote{True}}, the sum of the histograms is normalized to 1. Default is \sphinxcode{\sphinxupquote{None}} for both \sphinxstyleemphasis{normed} and \sphinxstyleemphasis{density}. If either is set, then that value will be used. If neither are set, then the args will be treated as \sphinxcode{\sphinxupquote{False}}. If both \sphinxstyleemphasis{density} and \sphinxstyleemphasis{normed} are set an error is raised. \item[{\sphinxstylestrong{weights}}] \leavevmode{[}(n, ) array\_like or None, optional{]} An array of weights, of the same shape as \sphinxstyleemphasis{x}. Each value in \sphinxstyleemphasis{x} only contributes its associated weight towards the bin count (instead of 1). If \sphinxstyleemphasis{normed} or \sphinxstyleemphasis{density} is \sphinxcode{\sphinxupquote{True}}, the weights are normalized, so that the integral of the density over the range remains 1. Default is \sphinxcode{\sphinxupquote{None}}. This parameter can be used to draw a histogram of data that has already been binned, e.g. using \sphinxcode{\sphinxupquote{np.histogram}} (by treating each bin as a single point with a weight equal to its count) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{counts}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{bins}\PYG{p}{,} \PYG{n}{weights}\PYG{o}{=}\PYG{n}{counts}\PYG{p}{)} \end{sphinxVerbatim} (or you may alternatively use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}}). \item[{\sphinxstylestrong{cumulative}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, then a histogram is computed where each bin gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. If \sphinxstyleemphasis{normed} or \sphinxstyleemphasis{density} is also \sphinxcode{\sphinxupquote{True}} then the histogram is normalized such that the last bin equals 1. If \sphinxstyleemphasis{cumulative} evaluates to less than 0 (e.g., -1), the direction of accumulation is reversed. In this case, if \sphinxstyleemphasis{normed} and/or \sphinxstyleemphasis{density} is also \sphinxcode{\sphinxupquote{True}}, then the histogram is normalized such that the first bin equals 1. Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}array\_like, scalar, or None{]} Location of the bottom baseline of each bin. If a scalar, the base line for each bin is shifted by the same amount. If an array, each bin is shifted independently and the length of bottom must match the number of bins. If None, defaults to 0. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{histtype}}] \leavevmode{[}\{'bar', 'barstacked', 'step', 'stepfilled'\}, optional{]} The type of histogram to draw. \begin{itemize} \item {} 'bar' is a traditional bar-type histogram. If multiple data are given the bars are arranged side by side. \item {} 'barstacked' is a bar-type histogram where multiple data are stacked on top of each other. \item {} 'step' generates a lineplot that is by default unfilled. \item {} 'stepfilled' generates a lineplot that is by default filled. \end{itemize} Default is 'bar' \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'left', 'mid', 'right'\}, optional{]} Controls how the histogram is plotted. \begin{itemize} \item {} 'left': bars are centered on the left bin edges. \item {} 'mid': bars are centered between the bin edges. \item {} 'right': bars are centered on the right bin edges. \end{itemize} Default is 'mid' \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'horizontal', 'vertical'\}, optional{]} If 'horizontal', {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}} will be used for bar-type histograms and the \sphinxstyleemphasis{bottom} kwarg will be the left edges. \item[{\sphinxstylestrong{rwidth}}] \leavevmode{[}scalar or None, optional{]} The relative width of the bars as a fraction of the bin width. If \sphinxcode{\sphinxupquote{None}}, automatically compute the width. Ignored if \sphinxstyleemphasis{histtype} is 'step' or 'stepfilled'. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, the histogram axis will be set to a log scale. If \sphinxstyleemphasis{log} is \sphinxcode{\sphinxupquote{True}} and \sphinxstyleemphasis{x} is a 1D array, empty bins will be filtered out and only the non-empty \sphinxcode{\sphinxupquote{(n, bins, patches)}} will be returned. Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or array\_like of colors or None, optional{]} Color spec or sequence of color specs, one per dataset. Default (\sphinxcode{\sphinxupquote{None}}) uses the standard line color sequence. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str or None, optional{]} String, or sequence of strings to match multiple datasets. Bar charts yield multiple patches per dataset, but only the first gets the label, so that the legend command will work as expected. default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{stacked}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, multiple data are stacked on top of each other If \sphinxcode{\sphinxupquote{False}} multiple data are arranged side by side if histtype is 'bar' or on top of each other if histtype is 'step' Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional{]} Deprecated; use the density keyword argument instead. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{n}}] \leavevmode{[}array or list of arrays{]} The values of the histogram bins. See \sphinxstyleemphasis{density} and \sphinxstyleemphasis{weights} for a description of the possible semantics. If input \sphinxstyleemphasis{x} is an array, then this is an array of length \sphinxstyleemphasis{nbins}. If input is a sequence of arrays \sphinxcode{\sphinxupquote{{[}data1, data2,..{]}}}, then this is a list of arrays with the values of the histograms for each of the arrays in the same order. The dtype of the array \sphinxstyleemphasis{n} (or of its element arrays) will always be float even if no weighting or normalization is used. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}array{]} The edges of the bins. Length nbins + 1 (nbins left edges and right edge of last bin). Always a single array even when multiple data sets are passed in. \item[{\sphinxstylestrong{patches}}] \leavevmode{[}list or list of lists{]} Silent list of individual patches used to create the histogram or list of such list if multiple input datasets. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:matplotlib.axes.Axes.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist2d}}}}}}] \leavevmode 2D histograms \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'weights', 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.hist}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:examples-using-matplotlib-axes-axes-hist}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_histogram\_path.py} \end{itemize} \paragraph{matplotlib.axes.Axes.hist2d} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:matplotlib-axes-axes-hist2d}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d::doc}}\index{hist2d() (matplotlib.axes.Axes method)@\spxentry{hist2d()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:matplotlib.axes.Axes.hist2d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{hist2d}}}{\emph{self}, \emph{x}, \emph{y}, \emph{bins=10}, \emph{range=None}, \emph{density=False}, \emph{weights=None}, \emph{cmin=None}, \emph{cmax=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Make a 2D histogram plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array\_like, shape (n, ){]} Input values \item[{\sphinxstylestrong{bins}}] \leavevmode{[}None or int or {[}int, int{]} or array\_like or {[}array, array{]}{]} The bin specification: \begin{itemize} \item {} If int, the number of bins for the two dimensions (nx=ny=bins). \item {} If \sphinxcode{\sphinxupquote{{[}int, int{]}}}, the number of bins in each dimension (nx, ny = bins). \item {} If array\_like, the bin edges for the two dimensions (x\_edges=y\_edges=bins). \item {} If \sphinxcode{\sphinxupquote{{[}array, array{]}}}, the bin edges in each dimension (x\_edges, y\_edges = bins). \end{itemize} The default value is 10. \item[{\sphinxstylestrong{range}}] \leavevmode{[}array\_like shape(2, 2), optional, default: None{]} The leftmost and rightmost edges of the bins along each dimension (if not specified explicitly in the bins parameters): \sphinxcode{\sphinxupquote{{[}{[}xmin, xmax{]}, {[}ymin, ymax{]}{]}}}. All values outside of this range will be considered outliers and not tallied in the histogram. \item[{\sphinxstylestrong{density}}] \leavevmode{[}bool, optional, default: False{]} Normalize histogram. \sphinxstyleemphasis{normed} is a deprecated synonym for this parameter. \item[{\sphinxstylestrong{weights}}] \leavevmode{[}array\_like, shape (n, ), optional, default: None{]} An array of values w\_i weighing each sample (x\_i, y\_i). \item[{\sphinxstylestrong{cmin}}] \leavevmode{[}scalar, optional, default: None{]} All bins that has count less than cmin will not be displayed and these count values in the return value count histogram will also be set to nan upon return \item[{\sphinxstylestrong{cmax}}] \leavevmode{[}scalar, optional, default: None{]} All bins that has count more than cmax will not be displayed (set to none before passing to imshow) and these count values in the return value count histogram will also be set to nan upon return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{h}}] \leavevmode{[}2D array{]} The bi-dimensional histogram of samples x and y. Values in x are histogrammed along the first dimension and values in y are histogrammed along the second dimension. \item[{\sphinxstylestrong{xedges}}] \leavevmode{[}1D array{]} The bin edges along the x axis. \item[{\sphinxstylestrong{yedges}}] \leavevmode{[}1D array{]} The bin edges along the y axis. \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}Colormap or str, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Colormap}}}}} instance. If not set, use rc settings. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize}}}}} instance is used to scale luminance data to \sphinxcode{\sphinxupquote{{[}0, 1{]}}}. If not set, defaults to {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize()}}}}}. \item[{\sphinxstylestrong{vmin/vmax}}] \leavevmode{[}None or scalar, optional{]} Arguments passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}\sphinxcode{\sphinxupquote{0 \textless{}= scalar \textless{}= 1}} or \sphinxcode{\sphinxupquote{None}}, optional{]} The alpha blending value. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hist:matplotlib.axes.Axes.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist}}}}}}] \leavevmode 1D histogram plotting \end{description} \subsubsection*{Notes} \begin{itemize} \item {} Currently \sphinxcode{\sphinxupquote{hist2d}} calculates it's own axis limits, and any limits previously set are ignored. \item {} Rendering the histogram with a logarithmic color scale is accomplished by passing a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.LogNorm}}}}} instance to the \sphinxstyleemphasis{norm} keyword argument. Likewise, power-law normalization (similar in effect to gamma correction) can be accomplished with {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.PowerNorm}}}}}. \end{itemize} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'weights', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.hist2d}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.hist2d:examples-using-matplotlib-axes-axes-hist2d}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_power\_norm.py} \end{itemize} \subsubsection{Contours} \label{\detokenize{api/axes_api:contours}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel:matplotlib.axes.Axes.clabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.clabel}}}}} & Label a contour plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.contour}}}}} & Plot contours. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.contourf}}}}} & Plot contours. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.clabel} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel:matplotlib-axes-axes-clabel}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel::doc}}\index{clabel() (matplotlib.axes.Axes method)@\spxentry{clabel()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel:matplotlib.axes.Axes.clabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{clabel}}}{\emph{self}, \emph{CS}, \emph{*args}, \emph{**kwargs}}{} Label a contour plot. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{clabel}\PYG{p}{(}\PYG{n}{cs}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{,}\PYG{p}{]} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Adds labels to line contours in \sphinxstyleemphasis{cs}, where \sphinxstyleemphasis{cs} is a {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}} object returned by \sphinxcode{\sphinxupquote{contour()}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}{]} The ContourSet to label. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}array-like, optional{]} A list of level values, that should be labeled. The list must be a subset of \sphinxcode{\sphinxupquote{cs.levels}}. If not given, all levels are labeled. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}string or float, optional{]} Size in points or relative size e.g., 'smaller', 'x-large'. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_size}}}}} for accepted string values. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color-spec, optional{]} The label colors: \begin{itemize} \item {} If \sphinxstyleemphasis{None}, the color of each label matches the color of the corresponding contour. \item {} If one string color, e.g., \sphinxstyleemphasis{colors} = 'r' or \sphinxstyleemphasis{colors} = 'red', all labels will be plotted in this color. \item {} If a tuple of matplotlib color args (string, float, rgb, etc), different labels will be plotted in different colors in the order specified. \end{itemize} \item[{\sphinxstylestrong{inline}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}} the underlying contour is removed where the label is placed. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{inline\_spacing}}] \leavevmode{[}float, optional{]} Space in pixels to leave on each side of label when placing inline. Defaults to 5. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}string or dict, optional{]} A format string for the label. Default is '\%1.3f' Alternatively, this can be a dictionary matching contour levels with arbitrary strings to use for each contour level (i.e., fmt{[}level{]}=string), or it can be any callable, such as a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} instance, that returns a string when called with a numeric contour level. \item[{\sphinxstylestrong{manual}}] \leavevmode{[}bool or iterable, optional{]} If \sphinxcode{\sphinxupquote{True}}, contour labels will be placed manually using mouse clicks. Click the first button near a contour to add a label, click the second button (or potentially both mouse buttons at once) to finish adding labels. The third button can be used to remove the last label added, but only if labels are not inline. Alternatively, the keyboard can be used to select label locations (enter to end label placement, delete or backspace act like the third mouse button, and any other key will select a label location). \sphinxstyleemphasis{manual} can also be an iterable object of x,y tuples. Contour labels will be created as if mouse is clicked at each x,y positions. \item[{\sphinxstylestrong{rightside\_up}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, label rotations will always be plus or minus 90 degrees from level. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{use\_clabeltext}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ClabelText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ClabelText}}}}} class (instead of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}) is used to create labels. \sphinxcode{\sphinxupquote{ClabelText}} recalculates rotation angles of texts during the drawing time, therefore this can be used if aspect of the axes changes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{labels}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.clabel}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel:examples-using-matplotlib-axes-axes-clabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.contour} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib-axes-axes-contour}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contour::doc}}\index{contour() (matplotlib.axes.Axes method)@\spxentry{contour()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{contour}}}{\emph{self}, \emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot contours. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{contour}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{Z}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array-like, optional{]} The coordinates of the values in \sphinxstyleemphasis{Z}. \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} must both be 2-D with the same shape as \sphinxstyleemphasis{Z} (e.g. created via \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid}}}), or they must both be 1-D such that \sphinxcode{\sphinxupquote{len(X) == M}} is the number of columns in \sphinxstyleemphasis{Z} and \sphinxcode{\sphinxupquote{len(Y) == N}} is the number of rows in \sphinxstyleemphasis{Z}. If not given, they are assumed to be integer indices, i.e. \sphinxcode{\sphinxupquote{X = range(M)}}, \sphinxcode{\sphinxupquote{Y = range(N)}}. \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like(N, M){]} The height values over which the contour is drawn. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}int or array-like, optional{]} Determines the number and positions of the contour lines / regions. If an int \sphinxstyleemphasis{n}, use \sphinxstyleemphasis{n} data intervals; i.e. draw \sphinxstyleemphasis{n+1} contour lines. The level heights are automatically chosen. If array-like, draw contour lines at the specified levels. The values must be in increasing order. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{corner\_mask}}] \leavevmode{[}bool, optional{]} Enable/disable corner masking, which only has an effect if \sphinxstyleemphasis{Z} is a masked array. If \sphinxcode{\sphinxupquote{False}}, any quad touching a masked point is masked out. If \sphinxcode{\sphinxupquote{True}}, only the triangular corners of quads nearest those points are always masked out, other triangular corners comprising three unmasked points are contoured as usual. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.corner\_mask"{]}}}}, which defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color string or sequence of colors, optional{]} The colors of the levels, i.e. the lines for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and the areas for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. The sequence is cycled for the levels in ascending order. If the sequence is shorter than the number of levels, it's repeated. As a shortcut, single color strings may be used in place of one-element lists, i.e. \sphinxcode{\sphinxupquote{'red'}} instead of \sphinxcode{\sphinxupquote{{[}'red'{]}}} to color all levels with the same color. This shortcut does only work for color strings, not for other ways of specifying colors. By default (value \sphinxstyleemphasis{None}), the colormap specified by \sphinxstyleemphasis{cmap} will be used. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. The colormap maps the level values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. If given, \sphinxstyleemphasis{colors} take precedence over \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} If a colormap is used, the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance scales the level values to the canonical colormap range {[}0, 1{]} for mapping to colors. If not given, the default linear scaling is used. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float, optional{]} If not \sphinxstyleemphasis{None}, either or both of these values will be supplied to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance, overriding the default color scaling based on \sphinxstyleemphasis{levels}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'upper', 'lower', 'image'\}, optional{]} Determines the orientation and exact position of \sphinxstyleemphasis{Z} by specifying the position of \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}}. This is only relevant, if \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not given. \begin{itemize} \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0, Y=0 in the lower left corner. \item {} 'lower': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0.5, Y=0.5 in the lower left corner. \item {} 'upper': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=N+0.5, Y=0.5 in the upper left corner. \item {} 'image': Use the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \end{itemize} \item[{\sphinxstylestrong{extent}}] \leavevmode{[}(x0, x1, y0, y1), optional{]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This argument is ignored if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \item[{\sphinxstylestrong{locator}}] \leavevmode{[}ticker.Locator subclass, optional{]} The locator is used to determine the contour levels if they are not given explicitly via \sphinxstyleemphasis{levels}. Defaults to {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}. \item[{\sphinxstylestrong{extend}}] \leavevmode{[}\{'neither', 'both', 'min', 'max'\}, optional, default: 'neither'{]} Determines the \sphinxcode{\sphinxupquote{contourf}}-coloring of values that are outside the \sphinxstyleemphasis{levels} range. If 'neither', values outside the \sphinxstyleemphasis{levels} range are not colored. If 'min', 'max' or 'both', color the values below, above or below and above the \sphinxstyleemphasis{levels} range. Values below \sphinxcode{\sphinxupquote{min(levels)}} and above \sphinxcode{\sphinxupquote{max(levels)}} are mapped to the under/over values of the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}. Note, that most colormaps do not have dedicated colors for these by default, so that the over and under values are the edge values of the colormap. You may want to set these values explicitly using {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_under}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_over}}}}}. \begin{sphinxadmonition}{note}{Note:} An exising {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} does not get notified if properties of its colormap are changed. Therefore, an explicit call \sphinxcode{\sphinxupquote{QuadContourSet.changed()}} is needed after modifying the colormap. The explicit call can be left out, if a colorbar is assigned to the {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} because it internally calls \sphinxcode{\sphinxupquote{QuadContourSet.changed()}}. \end{sphinxadmonition} Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{x}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{h} \PYG{o}{=} \PYG{n}{x} \PYG{o}{*} \PYG{n}{y} \PYG{n}{cs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{contourf}\PYG{p}{(}\PYG{n}{h}\PYG{p}{,} \PYG{n}{levels}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{]}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}808080}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}A0A0A0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}C0C0C0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{changed}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{xunits, yunits}}] \leavevmode{[}registered units, optional{]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \item[{\sphinxstylestrong{antialiased}}] \leavevmode{[}bool, optional{]} Enable antialiasing, overriding the defaults. For filled contours, the default is \sphinxstyleemphasis{True}. For line contours, it is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.antialiased"{]}}}}. \item[{\sphinxstylestrong{Nchunk}}] \leavevmode{[}int \textgreater{}= 0, optional{]} If 0, no subdivision of the domain. Specify a positive integer to divide the domain into subdomains of \sphinxstyleemphasis{nchunk} by \sphinxstyleemphasis{nchunk} quads. Chunking reduces the maximum length of polygons generated by the contouring algorithm which reduces the rendering workload passed on to the backend and also requires slightly less RAM. It can however introduce rendering artifacts at chunk boundaries depending on the backend, the \sphinxstyleemphasis{antialiased} flag and value of \sphinxstyleemphasis{alpha}. \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}float or sequence of float, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. The line width of the contour lines. If a number, all levels will be plotted with this linewidth. If a sequence, the levels in ascending order will be plotted with the linewidths in the order specified. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.linewidth"{]}}}}. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the default is 'solid' unless the lines are monochrome. In that case, negative contours will take their linestyle from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} setting. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. \item[{\sphinxstylestrong{hatches}}] \leavevmode{[}List{[}str{]}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. A list of cross hatch patterns to use on the filled areas. If None, no hatching will be added to the contour. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{enumerate} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.contour}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:examples-using-matplotlib-axes-axes-contour}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \paragraph{matplotlib.axes.Axes.contourf} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib-axes-axes-contourf}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf::doc}}\index{contourf() (matplotlib.axes.Axes method)@\spxentry{contourf()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{contourf}}}{\emph{self}, \emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot contours. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{contour}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{Z}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array-like, optional{]} The coordinates of the values in \sphinxstyleemphasis{Z}. \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} must both be 2-D with the same shape as \sphinxstyleemphasis{Z} (e.g. created via \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid}}}), or they must both be 1-D such that \sphinxcode{\sphinxupquote{len(X) == M}} is the number of columns in \sphinxstyleemphasis{Z} and \sphinxcode{\sphinxupquote{len(Y) == N}} is the number of rows in \sphinxstyleemphasis{Z}. If not given, they are assumed to be integer indices, i.e. \sphinxcode{\sphinxupquote{X = range(M)}}, \sphinxcode{\sphinxupquote{Y = range(N)}}. \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like(N, M){]} The height values over which the contour is drawn. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}int or array-like, optional{]} Determines the number and positions of the contour lines / regions. If an int \sphinxstyleemphasis{n}, use \sphinxstyleemphasis{n} data intervals; i.e. draw \sphinxstyleemphasis{n+1} contour lines. The level heights are automatically chosen. If array-like, draw contour lines at the specified levels. The values must be in increasing order. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{corner\_mask}}] \leavevmode{[}bool, optional{]} Enable/disable corner masking, which only has an effect if \sphinxstyleemphasis{Z} is a masked array. If \sphinxcode{\sphinxupquote{False}}, any quad touching a masked point is masked out. If \sphinxcode{\sphinxupquote{True}}, only the triangular corners of quads nearest those points are always masked out, other triangular corners comprising three unmasked points are contoured as usual. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.corner\_mask"{]}}}}, which defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color string or sequence of colors, optional{]} The colors of the levels, i.e. the lines for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and the areas for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. The sequence is cycled for the levels in ascending order. If the sequence is shorter than the number of levels, it's repeated. As a shortcut, single color strings may be used in place of one-element lists, i.e. \sphinxcode{\sphinxupquote{'red'}} instead of \sphinxcode{\sphinxupquote{{[}'red'{]}}} to color all levels with the same color. This shortcut does only work for color strings, not for other ways of specifying colors. By default (value \sphinxstyleemphasis{None}), the colormap specified by \sphinxstyleemphasis{cmap} will be used. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. The colormap maps the level values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. If given, \sphinxstyleemphasis{colors} take precedence over \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} If a colormap is used, the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance scales the level values to the canonical colormap range {[}0, 1{]} for mapping to colors. If not given, the default linear scaling is used. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float, optional{]} If not \sphinxstyleemphasis{None}, either or both of these values will be supplied to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance, overriding the default color scaling based on \sphinxstyleemphasis{levels}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'upper', 'lower', 'image'\}, optional{]} Determines the orientation and exact position of \sphinxstyleemphasis{Z} by specifying the position of \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}}. This is only relevant, if \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not given. \begin{itemize} \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0, Y=0 in the lower left corner. \item {} 'lower': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0.5, Y=0.5 in the lower left corner. \item {} 'upper': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=N+0.5, Y=0.5 in the upper left corner. \item {} 'image': Use the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \end{itemize} \item[{\sphinxstylestrong{extent}}] \leavevmode{[}(x0, x1, y0, y1), optional{]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This argument is ignored if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \item[{\sphinxstylestrong{locator}}] \leavevmode{[}ticker.Locator subclass, optional{]} The locator is used to determine the contour levels if they are not given explicitly via \sphinxstyleemphasis{levels}. Defaults to {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}. \item[{\sphinxstylestrong{extend}}] \leavevmode{[}\{'neither', 'both', 'min', 'max'\}, optional, default: 'neither'{]} Determines the \sphinxcode{\sphinxupquote{contourf}}-coloring of values that are outside the \sphinxstyleemphasis{levels} range. If 'neither', values outside the \sphinxstyleemphasis{levels} range are not colored. If 'min', 'max' or 'both', color the values below, above or below and above the \sphinxstyleemphasis{levels} range. Values below \sphinxcode{\sphinxupquote{min(levels)}} and above \sphinxcode{\sphinxupquote{max(levels)}} are mapped to the under/over values of the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}. Note, that most colormaps do not have dedicated colors for these by default, so that the over and under values are the edge values of the colormap. You may want to set these values explicitly using {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_under}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_over}}}}}. \begin{sphinxadmonition}{note}{Note:} An exising {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} does not get notified if properties of its colormap are changed. Therefore, an explicit call \sphinxcode{\sphinxupquote{QuadContourSet.changed()}} is needed after modifying the colormap. The explicit call can be left out, if a colorbar is assigned to the {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} because it internally calls \sphinxcode{\sphinxupquote{QuadContourSet.changed()}}. \end{sphinxadmonition} Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{x}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{h} \PYG{o}{=} \PYG{n}{x} \PYG{o}{*} \PYG{n}{y} \PYG{n}{cs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{contourf}\PYG{p}{(}\PYG{n}{h}\PYG{p}{,} \PYG{n}{levels}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{]}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}808080}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}A0A0A0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}C0C0C0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{changed}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{xunits, yunits}}] \leavevmode{[}registered units, optional{]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \item[{\sphinxstylestrong{antialiased}}] \leavevmode{[}bool, optional{]} Enable antialiasing, overriding the defaults. For filled contours, the default is \sphinxstyleemphasis{True}. For line contours, it is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.antialiased"{]}}}}. \item[{\sphinxstylestrong{Nchunk}}] \leavevmode{[}int \textgreater{}= 0, optional{]} If 0, no subdivision of the domain. Specify a positive integer to divide the domain into subdomains of \sphinxstyleemphasis{nchunk} by \sphinxstyleemphasis{nchunk} quads. Chunking reduces the maximum length of polygons generated by the contouring algorithm which reduces the rendering workload passed on to the backend and also requires slightly less RAM. It can however introduce rendering artifacts at chunk boundaries depending on the backend, the \sphinxstyleemphasis{antialiased} flag and value of \sphinxstyleemphasis{alpha}. \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}float or sequence of float, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. The line width of the contour lines. If a number, all levels will be plotted with this linewidth. If a sequence, the levels in ascending order will be plotted with the linewidths in the order specified. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.linewidth"{]}}}}. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the default is 'solid' unless the lines are monochrome. In that case, negative contours will take their linestyle from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} setting. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. \item[{\sphinxstylestrong{hatches}}] \leavevmode{[}List{[}str{]}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. A list of cross hatch patterns to use on the filled areas. If None, no hatching will be added to the contour. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{enumerate} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.contourf}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:examples-using-matplotlib-axes-axes-contourf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \subsubsection{Array} \label{\detokenize{api/axes_api:array}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.imshow}}}}} & Display an image, i.e. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:matplotlib.axes.Axes.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.matshow}}}}} & Plot the values of a 2D matrix or array as color-coded image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pcolor}}}}} & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast:matplotlib.axes.Axes.pcolorfast}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pcolorfast}}}}} & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pcolormesh}}}}} & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.spy}}}}} & Plot the sparsity pattern of a 2D array. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.imshow} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib-axes-axes-imshow}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow::doc}}\index{imshow() (matplotlib.axes.Axes method)@\spxentry{imshow()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{imshow}}}{\emph{self}, \emph{X}, \emph{cmap=None}, \emph{norm=None}, \emph{aspect=None}, \emph{interpolation=None}, \emph{alpha=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{origin=None}, \emph{extent=None}, \emph{shape=\textless{}deprecated parameter\textgreater{}}, \emph{filternorm=1}, \emph{filterrad=4.0}, \emph{imlim=\textless{}deprecated parameter\textgreater{}}, \emph{resample=None}, \emph{url=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Display an image, i.e. data on a 2D regular raster. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode{[}array-like or PIL image{]} The image data. Supported array shapes are: \begin{itemize} \item {} (M, N): an image with scalar data. The data is visualized using a colormap. \item {} (M, N, 3): an image with RGB values (0-1 float or 0-255 int). \item {} (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), i.e. including transparency. \end{itemize} The first two dimensions (M, N) define the rows and columns of the image. Out-of-range RGB(A) values are clipped. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} The Colormap instance or registered colormap name used to map scalar data to colors. This parameter is ignored for RGB(A) data. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The \sphinxcode{\sphinxupquote{Normalize}} instance used to scale scalar data to the {[}0, 1{]} range before mapping to colors using \sphinxstyleemphasis{cmap}. By default, a linear scaling mapping the lowest value to 0 and the highest to 1 is used. This parameter is ignored for RGB(A) data. \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}\{'equal', 'auto'\} or float, optional{]} Controls the aspect ratio of the axes. The aspect is of particular relevance for images since it may distort the image, i.e. pixel will not be square. This parameter is a shortcut for explicitly calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}}. See there for further details. \begin{itemize} \item {} 'equal': Ensures an aspect ratio of 1. Pixels will be square (unless pixel sizes are explicitly made non-square in data coordinates using \sphinxstyleemphasis{extent}). \item {} 'auto': The axes is kept fixed and the aspect is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. \end{itemize} If not given, use \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.aspect"{]}}}} (default: 'equal'). \item[{\sphinxstylestrong{interpolation}}] \leavevmode{[}str, optional{]} The interpolation method used. If \sphinxstyleemphasis{None} \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.interpolation"{]}}}} is used, which defaults to 'nearest'. Supported values are 'none', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'. If \sphinxstyleemphasis{interpolation} is 'none', then no interpolation is performed on the Agg, ps, pdf and svg backends. Other backends will fall back to 'nearest'. Note that most SVG renders perform interpolation at rendering and that the default interpolation method they implement may differ. See \DUrole{xref,std,std-doc}{/gallery/images\_contours\_and\_fields/interpolation\_methods} for an overview of the supported interpolation methods. Some interpolation methods require an additional radius parameter, which can be set by \sphinxstyleemphasis{filterrad}. Additionally, the antigrain image resize filter is controlled by the parameter \sphinxstyleemphasis{filternorm}. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). This parameter is ignored for RGBA input data. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional{]} When using scalar data and no explicit \sphinxstyleemphasis{norm}, \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} define the data range that the colormap covers. By default, the colormap covers the complete value range of the supplied data. \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} are ignored if the \sphinxstyleemphasis{norm} parameter is used. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Place the {[}0,0{]} index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} is used, defaulting to 'upper'. Note that the vertical axes points upward for 'lower' but downward for 'upper'. \item[{\sphinxstylestrong{extent}}] \leavevmode{[}scalars (left, right, bottom, top), optional{]} The bounding box in data coordinates that the image will fill. The image is stretched individually along x and y to fill the box. The default extent is determined by the following conditions. Pixels have unit size in data coordinates. Their centers are on integer coordinates, and their center coordinates range from 0 to columns-1 horizontally and from 0 to rows-1 vertically. Note that the direction of the vertical axis and thus the default values for top and bottom depend on \sphinxstyleemphasis{origin}: \begin{itemize} \item {} For \sphinxcode{\sphinxupquote{origin == 'upper'}} the default is \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, numrows-0.5, -0.5)}}. \item {} For \sphinxcode{\sphinxupquote{origin == 'lower'}} the default is \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, -0.5, numrows-0.5)}}. \end{itemize} See the example {\hyperref[\detokenize{tutorials/intermediate/imshow_extent::doc}]{\sphinxcrossref{\DUrole{doc}{origin and extent in imshow}}}} for a more detailed description. \item[{\sphinxstylestrong{filternorm}}] \leavevmode{[}bool, optional, default: True{]} A parameter for the antigrain image resize filter (see the antigrain documentation). If \sphinxstyleemphasis{filternorm} is set, the filter normalizes integer values and corrects the rounding errors. It doesn't do anything with the source floating point values, it corrects only integers according to the rule of 1.0 which means that any sum of pixel weights must be equal to 1.0. So, the filter function must produce a graph of the proper shape. \item[{\sphinxstylestrong{filterrad}}] \leavevmode{[}float \textgreater{} 0, optional, default: 4.0{]} The filter radius for filters that have a radius parameter, i.e. when interpolation is one of: 'sinc', 'lanczos' or 'blackman'. \item[{\sphinxstylestrong{resample}}] \leavevmode{[}bool, optional{]} When \sphinxstyleemphasis{True}, use a full resampling method. When \sphinxstyleemphasis{False}, only resample when the output image is larger than the input image. \item[{\sphinxstylestrong{url}}] \leavevmode{[}str, optional{]} Set the url of the created {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}. See {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_url}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} properties{]} These parameters are passed on to the constructor of the {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} artist. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:matplotlib.axes.Axes.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matshow}}}}}}] \leavevmode Plot a matrix or an array as an image. \end{description} \subsubsection*{Notes} Unless \sphinxstyleemphasis{extent} is used, pixel centers will be located at integer coordinates. In other words: the origin will coincide with the center of pixel (0, 0). There are two common representations for RGB images with an alpha channel: \begin{itemize} \item {} Straight (unassociated) alpha: R, G, and B channels represent the color of the pixel, disregarding its opacity. \item {} Premultiplied (associated) alpha: R, G, and B channels represent the color of the pixel, adjusted for its opacity by multiplication. \end{itemize} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} expects RGB images adopting the straight (unassociated) alpha representation. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.imshow}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:examples-using-matplotlib-axes-axes-imshow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_affine\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barcode\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_zcoord.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_interpolation\_methods.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_layer\_images.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_shading\_example.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_zoom\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colorbar\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colormap\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \paragraph{matplotlib.axes.Axes.matshow} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:matplotlib-axes-axes-matshow}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow::doc}}\index{matshow() (matplotlib.axes.Axes method)@\spxentry{matshow()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:matplotlib.axes.Axes.matshow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{matshow}}}{\emph{self}, \emph{Z}, \emph{**kwargs}}{} Plot the values of a 2D matrix or array as color-coded image. The matrix will be shown the way it would be printed, with the first row at the top. Row and column numbering is zero-based. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like(M, N){]} The matrix to be displayed. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} arguments{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}}] \leavevmode More general function to plot data on a 2D regular raster. \end{description} \subsubsection*{Notes} This is just a convenience function wrapping {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} to set useful defaults for a displaying a matrix. In particular: \begin{itemize} \item {} Set \sphinxcode{\sphinxupquote{origin='upper'}}. \item {} Set \sphinxcode{\sphinxupquote{interpolation='nearest'}}. \item {} Set \sphinxcode{\sphinxupquote{aspect='equal'}}. \item {} Ticks are placed to the left and above. \item {} Ticks are formatted to show integer indices. \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.matshow}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:examples-using-matplotlib-axes-axes-matshow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_matshow.py} \end{itemize} \paragraph{matplotlib.axes.Axes.pcolor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib-axes-axes-pcolor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor::doc}}\index{pcolor() (matplotlib.axes.Axes method)@\spxentry{pcolor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pcolor}}}{\emph{self}, \emph{*args}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{data=None}, \emph{**kwargs}}{} Create a pseudocolor plot with a non-regular rectangular grid. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pcolor}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} can be used to specify the corners of the quadrilaterals. \begin{sphinxadmonition}{hint}{Hint:} \sphinxcode{\sphinxupquote{pcolor()}} can be very slow for large arrays. In most cases you should use the similar but much faster {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} instead. See there for a discussion of the differences. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array\_like{]} A scalar 2-D array. The values will be color-mapped. \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array\_like, optional{]} The coordinates of the quadrilateral corners. The quadrilateral for \sphinxcode{\sphinxupquote{C{[}i,j{]}}} has corners at: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{o}{\textbar{}} \PYG{n}{C}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,}\PYG{n}{j}\PYG{p}{]} \PYG{o}{\textbar{}} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} Note that the column index corresponds to the x-coordinate, and the row index corresponds to y. For details, see the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:axes-pcolor-grid-orientation}]{\sphinxcrossref{\DUrole{std,std-ref}{Notes}}}} section below. The dimensions of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} should be one greater than those of \sphinxstyleemphasis{C}. Alternatively, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may have equal dimensions, in which case the last row and column of \sphinxstyleemphasis{C} will be ignored. If \sphinxstyleemphasis{X} and/or \sphinxstyleemphasis{Y} are 1-D arrays or column vectors they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps the \sphinxstyleemphasis{C} values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The Normalize instance scales the data values to the canonical colormap range {[}0, 1{]} for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} The colorbar range. If \sphinxstyleemphasis{None}, suitable min/max values are automatically chosen by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance (defaults to the respective min/max values of \sphinxstyleemphasis{C} in case of the default linear scaling). \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'none', None, 'face', color, color sequence\}, optional{]} The color of the edges. Defaults to 'none'. Possible values: \begin{itemize} \item {} 'none' or '': No edge. \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.edgecolor"{]}}}} will be used. Note that currently \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.force\_edgecolor"{]}}}} has to be True for this to work. \item {} 'face': Use the adjacent face color. \item {} An mpl color or sequence of colors will set the edge color. \end{itemize} The singular form \sphinxstyleemphasis{edgecolor} works as an alias. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value of the face color, between 0 (transparent) and 1 (opaque). Note: The edgecolor is currently not affected by this. \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool, optional, default: False{]} Whether to snap the mesh to pixel boundaries. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{collection}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{antialiaseds}}] \leavevmode{[}bool, optional, default: False{]} The default \sphinxstyleemphasis{antialiaseds} is False if the default \sphinxstyleemphasis{edgecolors}="none" is used. This eliminates artificial lines at patch boundaries, and works regardless of the value of alpha. If \sphinxstyleemphasis{edgecolors} is not "none", then the default \sphinxstyleemphasis{antialiaseds} is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.antialiased"{]}}}}, which defaults to True. Stroking the edges may be preferred if \sphinxstyleemphasis{alpha} is 1, but will cause artifacts otherwise. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additionally, the following arguments are allowed. They are passed along to the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} constructor: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}}] \leavevmode for an explanation of the differences between pcolor and pcolormesh. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}}] \leavevmode If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are each equidistant, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} can be a faster alternative. \end{description} \subsubsection*{Notes} \sphinxstylestrong{Masked arrays} \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may be masked arrays. If either \sphinxcode{\sphinxupquote{C{[}i, j{]}}}, or one of the vertices surrounding \sphinxcode{\sphinxupquote{C{[}i,j{]}}} (\sphinxstyleemphasis{X} or \sphinxstyleemphasis{Y} at \sphinxcode{\sphinxupquote{{[}i, j{]}, {[}i+1, j{]}, {[}i, j+1{]}, {[}i+1, j+1{]}}}) is masked, nothing is plotted. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:axes-pcolor-grid-orientation}} \sphinxstylestrong{Grid orientation} The grid orientation follows the standard matrix convention: An array \sphinxstyleemphasis{C} with shape (nrows, ncolumns) is plotted with the column number as \sphinxstyleemphasis{X} and the row number as \sphinxstyleemphasis{Y}. \sphinxstylestrong{Handling of pcolor() end-cases} \sphinxcode{\sphinxupquote{pcolor()}} displays all columns of \sphinxstyleemphasis{C} if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are not specified, or if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} have one more column than \sphinxstyleemphasis{C}. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} have the same number of columns as \sphinxstyleemphasis{C} then the last column of \sphinxstyleemphasis{C} is dropped. Similarly for the rows. Note: This behavior is different from MATLAB's \sphinxcode{\sphinxupquote{pcolor()}}, which always discards the last row and column of \sphinxstyleemphasis{C}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.pcolor}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:examples-using-matplotlib-axes-axes-pcolor}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \paragraph{matplotlib.axes.Axes.pcolorfast} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast:matplotlib-axes-axes-pcolorfast}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast::doc}}\index{pcolorfast() (matplotlib.axes.Axes method)@\spxentry{pcolorfast()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast:matplotlib.axes.Axes.pcolorfast}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pcolorfast}}}{\emph{self}, \emph{*args}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{data=None}, \emph{**kwargs}}{} Create a pseudocolor plot with a non-regular rectangular grid. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{pcolorfast}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{]}\PYG{p}{,} \PYG{n}{C}\PYG{p}{,} \PYG{o}{/}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This method is similar to \textasciitilde{}.Axes.pcolor{}` and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}. It's designed to provide the fastest pcolor-type plotting with the Agg backend. To achieve this, it uses different algorithms internally depending on the complexity of the input grid (regular rectangular, non-regular rectangular or arbitrary quadrilateral). \begin{sphinxadmonition}{warning}{Warning:} This method is experimental. Compared to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} it has some limitations: \begin{itemize} \item {} It supports only flat shading (no outlines) \item {} It lacks support for log scaling of the axes. \item {} It does not have a have a pyplot wrapper. \end{itemize} \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array-like(M, N){]} A 2D array or masked array. The values will be color-mapped. This argument can only be passed positionally. C can in some cases be 3D with the last dimension as rgb(a). This is available when C qualifies for image or pcolorimage type, will throw a TypeError if C is 3D and quadmesh. \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}tuple or array-like, default: \sphinxcode{\sphinxupquote{(0, N)}}, \sphinxcode{\sphinxupquote{(0, M)}}{]} \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are used to specify the coordinates of the quadrilaterals. There are different ways to do this: \begin{itemize} \item {} Use tuples \sphinxcode{\sphinxupquote{X=(xmin, xmax)}} and \sphinxcode{\sphinxupquote{Y=(ymin, ymax)}} to define a \sphinxstyleemphasis{uniform rectangular grid}. The tuples define the outer edges of the grid. All individual quadrilaterals will be of the same size. This is the fastest version. \item {} Use 1D arrays \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} to specify a \sphinxstyleemphasis{non-uniform rectangular grid}. In this case \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} have to be monotonic 1D arrays of length \sphinxstyleemphasis{N+1} and \sphinxstyleemphasis{M+1}, specifying the x and y boundaries of the cells. The speed is intermediate. Note: The grid is checked, and if found to be uniform the fast version is used. \item {} Use 2D arrays \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} if you need an \sphinxstyleemphasis{arbitrary quadrilateral grid} (i.e. if the quadrilaterals are not rectangular). In this case \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are 2D arrays with shape (M, N), specifying the x and y coordinates of the corners of the colored quadrilaterals. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} for details. This is the most general, but the slowest to render. It may produce faster and more compact output using ps, pdf, and svg backends, however. \end{itemize} These arguments can only be passed positionally. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps the \sphinxstyleemphasis{C} values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The Normalize instance scales the data values to the canonical colormap range {[}0, 1{]} for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} The colorbar range. If \sphinxstyleemphasis{None}, suitable min/max values are automatically chosen by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance (defaults to the respective min/max values of \sphinxstyleemphasis{C} in case of the default linear scaling). \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool, optional, default: False{]} Whether to snap the mesh to pixel boundaries. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} or {\hyperref[\detokenize{api/image_api:matplotlib.image.PcolorImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PcolorImage}}}}} or {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}}{]} The return type depends on the type of grid: \begin{itemize} \item {} {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} for a regular rectangular grid. \item {} {\hyperref[\detokenize{api/image_api:matplotlib.image.PcolorImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PcolorImage}}}}} for a non-regular rectangular grid. \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}} for a non-rectangular grid. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.pcolorfast}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolorfast:examples-using-matplotlib-axes-axes-pcolorfast}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.pcolormesh} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib-axes-axes-pcolormesh}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh::doc}}\index{pcolormesh() (matplotlib.axes.Axes method)@\spxentry{pcolormesh()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pcolormesh}}}{\emph{self}, \emph{*args}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{shading='flat'}, \emph{antialiased=False}, \emph{data=None}, \emph{**kwargs}}{} Create a pseudocolor plot with a non-regular rectangular grid. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pcolor}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} can be used to specify the corners of the quadrilaterals. \begin{sphinxadmonition}{note}{Note:} \sphinxcode{\sphinxupquote{pcolormesh()}} is similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}}. It's much faster and preferred in most cases. For a detailed discussion on the differences see {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:differences-pcolor-pcolormesh}]{\sphinxcrossref{\DUrole{std,std-ref}{Differences between pcolor() and pcolormesh()}}}}. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array\_like{]} A scalar 2-D array. The values will be color-mapped. \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array\_like, optional{]} The coordinates of the quadrilateral corners. The quadrilateral for \sphinxcode{\sphinxupquote{C{[}i,j{]}}} has corners at: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{o}{\textbar{}} \PYG{n}{C}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,}\PYG{n}{j}\PYG{p}{]} \PYG{o}{\textbar{}} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} Note that the column index corresponds to the x-coordinate, and the row index corresponds to y. For details, see the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:axes-pcolormesh-grid-orientation}]{\sphinxcrossref{\DUrole{std,std-ref}{Notes}}}} section below. The dimensions of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} should be one greater than those of \sphinxstyleemphasis{C}. Alternatively, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may have equal dimensions, in which case the last row and column of \sphinxstyleemphasis{C} will be ignored. If \sphinxstyleemphasis{X} and/or \sphinxstyleemphasis{Y} are 1-D arrays or column vectors they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps the \sphinxstyleemphasis{C} values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The Normalize instance scales the data values to the canonical colormap range {[}0, 1{]} for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} The colorbar range. If \sphinxstyleemphasis{None}, suitable min/max values are automatically chosen by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance (defaults to the respective min/max values of \sphinxstyleemphasis{C} in case of the default linear scaling). \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'none', None, 'face', color, color sequence\}, optional{]} The color of the edges. Defaults to 'none'. Possible values: \begin{itemize} \item {} 'none' or '': No edge. \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.edgecolor"{]}}}} will be used. Note that currently \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.force\_edgecolor"{]}}}} has to be True for this to work. \item {} 'face': Use the adjacent face color. \item {} An mpl color or sequence of colors will set the edge color. \end{itemize} The singular form \sphinxstyleemphasis{edgecolor} works as an alias. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{shading}}] \leavevmode{[}\{'flat', 'gouraud'\}, optional{]} The fill style, Possible values: \begin{itemize} \item {} 'flat': A solid color is used for each quad. The color of the quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by \sphinxcode{\sphinxupquote{C{[}i,j{]}}}. \item {} 'gouraud': Each quad will be Gouraud shaded: The color of the corners (i', j') are given by \sphinxcode{\sphinxupquote{C{[}i',j'{]}}}. The color values of the area in between is interpolated from the corner values. When Gouraud shading is used, \sphinxstyleemphasis{edgecolors} is ignored. \end{itemize} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool, optional, default: False{]} Whether to snap the mesh to pixel boundaries. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mesh}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.QuadMesh}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additionally, the following arguments are allowed. They are passed along to the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}} constructor: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}}}] \leavevmode An alternative implementation with slightly different features. For a detailed discussion on the differences see {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:differences-pcolor-pcolormesh}]{\sphinxcrossref{\DUrole{std,std-ref}{Differences between pcolor() and pcolormesh()}}}}. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}}] \leavevmode If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are each equidistant, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} can be a faster alternative. \end{description} \subsubsection*{Notes} \sphinxstylestrong{Masked arrays} \sphinxstyleemphasis{C} may be a masked array. If \sphinxcode{\sphinxupquote{C{[}i, j{]}}} is masked, the corresponding quadrilateral will be transparent. Masking of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} is not supported. Use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} if you need this functionality. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:axes-pcolormesh-grid-orientation}} \sphinxstylestrong{Grid orientation} The grid orientation follows the standard matrix convention: An array \sphinxstyleemphasis{C} with shape (nrows, ncolumns) is plotted with the column number as \sphinxstyleemphasis{X} and the row number as \sphinxstyleemphasis{Y}. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:differences-pcolor-pcolormesh}} \sphinxstylestrong{Differences between pcolor() and pcolormesh()} Both methods are used to create a pseudocolor plot of a 2-D array using quadrilaterals. The main difference lies in the created object and internal data handling: While {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} returns a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} returns a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}}. The latter is more specialized for the given purpose and thus is faster. It should almost always be preferred. There is also a slight difference in the handling of masked arrays. Both {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} support masked arrays for \sphinxstyleemphasis{C}. However, only {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} supports masked arrays for \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y}. The reason lies in the internal handling of the masked values. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} leaves out the respective polygons from the PolyCollection. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} sets the facecolor of the masked elements to transparent. You can see the difference when using edgecolors. While all edges are drawn irrespective of masking in a QuadMesh, the edge between two adjacent masked quadrilaterals in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} is not drawn as the corresponding polygons do not exist in the PolyCollection. Another difference is the support of Gouraud shading in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}, which is not available with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.pcolormesh}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:examples-using-matplotlib-axes-axes-pcolormesh}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quadmesh\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating Colormaps in Matplotlib}}}} \end{itemize} \paragraph{matplotlib.axes.Axes.spy} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib-axes-axes-spy}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.spy::doc}}\index{spy() (matplotlib.axes.Axes method)@\spxentry{spy()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:matplotlib.axes.Axes.spy}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{spy}}}{\emph{self}, \emph{Z}, \emph{precision=0}, \emph{marker=None}, \emph{markersize=None}, \emph{aspect='equal'}, \emph{origin='upper'}, \emph{**kwargs}}{} Plot the sparsity pattern of a 2D array. This visualizes the non-zero values of the array. Two plotting styles are available: image and marker. Both are available for full arrays, but only the marker style works for \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} instances. \sphinxstylestrong{Image style} If \sphinxstyleemphasis{marker} and \sphinxstyleemphasis{markersize} are \sphinxstyleemphasis{None}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} is used. Any extra remaining kwargs are passed to this method. \sphinxstylestrong{Marker style} If \sphinxstyleemphasis{Z} is a \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} or \sphinxstyleemphasis{marker} or \sphinxstyleemphasis{markersize} are \sphinxstyleemphasis{None}, a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} object will be returned with the value of marker determining the marker type, and any remaining kwargs passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like (M, N){]} The array to be plotted. \item[{\sphinxstylestrong{precision}}] \leavevmode{[}float or 'present', optional, default: 0{]} If \sphinxstyleemphasis{precision} is 0, any non-zero value will be plotted. Otherwise, values of \(|Z| > precision\) will be plotted. For \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} instances, you can also pass 'present'. In this case any value present in the array will be plotted, even if it is identically zero. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Place the {[}0,0{]} index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} is used, defaulting to 'upper'. \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}\{'equal', 'auto', None\} or float, optional{]} Controls the aspect ratio of the axes. The aspect is of particular relevance for images since it may distort the image, i.e. pixel will not be square. This parameter is a shortcut for explicitly calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}}. See there for further details. \begin{itemize} \item {} 'equal': Ensures an aspect ratio of 1. Pixels will be square. \item {} 'auto': The axes is kept fixed and the aspect is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. \item {} \sphinxstyleemphasis{None}: Use \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.aspect"{]}}}} (default: 'equal'). \end{itemize} Default: 'equal' \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The return type depends on the plotting style (see above). \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode The supported additional parameters depend on the plotting style. For the image style, you can pass the following additional parameters of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: \begin{itemize} \item {} \sphinxstyleemphasis{cmap} \item {} \sphinxstyleemphasis{alpha} \item {} \sphinxstyleemphasis{url} \item {} any {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} properties (passed on to the {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}) \end{itemize} For the marker style, you can pass any {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property except for \sphinxstyleemphasis{linestyle}: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.spy}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.spy:examples-using-matplotlib-axes-axes-spy}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_spy\_demos.py} \end{itemize} \subsubsection{Unstructured Triangles} \label{\detokenize{api/axes_api:unstructured-triangles}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor:matplotlib.axes.Axes.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tripcolor}}}}} & Create a pseudocolor plot of an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot:matplotlib.axes.Axes.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.triplot}}}}} & Draw a unstructured triangular grid as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tricontour}}}}} & Draw contours on an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tricontourf}}}}} & Draw contours on an unstructured triangular grid. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.tripcolor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor:matplotlib-axes-axes-tripcolor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor::doc}}\index{tripcolor() (matplotlib.axes.Axes method)@\spxentry{tripcolor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor:matplotlib.axes.Axes.tripcolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{tripcolor}}}{\emph{ax}, \emph{*args}, \emph{alpha=1.0}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{shading='flat'}, \emph{facecolors=None}, \emph{**kwargs}}{} Create a pseudocolor plot of an unstructured triangular grid. The triangulation can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The next argument must be \sphinxstyleemphasis{C}, the array of color values, either one per point in the triangulation if color values are defined at points, or one per triangle in the triangulation if color values are defined at triangles. If there are the same number of points and triangles in the triangulation it is assumed that color values are defined at points; to force the use of color values at triangles use the kwarg \sphinxcode{\sphinxupquote{facecolors=C}} instead of just \sphinxcode{\sphinxupquote{C}}. \sphinxstyleemphasis{shading} may be 'flat' (the default) or 'gouraud'. If \sphinxstyleemphasis{shading} is 'flat' and C values are defined at points, the color values used for each triangle are from the mean C of the triangle's three points. If \sphinxstyleemphasis{shading} is 'gouraud' then color values must be defined at points. The remaining kwargs are the same as for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.tripcolor}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tripcolor:examples-using-matplotlib-axes-axes-tripcolor}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tripcolor\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.triplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot:matplotlib-axes-axes-triplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot::doc}}\index{triplot() (matplotlib.axes.Axes method)@\spxentry{triplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot:matplotlib.axes.Axes.triplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{triplot}}}{\emph{ax}, \emph{*args}, \emph{**kwargs}}{} Draw a unstructured triangular grid as lines and/or markers. The triangulation to plot can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The remaining args and kwargs are the same as for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. Return a list of 2 {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} containing respectively: \begin{itemize} \item {} the lines plotted for triangles edges \item {} the markers plotted for triangles nodes \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.triplot}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.triplot:examples-using-matplotlib-axes-axes-triplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triplot\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.tricontour} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib-axes-axes-tricontour}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour::doc}}\index{tricontour() (matplotlib.axes.Axes method)@\spxentry{tricontour()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{tricontour}}}{\emph{ax}, \emph{*args}, \emph{**kwargs}}{} Draw contours on an unstructured triangular grid. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. The triangulation can be specified in one of two ways; either \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{triangulation} is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object will be created. See that class' docstring for an explanation of these cases. The remaining arguments may be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. The level values are chosen automatically. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \end{sphinxVerbatim} contour up to \sphinxstyleemphasis{N+1} automatically chosen contour levels (\sphinxstyleemphasis{N} intervals). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} draw contour lines at the values specified in sequence \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontourf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} fill the (len(\sphinxstyleemphasis{V})-1) regions between the values in \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Use keyword args to control colors, linewidth, origin, cmap ... see below for more details. \sphinxcode{\sphinxupquote{tricontour(...)}} returns a \sphinxcode{\sphinxupquote{TriContourSet}} object. Optional keyword arguments: \begin{quote} \sphinxstyleemphasis{colors}: {[} \sphinxstyleemphasis{None} \textbar{} string \textbar{} (mpl\_colors) {]} If \sphinxstyleemphasis{None}, the colormap specified by cmap will be used. If a string, like 'r' or 'red', all levels will be plotted in this color. If a tuple of matplotlib color args (string, float, rgb, etc), different levels will be plotted in different colors in the order specified. \sphinxstyleemphasis{alpha}: float The alpha blending value \sphinxstyleemphasis{cmap}: {[} \sphinxstyleemphasis{None} \textbar{} Colormap {]} A cm {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{cmap} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, a default Colormap is used. \sphinxstyleemphasis{norm}: {[} \sphinxstyleemphasis{None} \textbar{} Normalize {]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance for scaling data values to colors. If \sphinxstyleemphasis{norm} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, the default linear scaling is used. \sphinxstyleemphasis{levels} {[}level0, level1, ..., leveln{]} A list of floating point numbers indicating the level curves to draw, in increasing order; e.g., to draw just the zero contour pass \sphinxcode{\sphinxupquote{levels={[}0{]}}} \sphinxstyleemphasis{origin}: {[} \sphinxstyleemphasis{None} \textbar{} 'upper' \textbar{} 'lower' \textbar{} 'image' {]} If \sphinxstyleemphasis{None}, the first value of \sphinxstyleemphasis{Z} will correspond to the lower left corner, location (0,0). If 'image', the rc value for \sphinxcode{\sphinxupquote{image.origin}} will be used. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{extent}: {[} \sphinxstyleemphasis{None} \textbar{} (x0,x1,y0,y1) {]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.imshow()}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{locator}: {[} \sphinxstyleemphasis{None} \textbar{} ticker.Locator subclass {]} If \sphinxstyleemphasis{locator} is None, the default {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} is used. The locator is used to determine the contour levels if they are not given explicitly via the \sphinxstyleemphasis{V} argument. \sphinxstyleemphasis{extend}: {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} Unless this is 'neither', contour levels are automatically added to one or both ends of the range so that all data are included. These added ranges are then mapped to the special colormap values which default to the ends of the colormap range, but can be set via {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_under()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_over()}}}}} methods. \sphinxstyleemphasis{xunits}, \sphinxstyleemphasis{yunits}: {[} \sphinxstyleemphasis{None} \textbar{} registered units {]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \end{quote} tricontour-only keyword arguments: \begin{quote} \sphinxstyleemphasis{linewidths}: {[} \sphinxstyleemphasis{None} \textbar{} number \textbar{} tuple of numbers {]} If \sphinxstyleemphasis{linewidths} is \sphinxstyleemphasis{None}, defaults to rc:\sphinxcode{\sphinxupquote{lines.linewidth}}. If a number, all levels will be plotted with this linewidth. If a tuple, different levels will be plotted with different linewidths in the order specified \sphinxstyleemphasis{linestyles}: {[} \sphinxstyleemphasis{None} \textbar{} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]} If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the 'solid' is used. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. If contour is using a monochrome colormap and the contour level is less than 0, then the linestyle specified in \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} will be used. \end{quote} tricontourf-only keyword arguments: \begin{quote} \sphinxstyleemphasis{antialiased}: bool enable antialiasing \end{quote} Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.tricontour}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:examples-using-matplotlib-axes-axes-tricontour}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.tricontourf} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib-axes-axes-tricontourf}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf::doc}}\index{tricontourf() (matplotlib.axes.Axes method)@\spxentry{tricontourf()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{tricontourf}}}{\emph{ax}, \emph{*args}, \emph{**kwargs}}{} Draw contours on an unstructured triangular grid. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. The triangulation can be specified in one of two ways; either \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{triangulation} is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object will be created. See that class' docstring for an explanation of these cases. The remaining arguments may be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. The level values are chosen automatically. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \end{sphinxVerbatim} contour up to \sphinxstyleemphasis{N+1} automatically chosen contour levels (\sphinxstyleemphasis{N} intervals). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} draw contour lines at the values specified in sequence \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontourf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} fill the (len(\sphinxstyleemphasis{V})-1) regions between the values in \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Use keyword args to control colors, linewidth, origin, cmap ... see below for more details. \sphinxcode{\sphinxupquote{tricontour(...)}} returns a \sphinxcode{\sphinxupquote{TriContourSet}} object. Optional keyword arguments: \begin{quote} \sphinxstyleemphasis{colors}: {[} \sphinxstyleemphasis{None} \textbar{} string \textbar{} (mpl\_colors) {]} If \sphinxstyleemphasis{None}, the colormap specified by cmap will be used. If a string, like 'r' or 'red', all levels will be plotted in this color. If a tuple of matplotlib color args (string, float, rgb, etc), different levels will be plotted in different colors in the order specified. \sphinxstyleemphasis{alpha}: float The alpha blending value \sphinxstyleemphasis{cmap}: {[} \sphinxstyleemphasis{None} \textbar{} Colormap {]} A cm {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{cmap} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, a default Colormap is used. \sphinxstyleemphasis{norm}: {[} \sphinxstyleemphasis{None} \textbar{} Normalize {]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance for scaling data values to colors. If \sphinxstyleemphasis{norm} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, the default linear scaling is used. \sphinxstyleemphasis{levels} {[}level0, level1, ..., leveln{]} A list of floating point numbers indicating the level curves to draw, in increasing order; e.g., to draw just the zero contour pass \sphinxcode{\sphinxupquote{levels={[}0{]}}} \sphinxstyleemphasis{origin}: {[} \sphinxstyleemphasis{None} \textbar{} 'upper' \textbar{} 'lower' \textbar{} 'image' {]} If \sphinxstyleemphasis{None}, the first value of \sphinxstyleemphasis{Z} will correspond to the lower left corner, location (0,0). If 'image', the rc value for \sphinxcode{\sphinxupquote{image.origin}} will be used. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{extent}: {[} \sphinxstyleemphasis{None} \textbar{} (x0,x1,y0,y1) {]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.imshow()}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{locator}: {[} \sphinxstyleemphasis{None} \textbar{} ticker.Locator subclass {]} If \sphinxstyleemphasis{locator} is None, the default {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} is used. The locator is used to determine the contour levels if they are not given explicitly via the \sphinxstyleemphasis{V} argument. \sphinxstyleemphasis{extend}: {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} Unless this is 'neither', contour levels are automatically added to one or both ends of the range so that all data are included. These added ranges are then mapped to the special colormap values which default to the ends of the colormap range, but can be set via {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_under()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_over()}}}}} methods. \sphinxstyleemphasis{xunits}, \sphinxstyleemphasis{yunits}: {[} \sphinxstyleemphasis{None} \textbar{} registered units {]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \end{quote} tricontour-only keyword arguments: \begin{quote} \sphinxstyleemphasis{linewidths}: {[} \sphinxstyleemphasis{None} \textbar{} number \textbar{} tuple of numbers {]} If \sphinxstyleemphasis{linewidths} is \sphinxstyleemphasis{None}, defaults to rc:\sphinxcode{\sphinxupquote{lines.linewidth}}. If a number, all levels will be plotted with this linewidth. If a tuple, different levels will be plotted with different linewidths in the order specified \sphinxstyleemphasis{linestyles}: {[} \sphinxstyleemphasis{None} \textbar{} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]} If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the 'solid' is used. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. If contour is using a monochrome colormap and the contour level is less than 0, then the linestyle specified in \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} will be used. \end{quote} tricontourf-only keyword arguments: \begin{quote} \sphinxstyleemphasis{antialiased}: bool enable antialiasing \end{quote} Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.tricontourf}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:examples-using-matplotlib-axes-axes-tricontourf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \subsubsection{Text and Annotations} \label{\detokenize{api/axes_api:text-and-annotations}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.annotate}}}}} & Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.text}}}}} & Add text to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.table:matplotlib.axes.Axes.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.table}}}}} & Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.arrow:matplotlib.axes.Axes.arrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.arrow}}}}} & Add an arrow to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:matplotlib.axes.Axes.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.inset\_axes}}}}} & Add a child inset axes to this existing axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset:matplotlib.axes.Axes.indicate_inset}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.indicate\_inset}}}}} & Add an inset indicator to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset_zoom:matplotlib.axes.Axes.indicate_inset_zoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.indicate\_inset\_zoom}}}}} & Add an inset indicator rectangle to the axes based on the axis limits for an \sphinxstyleemphasis{inset\_ax} and draw connectors between \sphinxstyleemphasis{inset\_ax} and the rectangle. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:matplotlib.axes.Axes.secondary_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_xaxis}}}}} & Add a second x-axis to this axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:matplotlib.axes.Axes.secondary_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.secondary\_yaxis}}}}} & Add a second y-axis to this axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.annotate} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib-axes-axes-annotate}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate::doc}}\index{annotate() (matplotlib.axes.Axes method)@\spxentry{annotate()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{annotate}}}{\emph{self}, \emph{s}, \emph{xy}, \emph{*args}, \emph{**kwargs}}{} Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. In the simplest form, the text is placed at \sphinxstyleemphasis{xy}. Optionally, the text can be displayed in another position \sphinxstyleemphasis{xytext}. An arrow pointing from the text to the annotated point \sphinxstyleemphasis{xy} can then be added by defining \sphinxstyleemphasis{arrowprops}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} The text of the annotation. \sphinxstyleemphasis{s} is a deprecated synonym for this parameter. \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The point \sphinxstyleemphasis{(x,y)} to annotate. \item[{\sphinxstylestrong{xytext}}] \leavevmode{[}(float, float), optional{]} The position \sphinxstyleemphasis{(x,y)} to place the text at. If \sphinxstyleemphasis{None}, defaults to \sphinxstyleemphasis{xy}. \item[{\sphinxstylestrong{xycoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xy} is given in. The following types of values are supported: \begin{itemize} \item {} One of the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'figure points' & Points from the lower left of the figure \\ \hline 'figure pixels' & Pixels from the lower left of the figure \\ \hline 'figure fraction' & Fraction of figure from lower left \\ \hline 'axes points' & Points from lower left corner of axes \\ \hline 'axes pixels' & Pixels from lower left corner of axes \\ \hline 'axes fraction' & Fraction of axes from lower left \\ \hline 'data' & Use the coordinate system of the object being annotated (default) \\ \hline 'polar' & \sphinxstyleemphasis{(theta,r)} if not native 'data' coordinates \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item {} An {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}: \sphinxstyleemphasis{xy} is interpreted as a fraction of the artists {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. E.g. \sphinxstyleemphasis{(0, 0)} would be the lower left corner of the bounding box and \sphinxstyleemphasis{(0.5, 1)} would be the center top of the bounding box. \item {} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} to transform \sphinxstyleemphasis{xy} to screen coordinates. \item {} A function with one of the following signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Bbox} \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Transform} \end{sphinxVerbatim} where \sphinxstyleemphasis{renderer} is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass. The result of the function is interpreted like the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} cases above. \item {} A tuple \sphinxstyleemphasis{(xcoords, ycoords)} specifying separate coordinate systems for \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \sphinxstyleemphasis{xcoords} and \sphinxstyleemphasis{ycoords} must each be of one of the above described types. \end{itemize} See {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}} for more details. Defaults to 'data'. \item[{\sphinxstylestrong{textcoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xytext} is given in. All \sphinxstyleemphasis{xycoords} values are valid as well as the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'offset points' & Offset (in points) from the \sphinxstyleemphasis{xy} value \\ \hline 'offset pixels' & Offset (in pixels) from the \sphinxstyleemphasis{xy} value \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to the value of \sphinxstyleemphasis{xycoords}, i.e. use the same coordinate system for annotation point and text position. \item[{\sphinxstylestrong{arrowprops}}] \leavevmode{[}dict, optional{]} The properties used to draw a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} arrow between the positions \sphinxstyleemphasis{xy} and \sphinxstyleemphasis{xytext}. If \sphinxstyleemphasis{arrowprops} does not contain the key 'arrowstyle' the allowed keys are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline width & The width of the arrow in points \\ \hline headwidth & The width of the base of the arrow head in points \\ \hline headlength & The length of the arrow head in points \\ \hline shrink & Fraction of total length to shrink from both ends \\ \hline ? & Any key to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} If \sphinxstyleemphasis{arrowprops} contains the key 'arrowstyle' the above keys are forbidden. The allowed values of \sphinxcode{\sphinxupquote{'arrowstyle'}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline \sphinxcode{\sphinxupquote{'-'}} & None \\ \hline \sphinxcode{\sphinxupquote{'-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'-{[}'}} & widthB=1.0,lengthB=0.2,angleB=None \\ \hline \sphinxcode{\sphinxupquote{'\textbar{}-\textbar{}'}} & widthA=1.0,widthB=1.0 \\ \hline \sphinxcode{\sphinxupquote{'-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'fancy'}} & head\_length=0.4,head\_width=0.4,tail\_width=0.4 \\ \hline \sphinxcode{\sphinxupquote{'simple'}} & head\_length=0.5,head\_width=0.5,tail\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'wedge'}} & tail\_width=0.3,shrink\_factor=0.5 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Valid keys for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline arrowstyle & the arrow style \\ \hline connectionstyle & the connection style \\ \hline relpos & default is (0.5, 0.5) \\ \hline patchA & default is bounding box of the text \\ \hline patchB & default is None \\ \hline shrinkA & default is 2 points \\ \hline shrinkB & default is 2 points \\ \hline mutation\_scale & default is text size (in points) \\ \hline mutation\_aspect & default is 1. \\ \hline ? & any key for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to None, i.e. no arrow is drawn. \item[{\sphinxstylestrong{annotation\_clip}}] \leavevmode{[}bool or None, optional{]} Whether to draw the annotation when the annotation point \sphinxstyleemphasis{xy} is outside the axes area. \begin{itemize} \item {} If \sphinxstyleemphasis{True}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes. \item {} If \sphinxstyleemphasis{False}, the annotation will always be drawn. \item {} If \sphinxstyleemphasis{None}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes and \sphinxstyleemphasis{xycoords} is 'data'. \end{itemize} Defaults to \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are passed to {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{annotation}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.annotate}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:examples-using-matplotlib-axes-axes-annotate}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotate\_transform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_basic.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_polar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connectionstyle\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.text} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib-axes-axes-text}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.text::doc}}\index{text() (matplotlib.axes.Axes method)@\spxentry{text()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{text}}}{\emph{self}, \emph{x}, \emph{y}, \emph{s}, \emph{fontdict=None}, \emph{withdash=\textless{}deprecated parameter\textgreater{}}, \emph{**kwargs}}{} Add text to the axes. Add the text \sphinxstyleemphasis{s} to the axes at location \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}scalars{]} The position to place the text. By default, this is in data coordinates. The coordinate system can be changed using the \sphinxstyleemphasis{transform} parameter. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dictionary, optional, default: None{]} A dictionary to override the default text properties. If fontdict is None, the defaults are determined by your rc parameters. \item[{\sphinxstylestrong{withdash}}] \leavevmode{[}boolean, optional, default: False{]} Creates a {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} instance instead of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The created {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties.{]} Other miscellaneous text parameters. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Individual keyword arguments can be used to override any given parameter: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} The default transform specifies that text is in data coords, alternatively, you can specify text in axis coords (0,0 is lower-left and 1,1 is upper-right). The example below places text in the center of the axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} You can put a rectangular box around the text instance (e.g., to set a background color) by using the keyword \sphinxcode{\sphinxupquote{bbox}}. \sphinxcode{\sphinxupquote{bbox}} is a dictionary of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} properties. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.text}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.text:examples-using-matplotlib-axes-axes-text}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_rotation\_mode.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \paragraph{matplotlib.axes.Axes.table} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.table:matplotlib-axes-axes-table}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.table::doc}}\index{table() (matplotlib.axes.Axes method)@\spxentry{table()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.table:matplotlib.axes.Axes.table}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{table}}}{\emph{ax}, \emph{cellText=None}, \emph{cellColours=None}, \emph{cellLoc='right'}, \emph{colWidths=None}, \emph{rowLabels=None}, \emph{rowColours=None}, \emph{rowLoc='left'}, \emph{colLabels=None}, \emph{colColours=None}, \emph{colLoc='center'}, \emph{loc='bottom'}, \emph{bbox=None}, \emph{edges='closed'}, \emph{**kwargs}}{} Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. At least one of \sphinxstyleemphasis{cellText} or \sphinxstyleemphasis{cellColours} must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements. The table can optionally have row and column headers, which are configured using \sphinxstyleemphasis{rowLabels}, \sphinxstyleemphasis{rowColours}, \sphinxstyleemphasis{rowLoc} and \sphinxstyleemphasis{colLabels}, \sphinxstyleemphasis{colColours}, \sphinxstyleemphasis{colLoc} respectively. For finer grained control over tables, use the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} class and add it to the axes with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib.axes.Axes.add_table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_table}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cellText}}] \leavevmode{[}2D list of str, optional{]} The texts to place into the table cells. \sphinxstyleemphasis{Note}: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries. \item[{\sphinxstylestrong{cellColours}}] \leavevmode{[}2D list of matplotlib color specs, optional{]} The background colors of the cells. \item[{\sphinxstylestrong{cellLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, default: 'right'{]} The alignment of the text within the cells. \item[{\sphinxstylestrong{colWidths}}] \leavevmode{[}list of float, optional{]} The column widths in units of the axes. If not given, all columns will have a width of \sphinxstyleemphasis{1 / ncols}. \item[{\sphinxstylestrong{rowLabels}}] \leavevmode{[}list of str, optional{]} The text of the row header cells. \item[{\sphinxstylestrong{rowColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the row header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the row header cells. \item[{\sphinxstylestrong{colLabels}}] \leavevmode{[}list of str, optional{]} The text of the column header cells. \item[{\sphinxstylestrong{colColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the column header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the column header cells. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str, optional{]} The position of the cell with respect to \sphinxstyleemphasis{ax}. This must be one of the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{codes}}}}}. \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} A bounding box to draw the table into. If this is not \sphinxstyleemphasis{None}, this overrides \sphinxstyleemphasis{loc}. \item[{\sphinxstylestrong{edges}}] \leavevmode{[}substring of 'BRTL' or \{'open', 'closed', 'horizontal', 'vertical'\}{]} The cell edges to be drawn with a line. See also {\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible\_edges}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{table}}] \leavevmode{[}{\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}}{]} The created table. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} properties. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.arrow} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.arrow:matplotlib-axes-axes-arrow}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.arrow::doc}}\index{arrow() (matplotlib.axes.Axes method)@\spxentry{arrow()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.arrow:matplotlib.axes.Axes.arrow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{arrow}}}{\emph{self}, \emph{x}, \emph{y}, \emph{dx}, \emph{dy}, \emph{**kwargs}}{} Add an arrow to the axes. This draws an arrow from \sphinxcode{\sphinxupquote{(x, y)}} to \sphinxcode{\sphinxupquote{(x+dx, y+dy)}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The x and y coordinates of the arrow base. \item[{\sphinxstylestrong{dx, dy}}] \leavevmode{[}float{]} The length of the arrow along x and y direction. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arrow}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}}{]} The created {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}} object. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Optional kwargs (inherited from {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}} patch) control the arrow construction and properties: \item[{\sphinxstylestrong{Constructor arguments}}] \leavevmode\begin{description} \item[{\sphinxstyleemphasis{width}: float (default: 0.001)}] \leavevmode width of full arrow tail \item[{\sphinxstyleemphasis{length\_includes\_head}: bool (default: False)}] \leavevmode True if head is to be counted in calculating the length. \item[{\sphinxstyleemphasis{head\_width}: float or None (default: 3*width)}] \leavevmode total width of the full arrow head \item[{\sphinxstyleemphasis{head\_length}: float or None (default: 1.5 * head\_width)}] \leavevmode length of arrow head \item[{\sphinxstyleemphasis{shape}: {[}'full', 'left', 'right'{]} (default: 'full')}] \leavevmode draw the left-half, right-half, or full arrow \item[{\sphinxstyleemphasis{overhang}: float (default: 0)}] \leavevmode fraction that the arrow is swept back (0 overhang means triangular shape). Can be negative or greater than one. \item[{\sphinxstyleemphasis{head\_starts\_at\_zero}: bool (default: False)}] \leavevmode if True, the head starts being drawn at coordinate 0 instead of ending at coordinate 0. \end{description} \item[{\sphinxstylestrong{Other valid kwargs (inherited from :class:{}`Patch{}`) are:}}] \leavevmode \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} The resulting arrow is affected by the axes aspect ratio and limits. This may produce an arrow whose head is not square with its stem. To create an arrow whose head is square with its stem, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.annotate:matplotlib.axes.Axes.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.inset\_axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:matplotlib-axes-axes-inset-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes::doc}}\index{inset\_axes() (matplotlib.axes.Axes method)@\spxentry{inset\_axes()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:matplotlib.axes.Axes.inset_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{inset\_axes}}}{\emph{self}, \emph{bounds}, \emph{*}, \emph{transform=None}, \emph{zorder=5}, \emph{**kwargs}}{} Add a child inset axes to this existing axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bounds}}] \leavevmode{[}{[}x0, y0, width, height{]}{]} Lower-left corner of inset axes, and its width and height. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} Defaults to \sphinxcode{\sphinxupquote{ax.transAxes}}, i.e. the units of \sphinxstyleemphasis{rect} are in axes-relative coordinates. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}number{]} Defaults to 5 (same as {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}). Adjust higher or lower to change whether it is above or below data plotted on the parent axes. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other \sphinxstyleemphasis{kwargs} are passed on to the \sphinxcode{\sphinxupquote{axes.Axes}} child axes. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Axes}] \leavevmode The created {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} instance. \end{description} \end{description}\end{quote} \begin{sphinxadmonition}{warning}{Warning:} This method is experimental as of 3.0, and the API may change. \end{sphinxadmonition} \subsubsection*{Examples} This example makes two inset axes, the first is in axes-relative coordinates, and the second in data-coordinates: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axin1} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.15}\PYG{p}{,} \PYG{l+m+mf}{0.15}\PYG{p}{]}\PYG{p}{)} \PYG{n}{axin2} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{inset\PYGZus{}axes}\PYG{p}{(} \PYG{p}{[}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mf}{2.3}\PYG{p}{,} \PYG{l+m+mf}{2.3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.inset\_axes}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:examples-using-matplotlib-axes-axes-inset-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_zoom\_inset\_axes.py} \end{itemize} \paragraph{matplotlib.axes.Axes.indicate\_inset} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset:matplotlib-axes-axes-indicate-inset}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset::doc}}\index{indicate\_inset() (matplotlib.axes.Axes method)@\spxentry{indicate\_inset()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset:matplotlib.axes.Axes.indicate_inset}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{indicate\_inset}}}{\emph{self}, \emph{bounds}, \emph{inset\_ax=None}, \emph{*}, \emph{transform=None}, \emph{facecolor='none'}, \emph{edgecolor='0.5'}, \emph{alpha=0.5}, \emph{zorder=4.99}, \emph{**kwargs}}{} Add an inset indicator to the axes. This is a rectangle on the plot at the position indicated by \sphinxstyleemphasis{bounds} that optionally has lines that connect the rectangle to an inset axes ({\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:matplotlib.axes.Axes.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.inset\_axes}}}}}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bounds}}] \leavevmode{[}{[}x0, y0, width, height{]}{]} Lower-left corner of rectangle to be marked, and its width and height. \item[{\sphinxstylestrong{inset\_ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} An optional inset axes to draw connecting lines to. Two lines are drawn connecting the indicator box to the inset axes on corners chosen so as to not overlap with the indicator box. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} Transform for the rectangle co-ordinates. Defaults to \sphinxcode{\sphinxupquote{ax.transAxes}}, i.e. the units of \sphinxstyleemphasis{rect} are in axes-relative coordinates. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}Matplotlib color{]} Facecolor of the rectangle (default 'none'). \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}Matplotlib color{]} Color of the rectangle and color of the connecting lines. Default is '0.5'. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}number{]} Transparency of the rectangle and connector lines. Default is 0.5. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}number{]} Drawing order of the rectangle and connector lines. Default is 4.99 (just below the default level of inset axes). \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other \sphinxstyleemphasis{kwargs} are passed on to the rectangle patch. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rectangle\_patch}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Patches.Rectangle}}{]} Rectangle artist. \item[{\sphinxstylestrong{connector\_lines}}] \leavevmode{[}4-tuple of \sphinxcode{\sphinxupquote{Patches.ConnectionPatch}}{]} One for each of four connector lines. Two are set with visibility to \sphinxstyleemphasis{False}, but the user can set the visibility to True if the automatic choice is not deemed correct. \end{description} \end{description}\end{quote} \begin{sphinxadmonition}{warning}{Warning:} This method is experimental as of 3.0, and the API may change. \end{sphinxadmonition} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.indicate\_inset\_zoom} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset_zoom:matplotlib-axes-axes-indicate-inset-zoom}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset_zoom::doc}}\index{indicate\_inset\_zoom() (matplotlib.axes.Axes method)@\spxentry{indicate\_inset\_zoom()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset_zoom:matplotlib.axes.Axes.indicate_inset_zoom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{indicate\_inset\_zoom}}}{\emph{self}, \emph{inset\_ax}, \emph{**kwargs}}{} Add an inset indicator rectangle to the axes based on the axis limits for an \sphinxstyleemphasis{inset\_ax} and draw connectors between \sphinxstyleemphasis{inset\_ax} and the rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{inset\_ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} Inset axes to draw connecting lines to. Two lines are drawn connecting the indicator box to the inset axes on corners chosen so as to not overlap with the indicator box. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other \sphinxstyleemphasis{kwargs} are passed on to \sphinxcode{\sphinxupquote{Axes.inset\_rectangle}} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rectangle\_patch}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Patches.Rectangle}}{]} Rectangle artist. \item[{\sphinxstylestrong{connector\_lines}}] \leavevmode{[}4-tuple of \sphinxcode{\sphinxupquote{Patches.ConnectionPatch}}{]} One for each of four connector lines. Two are set with visibility to \sphinxstyleemphasis{False}, but the user can set the visibility to True if the automatic choice is not deemed correct. \end{description} \end{description}\end{quote} \begin{sphinxadmonition}{warning}{Warning:} This method is experimental as of 3.0, and the API may change. \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.indicate\_inset\_zoom}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.indicate_inset_zoom:examples-using-matplotlib-axes-axes-indicate-inset-zoom}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_zoom\_inset\_axes.py} \end{itemize} \paragraph{matplotlib.axes.Axes.secondary\_xaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:matplotlib-axes-axes-secondary-xaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis::doc}}\index{secondary\_xaxis() (matplotlib.axes.Axes method)@\spxentry{secondary\_xaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:matplotlib.axes.Axes.secondary_xaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{secondary\_xaxis}}}{\emph{self}, \emph{location}, \emph{*}, \emph{functions=None}, \emph{**kwargs}}{} Add a second x-axis to this axes. For example if we want to have a second scale for the data plotted on the xaxis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{location}}] \leavevmode{[}string or scalar{]} The position to put the secondary axis. Strings can be 'top' or 'bottom', for x-oriented axises or 'left' or 'right' for y-oriented axises or a scalar can be a float indicating the relative position on the axes to put the new axes (0 being the bottom (left), and 1.0 being the top (right).) \item[{\sphinxstylestrong{functions}}] \leavevmode{[}2-tuple of func, or Transform with an inverse{]} If a 2-tuple of functions, the user specifies the transform function and its inverse. i.e. \sphinxcode{\sphinxupquote{functions=(lambda x: 2 / x, lambda x: 2 / x)}} would be an reciprocal transform with a factor of 2. The user can also directly supply a subclass of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transforms.Transform}}}}} so long as it has an inverse. See \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/secondary\_axis} for examples of making these conversions. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}axes.\_secondary\_axes.SecondaryAxis{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} properties.{]} Other miscellaneous axes parameters. \end{description} \end{description}\end{quote} \begin{sphinxadmonition}{warning}{Warning:} This method is experimental as of 3.1, and the API may change. \end{sphinxadmonition} \subsubsection*{Examples} The main axis shows frequency, and the secondary axis shows period. \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{matplotlib-axes-Axes-secondary_xaxis-1}.pdf} \end{figure} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.secondary\_xaxis}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_xaxis:examples-using-matplotlib-axes-axes-secondary-xaxis}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_secondary\_axis.py} \end{itemize} \paragraph{matplotlib.axes.Axes.secondary\_yaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:matplotlib-axes-axes-secondary-yaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis::doc}}\index{secondary\_yaxis() (matplotlib.axes.Axes method)@\spxentry{secondary\_yaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:matplotlib.axes.Axes.secondary_yaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{secondary\_yaxis}}}{\emph{self}, \emph{location}, \emph{*}, \emph{functions=None}, \emph{**kwargs}}{} Add a second y-axis to this axes. For example if we want to have a second scale for the data plotted on the yaxis. \%(\_secax\_docstring)s \subsubsection*{Examples} Add a secondary axes that converts from radians to degrees \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{matplotlib-axes-Axes-secondary_yaxis-1}.pdf} \end{figure} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.secondary\_yaxis}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.secondary_yaxis:examples-using-matplotlib-axes-axes-secondary-yaxis}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_secondary\_axis.py} \end{itemize} \subsubsection{Fields} \label{\detokenize{api/axes_api:fields}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs:matplotlib.axes.Axes.barbs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.barbs}}}}} & Plot a 2-D field of barbs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver:matplotlib.axes.Axes.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.quiver}}}}} & Plot a 2D field of arrows. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:matplotlib.axes.Axes.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.quiverkey}}}}} & Add a key to a quiver plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:matplotlib.axes.Axes.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.streamplot}}}}} & Draw streamlines of a vector flow. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.barbs} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs:matplotlib-axes-axes-barbs}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs::doc}}\index{barbs() (matplotlib.axes.Axes method)@\spxentry{barbs()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs:matplotlib.axes.Axes.barbs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{barbs}}}{\emph{self}, \emph{*args}, \emph{data=None}, \emph{**kw}}{} Plot a 2-D field of barbs. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{barb}\PYG{p}{(}\PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}:}] \leavevmode The x and y coordinates of the barb locations (default is head of barb; see \sphinxstyleemphasis{pivot} kwarg) \item[{\sphinxstyleemphasis{U}, \sphinxstyleemphasis{V}:}] \leavevmode Give the x and y components of the barb shaft \item[{\sphinxstyleemphasis{C}:}] \leavevmode An optional array used to map colors to the barbs \end{description} \end{quote} All arguments may be 1-D or 2-D arrays or sequences. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are absent, they will be generated as a uniform grid. If \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V} are 2-D arrays but \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are 1-D, and if \sphinxcode{\sphinxupquote{len(X)}} and \sphinxcode{\sphinxupquote{len(Y)}} match the column and row dimensions of \sphinxstyleemphasis{U}, then \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} will be expanded with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid()}}}. \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V}, \sphinxstyleemphasis{C} may be masked arrays, but masked \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not supported at present. Keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{length}:}] \leavevmode Length of the barb in points; the other parts of the barb are scaled against this. Default is 7. \item[{\sphinxstyleemphasis{pivot}: {[} 'tip' \textbar{} 'middle' \textbar{} float {]}}] \leavevmode The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name \sphinxstyleemphasis{pivot}. Default is 'tip'. Can also be a number, which shifts the start of the barb that many points from the origin. \item[{\sphinxstyleemphasis{barbcolor}: {[} color \textbar{} color sequence {]}}] \leavevmode Specifies the color all parts of the barb except any flags. This parameter is analogous to the \sphinxstyleemphasis{edgecolor} parameter for polygons, which can be used instead. However this parameter will override facecolor. \item[{\sphinxstyleemphasis{flagcolor}: {[} color \textbar{} color sequence {]}}] \leavevmode Specifies the color of any flags on the barb. This parameter is analogous to the \sphinxstyleemphasis{facecolor} parameter for polygons, which can be used instead. However this parameter will override facecolor. If this is not set (and \sphinxstyleemphasis{C} has not either) then \sphinxstyleemphasis{flagcolor} will be set to match \sphinxstyleemphasis{barbcolor} so that the barb has a uniform color. If \sphinxstyleemphasis{C} has been set, \sphinxstyleemphasis{flagcolor} has no effect. \item[{\sphinxstyleemphasis{sizes}:}] \leavevmode A dictionary of coefficients specifying the ratio of a given feature to the length of the barb. Only those values one wishes to override need to be included. These features include: \begin{itemize} \item {} 'spacing' - space between features (flags, full/half barbs) \item {} 'height' - height (distance from shaft to top) of a flag or full barb \item {} 'width' - width of a flag, twice the width of a full barb \item {} 'emptybarb' - radius of the circle used for low magnitudes \end{itemize} \item[{\sphinxstyleemphasis{fill\_empty}:}] \leavevmode A flag on whether the empty barbs (circles) that are drawn should be filled with the flag color. If they are not filled, they will be drawn such that no color is applied to the center. Default is False \item[{\sphinxstyleemphasis{rounding}:}] \leavevmode A flag to indicate whether the vector magnitude should be rounded when allocating barb components. If True, the magnitude is rounded to the nearest multiple of the half-barb increment. If False, the magnitude is simply truncated to the next lowest multiple. Default is True \item[{\sphinxstyleemphasis{barb\_increments}:}] \leavevmode A dictionary of increments specifying values to associate with different parts of the barb. Only those values one wishes to override need to be included. \begin{itemize} \item {} 'half' - half barbs (Default is 5) \item {} 'full' - full barbs (Default is 10) \item {} 'flag' - flags (default is 50) \end{itemize} \item[{\sphinxstyleemphasis{flip\_barb}:}] \leavevmode Either a single boolean flag or an array of booleans. Single boolean indicates whether the lines and flags should point opposite to normal for all barbs. An array (which should be the same size as the other data arrays) indicates whether to flip for each individual barb. Normal behavior is for the barbs and lines to point right (comes from wind barbs having these features point towards low pressure in the Northern Hemisphere.) Default is False \end{description} \end{quote} Barbs are traditionally used in meteorology as a way to plot the speed and direction of wind observations, but can technically be used to plot any two dimensional vector quantity. As opposed to arrows, which give vector magnitude by the length of the arrow, the barbs give more quantitative information about the vector magnitude by putting slanted lines or a triangle for various increments in magnitude, as show schematically below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{:} \PYG{o}{/}\PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \end{sphinxVerbatim} The largest increment is given by a triangle (or "flag"). After those come full lines (barbs). The smallest increment is a half line. There is only, of course, ever at most 1 half line. If the magnitude is small and only needs a single half-line and no full lines or triangles, the half-line is offset from the end of the barb so that it can be easily distinguished from barbs with a single full line. The magnitude for the barb shown above would nominally be 65, using the standard increments of 50, 10, and 5. linewidths and edgecolors can be used to customize the barb. Additional {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} keyword arguments: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.barbs}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.barbs:examples-using-matplotlib-axes-axes-barbs}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barb\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.quiver} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver:matplotlib-axes-axes-quiver}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver::doc}}\index{quiver() (matplotlib.axes.Axes method)@\spxentry{quiver()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver:matplotlib.axes.Axes.quiver}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{quiver}}}{\emph{self}, \emph{*args}, \emph{data=None}, \emph{**kw}}{} Plot a 2D field of arrows. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{quiver}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{]}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{p}{[}\PYG{n}{C}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Where \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} define the arrow locations, \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} define the arrow directions, and \sphinxstyleemphasis{C} optionally sets the color. \sphinxstylestrong{Arrow size} The default settings auto-scales the length of the arrows to a reasonable size. To change this behavior see the \sphinxstyleemphasis{scale} and \sphinxstyleemphasis{scale\_units} parameters. \sphinxstylestrong{Arrow shape} The defaults give a slightly swept-back arrow; to make the head a triangle, make \sphinxstyleemphasis{headaxislength} the same as \sphinxstyleemphasis{headlength}. To make the arrow more pointed, reduce \sphinxstyleemphasis{headwidth} or increase \sphinxstyleemphasis{headlength} and \sphinxstyleemphasis{headaxislength}. To make the head smaller relative to the shaft, scale down all the head parameters. You will probably do best to leave minshaft alone. \sphinxstylestrong{Arrow outline} \sphinxstyleemphasis{linewidths} and \sphinxstyleemphasis{edgecolors} can be used to customize the arrow outlines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}1D or 2D array-like, optional{]} The x and y coordinates of the arrow locations. If not given, they will be generated as a uniform integer meshgrid based on the dimensions of \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V}. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are 1D but \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} are 2D, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are expanded to 2D using \sphinxcode{\sphinxupquote{X, Y = np.meshgrid(X, Y)}}. In this case \sphinxcode{\sphinxupquote{len(X)}} and \sphinxcode{\sphinxupquote{len(Y)}} must match the column and row dimensions of \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V}. \item[{\sphinxstylestrong{U, V}}] \leavevmode{[}1D or 2D array-like{]} The x and y direction components of the arrow vectors. \item[{\sphinxstylestrong{C}}] \leavevmode{[}1D or 2D array-like, optional{]} Numeric data that defines the arrow colors by colormapping via \sphinxstyleemphasis{norm} and \sphinxstyleemphasis{cmap}. This does not support explicit colors. If you want to set colors directly, use \sphinxstyleemphasis{color} instead. \item[{\sphinxstylestrong{units}}] \leavevmode{[}\{'width', 'height', 'dots', 'inches', 'x', 'y' 'xy'\}, default: 'width'{]} The arrow dimensions (except for \sphinxstyleemphasis{length}) are measured in multiples of this unit. The following values are supported: \begin{itemize} \item {} 'width', 'height': The width or height of the axis. \item {} 'dots', 'inches': Pixels or inches based on the figure dpi. \item {} 'x', 'y', 'xy': \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} or \(\sqrt{X^2 + Y^2}\) in data units. \end{itemize} The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units, the arrow size is independent of the zoom state. For 'width or 'height', the arrow size increases with the width and height of the axes, respectively, when the window is resized; for 'dots' or 'inches', resizing does not change the arrows. \item[{\sphinxstylestrong{angles}}] \leavevmode{[}\{'uv', 'xy'\} or array-like, optional, default: 'uv'{]} Method for determining the angle of the arrows. \begin{itemize} \item {} 'uv': The arrow axis aspect ratio is 1 so that if \sphinxstyleemphasis{U} == \sphinxstyleemphasis{V} the orientation of the arrow on the plot is 45 degrees counter-clockwise from the horizontal axis (positive to the right). Use this if the arrows symbolize a quantity that is not based on \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} data coordinates. \item {} 'xy': Arrows point from (x,y) to (x+u, y+v). Use this for plotting a gradient field, for example. \item {} Alternatively, arbitrary angles may be specified explicitly as an array of values in degrees, counter-clockwise from the horizontal axis. In this case \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} is only used to determine the length of the arrows. \end{itemize} Note: inverting a data axis will correspondingly invert the arrows only with \sphinxcode{\sphinxupquote{angles='xy'}}. \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} Number of data units per arrow length unit, e.g., m/s per plot width; a smaller scale parameter makes the arrow longer. Default is \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{None}, a simple autoscaling algorithm is used, based on the average vector length and the number of vectors. The arrow length unit is given by the \sphinxstyleemphasis{scale\_units} parameter. \item[{\sphinxstylestrong{scale\_units}}] \leavevmode{[}\{'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'\}, optional{]} If the \sphinxstyleemphasis{scale} kwarg is \sphinxstyleemphasis{None}, the arrow length unit. Default is \sphinxstyleemphasis{None}. e.g. \sphinxstyleemphasis{scale\_units} is 'inches', \sphinxstyleemphasis{scale} is 2.0, and \sphinxcode{\sphinxupquote{(u,v) = (1,0)}}, then the vector will be 0.5 inches long. If \sphinxstyleemphasis{scale\_units} is 'width' or 'height', then the vector will be half the width/height of the axes. If \sphinxstyleemphasis{scale\_units} is 'x' then the vector will be 0.5 x-axis units. To plot vectors in the x-y plane, with u and v having the same units as x and y, use \sphinxcode{\sphinxupquote{angles='xy', scale\_units='xy', scale=1}}. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float, optional{]} Shaft width in arrow units; default depends on choice of units, above, and number of vectors; a typical starting value is about 0.005 times the width of the plot. \item[{\sphinxstylestrong{headwidth}}] \leavevmode{[}float, optional, default: 3{]} Head width as multiple of shaft width. \item[{\sphinxstylestrong{headlength}}] \leavevmode{[}float, optional, default: 5{]} Head length as multiple of shaft width. \item[{\sphinxstylestrong{headaxislength}}] \leavevmode{[}float, optional, default: 4.5{]} Head length at shaft intersection. \item[{\sphinxstylestrong{minshaft}}] \leavevmode{[}float, optional, default: 1{]} Length below which arrow scales, in units of head length. Do not set this to less than 1, or small arrows will look terrible! \item[{\sphinxstylestrong{minlength}}] \leavevmode{[}float, optional, default: 1{]} Minimum length as a multiple of shaft width; if an arrow length is less than this, plot a dot (hexagon) of this diameter instead. \item[{\sphinxstylestrong{pivot}}] \leavevmode{[}\{'tail', 'mid', 'middle', 'tip'\}, optional, default: 'tail'{]} The part of the arrow that is anchored to the \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} grid. The arrow rotates about this point. 'mid' is a synonym for 'middle'. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or color sequence, optional{]} Explicit color(s) for the arrows. If \sphinxstyleemphasis{C} has been set, \sphinxstyleemphasis{color} has no effect. This is a synonym for the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} \sphinxstyleemphasis{facecolor} parameter. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} properties, optional{]} All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:matplotlib.axes.Axes.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiverkey}}}}}}] \leavevmode Add a key to a quiver plot. \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.quiver}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiver:examples-using-matplotlib-axes-axes-quiver}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.quiverkey} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:matplotlib-axes-axes-quiverkey}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey::doc}}\index{quiverkey() (matplotlib.axes.Axes method)@\spxentry{quiverkey()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:matplotlib.axes.Axes.quiverkey}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{quiverkey}}}{\emph{self}, \emph{Q}, \emph{X}, \emph{Y}, \emph{U}, \emph{label}, \emph{**kw}}{} Add a key to a quiver plot. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{quiverkey}\PYG{p}{(}\PYG{n}{Q}\PYG{p}{,} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{label}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{Q}:}] \leavevmode The Quiver instance returned by a call to quiver. \item[{\sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}:}] \leavevmode The location of the key; additional explanation follows. \item[{\sphinxstyleemphasis{U}:}] \leavevmode The length of the key \item[{\sphinxstyleemphasis{label}:}] \leavevmode A string with the length and units of the key \end{description} \end{quote} Keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{angle} = 0}] \leavevmode The angle of the key arrow. Measured in degrees anti-clockwise from the x-axis. \item[{\sphinxstyleemphasis{coordinates} = {[} 'axes' \textbar{} 'figure' \textbar{} 'data' \textbar{} 'inches' {]}}] \leavevmode Coordinate system and units for \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}: 'axes' and 'figure' are normalized coordinate systems with 0,0 in the lower left and 1,1 in the upper right; 'data' are the axes data coordinates (used for the locations of the vectors in the quiver plot itself); 'inches' is position in the figure in inches, with 0,0 at the lower left corner. \item[{\sphinxstyleemphasis{color}:}] \leavevmode overrides face and edge colors from \sphinxstyleemphasis{Q}. \item[{\sphinxstyleemphasis{labelpos} = {[} 'N' \textbar{} 'S' \textbar{} 'E' \textbar{} 'W' {]}}] \leavevmode Position the label above, below, to the right, to the left of the arrow, respectively. \item[{\sphinxstyleemphasis{labelsep}:}] \leavevmode Distance in inches between the arrow and the label. Default is 0.1 \item[{\sphinxstyleemphasis{labelcolor}:}] \leavevmode defaults to default {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} color. \item[{\sphinxstyleemphasis{fontproperties}:}] \leavevmode A dictionary with keyword arguments accepted by the {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} initializer: \sphinxstyleemphasis{family}, \sphinxstyleemphasis{style}, \sphinxstyleemphasis{variant}, \sphinxstyleemphasis{size}, \sphinxstyleemphasis{weight} \end{description} \end{quote} Any additional keyword arguments are used to override vector properties taken from \sphinxstyleemphasis{Q}. The positioning of the key depends on \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}, \sphinxstyleemphasis{coordinates}, and \sphinxstyleemphasis{labelpos}. If \sphinxstyleemphasis{labelpos} is 'N' or 'S', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} give the position of the middle of the key arrow. If \sphinxstyleemphasis{labelpos} is 'E', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} positions the head, and if \sphinxstyleemphasis{labelpos} is 'W', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} positions the tail; in either of these two cases, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} is somewhere in the middle of the arrow+label key object. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.quiverkey}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.quiverkey:examples-using-matplotlib-axes-axes-quiverkey}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.streamplot} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:matplotlib-axes-axes-streamplot}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot::doc}}\index{streamplot() (matplotlib.axes.Axes method)@\spxentry{streamplot()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:matplotlib.axes.Axes.streamplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{streamplot}}}{\emph{axes}, \emph{x}, \emph{y}, \emph{u}, \emph{v}, \emph{density=1}, \emph{linewidth=None}, \emph{color=None}, \emph{cmap=None}, \emph{norm=None}, \emph{arrowsize=1}, \emph{arrowstyle='-\textbar{}\textgreater{}'}, \emph{minlength=0.1}, \emph{transform=None}, \emph{zorder=None}, \emph{start\_points=None}, \emph{maxlength=4.0}, \emph{integration\_direction='both'}, \emph{*}, \emph{data=None}}{} Draw streamlines of a vector flow. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1d arrays{]} An evenly spaced grid. \item[{\sphinxstylestrong{u, v}}] \leavevmode{[}2d arrays{]} \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}-velocities. Number of rows should match length of \sphinxstyleemphasis{y}, and the number of columns should match \sphinxstyleemphasis{x}. \item[{\sphinxstylestrong{density}}] \leavevmode{[}float or 2-tuple{]} Controls the closeness of streamlines. When \sphinxcode{\sphinxupquote{density = 1}}, the domain is divided into a 30x30 grid---\sphinxstyleemphasis{density} linearly scales this grid. Each cell in the grid can have, at most, one traversing streamline. For different densities in each direction, use {[}density\_x, density\_y{]}. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}numeric or 2d array{]} Vary linewidth when given a 2d array with the same shape as velocities. \item[{\sphinxstylestrong{color}}] \leavevmode{[}matplotlib color code, or 2d array{]} Streamline color. When given an array with the same shape as velocities, \sphinxstyleemphasis{color} values are converted to colors using \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}{]} Colormap used to plot streamlines and arrows. Only necessary when using an array input for \sphinxstyleemphasis{color}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} Normalize object used to scale luminance data to 0, 1. If \sphinxcode{\sphinxupquote{None}}, stretch (min, max) to (0, 1). Only necessary when \sphinxstyleemphasis{color} is an array. \item[{\sphinxstylestrong{arrowsize}}] \leavevmode{[}float{]} Factor scale arrow size. \item[{\sphinxstylestrong{arrowstyle}}] \leavevmode{[}str{]} Arrow style specification. See {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}}. \item[{\sphinxstylestrong{minlength}}] \leavevmode{[}float{]} Minimum length of streamline in axes coordinates. \item[{\sphinxstylestrong{start\_points}}] \leavevmode{[}Nx2 array{]} Coordinates of starting points for the streamlines. In data coordinates, the same as the \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} arrays. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}int{]} Any number. \item[{\sphinxstylestrong{maxlength}}] \leavevmode{[}float{]} Maximum length of streamline in axes coordinates. \item[{\sphinxstylestrong{integration\_direction}}] \leavevmode{[}{[}'forward' \textbar{} 'backward' \textbar{} 'both'{]}{]} Integrate the streamline in forward, backward or both directions. default is \sphinxcode{\sphinxupquote{'both'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{stream\_container}}] \leavevmode{[}StreamplotSet{]} Container object with attributes \begin{itemize} \item {} lines: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} of streamlines \item {} arrows: collection of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} objects representing arrows half-way along stream lines. \end{itemize} This container will probably change in the future to allow changes to the colormap, alpha, etc. for both lines and arrows, but these changes should be backward compatible. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'start\_points', 'u', 'v', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.streamplot}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.streamplot:examples-using-matplotlib-axes-axes-streamplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \subsection{Clearing} \label{\detokenize{api/axes_api:clearing}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:matplotlib.axes.Axes.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.cla}}}}} & Clear the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.clear:matplotlib.axes.Axes.clear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.clear}}}}} & Clear the axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.cla} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:matplotlib-axes-axes-cla}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cla::doc}}\index{cla() (matplotlib.axes.Axes method)@\spxentry{cla()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:matplotlib.axes.Axes.cla}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.cla}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:examples-using-matplotlib-axes-axes-cla}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.clear} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clear:matplotlib-axes-axes-clear}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clear::doc}}\index{clear() (matplotlib.axes.Axes method)@\spxentry{clear()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.clear:matplotlib.axes.Axes.clear}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}}{} Clear the axes. \end{fulllineitems} \subsection{Appearance} \label{\detokenize{api/axes_api:appearance}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib.axes.Axes.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axis}}}}} & Convenience method to get or set some axis properties. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_off:matplotlib.axes.Axes.set_axis_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_axis\_off}}}}} & Turn the x- and y-axis off. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_on:matplotlib.axes.Axes.set_axis_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_axis\_on}}}}} & Turn the x- and y-axis on. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_frame\_on}}}}} & Set whether the axes rectangle patch is drawn. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_frame_on:matplotlib.axes.Axes.get_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_frame\_on}}}}} & Get whether the axes rectangle patch is drawn. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_axisbelow}}}}} & Set whether axis ticks and gridlines are above or below most artists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axisbelow:matplotlib.axes.Axes.get_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_axisbelow}}}}} & Get whether axis ticks and gridlines are above or below most artists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.grid}}}}} & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_facecolor:matplotlib.axes.Axes.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_facecolor}}}}} & Get the facecolor of the Axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_fc:matplotlib.axes.Axes.get_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_fc}}}}} & Get the facecolor of the Axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_facecolor}}}}} & Set the facecolor of the Axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_fc}}}}} & Set the facecolor of the Axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.axis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib-axes-axes-axis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axis::doc}}\index{axis() (matplotlib.axes.Axes method)@\spxentry{axis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:matplotlib.axes.Axes.axis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axis}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Convenience method to get or set some axis properties. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{]}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{n}{option}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float, optional{]} The axis limits to be set. Either none or all of the limits must be given. \item[{\sphinxstylestrong{option}}] \leavevmode{[}bool or str{]} If a bool, turns axis lines and labels on or off. If a string, possible values are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'on' & Turn on axis lines and labels. Same as \sphinxcode{\sphinxupquote{True}}. \\ \hline 'off' & Turn off axis lines and labels. Same as \sphinxcode{\sphinxupquote{False}}. \\ \hline 'equal' & Set equal scaling (i.e., make circles circular) by changing axis limits. \\ \hline 'scaled' & Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. \\ \hline 'tight' & Set limits just large enough to show all data. \\ \hline 'auto' & Automatic scaling (fill plot box with data). \\ \hline 'normal' & Same as 'auto'; deprecated. \\ \hline 'image' & 'scaled' with axis limits equal to data limits. \\ \hline 'square' & Square plot; similar to 'scaled', but initially forcing \sphinxcode{\sphinxupquote{xmax-xmin = ymax-ymin}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether observers are notified of the axis limit change. This option is passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float{]} The axis limits. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.axis}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axis:examples-using-matplotlib-axes-axes-axis}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.set\_axis\_off} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_off:matplotlib-axes-axes-set-axis-off}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_off::doc}}\index{set\_axis\_off() (matplotlib.axes.Axes method)@\spxentry{set\_axis\_off()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_off:matplotlib.axes.Axes.set_axis_off}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_axis\_off}}}{\emph{self}}{} Turn the x- and y-axis off. This affects the axis lines, ticks, ticklabels, grid and axis labels. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_axis\_off}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_off:examples-using-matplotlib-axes-axes-set-axis-off}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colormap\_reference.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.set\_axis\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_on:matplotlib-axes-axes-set-axis-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_on::doc}}\index{set\_axis\_on() (matplotlib.axes.Axes method)@\spxentry{set\_axis\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axis_on:matplotlib.axes.Axes.set_axis_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_axis\_on}}}{\emph{self}}{} Turn the x- and y-axis on. This affects the axis lines, ticks, ticklabels, grid and axis labels. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_frame\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib-axes-axes-set-frame-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on::doc}}\index{set\_frame\_on() (matplotlib.axes.Axes method)@\spxentry{set\_frame\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_frame\_on}}}{\emph{self}, \emph{b}}{} Set whether the axes rectangle patch is drawn. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_frame\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_frame_on:matplotlib-axes-axes-get-frame-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_frame_on::doc}}\index{get\_frame\_on() (matplotlib.axes.Axes method)@\spxentry{get\_frame\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_frame_on:matplotlib.axes.Axes.get_frame_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_frame\_on}}}{\emph{self}}{} Get whether the axes rectangle patch is drawn. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_axisbelow} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib-axes-axes-set-axisbelow}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow::doc}}\index{set\_axisbelow() (matplotlib.axes.Axes method)@\spxentry{set\_axisbelow()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_axisbelow}}}{\emph{self}, \emph{b}}{} Set whether axis ticks and gridlines are above or below most artists. This controls the zorder of the ticks and gridlines. For more information on the zorder see \DUrole{xref,std,std-doc}{/gallery/misc/zorder\_demo}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or 'line'{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True} (zorder = 0.5): Ticks and gridlines are below all Artists. \item {} 'line' (zorder = 1.5): Ticks and gridlines are above patches (e.g. rectangles, with default zorder = 1) but still below lines and markers (with their default zorder = 2). \item {} \sphinxstyleemphasis{False} (zorder = 2.5): Ticks and gridlines are above patches and lines / markers. \end{itemize} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axisbelow:matplotlib.axes.Axes.get_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_axisbelow}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_axisbelow} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axisbelow:matplotlib-axes-axes-get-axisbelow}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axisbelow::doc}}\index{get\_axisbelow() (matplotlib.axes.Axes method)@\spxentry{get\_axisbelow()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axisbelow:matplotlib.axes.Axes.get_axisbelow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_axisbelow}}}{\emph{self}}{} Get whether axis ticks and gridlines are above or below most artists. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axisbelow}}] \leavevmode{[}bool or 'line'{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axisbelow}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.grid} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib-axes-axes-grid}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.grid::doc}}\index{grid() (matplotlib.axes.Axes method)@\spxentry{grid()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=None}, \emph{which='major'}, \emph{axis='both'}, \emph{**kwargs}}{} Configure the grid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None, optional{]} Whether to show the grid lines. If any \sphinxstyleemphasis{kwargs} are supplied, it is assumed you want the grid on and \sphinxstyleemphasis{b} will be set to True. If \sphinxstyleemphasis{b} is \sphinxstyleemphasis{None} and there are no \sphinxstyleemphasis{kwargs}, this toggles the visibility of the lines. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}, optional{]} The grid lines to apply the changes on. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} The axis to apply the changes on. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties{]} Define the line properties of the grid, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} Valid \sphinxstyleemphasis{kwargs} are \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} The axis is drawn as a unit, so the effective zorder for drawing the grid is determined by the zorder of each axis, not by the zorder of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects comprising the grid. Therefore, to set grid zorder, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axisbelow}}}}} or, for more control, call the {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder:matplotlib.axis.Axis.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zorder}}}}} method of each axis. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_facecolor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_facecolor:matplotlib-axes-axes-get-facecolor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_facecolor::doc}}\index{get\_facecolor() (matplotlib.axes.Axes method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_facecolor:matplotlib.axes.Axes.get_facecolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{} Get the facecolor of the Axes. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_fc} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_fc:matplotlib-axes-axes-get-fc}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_fc::doc}}\index{get\_fc() (matplotlib.axes.Axes method)@\spxentry{get\_fc()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_fc:matplotlib.axes.Axes.get_fc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Get the facecolor of the Axes. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_facecolor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib-axes-axes-set-facecolor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor::doc}}\index{set\_facecolor() (matplotlib.axes.Axes method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{color}}{} Set the facecolor of the Axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_facecolor}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:examples-using-matplotlib-axes-axes-set-facecolor}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.set\_fc} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib-axes-axes-set-fc}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc::doc}}\index{set\_fc() (matplotlib.axes.Axes method)@\spxentry{set\_fc()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{color}}{} Set the facecolor of the Axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsection{Property cycle} \label{\detokenize{api/axes_api:property-cycle}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle:matplotlib.axes.Axes.set_prop_cycle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_prop\_cycle}}}}} & Set the property cycle of the Axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.set\_prop\_cycle} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle:matplotlib-axes-axes-set-prop-cycle}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle::doc}}\index{set\_prop\_cycle() (matplotlib.axes.Axes method)@\spxentry{set\_prop\_cycle()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle:matplotlib.axes.Axes.set_prop_cycle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_prop\_cycle}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Set the property cycle of the Axes. The property cycle controls the style properties such as color, marker and linestyle of future plot commands. The style properties of data already added to the Axes are not modified. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{cycler}\PYG{p}{)} \PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{label}\PYG{o}{=}\PYG{n}{values}\PYG{p}{[}\PYG{p}{,} \PYG{n}{label2}\PYG{o}{=}\PYG{n}{values2}\PYG{p}{[}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}\PYG{p}{]}\PYG{p}{)} \PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{label}\PYG{p}{,} \PYG{n}{values}\PYG{p}{)} \end{sphinxVerbatim} Form 1 sets given \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} object. Form 2 creates a \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} which cycles over one or more properties simultaneously and set it as the property cycle of the axes. If multiple properties are given, their value lists must have the same length. This is just a shortcut for explicitly creating a cycler and passing it to the function, i.e. it's short for \sphinxcode{\sphinxupquote{set\_prop\_cycle(cycler(label=values label2=values2, ...))}}. Form 3 creates a \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} for a single property and set it as the property cycle of the axes. This form exists for compatibility with the original \sphinxhref{https://matplotlib.org/cycler/generated/cycler.cycler.html\#cycler.cycler}{\sphinxcode{\sphinxupquote{cycler.cycler}}} interface. Its use is discouraged in favor of the kwarg form, i.e. \sphinxcode{\sphinxupquote{set\_prop\_cycle(label=values)}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cycler}}] \leavevmode{[}Cycler{]} Set the given Cycler. \sphinxstyleemphasis{None} resets to the cycle defined by the current style. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} The property key. Must be a valid {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} property. For example, 'color' or 'linestyle'. Aliases are allowed, such as 'c' for 'color' and 'lw' for 'linewidth'. \item[{\sphinxstylestrong{values}}] \leavevmode{[}iterable{]} Finite-length iterable of the property values. These values are validated and will raise a ValueError if invalid. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/rcsetup_api:matplotlib.rcsetup.cycler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.cycler}}}}}}] \leavevmode Convenience function for creating validated cyclers for properties. \item[{\sphinxhref{https://matplotlib.org/cycler/generated/cycler.cycler.html\#cycler.cycler}{\sphinxcode{\sphinxupquote{cycler.cycler}}}}] \leavevmode The original function for creating unvalidated cyclers. \end{description} \subsubsection*{Examples} Setting the property cycle for a single property: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Setting the property cycle for simultaneously cycling over multiple properties (e.g. red circle, green plus, blue cross): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}prop\PYGZus{}cycle}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{marker}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{+}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_prop\_cycle}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_prop_cycle:examples-using-matplotlib-axes-axes-set-prop-cycle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycler.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/color_cycle:sphx-glr-tutorials-intermediate-color-cycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Styling with cycler}}}} \end{itemize} \subsection{Axis / limits} \label{\detokenize{api/axes_api:axis-limits}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis:matplotlib.axes.Axes.get_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xaxis}}}}} & Return the XAxis instance. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis:matplotlib.axes.Axes.get_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yaxis}}}}} & Return the YAxis instance. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.get\_xaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis:matplotlib-axes-axes-get-xaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis::doc}}\index{get\_xaxis() (matplotlib.axes.Axes method)@\spxentry{get\_xaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis:matplotlib.axes.Axes.get_xaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xaxis}}}{\emph{self}}{} Return the XAxis instance. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_yaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis:matplotlib-axes-axes-get-yaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis::doc}}\index{get\_yaxis() (matplotlib.axes.Axes method)@\spxentry{get\_yaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis:matplotlib.axes.Axes.get_yaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yaxis}}}{\emph{self}}{} Return the YAxis instance. \end{fulllineitems} \subsubsection{Axis Limits and direction} \label{\detokenize{api/axes_api:axis-limits-and-direction}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_xaxis}}}}} & Invert the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.xaxis\_inverted}}}}} & Return whether the x-axis is inverted. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.invert\_yaxis}}}}} & Invert the y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.yaxis\_inverted}}}}} & Return whether the y-axis is inverted. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xlim}}}}} & Set the x-axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xlim}}}}} & Return the x-axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ylim}}}}} & Set the y-axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_ylim}}}}} & Return the y-axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim:matplotlib.axes.Axes.update_datalim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.update\_datalim}}}}} & Extend the \sphinxcode{\sphinxupquote{dataLim}} BBox to include the given points. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim_bounds:matplotlib.axes.Axes.update_datalim_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.update\_datalim\_bounds}}}}} & Extend the \sphinxcode{\sphinxupquote{datalim}} BBox to include the given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xbound}}}}} & Set the lower and upper numerical bounds of the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xbound}}}}} & Return the lower and upper x-axis bounds, in increasing order. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ybound}}}}} & Set the lower and upper numerical bounds of the y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_ybound}}}}} & Return the lower and upper y-axis bounds, in increasing order. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.invert\_xaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib-axes-axes-invert-xaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis::doc}}\index{invert\_xaxis() (matplotlib.axes.Axes method)@\spxentry{invert\_xaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{invert\_xaxis}}}{\emph{self}}{} Invert the x-axis. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xaxis\_inverted}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xbound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xbound}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.xaxis\_inverted} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib-axes-axes-xaxis-inverted}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted::doc}}\index{xaxis\_inverted() (matplotlib.axes.Axes method)@\spxentry{xaxis\_inverted()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{xaxis\_inverted}}}{\emph{self}}{} Return whether the x-axis is inverted. The axis is inverted if the left value is larger than the right value. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_xaxis}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xbound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xbound}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.invert\_yaxis} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib-axes-axes-invert-yaxis}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis::doc}}\index{invert\_yaxis() (matplotlib.axes.Axes method)@\spxentry{invert\_yaxis()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{invert\_yaxis}}}{\emph{self}}{} Invert the y-axis. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yaxis\_inverted}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ybound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ybound}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.yaxis\_inverted} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib-axes-axes-yaxis-inverted}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted::doc}}\index{yaxis\_inverted() (matplotlib.axes.Axes method)@\spxentry{yaxis\_inverted()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{yaxis\_inverted}}}{\emph{self}}{} Return whether the y-axis is inverted. The axis is inverted if the bottom value is larger than the top value. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_yaxis}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ybound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ybound}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_xlim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib-axes-axes-set-xlim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim::doc}}\index{set\_xlim() (matplotlib.axes.Axes method)@\spxentry{set\_xlim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xlim}}}{\emph{self}, \emph{left=None}, \emph{right=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{xmin=None}, \emph{xmax=None}}{} Set the x-axis view limits. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left}}] \leavevmode{[}scalar, optional{]} The left xlim in data coordinates. Passing \sphinxstyleemphasis{None} leaves the limit unchanged. The left and right xlims may be passed as the tuple (\sphinxstyleemphasis{left}, \sphinxstyleemphasis{right}) as the first positional argument (or as the \sphinxstyleemphasis{left} keyword argument). \item[{\sphinxstylestrong{right}}] \leavevmode{[}scalar, optional{]} The right xlim in data coordinates. Passing \sphinxstyleemphasis{None} leaves the limit unchanged. \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional{]} Whether to notify observers of limit change (default: True). \item[{\sphinxstylestrong{auto}}] \leavevmode{[}bool or None, optional{]} Whether to turn on autoscaling of the x-axis. True turns on, False turns off (default action), None leaves unchanged. \item[{\sphinxstylestrong{xmin, xmax}}] \leavevmode{[}scalar, optional{]} They are equivalent to left and right respectively, and it is an error to pass both \sphinxstyleemphasis{xmin} and \sphinxstyleemphasis{left} or \sphinxstyleemphasis{xmax} and \sphinxstyleemphasis{right}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left, right}}] \leavevmode{[}(float, float){]} The new x-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xbound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xbound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_xaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xaxis\_inverted}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} The \sphinxstyleemphasis{left} value may be greater than the \sphinxstyleemphasis{right} value, in which case the x-axis values will decrease from left to right. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{left}\PYG{p}{,} \PYG{n}{right} \PYG{o}{=} \PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{)} \end{sphinxVerbatim} One limit may be left unchanged. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{right}\PYG{o}{=}\PYG{n}{right\PYGZus{}lim}\PYG{p}{)} \end{sphinxVerbatim} Limits may be passed in reverse order to flip the direction of the x-axis. For example, suppose \sphinxstyleemphasis{x} represents the number of years before present. The x-axis limits might be set like the following so 5000 years ago is on the left of the plot and the present is on the right. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{5000}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_xlim}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:examples-using-matplotlib-axes-axes-set-xlim}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_xlim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib-axes-axes-get-xlim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim::doc}}\index{get\_xlim() (matplotlib.axes.Axes method)@\spxentry{get\_xlim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xlim}}}{\emph{self}}{} Return the x-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left, right}}] \leavevmode{[}(float, float){]} The current x-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xbound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xbound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_xaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xaxis\_inverted}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} The x-axis may be inverted, in which case the \sphinxstyleemphasis{left} value will be greater than the \sphinxstyleemphasis{right} value. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_ylim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib-axes-axes-set-ylim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim::doc}}\index{set\_ylim() (matplotlib.axes.Axes method)@\spxentry{set\_ylim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_ylim}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{ymin=None}, \emph{ymax=None}}{} Set the y-axis view limits. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}scalar, optional{]} The bottom ylim in data coordinates. Passing \sphinxstyleemphasis{None} leaves the limit unchanged. The bottom and top ylims may be passed as the tuple (\sphinxstyleemphasis{bottom}, \sphinxstyleemphasis{top}) as the first positional argument (or as the \sphinxstyleemphasis{bottom} keyword argument). \item[{\sphinxstylestrong{top}}] \leavevmode{[}scalar, optional{]} The top ylim in data coordinates. Passing \sphinxstyleemphasis{None} leaves the limit unchanged. \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional{]} Whether to notify observers of limit change (default: \sphinxcode{\sphinxupquote{True}}). \item[{\sphinxstylestrong{auto}}] \leavevmode{[}bool or None, optional{]} Whether to turn on autoscaling of the y-axis. \sphinxstyleemphasis{True} turns on, \sphinxstyleemphasis{False} turns off (default action), \sphinxstyleemphasis{None} leaves unchanged. \item[{\sphinxstylestrong{ymin, ymax}}] \leavevmode{[}scalar, optional{]} They are equivalent to bottom and top respectively, and it is an error to pass both \sphinxstyleemphasis{ymin} and \sphinxstyleemphasis{bottom} or \sphinxstyleemphasis{ymax} and \sphinxstyleemphasis{top}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom, top}}] \leavevmode{[}(float, float){]} The new y-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ybound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ybound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_yaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yaxis\_inverted}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} The \sphinxstyleemphasis{bottom} value may be greater than the \sphinxstyleemphasis{top} value, in which case the y-axis values will decrease from \sphinxstyleemphasis{bottom} to \sphinxstyleemphasis{top}. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)} \end{sphinxVerbatim} One limit may be left unchanged. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{n}{top\PYGZus{}lim}\PYG{p}{)} \end{sphinxVerbatim} Limits may be passed in reverse order to flip the direction of the y-axis. For example, suppose \sphinxcode{\sphinxupquote{y}} represents depth of the ocean in m. The y-axis limits might be set like the following so 5000 m depth is at the bottom of the plot and the surface, 0 m, is at the top. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{set\PYGZus{}ylim}\PYG{p}{(}\PYG{l+m+mi}{5000}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_ylim}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:examples-using-matplotlib-axes-axes-set-ylim}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_ylim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib-axes-axes-get-ylim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim::doc}}\index{get\_ylim() (matplotlib.axes.Axes method)@\spxentry{get\_ylim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_ylim}}}{\emph{self}}{} Return the y-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom, top}}] \leavevmode{[}(float, float){]} The current y-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ybound}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ybound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_yaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yaxis\_inverted}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} The y-axis may be inverted, in which case the \sphinxstyleemphasis{bottom} value will be greater than the \sphinxstyleemphasis{top} value. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.update\_datalim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim:matplotlib-axes-axes-update-datalim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim::doc}}\index{update\_datalim() (matplotlib.axes.Axes method)@\spxentry{update\_datalim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim:matplotlib.axes.Axes.update_datalim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{update\_datalim}}}{\emph{self}, \emph{xys}, \emph{updatex=True}, \emph{updatey=True}}{} Extend the \sphinxcode{\sphinxupquote{dataLim}} BBox to include the given points. If no data is set currently, the BBox will ignore its limits and set the bound to be the bounds of the xydata (\sphinxstyleemphasis{xys}). Otherwise, it will compute the bounds of the union of its current data and the data in \sphinxstyleemphasis{xys}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xys}}] \leavevmode{[}2D array-like{]} The points to include in the data limits BBox. This can be either a list of (x, y) tuples or a Nx2 array. \item[{\sphinxstylestrong{updatex, updatey}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether to update the x/y limits. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.update\_datalim\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim_bounds:matplotlib-axes-axes-update-datalim-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim_bounds::doc}}\index{update\_datalim\_bounds() (matplotlib.axes.Axes method)@\spxentry{update\_datalim\_bounds()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim_bounds:matplotlib.axes.Axes.update_datalim_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{update\_datalim\_bounds}}}{\emph{self}, \emph{bounds}}{} Extend the \sphinxcode{\sphinxupquote{datalim}} BBox to include the given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bounds}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_xbound} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib-axes-axes-set-xbound}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound::doc}}\index{set\_xbound() (matplotlib.axes.Axes method)@\spxentry{set\_xbound()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xbound}}}{\emph{self}, \emph{lower=None}, \emph{upper=None}}{} Set the lower and upper numerical bounds of the x-axis. This method will honor axes inversion regardless of parameter order. It will not change the autoscaling setting (\sphinxcode{\sphinxupquote{Axes.\_autoscaleXon}}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lower, upper}}] \leavevmode{[}float or None{]} The lower and upper bounds. If \sphinxstyleemphasis{None}, the respective axis bound is not modified. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xbound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_xaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xaxis\_inverted}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xbound} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib-axes-axes-get-xbound}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound::doc}}\index{get\_xbound() (matplotlib.axes.Axes method)@\spxentry{get\_xbound()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xbound:matplotlib.axes.Axes.get_xbound}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xbound}}}{\emph{self}}{} Return the lower and upper x-axis bounds, in increasing order. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xbound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_xaxis:matplotlib.axes.Axes.invert_xaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_xaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_inverted:matplotlib.axes.Axes.xaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xaxis\_inverted}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_ybound} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib-axes-axes-set-ybound}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound::doc}}\index{set\_ybound() (matplotlib.axes.Axes method)@\spxentry{set\_ybound()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_ybound}}}{\emph{self}, \emph{lower=None}, \emph{upper=None}}{} Set the lower and upper numerical bounds of the y-axis. This method will honor axes inversion regardless of parameter order. It will not change the autoscaling setting (\sphinxcode{\sphinxupquote{Axes.\_autoscaleYon}}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lower, upper}}] \leavevmode{[}float or None{]} The lower and upper bounds. If \sphinxstyleemphasis{None}, the respective axis bound is not modified. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ybound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_yaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yaxis\_inverted}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_ybound} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib-axes-axes-get-ybound}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound::doc}}\index{get\_ybound() (matplotlib.axes.Axes method)@\spxentry{get\_ybound()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ybound:matplotlib.axes.Axes.get_ybound}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_ybound}}}{\emph{self}}{} Return the lower and upper y-axis bounds, in increasing order. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ybound}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.invert_yaxis:matplotlib.axes.Axes.invert_yaxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{invert\_yaxis}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_inverted:matplotlib.axes.Axes.yaxis_inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yaxis\_inverted}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{Axis Labels, title, and legend} \label{\detokenize{api/axes_api:axis-labels-title-and-legend}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xlabel}}}}} & Set the label for the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlabel:matplotlib.axes.Axes.get_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xlabel}}}}} & Get the xlabel text string. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ylabel}}}}} & Set the label for the y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylabel:matplotlib.axes.Axes.get_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_ylabel}}}}} & Get the ylabel text string. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_title}}}}} & Set a title for the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_title:matplotlib.axes.Axes.get_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_title}}}}} & Get an axes title. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}} & Place a legend on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend:matplotlib.axes.Axes.get_legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_legend}}}}} & Return the \sphinxcode{\sphinxupquote{Legend}} instance, or None if no legend is defined. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels:matplotlib.axes.Axes.get_legend_handles_labels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_legend\_handles\_labels}}}}} & Return handles and labels for legend \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.set\_xlabel} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib-axes-axes-set-xlabel}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel::doc}}\index{set\_xlabel() (matplotlib.axes.Axes method)@\spxentry{set\_xlabel()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xlabel}}}{\emph{self}, \emph{xlabel}, \emph{fontdict=None}, \emph{labelpad=None}, \emph{**kwargs}}{} Set the label for the x-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xlabel}}] \leavevmode{[}str{]} The label text. \item[{\sphinxstylestrong{labelpad}}] \leavevmode{[}scalar, optional, default: None{]} Spacing in points from the axes bounding box including ticks and tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties control the appearance of the label. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}}}] \leavevmode for information on how override and the optional args work \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_xlabel}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:examples-using-matplotlib-axes-axes-set-xlabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_xlabel} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlabel:matplotlib-axes-axes-get-xlabel}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlabel::doc}}\index{get\_xlabel() (matplotlib.axes.Axes method)@\spxentry{get\_xlabel()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlabel:matplotlib.axes.Axes.get_xlabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xlabel}}}{\emph{self}}{} Get the xlabel text string. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_ylabel} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib-axes-axes-set-ylabel}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel::doc}}\index{set\_ylabel() (matplotlib.axes.Axes method)@\spxentry{set\_ylabel()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_ylabel}}}{\emph{self}, \emph{ylabel}, \emph{fontdict=None}, \emph{labelpad=None}, \emph{**kwargs}}{} Set the label for the y-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ylabel}}] \leavevmode{[}str{]} The label text. \item[{\sphinxstylestrong{labelpad}}] \leavevmode{[}scalar, optional, default: None{]} Spacing in points from the axes bounding box including ticks and tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties control the appearance of the label. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}}}] \leavevmode for information on how override and the optional args work \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_ylabel}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:examples-using-matplotlib-axes-axes-set-ylabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_ylabel} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylabel:matplotlib-axes-axes-get-ylabel}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylabel::doc}}\index{get\_ylabel() (matplotlib.axes.Axes method)@\spxentry{get\_ylabel()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylabel:matplotlib.axes.Axes.get_ylabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_ylabel}}}{\emph{self}}{} Get the ylabel text string. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_title} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib-axes-axes-set-title}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title::doc}}\index{set\_title() (matplotlib.axes.Axes method)@\spxentry{set\_title()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_title}}}{\emph{self}, \emph{label}, \emph{fontdict=None}, \emph{loc='center'}, \emph{pad=None}, \emph{**kwargs}}{} Set a title for the axes. Set one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text to use for the title \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} A dictionary controlling the appearance of the title text, the default \sphinxcode{\sphinxupquote{fontdict}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontweight}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titleweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{verticalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{baseline}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{loc}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{'center', 'left', 'right'\}, str, optional{]} Which title to set, defaults to 'center' \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} The offset of the title from the top of the axes, in points. Default is \sphinxcode{\sphinxupquote{None}} to use rcParams{[}'axes.titlepad'{]}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The matplotlib text instance representing the title \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} Other keyword arguments are text properties, see {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} for a list of valid text properties. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_title}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:examples-using-matplotlib-axes-axes-set-title}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_file.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_title} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_title:matplotlib-axes-axes-get-title}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_title::doc}}\index{get\_title() (matplotlib.axes.Axes method)@\spxentry{get\_title()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_title:matplotlib.axes.Axes.get_title}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_title}}}{\emph{self}, \emph{loc='center'}}{} Get an axes title. Get one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{'center', 'left', 'right'\}, str, optional{]} Which title to get, defaults to 'center'. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{title}}] \leavevmode{[}str{]} The title text string. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.legend} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib-axes-axes-legend}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.legend::doc}}\index{legend() (matplotlib.axes.Axes method)@\spxentry{legend()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{legend}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Place a legend on the axes. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \PYG{n}{legend}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{)} \PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{p}{,} \PYG{n}{labels}\PYG{p}{)} \end{sphinxVerbatim} The call signatures correspond to three different ways how to use this method. \sphinxstylestrong{1. Automatic detection of elements to be shown in the legend} The elements to be added to the legend are automatically determined, when you do not pass in any extra arguments. In this case, the labels are taken from the artist. You can specify them either at artist creation or by calling the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label()}}}}} method on the artist: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Inline label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}label}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Label via method}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Specific lines can be excluded from the automatic legend element selection by defining a label starting with an underscore. This is default for all artists, so calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}} without any arguments and without setting the labels manually will result in no legend being drawn. \sphinxstylestrong{2. Labeling existing plot elements} To make a legend for lines which already exist on the axes (via plot for instance), simply call this function with an iterable of strings, one for each legend item. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A simple line}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Note: This way of using is discouraged, because the relation between plot elements and labels is only implicit by their order and can easily be mixed up. \sphinxstylestrong{3. Explicitly defining the elements in the legend} For full control of which artists have a legend entry, it is possible to pass an iterable of legend artists followed by an iterable of legend labels respectively: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(}\PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{handles}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of Artists (lines, patches) to be added to the legend. Use this together with \sphinxstyleemphasis{labels}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. The length of handles and labels should be the same in this case. If they are not, they are truncated to the smaller length. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence of strings, optional{]} A list of labels to show next to the artists. Use this together with \sphinxstyleemphasis{handles}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} instance}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str or pair of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.loc"{]}}}} ('best' for axes, 'upper right' for figures){]} The location of the legend. The strings \sphinxcode{\sphinxupquote{'upper left', 'upper right', 'lower left', 'lower right'}} place the legend at the corresponding corner of the axes/figure. The strings \sphinxcode{\sphinxupquote{'upper center', 'lower center', 'center left', 'center right'}} place the legend at the center of the corresponding edge of the axes/figure. The string \sphinxcode{\sphinxupquote{'center'}} places the legend at the center of the axes/figure. The string \sphinxcode{\sphinxupquote{'best'}} places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case \sphinxstyleemphasis{bbox\_to\_anchor} will be ignored). For back-compatibility, \sphinxcode{\sphinxupquote{'center right'}} (but no other location) can also be spelled \sphinxcode{\sphinxupquote{'right'}}, and each "string" locations can also be given as a numeric value: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Location String &\sphinxstyletheadfamily Location Code \\ \hline 'best' & 0 \\ \hline 'upper right' & 1 \\ \hline 'upper left' & 2 \\ \hline 'lower left' & 3 \\ \hline 'lower right' & 4 \\ \hline 'right' & 5 \\ \hline 'center left' & 6 \\ \hline 'center right' & 7 \\ \hline 'lower center' & 8 \\ \hline 'upper center' & 9 \\ \hline 'center' & 10 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}, 2-tuple, or 4-tuple of floats{]} Box that is used to position the legend in conjunction with \sphinxstyleemphasis{loc}. Defaults to \sphinxcode{\sphinxupquote{axes.bbox}} (if called as a method to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}) or \sphinxcode{\sphinxupquote{figure.bbox}} (if {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}). This argument allows arbitrary placement of the legend. Bbox coordinates are interpreted in the coordinate system given by \sphinxcode{\sphinxupquote{bbox\_transform}}, with the default transform Axes or Figure coordinates, depending on which \sphinxcode{\sphinxupquote{legend}} is called. If a 4-tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} is given, then it specifies the bbox \sphinxcode{\sphinxupquote{(x, y, width, height)}} that the legend is placed in. To put the legend in the best location in the bottom right quadrant of the axes (or figure): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{best}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} A 2-tuple \sphinxcode{\sphinxupquote{(x, y)}} places the corner of the legend specified by \sphinxstyleemphasis{loc} at x, y. For example, to put the legend's upper right-hand corner in the center of the axes (or figure) the following keywords can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{ncol}}] \leavevmode{[}integer{]} The number of columns that the legend has. Default is 1. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}None or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} or dict{]} The font properties of the legend. If None (default), the current {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} will be used. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int or float or \{'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only used if \sphinxcode{\sphinxupquote{prop}} is not specified. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} (line). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.numpoints"{]}}}}. \item[{\sphinxstylestrong{scatterpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} (scatter plot). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.scatterpoints"{]}}}}. \item[{\sphinxstylestrong{scatteryoffsets}}] \leavevmode{[}iterable of floats{]} The vertical offset (relative to the font size) for the markers created for a scatter plot legend entry. 0.0 is at the base the legend text, and 1.0 is at the top. To draw all markers at the same height, set to \sphinxcode{\sphinxupquote{{[}0.5{]}}}. Default is \sphinxcode{\sphinxupquote{{[}0.375, 0.5, 0.3125{]}}}. \item[{\sphinxstylestrong{markerscale}}] \leavevmode{[}None or int or float{]} The relative size of legend markers compared with the originally drawn ones. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.markerscale"{]}}}}. \item[{\sphinxstylestrong{markerfirst}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, legend marker is placed to the left of the legend label. If \sphinxstyleemphasis{False}, legend marker is placed to the right of the legend label. Default is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}None or bool{]} Control whether the legend should be drawn on a patch (frame). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.frameon"{]}}}}. \item[{\sphinxstylestrong{fancybox}}] \leavevmode{[}None or bool{]} Control whether round edges should be enabled around the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} which makes up the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fancybox"{]}}}}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}None or bool{]} Control whether to draw a shadow behind the legend. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.shadow"{]}}}}. \item[{\sphinxstylestrong{framealpha}}] \leavevmode{[}None or float{]} Control the alpha transparency of the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.framealpha"{]}}}}. If shadow is activated and \sphinxstyleemphasis{framealpha} is \sphinxcode{\sphinxupquote{None}}, the default value is ignored. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.facecolor"{]}}}}. If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background patch edge color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.edgecolor"{]}}}} If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.edgecolor"{]}}}}. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"expand", None\}{]} If \sphinxcode{\sphinxupquote{mode}} is set to \sphinxcode{\sphinxupquote{"expand"}} the legend will be horizontally expanded to fill the axes area (or \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} if defines the legend's size). \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transform for the bounding box (\sphinxcode{\sphinxupquote{bbox\_to\_anchor}}). For a value of \sphinxcode{\sphinxupquote{None}} (default) the Axes' \sphinxcode{\sphinxupquote{transAxes}} transform will be used. \item[{\sphinxstylestrong{title}}] \leavevmode{[}str or None{]} The legend's title. Default is no title (\sphinxcode{\sphinxupquote{None}}). \item[{\sphinxstylestrong{title\_fontsize: str or None}}] \leavevmode The fontsize of the legend's title. Default is the default fontsize. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float or None{]} The fractional whitespace inside the legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderpad"{]}}}}. \item[{\sphinxstylestrong{labelspacing}}] \leavevmode{[}float or None{]} The vertical space between the legend entries. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.labelspacing"{]}}}}. \item[{\sphinxstylestrong{handlelength}}] \leavevmode{[}float or None{]} The length of the legend handles. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handlelength"{]}}}}. \item[{\sphinxstylestrong{handletextpad}}] \leavevmode{[}float or None{]} The pad between the legend handle and text. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handletextpad"{]}}}}. \item[{\sphinxstylestrong{borderaxespad}}] \leavevmode{[}float or None{]} The pad between the axes and legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderaxespad"{]}}}}. \item[{\sphinxstylestrong{columnspacing}}] \leavevmode{[}float or None{]} The spacing between columns. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.columnspacing"{]}}}}. \item[{\sphinxstylestrong{handler\_map}}] \leavevmode{[}dict or None{]} The custom dictionary mapping instances or types to a legend handler. This \sphinxcode{\sphinxupquote{handler\_map}} updates the default handler map found at {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend.get\_legend\_handler\_map()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Not all kinds of artist are supported by the legend command. See {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for details. \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{legend_00_00}.pdf} \end{figure} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.legend}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:examples-using-matplotlib-axes-axes-legend}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_legend.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_legend} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend:matplotlib-axes-axes-get-legend}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend::doc}}\index{get\_legend() (matplotlib.axes.Axes method)@\spxentry{get\_legend()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend:matplotlib.axes.Axes.get_legend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_legend}}}{\emph{self}}{} Return the \sphinxcode{\sphinxupquote{Legend}} instance, or None if no legend is defined. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_legend\_handles\_labels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels:matplotlib-axes-axes-get-legend-handles-labels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels::doc}}\index{get\_legend\_handles\_labels() (matplotlib.axes.Axes method)@\spxentry{get\_legend\_handles\_labels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_legend_handles_labels:matplotlib.axes.Axes.get_legend_handles_labels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_legend\_handles\_labels}}}{\emph{self}, \emph{legend\_handler\_map=None}}{} Return handles and labels for legend \sphinxcode{\sphinxupquote{ax.legend()}} is equivalent to \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{h}\PYG{p}{,} \PYG{n}{l} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}legend\PYGZus{}handles\PYGZus{}labels}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{n}{h}\PYG{p}{,} \PYG{n}{l}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subsubsection{Axis scales} \label{\detokenize{api/axes_api:axis-scales}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} & Set the x-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xscale:matplotlib.axes.Axes.get_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xscale}}}}} & Return the x-axis scale as string. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}} & Set the y-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yscale:matplotlib.axes.Axes.get_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yscale}}}}} & Return the y-axis scale as string. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.set\_xscale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib-axes-axes-set-xscale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale::doc}}\index{set\_xscale() (matplotlib.axes.Axes method)@\spxentry{set\_xscale()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xscale}}}{\emph{self}, \emph{value}, \emph{**kwargs}}{} Set the x-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_xscale}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:examples-using-matplotlib-axes-axes-set-xscale}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_scales.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_xscale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xscale:matplotlib-axes-axes-get-xscale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xscale::doc}}\index{get\_xscale() (matplotlib.axes.Axes method)@\spxentry{get\_xscale()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xscale:matplotlib.axes.Axes.get_xscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xscale}}}{\emph{self}}{} Return the x-axis scale as string. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xscale}}}}}}] \leavevmode \end{description} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_yscale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib-axes-axes-set-yscale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale::doc}}\index{set\_yscale() (matplotlib.axes.Axes method)@\spxentry{set\_yscale()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_yscale}}}{\emph{self}, \emph{value}, \emph{**kwargs}}{} Set the y-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_yscale}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:examples-using-matplotlib-axes-axes-set-yscale}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_scales.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_yscale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yscale:matplotlib-axes-axes-get-yscale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yscale::doc}}\index{get\_yscale() (matplotlib.axes.Axes method)@\spxentry{get\_yscale()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yscale:matplotlib.axes.Axes.get_yscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yscale}}}{\emph{self}}{} Return the y-axis scale as string. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_yscale}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{Autoscaling and margins} \label{\detokenize{api/axes_api:autoscaling-and-margins}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges:matplotlib.axes.Axes.use_sticky_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.use\_sticky\_edges}}}}} & When autoscaling, whether to obey all \sphinxcode{\sphinxupquote{Artist.sticky\_edges}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib.axes.Axes.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.margins}}}}} & Set or retrieve autoscaling margins. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xmargin}}}}} & Set padding of X data limits prior to autoscaling. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_ymargin}}}}} & Set padding of Y data limits prior to autoscaling. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.relim}}}}} & Recompute the data limits based on current artists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib.axes.Axes.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.autoscale}}}}} & Autoscale the axis view to the data (toggle). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.autoscale\_view}}}}} & Autoscale the view limits using the data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_autoscale\_on}}}}} & Set whether autoscaling is applied on plot commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscale_on:matplotlib.axes.Axes.get_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_autoscale\_on}}}}} & Get whether autoscaling is applied for both axes on plot commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_autoscalex\_on}}}}} & Set whether autoscaling for the x-axis is applied on plot commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscalex_on:matplotlib.axes.Axes.get_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_autoscalex\_on}}}}} & Get whether autoscaling for the x-axis is applied on plot commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_autoscaley\_on}}}}} & Set whether autoscaling for the y-axis is applied on plot commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscaley_on:matplotlib.axes.Axes.get_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_autoscaley\_on}}}}} & Get whether autoscaling for the y-axis is applied on plot commands \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.use\_sticky\_edges} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges:matplotlib-axes-axes-use-sticky-edges}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges::doc}}\index{use\_sticky\_edges (matplotlib.axes.Axes attribute)@\spxentry{use\_sticky\_edges}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges:matplotlib.axes.Axes.use_sticky_edges}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{use\_sticky\_edges}}} When autoscaling, whether to obey all \sphinxcode{\sphinxupquote{Artist.sticky\_edges}}. Default is \sphinxcode{\sphinxupquote{True}}. Setting this to \sphinxcode{\sphinxupquote{False}} ensures that the specified margins will be applied, even if the plot includes an image, for example, which would otherwise force a view limit to coincide with its data limit. The changing this property does not change the plot until {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib.axes.Axes.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}} is called. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.margins} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib-axes-axes-margins}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.margins::doc}}\index{margins() (matplotlib.axes.Axes method)@\spxentry{margins()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib.axes.Axes.margins}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{margins}}}{\emph{self}, \emph{*margins}, \emph{x=None}, \emph{y=None}, \emph{tight=True}}{} Set or retrieve autoscaling margins. The padding added to each limit of the axes is the \sphinxstyleemphasis{margin} times the data interval. All input parameters must be floats within the range {[}0, 1{]}. Passing both positional and keyword arguments is invalid and will raise a TypeError. If no arguments (positional or otherwise) are provided, the current margins will remain in place and simply be returned. Specifying any margin changes only the autoscaling; for example, if \sphinxstyleemphasis{xmargin} is not None, then \sphinxstyleemphasis{xmargin} times the X data interval will be added to each end of that interval before it is used in autoscaling. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*margins}}] \leavevmode{[}float, optional{]} If a single positional argument is provided, it specifies both margins of the x-axis and y-axis limits. If two positional arguments are provided, they will be interpreted as \sphinxstyleemphasis{xmargin}, \sphinxstyleemphasis{ymargin}. If setting the margin on a single axis is desired, use the keyword arguments described below. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float, optional{]} Specific margin values for the x-axis and y-axis, respectively. These cannot be used with positional arguments, but can be used individually to alter on e.g., only the y-axis. \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, default is True{]} The \sphinxstyleemphasis{tight} parameter is passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view()}}}}}, which is executed after a margin is changed; the default here is \sphinxstyleemphasis{True}, on the assumption that when margins are specified, no additional padding to match tick marks is usually desired. Set \sphinxstyleemphasis{tight} to \sphinxstyleemphasis{None} will preserve the previous setting. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmargin, ymargin}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If a previously used Axes method such as {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}} has set {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges:matplotlib.axes.Axes.use_sticky_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use\_sticky\_edges}}}}} to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, only the limits not set by the "sticky artists" will be modified. To force all of the margins to be set, set {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.use_sticky_edges:matplotlib.axes.Axes.use_sticky_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{use\_sticky\_edges}}}}} to \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} before calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:matplotlib.axes.Axes.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{margins()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.margins}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.margins:examples-using-matplotlib-axes-axes-margins}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \paragraph{matplotlib.axes.Axes.set\_xmargin} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib-axes-axes-set-xmargin}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin::doc}}\index{set\_xmargin() (matplotlib.axes.Axes method)@\spxentry{set\_xmargin()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xmargin}}}{\emph{self}, \emph{m}}{} Set padding of X data limits prior to autoscaling. \sphinxstyleemphasis{m} times the data interval will be added to each end of that interval before it is used in autoscaling. For example, if your data is in the range {[}0, 2{]}, a factor of \sphinxcode{\sphinxupquote{m = 0.1}} will result in a range {[}-0.2, 2.2{]}. Negative values -0.5 \textless{} m \textless{} 0 will result in clipping of the data range. I.e. for a data range {[}0, 2{]}, a factor of \sphinxcode{\sphinxupquote{m = -0.1}} will result in a range {[}0.2, 1.8{]}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{m}}] \leavevmode{[}float greater than -0.5{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_ymargin} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib-axes-axes-set-ymargin}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin::doc}}\index{set\_ymargin() (matplotlib.axes.Axes method)@\spxentry{set\_ymargin()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_ymargin}}}{\emph{self}, \emph{m}}{} Set padding of Y data limits prior to autoscaling. \sphinxstyleemphasis{m} times the data interval will be added to each end of that interval before it is used in autoscaling. For example, if your data is in the range {[}0, 2{]}, a factor of \sphinxcode{\sphinxupquote{m = 0.1}} will result in a range {[}-0.2, 2.2{]}. Negative values -0.5 \textless{} m \textless{} 0 will result in clipping of the data range. I.e. for a data range {[}0, 2{]}, a factor of \sphinxcode{\sphinxupquote{m = -0.1}} will result in a range {[}0.2, 1.8{]}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{m}}] \leavevmode{[}float greater than -0.5{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.relim} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib-axes-axes-relim}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.relim::doc}}\index{relim() (matplotlib.axes.Axes method)@\spxentry{relim()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{relim}}}{\emph{self}, \emph{visible\_only=False}}{} Recompute the data limits based on current artists. At present, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} instances are not supported. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{visible\_only}}] \leavevmode{[}bool{]} Whether to exclude invisible artists. Defaults to False. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.autoscale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib-axes-axes-autoscale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale::doc}}\index{autoscale() (matplotlib.axes.Axes method)@\spxentry{autoscale()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib.axes.Axes.autoscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}, \emph{enable=True}, \emph{axis='both'}, \emph{tight=None}}{} Autoscale the axis view to the data (toggle). Convenience method for simple axis view autoscaling. It turns autoscaling on or off, and then, if autoscaling for either axis is on, it performs the autoscaling on the specified axis or axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{enable}}] \leavevmode{[}bool or None, optional{]} True (default) turns autoscaling on, False turns it off. None leaves the autoscaling state unchanged. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} which axis to operate on; default is 'both' \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, optional{]} If True, set view limits to data limits; if False, let the locator and margins expand the view limits; if None, use tight scaling if the only artist is an image, otherwise treat \sphinxstyleemphasis{tight} as False. The \sphinxstyleemphasis{tight} setting is retained for future autoscaling until it is explicitly changed. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.autoscale\_view} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib-axes-axes-autoscale-view}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view::doc}}\index{autoscale\_view() (matplotlib.axes.Axes method)@\spxentry{autoscale\_view()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{autoscale\_view}}}{\emph{self}, \emph{tight=None}, \emph{scalex=True}, \emph{scaley=True}}{} Autoscale the view limits using the data limits. You can selectively autoscale only a single axis, e.g., the xaxis by setting \sphinxstyleemphasis{scaley} to \sphinxstyleemphasis{False}. The autoscaling preserves any axis direction reversal that has already been done. If \sphinxstyleemphasis{tight} is \sphinxstyleemphasis{False}, the axis major locator will be used to expand the view limits if rcParams{[}'axes.autolimit\_mode'{]} is 'round\_numbers'. Note that any margins that are in effect will be applied first, regardless of whether \sphinxstyleemphasis{tight} is \sphinxstyleemphasis{True} or \sphinxstyleemphasis{False}. Specifying \sphinxstyleemphasis{tight} as \sphinxstyleemphasis{True} or \sphinxstyleemphasis{False} saves the setting as a private attribute of the Axes; specifying it as \sphinxstyleemphasis{None} (the default) applies the previously saved value. The data limits are not updated automatically when artist data are changed after the artist has been added to an Axes instance. In that case, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.relim()}}}}} prior to calling autoscale\_view. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.autoscale\_view}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:examples-using-matplotlib-axes-axes-autoscale-view}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_compound\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_collection.py} \end{itemize} \paragraph{matplotlib.axes.Axes.set\_autoscale\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib-axes-axes-set-autoscale-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on::doc}}\index{set\_autoscale\_on() (matplotlib.axes.Axes method)@\spxentry{set\_autoscale\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_autoscale\_on}}}{\emph{self}, \emph{b}}{} Set whether autoscaling is applied on plot commands \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_autoscale\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscale_on:matplotlib-axes-axes-get-autoscale-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscale_on::doc}}\index{get\_autoscale\_on() (matplotlib.axes.Axes method)@\spxentry{get\_autoscale\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscale_on:matplotlib.axes.Axes.get_autoscale_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_autoscale\_on}}}{\emph{self}}{} Get whether autoscaling is applied for both axes on plot commands \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_autoscalex\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib-axes-axes-set-autoscalex-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on::doc}}\index{set\_autoscalex\_on() (matplotlib.axes.Axes method)@\spxentry{set\_autoscalex\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_autoscalex\_on}}}{\emph{self}, \emph{b}}{} Set whether autoscaling for the x-axis is applied on plot commands \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_autoscalex\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscalex_on:matplotlib-axes-axes-get-autoscalex-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscalex_on::doc}}\index{get\_autoscalex\_on() (matplotlib.axes.Axes method)@\spxentry{get\_autoscalex\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscalex_on:matplotlib.axes.Axes.get_autoscalex_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_autoscalex\_on}}}{\emph{self}}{} Get whether autoscaling for the x-axis is applied on plot commands \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_autoscaley\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib-axes-axes-set-autoscaley-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on::doc}}\index{set\_autoscaley\_on() (matplotlib.axes.Axes method)@\spxentry{set\_autoscaley\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_autoscaley\_on}}}{\emph{self}, \emph{b}}{} Set whether autoscaling for the y-axis is applied on plot commands \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_autoscaley\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscaley_on:matplotlib-axes-axes-get-autoscaley-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscaley_on::doc}}\index{get\_autoscaley\_on() (matplotlib.axes.Axes method)@\spxentry{get\_autoscaley\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_autoscaley_on:matplotlib.axes.Axes.get_autoscaley_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_autoscaley\_on}}}{\emph{self}}{} Get whether autoscaling for the y-axis is applied on plot commands \end{fulllineitems} \subsubsection{Aspect ratio} \label{\detokenize{api/axes_api:aspect-ratio}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect:matplotlib.axes.Axes.apply_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.apply\_aspect}}}}} & Adjust the Axes for a specified data aspect ratio. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}} & Set the aspect of the axis scaling, i.e. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_aspect:matplotlib.axes.Axes.get_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_aspect}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_adjustable}}}}} & Define which parameter the Axes will change to achieve a given aspect. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_adjustable:matplotlib.axes.Axes.get_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_adjustable}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.apply\_aspect} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect:matplotlib-axes-axes-apply-aspect}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect::doc}}\index{apply\_aspect() (matplotlib.axes.Axes method)@\spxentry{apply\_aspect()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.apply_aspect:matplotlib.axes.Axes.apply_aspect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{apply\_aspect}}}{\emph{self}, \emph{position=None}}{} Adjust the Axes for a specified data aspect ratio. Depending on {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_adjustable:matplotlib.axes.Axes.get_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_adjustable}}}}} this will modify either the Axes box (position) or the view limits. In the former case, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_anchor:matplotlib.axes.Axes.get_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_anchor}}}}} will affect the position. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_aspect}}}}}}] \leavevmode for a description of aspect ratio handling. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_adjustable}}}}}}] \leavevmode defining the parameter to adjust in order to meet the required aspect. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_anchor}}}}}}] \leavevmode defining the position in case of extra space. \end{description} \subsubsection*{Notes} This is called automatically when each Axes is drawn. You may need to call it yourself if you need to update the Axes position and/or view limits before the Figure is drawn. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_aspect} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib-axes-axes-set-aspect}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect::doc}}\index{set\_aspect() (matplotlib.axes.Axes method)@\spxentry{set\_aspect()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_aspect}}}{\emph{self}, \emph{aspect}, \emph{adjustable=None}, \emph{anchor=None}, \emph{share=False}}{} Set the aspect of the axis scaling, i.e. the ratio of y-unit to x-unit. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}\{'auto', 'equal'\} or num{]} Possible values: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily value &\sphinxstyletheadfamily description \\ \hline 'auto' & automatic; fill the position rectangle with data \\ \hline 'equal' & same scaling from data to plot units for x and y \\ \hline num & a circle will be stretched such that the height is num times the width. aspect=1 is the same as aspect='equal'. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{adjustable}}] \leavevmode{[}None or \{'box', 'datalim'\}, optional{]} If not \sphinxcode{\sphinxupquote{None}}, this defines which parameter will be adjusted to meet the required aspect. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_adjustable}}}}} for further details. \item[{\sphinxstylestrong{anchor}}] \leavevmode{[}None or str or 2-tuple of float, optional{]} If not \sphinxcode{\sphinxupquote{None}}, this defines where the Axes will be drawn if there is extra space due to aspect constraints. The most common way to to specify the anchor are abbreviations of cardinal directions: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily value &\sphinxstyletheadfamily description \\ \hline 'C' & centered \\ \hline 'SW' & lower left corner \\ \hline 'S' & middle of bottom edge \\ \hline 'SE' & lower right corner \\ \hline etc. &\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_anchor}}}}} for further details. \item[{\sphinxstylestrong{share}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, apply the settings to all shared Axes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_adjustable}}}}}}] \leavevmode defining the parameter to adjust in order to meet the required aspect. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_anchor}}}}}}] \leavevmode defining the position in case of extra space. \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_aspect}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:examples-using-matplotlib-axes-axes-set-aspect}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \paragraph{matplotlib.axes.Axes.get\_aspect} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_aspect:matplotlib-axes-axes-get-aspect}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_aspect::doc}}\index{get\_aspect() (matplotlib.axes.Axes method)@\spxentry{get\_aspect()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_aspect:matplotlib.axes.Axes.get_aspect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_aspect}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_adjustable} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib-axes-axes-set-adjustable}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable::doc}}\index{set\_adjustable() (matplotlib.axes.Axes method)@\spxentry{set\_adjustable()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_adjustable}}}{\emph{self}, \emph{adjustable}, \emph{share=False}}{} Define which parameter the Axes will change to achieve a given aspect. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{adjustable}}] \leavevmode{[}\{'box', 'datalim'\}{]} If 'box', change the physical dimensions of the Axes. If 'datalim', change the \sphinxcode{\sphinxupquote{x}} or \sphinxcode{\sphinxupquote{y}} data limits. \item[{\sphinxstylestrong{share}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, apply the settings to all shared Axes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_aspect}}}}}}] \leavevmode for a description of aspect handling. \end{description} \subsubsection*{Notes} Shared Axes (of which twinned Axes are a special case) impose restrictions on how aspect ratios can be imposed. For twinned Axes, use 'datalim'. For Axes that share both x and y, use 'box'. Otherwise, either 'datalim' or 'box' may be used. These limitations are partly a requirement to avoid over-specification, and partly a result of the particular implementation we are currently using, in which the adjustments for aspect ratios are done sequentially and independently on each Axes as it is drawn. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_adjustable} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_adjustable:matplotlib-axes-axes-get-adjustable}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_adjustable::doc}}\index{get\_adjustable() (matplotlib.axes.Axes method)@\spxentry{get\_adjustable()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_adjustable:matplotlib.axes.Axes.get_adjustable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_adjustable}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{Ticks and tick labels} \label{\detokenize{api/axes_api:ticks-and-tick-labels}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xticks}}}}} & Set the x ticks with list of \sphinxstyleemphasis{ticks} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticks:matplotlib.axes.Axes.get_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xticks}}}}} & Return the x ticks as a list of locations \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xticklabels}}}}} & Set the x-tick labels with list of string labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels:matplotlib.axes.Axes.get_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xticklabels}}}}} & Get the x tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xmajorticklabels:matplotlib.axes.Axes.get_xmajorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xmajorticklabels}}}}} & Get the major x tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xminorticklabels:matplotlib.axes.Axes.get_xminorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xminorticklabels}}}}} & Get the minor x tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xgridlines:matplotlib.axes.Axes.get_xgridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xgridlines}}}}} & Get the x grid lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklines:matplotlib.axes.Axes.get_xticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xticklines}}}}} & Get the x tick lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_date:matplotlib.axes.Axes.xaxis_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.xaxis\_date}}}}} & Sets up x-axis ticks and labels that treat the x data as dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yticks}}}}} & Set the y ticks with list of \sphinxstyleemphasis{ticks} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks:matplotlib.axes.Axes.get_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yticks}}}}} & Return the y ticks as a list of locations \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yticklabels}}}}} & Set the y-tick labels with list of strings labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels:matplotlib.axes.Axes.get_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yticklabels}}}}} & Get the y tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ymajorticklabels:matplotlib.axes.Axes.get_ymajorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_ymajorticklabels}}}}} & Get the major y tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yminorticklabels:matplotlib.axes.Axes.get_yminorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yminorticklabels}}}}} & Get the minor y tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ygridlines:matplotlib.axes.Axes.get_ygridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_ygridlines}}}}} & Get the y grid lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklines:matplotlib.axes.Axes.get_yticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yticklines}}}}} & Get the y tick lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_date:matplotlib.axes.Axes.yaxis_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.yaxis\_date}}}}} & Sets up y-axis ticks and labels that treat the y data as dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_off:matplotlib.axes.Axes.minorticks_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.minorticks\_off}}}}} & Remove minor ticks from the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_on:matplotlib.axes.Axes.minorticks_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.minorticks\_on}}}}} & Display minor ticks on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.ticklabel\_format}}}}} & Change the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} used by default for linear axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.tick\_params}}}}} & Change the appearance of ticks, tick labels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params:matplotlib.axes.Axes.locator_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.locator\_params}}}}} & Control behavior of major tick locators. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axes.Axes.set\_xticks} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib-axes-axes-set-xticks}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks::doc}}\index{set\_xticks() (matplotlib.axes.Axes method)@\spxentry{set\_xticks()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xticks}}}{\emph{self}, \emph{ticks}, \emph{minor=False}}{} Set the x ticks with list of \sphinxstyleemphasis{ticks} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}list{]} List of x-axis tick locations. \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{False}} sets major ticks, if \sphinxcode{\sphinxupquote{True}} sets minor ticks. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xticks} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticks:matplotlib-axes-axes-get-xticks}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticks::doc}}\index{get\_xticks() (matplotlib.axes.Axes method)@\spxentry{get\_xticks()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticks:matplotlib.axes.Axes.get_xticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xticks}}}{\emph{self}, \emph{minor=False}}{} Return the x ticks as a list of locations \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_xticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib-axes-axes-set-xticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels::doc}}\index{set\_xticklabels() (matplotlib.axes.Axes method)@\spxentry{set\_xticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_xticklabels}}}{\emph{self}, \emph{labels}, \emph{fontdict=None}, \emph{minor=False}, \emph{**kwargs}}{} Set the x-tick labels with list of string labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}List{[}str{]}{]} List of string labels. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict, optional{]} A dictionary controlling the appearance of the ticklabels. The default \sphinxcode{\sphinxupquote{fontdict}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titleweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{verticalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{baseline}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{loc}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool, optional{]} Whether to set the minor ticklabels rather than the major ones. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances.}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels:matplotlib-axes-axes-get-xticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels::doc}}\index{get\_xticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_xticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels:matplotlib.axes.Axes.get_xticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xticklabels}}}{\emph{self}, \emph{minor=False}, \emph{which=None}}{} Get the x tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool, optional{]} If True return the minor ticklabels, else return the major ticklabels. \item[{\sphinxstylestrong{which}}] \leavevmode{[}None, ('minor', 'major', 'both'){]} Overrides \sphinxcode{\sphinxupquote{minor}}. Selects which ticklabels to return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xmajorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xmajorticklabels:matplotlib-axes-axes-get-xmajorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xmajorticklabels::doc}}\index{get\_xmajorticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_xmajorticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xmajorticklabels:matplotlib.axes.Axes.get_xmajorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xmajorticklabels}}}{\emph{self}}{} Get the major x tick labels. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xminorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xminorticklabels:matplotlib-axes-axes-get-xminorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xminorticklabels::doc}}\index{get\_xminorticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_xminorticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xminorticklabels:matplotlib.axes.Axes.get_xminorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xminorticklabels}}}{\emph{self}}{} Get the minor x tick labels. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xgridlines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xgridlines:matplotlib-axes-axes-get-xgridlines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xgridlines::doc}}\index{get\_xgridlines() (matplotlib.axes.Axes method)@\spxentry{get\_xgridlines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xgridlines:matplotlib.axes.Axes.get_xgridlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xgridlines}}}{\emph{self}}{} Get the x grid lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_xticklines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklines:matplotlib-axes-axes-get-xticklines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklines::doc}}\index{get\_xticklines() (matplotlib.axes.Axes method)@\spxentry{get\_xticklines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklines:matplotlib.axes.Axes.get_xticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xticklines}}}{\emph{self}}{} Get the x tick lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.xaxis\_date} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_date:matplotlib-axes-axes-xaxis-date}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_date::doc}}\index{xaxis\_date() (matplotlib.axes.Axes method)@\spxentry{xaxis\_date()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.xaxis_date:matplotlib.axes.Axes.xaxis_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{xaxis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up x-axis ticks and labels that treat the x data as dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tz}}] \leavevmode{[}string or \sphinxcode{\sphinxupquote{tzinfo}} instance, optional{]} Timezone. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"timezone"{]}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_yticks} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib-axes-axes-set-yticks}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks::doc}}\index{set\_yticks() (matplotlib.axes.Axes method)@\spxentry{set\_yticks()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_yticks}}}{\emph{self}, \emph{ticks}, \emph{minor=False}}{} Set the y ticks with list of \sphinxstyleemphasis{ticks} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}list{]} List of y-axis tick locations \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{False}} sets major ticks, if \sphinxcode{\sphinxupquote{True}} sets minor ticks. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_yticks} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks:matplotlib-axes-axes-get-yticks}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks::doc}}\index{get\_yticks() (matplotlib.axes.Axes method)@\spxentry{get\_yticks()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks:matplotlib.axes.Axes.get_yticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yticks}}}{\emph{self}, \emph{minor=False}}{} Return the y ticks as a list of locations \end{fulllineitems} \paragraph{matplotlib.axes.Axes.set\_yticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib-axes-axes-set-yticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels::doc}}\index{set\_yticklabels() (matplotlib.axes.Axes method)@\spxentry{set\_yticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_yticklabels}}}{\emph{self}, \emph{labels}, \emph{fontdict=None}, \emph{minor=False}, \emph{**kwargs}}{} Set the y-tick labels with list of strings labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}List{[}str{]}{]} list of string labels \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict, optional{]} A dictionary controlling the appearance of the ticklabels. The default \sphinxcode{\sphinxupquote{fontdict}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titleweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{verticalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{baseline}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{loc}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool, optional{]} Whether to set the minor ticklabels rather than the major ones. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances.}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_yticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels:matplotlib-axes-axes-get-yticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels::doc}}\index{get\_yticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_yticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels:matplotlib.axes.Axes.get_yticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yticklabels}}}{\emph{self}, \emph{minor=False}, \emph{which=None}}{} Get the y tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True return the minor ticklabels, else return the major ticklabels \item[{\sphinxstylestrong{which}}] \leavevmode{[}None, ('minor', 'major', 'both'){]} Overrides \sphinxcode{\sphinxupquote{minor}}. Selects which ticklabels to return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_ymajorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ymajorticklabels:matplotlib-axes-axes-get-ymajorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ymajorticklabels::doc}}\index{get\_ymajorticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_ymajorticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ymajorticklabels:matplotlib.axes.Axes.get_ymajorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_ymajorticklabels}}}{\emph{self}}{} Get the major y tick labels. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_yminorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yminorticklabels:matplotlib-axes-axes-get-yminorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yminorticklabels::doc}}\index{get\_yminorticklabels() (matplotlib.axes.Axes method)@\spxentry{get\_yminorticklabels()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yminorticklabels:matplotlib.axes.Axes.get_yminorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yminorticklabels}}}{\emph{self}}{} Get the minor y tick labels. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_ygridlines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ygridlines:matplotlib-axes-axes-get-ygridlines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ygridlines::doc}}\index{get\_ygridlines() (matplotlib.axes.Axes method)@\spxentry{get\_ygridlines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ygridlines:matplotlib.axes.Axes.get_ygridlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_ygridlines}}}{\emph{self}}{} Get the y grid lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.get\_yticklines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklines:matplotlib-axes-axes-get-yticklines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklines::doc}}\index{get\_yticklines() (matplotlib.axes.Axes method)@\spxentry{get\_yticklines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklines:matplotlib.axes.Axes.get_yticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yticklines}}}{\emph{self}}{} Get the y tick lines as a list of \sphinxcode{\sphinxupquote{Line2D}} instances. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.yaxis\_date} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_date:matplotlib-axes-axes-yaxis-date}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_date::doc}}\index{yaxis\_date() (matplotlib.axes.Axes method)@\spxentry{yaxis\_date()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.yaxis_date:matplotlib.axes.Axes.yaxis_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{yaxis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up y-axis ticks and labels that treat the y data as dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tz}}] \leavevmode{[}string or \sphinxcode{\sphinxupquote{tzinfo}} instance, optional{]} Timezone. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"timezone"{]}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axes.Axes.minorticks\_off} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_off:matplotlib-axes-axes-minorticks-off}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_off::doc}}\index{minorticks\_off() (matplotlib.axes.Axes method)@\spxentry{minorticks\_off()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_off:matplotlib.axes.Axes.minorticks_off}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{minorticks\_off}}}{\emph{self}}{} Remove minor ticks from the axes. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.minorticks\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_on:matplotlib-axes-axes-minorticks-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_on::doc}}\index{minorticks\_on() (matplotlib.axes.Axes method)@\spxentry{minorticks\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_on:matplotlib.axes.Axes.minorticks_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{minorticks\_on}}}{\emph{self}}{} Display minor ticks on the axes. Displaying minor ticks may reduce performance; you may turn them off using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.minorticks_off:matplotlib.axes.Axes.minorticks_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_off()}}}}} if drawing speed is a problem. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.ticklabel\_format} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib-axes-axes-ticklabel-format}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format::doc}}\index{ticklabel\_format() (matplotlib.axes.Axes method)@\spxentry{ticklabel\_format()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{ticklabel\_format}}}{\emph{self}, \emph{*}, \emph{axis='both'}, \emph{style=''}, \emph{scilimits=None}, \emph{useOffset=None}, \emph{useLocale=None}, \emph{useMathText=None}}{} Change the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} used by default for linear axes. Optional keyword arguments: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Keyword &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{axis} & {[} 'x' \textbar{} 'y' \textbar{} 'both' {]} \\ \hline \sphinxstyleemphasis{style} & {[} 'sci' (or 'scientific') \textbar{} 'plain' {]} plain turns off scientific notation \\ \hline \sphinxstyleemphasis{scilimits} & (m, n), pair of integers; if \sphinxstyleemphasis{style} is 'sci', scientific notation will be used for numbers outside the range 10$^{\text{m}}$ to 10$^{\text{n}}$. Use (0,0) to include all numbers. Use (m,m) where m \textless{}\textgreater{} 0 to fix the order of magnitude to 10$^{\text{m}}$. \\ \hline \sphinxstyleemphasis{useOffset} & {[} bool \textbar{} offset {]}; if True, the offset will be calculated as needed; if False, no offset will be used; if a numeric offset is specified, it will be used. \\ \hline \sphinxstyleemphasis{useLocale} & If True, format the number according to the current locale. This affects things such as the character used for the decimal separator. If False, use C-style (English) formatting. The default setting is controlled by the axes.formatter.use\_locale rcparam. \\ \hline \sphinxstyleemphasis{useMathText} & If True, render the offset and scientific notation in mathtext \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Only the major ticks are affected. If the method is called when the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} is not the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} being used, an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#AttributeError}{\sphinxcode{\sphinxupquote{AttributeError}}} will be raised. \end{fulllineitems} \paragraph{matplotlib.axes.Axes.tick\_params} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib-axes-axes-tick-params}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params::doc}}\index{tick\_params() (matplotlib.axes.Axes method)@\spxentry{tick\_params()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{tick\_params}}}{\emph{self}, \emph{axis='both'}, \emph{**kwargs}}{} Change the appearance of ticks, tick labels, and gridlines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'x', 'y', 'both'\}, optional{]} Which axis to apply the parameters to. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'x', 'y', 'both'\}{]} Axis on which to operate; default is 'both'. \item[{\sphinxstylestrong{reset}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, set all parameters to defaults before processing other keyword arguments. Default is \sphinxstyleemphasis{False}. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}{]} Default is 'major'; apply arguments to \sphinxstyleemphasis{which} ticks. \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{'in', 'out', 'inout'\}{]} Puts ticks inside the axes, outside the axes, or both. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float{]} Tick length in points. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} Tick width in points. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} Tick color; accepts any mpl color spec. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Distance in points between tick and label. \item[{\sphinxstylestrong{labelsize}}] \leavevmode{[}float or str{]} Tick label font size in points or as a string (e.g., 'large'). \item[{\sphinxstylestrong{labelcolor}}] \leavevmode{[}color{]} Tick label color; mpl color spec. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color{]} Changes the tick color and the label color to the same value: mpl color spec. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}float{]} Tick and label zorder. \item[{\sphinxstylestrong{bottom, top, left, right}}] \leavevmode{[}bool{]} Whether to draw the respective ticks. \item[{\sphinxstylestrong{labelbottom, labeltop, labelleft, labelright}}] \leavevmode{[}bool{]} Whether to draw the respective tick labels. \item[{\sphinxstylestrong{labelrotation}}] \leavevmode{[}float{]} Tick label rotation \item[{\sphinxstylestrong{grid\_color}}] \leavevmode{[}color{]} Changes the gridline color to the given mpl color spec. \item[{\sphinxstylestrong{grid\_alpha}}] \leavevmode{[}float{]} Transparency of gridlines: 0 (transparent) to 1 (opaque). \item[{\sphinxstylestrong{grid\_linewidth}}] \leavevmode{[}float{]} Width of gridlines in points. \item[{\sphinxstylestrong{grid\_linestyle}}] \leavevmode{[}string{]} Any valid {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} line style spec. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Usage \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{direction}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{out}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{length}\PYG{o}{=}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{grid\PYGZus{}color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{grid\PYGZus{}alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} This will make all major ticks be red, pointing out of the box, and with dimensions 6 points by 2 points. Tick labels will also be red. Gridlines will be red and translucent. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.tick\_params}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:examples-using-matplotlib-axes-axes-tick-params}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_two\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \paragraph{matplotlib.axes.Axes.locator\_params} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params:matplotlib-axes-axes-locator-params}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params::doc}}\index{locator\_params() (matplotlib.axes.Axes method)@\spxentry{locator\_params()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params:matplotlib.axes.Axes.locator_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{locator\_params}}}{\emph{self}, \emph{axis='both'}, \emph{tight=None}, \emph{**kwargs}}{} Control behavior of major tick locators. Because the locator is involved in autoscaling, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}} is called automatically after the parameters are changed. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} The axis on which to operate. \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, optional{]} Parameter passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}}. Default is None, for no change. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Remaining keyword arguments are passed to directly to the \sphinxcode{\sphinxupquote{set\_params()}} method of the locator. Supported keywords depend on the type of the locator. See for example {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.set_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_params}}}}} for the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticker.MaxNLocator}}}}} used by default for linear axes. \end{description} \end{description}\end{quote} \subsubsection*{Examples} When plotting small subplots, one might want to reduce the maximum number of ticks and use tight bounds, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{locator\PYGZus{}params}\PYG{p}{(}\PYG{n}{tight}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subsection{Units} \label{\detokenize{api/axes_api:units}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_xunits:matplotlib.axes.Axes.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_yunits:matplotlib.axes.Axes.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.have_units:matplotlib.axes.Axes.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_xunits:matplotlib-axes-axes-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axes.Axes method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_xunits:matplotlib.axes.Axes.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_yunits:matplotlib-axes-axes-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axes.Axes method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.convert_yunits:matplotlib.axes.Axes.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.have_units:matplotlib-axes-axes-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.have_units::doc}}\index{have\_units() (matplotlib.axes.Axes method)@\spxentry{have\_units()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.have_units:matplotlib.axes.Axes.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subsection{Adding Artists} \label{\detokenize{api/axes_api:adding-artists}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:matplotlib.axes.Axes.add_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_artist}}}}} & Add an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} to the axes, and return the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_child_axes:matplotlib.axes.Axes.add_child_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_child\_axes}}}}} & Add an \sphinxcode{\sphinxupquote{AxesBase}} to the axes' children; return the child axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_collection:matplotlib.axes.Axes.add_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_collection}}}}} & Add a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} to the axes' collections; return the collection. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_container:matplotlib.axes.Axes.add_container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_container}}}}} & Add a {\hyperref[\detokenize{api/container_api:matplotlib.container.Container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Container}}}}} to the axes' containers; return the container. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_image:matplotlib.axes.Axes.add_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_image}}}}} & Add an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} to the axes' images; return the image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line:matplotlib.axes.Axes.add_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_line}}}}} & Add a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} to the axes' lines; return the line. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch:matplotlib.axes.Axes.add_patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_patch}}}}} & Add a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the axes' patches; return the patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib.axes.Axes.add_table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_table}}}}} & Add a {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} to the axes' tables; return the table. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.add\_artist} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:matplotlib-axes-axes-add-artist}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist::doc}}\index{add\_artist() (matplotlib.axes.Axes method)@\spxentry{add\_artist()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:matplotlib.axes.Axes.add_artist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{} Add an {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} to the axes, and return the artist. Use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:matplotlib.axes.Axes.add_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_artist}}}}} only for artists for which there is no dedicated "add" method; and if necessary, use a method such as {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.update_datalim:matplotlib.axes.Axes.update_datalim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_datalim}}}}} to manually update the dataLim if the artist is to be included in autoscaling. If no \sphinxcode{\sphinxupquote{transform}} has been specified when creating the artist (e.g. \sphinxcode{\sphinxupquote{artist.get\_transform() == None}}) then the transform is set to \sphinxcode{\sphinxupquote{ax.transData}}. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.add\_artist}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:examples-using-matplotlib-axes-axes-add-artist}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.add\_child\_axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_child_axes:matplotlib-axes-axes-add-child-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_child_axes::doc}}\index{add\_child\_axes() (matplotlib.axes.Axes method)@\spxentry{add\_child\_axes()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_child_axes:matplotlib.axes.Axes.add_child_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_child\_axes}}}{\emph{self}, \emph{ax}}{} Add an \sphinxcode{\sphinxupquote{AxesBase}} to the axes' children; return the child axes. This is the lowlevel version. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.inset_axes:matplotlib.axes.Axes.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes.inset\_axes}}}}}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.add\_collection} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_collection:matplotlib-axes-axes-add-collection}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_collection::doc}}\index{add\_collection() (matplotlib.axes.Axes method)@\spxentry{add\_collection()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_collection:matplotlib.axes.Axes.add_collection}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_collection}}}{\emph{self}, \emph{collection}, \emph{autolim=True}}{} Add a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} to the axes' collections; return the collection. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.add\_collection}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_collection:examples-using-matplotlib-axes-axes-add-collection}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_span\_regions.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.add\_container} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_container:matplotlib-axes-axes-add-container}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_container::doc}}\index{add\_container() (matplotlib.axes.Axes method)@\spxentry{add\_container()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_container:matplotlib.axes.Axes.add_container}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_container}}}{\emph{self}, \emph{container}}{} Add a {\hyperref[\detokenize{api/container_api:matplotlib.container.Container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Container}}}}} to the axes' containers; return the container. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.add\_image} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_image:matplotlib-axes-axes-add-image}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_image::doc}}\index{add\_image() (matplotlib.axes.Axes method)@\spxentry{add\_image()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_image:matplotlib.axes.Axes.add_image}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_image}}}{\emph{self}, \emph{image}}{} Add an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} to the axes' images; return the image. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.add\_line} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line:matplotlib-axes-axes-add-line}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line::doc}}\index{add\_line() (matplotlib.axes.Axes method)@\spxentry{add\_line()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line:matplotlib.axes.Axes.add_line}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_line}}}{\emph{self}, \emph{line}}{} Add a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} to the axes' lines; return the line. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.add\_line}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_line:examples-using-matplotlib-axes-axes-add-line}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_line\_with\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.add\_patch} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch:matplotlib-axes-axes-add-patch}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch::doc}}\index{add\_patch() (matplotlib.axes.Axes method)@\spxentry{add\_patch()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch:matplotlib.axes.Axes.add_patch}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_patch}}}{\emph{self}, \emph{p}}{} Add a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the axes' patches; return the patch. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.add\_patch}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_patch:examples-using-matplotlib-axes-axes-add-patch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_compound\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_path\_patch.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_quad\_bezier.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_histogram\_path.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.add\_table} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib-axes-axes-add-table}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table::doc}}\index{add\_table() (matplotlib.axes.Axes method)@\spxentry{add\_table()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib.axes.Axes.add_table}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_table}}}{\emph{self}, \emph{tab}}{} Add a {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} to the axes' tables; return the table. \end{fulllineitems} \subsection{Twinning} \label{\detokenize{api/axes_api:twinning}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx:matplotlib.axes.Axes.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.twinx}}}}} & Create a twin Axes sharing the xaxis \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny:matplotlib.axes.Axes.twiny}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.twiny}}}}} & Create a twin Axes sharing the yaxis \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_x_axes:matplotlib.axes.Axes.get_shared_x_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_shared\_x\_axes}}}}} & Return a reference to the shared axes Grouper object for x axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_y_axes:matplotlib.axes.Axes.get_shared_y_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_shared\_y\_axes}}}}} & Return a reference to the shared axes Grouper object for y axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.twinx} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx:matplotlib-axes-axes-twinx}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx::doc}}\index{twinx() (matplotlib.axes.Axes method)@\spxentry{twinx()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx:matplotlib.axes.Axes.twinx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{twinx}}}{\emph{self}}{} Create a twin Axes sharing the xaxis Create a new Axes instance with an invisible x-axis and an independent y-axis positioned opposite to the original one (i.e. at right). The x-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both y-axes align, see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearLocator}}}}} \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax\_twin}}] \leavevmode{[}Axes{]} The newly created Axes instance \end{description} \end{description}\end{quote} \subsubsection*{Notes} For those who are 'picking' artists while using twinx, pick events are only called for the artists in the top-most axes. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.twinx}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twinx:examples-using-matplotlib-axes-axes-twinx}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_two\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.twiny} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny:matplotlib-axes-axes-twiny}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny::doc}}\index{twiny() (matplotlib.axes.Axes method)@\spxentry{twiny()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny:matplotlib.axes.Axes.twiny}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{twiny}}}{\emph{self}}{} Create a twin Axes sharing the yaxis Create a new Axes instance with an invisible y-axis and an independent x-axis positioned opposite to the original one (i.e. at top). The y-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both x-axes align, see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearLocator}}}}} \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax\_twin}}] \leavevmode{[}Axes{]} The newly created Axes instance \end{description} \end{description}\end{quote} \subsubsection*{Notes} For those who are 'picking' artists while using twiny, pick events are only called for the artists in the top-most axes. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.twiny}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.twiny:examples-using-matplotlib-axes-axes-twiny}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_two\_scales.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.get\_shared\_x\_axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_x_axes:matplotlib-axes-axes-get-shared-x-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_x_axes::doc}}\index{get\_shared\_x\_axes() (matplotlib.axes.Axes method)@\spxentry{get\_shared\_x\_axes()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_x_axes:matplotlib.axes.Axes.get_shared_x_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_shared\_x\_axes}}}{\emph{self}}{} Return a reference to the shared axes Grouper object for x axes. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_shared\_y\_axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_y_axes:matplotlib-axes-axes-get-shared-y-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_y_axes::doc}}\index{get\_shared\_y\_axes() (matplotlib.axes.Axes method)@\spxentry{get\_shared\_y\_axes()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_shared_y_axes:matplotlib.axes.Axes.get_shared_y_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_shared\_y\_axes}}}{\emph{self}}{} Return a reference to the shared axes Grouper object for y axes. \end{fulllineitems} \subsection{Axes Position} \label{\detokenize{api/axes_api:axes-position}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_anchor:matplotlib.axes.Axes.get_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_anchor}}}}} & Get the anchor location. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_anchor}}}}} & Define the anchor location. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axes_locator:matplotlib.axes.Axes.get_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_axes\_locator}}}}} & Return the axes\_locator. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_axes\_locator}}}}} & Set the axes locator. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.reset_position:matplotlib.axes.Axes.reset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.reset\_position}}}}} & Reset the active position to the original position. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib.axes.Axes.get_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_position}}}}} & Get a copy of the axes rectangle as a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_position}}}}} & Set the axes position. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.get\_anchor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_anchor:matplotlib-axes-axes-get-anchor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_anchor::doc}}\index{get\_anchor() (matplotlib.axes.Axes method)@\spxentry{get\_anchor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_anchor:matplotlib.axes.Axes.get_anchor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_anchor}}}{\emph{self}}{} Get the anchor location. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_anchor}}}}}}] \leavevmode for a description of the anchor. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_aspect}}}}}}] \leavevmode for a description of aspect handling. \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_anchor} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib-axes-axes-set-anchor}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor::doc}}\index{set\_anchor() (matplotlib.axes.Axes method)@\spxentry{set\_anchor()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_anchor}}}{\emph{self}, \emph{anchor}, \emph{share=False}}{} Define the anchor location. The actual drawing area (active position) of the Axes may be smaller than the Bbox (original position) when a fixed aspect is required. The anchor defines where the drawing area will be located within the available space. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{anchor}}] \leavevmode{[}2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\}{]} The anchor position may be either: \begin{itemize} \item {} a sequence (\sphinxstyleemphasis{cx}, \sphinxstyleemphasis{cy}). \sphinxstyleemphasis{cx} and \sphinxstyleemphasis{cy} may range from 0 to 1, where 0 is left or bottom and 1 is right or top. \item {} a string using cardinal directions as abbreviation: \begin{itemize} \item {} 'C' for centered \item {} 'S' (south) for bottom-center \item {} 'SW' (south west) for bottom-left \item {} etc. \end{itemize} Here is an overview of the possible positions: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline 'NW' & 'N' & 'NE' \\ \hline 'W' & 'C' & 'E' \\ \hline 'SW' & 'S' & 'SE' \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{itemize} \item[{\sphinxstylestrong{share}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, apply the settings to all shared Axes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_aspect}}}}}}] \leavevmode for a description of aspect handling. \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_axes\_locator} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axes_locator:matplotlib-axes-axes-get-axes-locator}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axes_locator::doc}}\index{get\_axes\_locator() (matplotlib.axes.Axes method)@\spxentry{get\_axes\_locator()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_axes_locator:matplotlib.axes.Axes.get_axes_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_axes\_locator}}}{\emph{self}}{} Return the axes\_locator. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_axes\_locator} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib-axes-axes-set-axes-locator}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator::doc}}\index{set\_axes\_locator() (matplotlib.axes.Axes method)@\spxentry{set\_axes\_locator()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_axes\_locator}}}{\emph{self}, \emph{locator}}{} Set the axes locator. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}Callable{[}{[}Axes, Renderer{]}, Bbox{]}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.reset\_position} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.reset_position:matplotlib-axes-axes-reset-position}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.reset_position::doc}}\index{reset\_position() (matplotlib.axes.Axes method)@\spxentry{reset\_position()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.reset_position:matplotlib.axes.Axes.reset_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{reset\_position}}}{\emph{self}}{} Reset the active position to the original position. This resets the a possible position change due to aspect constraints. For an explanation of the positions see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position}}}}}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_position} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib-axes-axes-get-position}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position::doc}}\index{get\_position() (matplotlib.axes.Axes method)@\spxentry{get\_position()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:matplotlib.axes.Axes.get_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}, \emph{original=False}}{} Get a copy of the axes rectangle as a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{original}}] \leavevmode{[}bool{]} If \sphinxcode{\sphinxupquote{True}}, return the original position. Otherwise return the active position. For an explanation of the positions see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pos}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.get\_position}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_position:examples-using-matplotlib-axes-axes-get-position}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.set\_position} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib-axes-axes-set-position}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position::doc}}\index{set\_position() (matplotlib.axes.Axes method)@\spxentry{set\_position()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_position}}}{\emph{self}, \emph{pos}, \emph{which='both'}}{} Set the axes position. Axes have two position attributes. The 'original' position is the position allocated for the Axes. The 'active' position is the position the Axes is actually drawn at. These positions are usually the same unless a fixed aspect is set to the Axes. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_aspect}}}}} for details. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pos}}] \leavevmode{[}{[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} The new position of the in {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} coordinates. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'both', 'active', 'original'\}, optional{]} Determines which position variables to change. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set\_position}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:examples-using-matplotlib-axes-axes-set-position}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \subsection{Async/Event based} \label{\detokenize{api/axes_api:async-event-based}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stale:matplotlib.axes.Axes.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pchanged:matplotlib.axes.Axes.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback:matplotlib.axes.Axes.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib.axes.Axes.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.stale} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stale:matplotlib-axes-axes-stale}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stale::doc}}\index{stale (matplotlib.axes.Axes attribute)@\spxentry{stale}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.stale:matplotlib.axes.Axes.stale}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pchanged:matplotlib-axes-axes-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pchanged::doc}}\index{pchanged() (matplotlib.axes.Axes method)@\spxentry{pchanged()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pchanged:matplotlib.axes.Axes.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback:matplotlib.axes.Axes.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib.axes.Axes.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback:matplotlib-axes-axes-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback::doc}}\index{add\_callback() (matplotlib.axes.Axes method)@\spxentry{add\_callback()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback:matplotlib.axes.Axes.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib.axes.Axes.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib.axes.Axes.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib-axes-axes-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback::doc}}\index{remove\_callback() (matplotlib.axes.Axes method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove_callback:matplotlib.axes.Axes.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_callback:matplotlib.axes.Axes.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsection{Interactive} \label{\detokenize{api/axes_api:interactive}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.can_pan:matplotlib.axes.Axes.can_pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.can\_pan}}}}} & Return \sphinxstyleemphasis{True} if this axes supports any pan/zoom button functionality. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.can_zoom:matplotlib.axes.Axes.can_zoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.can\_zoom}}}}} & Return \sphinxstyleemphasis{True} if this axes supports the zoom box button functionality. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate:matplotlib.axes.Axes.get_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_navigate}}}}} & Get whether the axes responds to navigation commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_navigate}}}}} & Set whether the axes responds to navigation toolbar commands \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate_mode:matplotlib.axes.Axes.get_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_navigate\_mode}}}}} & Get the navigation toolbar button status: 'PAN', 'ZOOM', or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_navigate\_mode}}}}} & Set the navigation toolbar button status; \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.start_pan:matplotlib.axes.Axes.start_pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.start\_pan}}}}} & Called when a pan operation has started. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.drag_pan:matplotlib.axes.Axes.drag_pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.drag\_pan}}}}} & Called when the mouse moves during a pan operation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.end_pan:matplotlib.axes.Axes.end_pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.end\_pan}}}}} & Called when a pan operation completes (when the mouse button is up.) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_coord:matplotlib.axes.Axes.format_coord}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.format\_coord}}}}} & Return a format string formatting the \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data:matplotlib.axes.Axes.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_xdata:matplotlib.axes.Axes.format_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.format\_xdata}}}}} & Return \sphinxstyleemphasis{x} formatted as an x-value. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_ydata:matplotlib.axes.Axes.format_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.format\_ydata}}}}} & Return \sphinxstyleemphasis{y} formatted as an y-value. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.mouseover:matplotlib.axes.Axes.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.in_axes:matplotlib.axes.Axes.in_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.in\_axes}}}}} & Return \sphinxstyleemphasis{True} if the given \sphinxstyleemphasis{mouseevent} (in display coords) is in the Axes \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pick:matplotlib.axes.Axes.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable:matplotlib.axes.Axes.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker:matplotlib.axes.Axes.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains:matplotlib.axes.Axes.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_contains:matplotlib.axes.Axes.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contains:matplotlib.axes.Axes.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.contains}}}}} & Test whether the artist contains the mouse event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contains_point:matplotlib.axes.Axes.contains_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.contains\_point}}}}} & Return whether \sphinxstyleemphasis{point} (pair of pixel coordinates) is inside the axes patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_cursor_data:matplotlib.axes.Axes.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.can\_pan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_pan:matplotlib-axes-axes-can-pan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_pan::doc}}\index{can\_pan() (matplotlib.axes.Axes method)@\spxentry{can\_pan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_pan:matplotlib.axes.Axes.can_pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{can\_pan}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports any pan/zoom button functionality. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.can\_zoom} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_zoom:matplotlib-axes-axes-can-zoom}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_zoom::doc}}\index{can\_zoom() (matplotlib.axes.Axes method)@\spxentry{can\_zoom()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.can_zoom:matplotlib.axes.Axes.can_zoom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{can\_zoom}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports the zoom box button functionality. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_navigate} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate:matplotlib-axes-axes-get-navigate}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate::doc}}\index{get\_navigate() (matplotlib.axes.Axes method)@\spxentry{get\_navigate()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate:matplotlib.axes.Axes.get_navigate}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_navigate}}}{\emph{self}}{} Get whether the axes responds to navigation commands \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_navigate} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib-axes-axes-set-navigate}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate::doc}}\index{set\_navigate() (matplotlib.axes.Axes method)@\spxentry{set\_navigate()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_navigate}}}{\emph{self}, \emph{b}}{} Set whether the axes responds to navigation toolbar commands \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_navigate\_mode} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate_mode:matplotlib-axes-axes-get-navigate-mode}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate_mode::doc}}\index{get\_navigate\_mode() (matplotlib.axes.Axes method)@\spxentry{get\_navigate\_mode()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_navigate_mode:matplotlib.axes.Axes.get_navigate_mode}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_navigate\_mode}}}{\emph{self}}{} Get the navigation toolbar button status: 'PAN', 'ZOOM', or None \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_navigate\_mode} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib-axes-axes-set-navigate-mode}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode::doc}}\index{set\_navigate\_mode() (matplotlib.axes.Axes method)@\spxentry{set\_navigate\_mode()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_navigate\_mode}}}{\emph{self}, \emph{b}}{} Set the navigation toolbar button status; \begin{sphinxadmonition}{warning}{Warning:} this is not a user-API function. \end{sphinxadmonition} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.start\_pan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.start_pan:matplotlib-axes-axes-start-pan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.start_pan::doc}}\index{start\_pan() (matplotlib.axes.Axes method)@\spxentry{start\_pan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.start_pan:matplotlib.axes.Axes.start_pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{start\_pan}}}{\emph{self}, \emph{x}, \emph{y}, \emph{button}}{} Called when a pan operation has started. \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are the mouse coordinates in display coords. button is the mouse button number: \begin{itemize} \item {} 1: LEFT \item {} 2: MIDDLE \item {} 3: RIGHT \end{itemize} \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.drag\_pan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.drag_pan:matplotlib-axes-axes-drag-pan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.drag_pan::doc}}\index{drag\_pan() (matplotlib.axes.Axes method)@\spxentry{drag\_pan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.drag_pan:matplotlib.axes.Axes.drag_pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{drag\_pan}}}{\emph{self}, \emph{button}, \emph{key}, \emph{x}, \emph{y}}{} Called when the mouse moves during a pan operation. \sphinxstyleemphasis{button} is the mouse button number: \begin{itemize} \item {} 1: LEFT \item {} 2: MIDDLE \item {} 3: RIGHT \end{itemize} \sphinxstyleemphasis{key} is a "shift" key \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are the mouse coordinates in display coords. \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.end\_pan} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.end_pan:matplotlib-axes-axes-end-pan}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.end_pan::doc}}\index{end\_pan() (matplotlib.axes.Axes method)@\spxentry{end\_pan()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.end_pan:matplotlib.axes.Axes.end_pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{end\_pan}}}{\emph{self}}{} Called when a pan operation completes (when the mouse button is up.) \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.format\_coord} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_coord:matplotlib-axes-axes-format-coord}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_coord::doc}}\index{format\_coord() (matplotlib.axes.Axes method)@\spxentry{format\_coord()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_coord:matplotlib.axes.Axes.format_coord}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{format\_coord}}}{\emph{self}, \emph{x}, \emph{y}}{} Return a format string formatting the \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} coordinates. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.format\_coord}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_coord:examples-using-matplotlib-axes-axes-format-coord}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_zcoord.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data:matplotlib-axes-axes-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axes.Axes method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data:matplotlib.axes.Axes.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_cursor_data:matplotlib.axes.Axes.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.format\_xdata} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_xdata:matplotlib-axes-axes-format-xdata}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_xdata::doc}}\index{format\_xdata() (matplotlib.axes.Axes method)@\spxentry{format\_xdata()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_xdata:matplotlib.axes.Axes.format_xdata}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{format\_xdata}}}{\emph{self}, \emph{x}}{} Return \sphinxstyleemphasis{x} formatted as an x-value. This function will use the \sphinxcode{\sphinxupquote{fmt\_xdata}} attribute if it is not None, else will fall back on the xaxis major formatter. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.format\_ydata} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_ydata:matplotlib-axes-axes-format-ydata}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_ydata::doc}}\index{format\_ydata() (matplotlib.axes.Axes method)@\spxentry{format\_ydata()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.format_ydata:matplotlib.axes.Axes.format_ydata}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{format\_ydata}}}{\emph{self}, \emph{y}}{} Return \sphinxstyleemphasis{y} formatted as an y-value. This function will use the \sphinxcode{\sphinxupquote{fmt\_ydata}} attribute if it is not None, else will fall back on the yaxis major formatter. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.mouseover:matplotlib-axes-axes-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.mouseover::doc}}\index{mouseover (matplotlib.axes.Axes attribute)@\spxentry{mouseover}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.mouseover:matplotlib.axes.Axes.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.in\_axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.in_axes:matplotlib-axes-axes-in-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.in_axes::doc}}\index{in\_axes() (matplotlib.axes.Axes method)@\spxentry{in\_axes()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.in_axes:matplotlib.axes.Axes.in_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{in\_axes}}}{\emph{self}, \emph{mouseevent}}{} Return \sphinxstyleemphasis{True} if the given \sphinxstyleemphasis{mouseevent} (in display coords) is in the Axes \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.pick} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pick:matplotlib-axes-axes-pick}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pick::doc}}\index{pick() (matplotlib.axes.Axes method)@\spxentry{pick()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pick:matplotlib.axes.Axes.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker:matplotlib.axes.Axes.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable:matplotlib.axes.Axes.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.pickable} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable:matplotlib-axes-axes-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable::doc}}\index{pickable() (matplotlib.axes.Axes method)@\spxentry{pickable()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable:matplotlib.axes.Axes.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker:matplotlib.axes.Axes.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pick:matplotlib.axes.Axes.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker:matplotlib-axes-axes-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker::doc}}\index{get\_picker() (matplotlib.axes.Axes method)@\spxentry{get\_picker()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_picker:matplotlib.axes.Axes.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pickable:matplotlib.axes.Axes.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pick:matplotlib.axes.Axes.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib-axes-axes-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker::doc}}\index{set\_picker() (matplotlib.axes.Axes method)@\spxentry{set\_picker()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_picker:matplotlib.axes.Axes.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains:matplotlib-axes-axes-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains::doc}}\index{set\_contains() (matplotlib.axes.Axes method)@\spxentry{set\_contains()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains:matplotlib.axes.Axes.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contains:matplotlib.axes.Axes.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_contains:matplotlib-axes-axes-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_contains::doc}}\index{get\_contains() (matplotlib.axes.Axes method)@\spxentry{get\_contains()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_contains:matplotlib.axes.Axes.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains:matplotlib.axes.Axes.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.contains} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains:matplotlib-axes-axes-contains}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains::doc}}\index{contains() (matplotlib.axes.Axes method)@\spxentry{contains()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains:matplotlib.axes.Axes.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_contains:matplotlib.axes.Axes.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_contains:matplotlib.axes.Axes.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.contains\_point} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains_point:matplotlib-axes-axes-contains-point}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains_point::doc}}\index{contains\_point() (matplotlib.axes.Axes method)@\spxentry{contains\_point()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.contains_point:matplotlib.axes.Axes.contains_point}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{contains\_point}}}{\emph{self}, \emph{point}}{} Return whether \sphinxstyleemphasis{point} (pair of pixel coordinates) is inside the axes patch. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_cursor_data:matplotlib-axes-axes-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axes.Axes method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_cursor_data:matplotlib.axes.Axes.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data:matplotlib.axes.Axes.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.format_cursor_data:matplotlib.axes.Axes.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subsection{Children} \label{\detokenize{api/axes_api:children}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_children:matplotlib.axes.Axes.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_images:matplotlib.axes.Axes.get_images}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_images}}}}} & return a list of Axes images contained by the Axes \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_lines:matplotlib.axes.Axes.get_lines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_lines}}}}} & Return a list of lines contained by the Axes \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.findobj:matplotlib.axes.Axes.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.findobj}}}}} & Find artist objects. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_children:matplotlib-axes-axes-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_children::doc}}\index{get\_children() (matplotlib.axes.Axes method)@\spxentry{get\_children()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_children:matplotlib.axes.Axes.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_images} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_images:matplotlib-axes-axes-get-images}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_images::doc}}\index{get\_images() (matplotlib.axes.Axes method)@\spxentry{get\_images()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_images:matplotlib.axes.Axes.get_images}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_images}}}{\emph{self}}{} return a list of Axes images contained by the Axes \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_lines} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_lines:matplotlib-axes-axes-get-lines}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_lines::doc}}\index{get\_lines() (matplotlib.axes.Axes method)@\spxentry{get\_lines()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_lines:matplotlib.axes.Axes.get_lines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_lines}}}{\emph{self}}{} Return a list of lines contained by the Axes \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.findobj} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.findobj:matplotlib-axes-axes-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.findobj::doc}}\index{findobj() (matplotlib.axes.Axes method)@\spxentry{findobj()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.findobj:matplotlib.axes.Axes.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsection{Drawing} \label{\detokenize{api/axes_api:drawing}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.draw:matplotlib.axes.Axes.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.draw}}}}} & Draw everything (plot lines, axes, labels) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.draw_artist:matplotlib.axes.Axes.draw_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.draw\_artist}}}}} & This method can only be used after an initial draw which caches the renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.redraw_in_frame:matplotlib.axes.Axes.redraw_in_frame}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.redraw\_in\_frame}}}}} & This method can only be used after an initial draw which caches the renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_renderer_cache:matplotlib.axes.Axes.get_renderer_cache}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_renderer\_cache}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterization_zorder:matplotlib.axes.Axes.get_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_rasterization\_zorder}}}}} & Return the zorder value below which artists will be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_rasterization\_zorder}}}}} & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_window\_extent}}}}} & Return the axes bounding box in display space; \sphinxstyleemphasis{args} and \sphinxstyleemphasis{kwargs} are empty. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_tightbbox}}}}} & Return the tight bounding box of the axes, including axis and their decorators (xlabel, title, etc). \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.draw} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw:matplotlib-axes-axes-draw}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw::doc}}\index{draw() (matplotlib.axes.Axes method)@\spxentry{draw()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw:matplotlib.axes.Axes.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer=None}, \emph{inframe=False}}{} Draw everything (plot lines, axes, labels) \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.draw\_artist} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw_artist:matplotlib-axes-axes-draw-artist}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw_artist::doc}}\index{draw\_artist() (matplotlib.axes.Axes method)@\spxentry{draw\_artist()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.draw_artist:matplotlib.axes.Axes.draw_artist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{draw\_artist}}}{\emph{self}, \emph{a}}{} This method can only be used after an initial draw which caches the renderer. It is used to efficiently update Axes data (axis ticks, labels, etc are not updated) \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.redraw\_in\_frame} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.redraw_in_frame:matplotlib-axes-axes-redraw-in-frame}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.redraw_in_frame::doc}}\index{redraw\_in\_frame() (matplotlib.axes.Axes method)@\spxentry{redraw\_in\_frame()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.redraw_in_frame:matplotlib.axes.Axes.redraw_in_frame}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{redraw\_in\_frame}}}{\emph{self}}{} This method can only be used after an initial draw which caches the renderer. It is used to efficiently update Axes data (axis ticks, labels, etc are not updated) \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_renderer\_cache} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_renderer_cache:matplotlib-axes-axes-get-renderer-cache}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_renderer_cache::doc}}\index{get\_renderer\_cache() (matplotlib.axes.Axes method)@\spxentry{get\_renderer\_cache()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_renderer_cache:matplotlib.axes.Axes.get_renderer_cache}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_renderer\_cache}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_rasterization\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterization_zorder:matplotlib-axes-axes-get-rasterization-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterization_zorder::doc}}\index{get\_rasterization\_zorder() (matplotlib.axes.Axes method)@\spxentry{get\_rasterization\_zorder()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterization_zorder:matplotlib.axes.Axes.get_rasterization_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_rasterization\_zorder}}}{\emph{self}}{} Return the zorder value below which artists will be rasterized. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_rasterization\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib-axes-axes-set-rasterization-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder::doc}}\index{set\_rasterization\_zorder() (matplotlib.axes.Axes method)@\spxentry{set\_rasterization\_zorder()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_rasterization\_zorder}}}{\emph{self}, \emph{z}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{z}}] \leavevmode{[}float or None{]} zorder below which artists are rasterized. \sphinxcode{\sphinxupquote{None}} means that artists do not get rasterized based on zorder. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib-axes-axes-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axes.Axes method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Return the axes bounding box in display space; \sphinxstyleemphasis{args} and \sphinxstyleemphasis{kwargs} are empty. This bounding box does not include the spines, ticks, ticklables, or other labels. For a bounding box including these elements use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_tightbbox}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox:matplotlib.axis.Axis.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Axis.get\_tightbbox}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{matplotlib.spines.get\_window\_extent}}}] \leavevmode \end{description} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_tightbbox} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib-axes-axes-get-tightbbox}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox::doc}}\index{get\_tightbbox() (matplotlib.axes.Axes method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}, \emph{call\_axes\_locator=True}, \emph{bbox\_extra\_artists=None}}{} Return the tight bounding box of the axes, including axis and their decorators (xlabel, title, etc). Artists that have \sphinxcode{\sphinxupquote{artist.set\_in\_layout(False)}} are not included in the bbox. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \item[{\sphinxstylestrong{bbox\_extra\_artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or \sphinxcode{\sphinxupquote{None}}{]} List of artists to include in the tight bounding box. If \sphinxcode{\sphinxupquote{None}} (default), then all artist children of the axes are included in the tight bounding box. \item[{\sphinxstylestrong{call\_axes\_locator}}] \leavevmode{[}boolean (default \sphinxcode{\sphinxupquote{True}}){]} If \sphinxstyleemphasis{call\_axes\_locator} is \sphinxcode{\sphinxupquote{False}}, it does not call the \sphinxcode{\sphinxupquote{\_axes\_locator}} attribute, which is necessary to get the correct bounding box. \sphinxcode{\sphinxupquote{call\_axes\_locator=False}} can be used if the caller is only interested in the relative size of the tightbbox compared to the axes bbox. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}{]} bounding box in figure pixel coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{matplotlib.axis.Axes.get\_window\_extent}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox:matplotlib.axis.Axis.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Axis.get\_tightbbox}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{matplotlib.spines.get\_window\_extent}}}] \leavevmode \end{description} \end{fulllineitems} \subsection{Bulk property manipulation} \label{\detokenize{api/axes_api:bulk-property-manipulation}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set:matplotlib.axes.Axes.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.update:matplotlib.axes.Axes.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.properties:matplotlib.axes.Axes.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.update_from:matplotlib.axes.Axes.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.set} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set:matplotlib-axes-axes-set}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set::doc}}\index{set() (matplotlib.axes.Axes method)@\spxentry{set()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set:matplotlib.axes.Axes.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.set}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set:examples-using-matplotlib-axes-axes-set}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \subsubsection{matplotlib.axes.Axes.update} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update:matplotlib-axes-axes-update}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update::doc}}\index{update() (matplotlib.axes.Axes method)@\spxentry{update()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update:matplotlib.axes.Axes.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.properties} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.properties:matplotlib-axes-axes-properties}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.properties::doc}}\index{properties() (matplotlib.axes.Axes method)@\spxentry{properties()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.properties:matplotlib.axes.Axes.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_from:matplotlib-axes-axes-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_from::doc}}\index{update\_from() (matplotlib.axes.Axes method)@\spxentry{update\_from()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.update_from:matplotlib.axes.Axes.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subsection{General Artist Properties} \label{\detokenize{api/axes_api:general-artist-properties}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_agg_filter:matplotlib.axes.Axes.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_alpha:matplotlib.axes.Axes.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_animated:matplotlib.axes.Axes.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_box:matplotlib.axes.Axes.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_on:matplotlib.axes.Axes.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_path:matplotlib.axes.Axes.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_gid:matplotlib.axes.Axes.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_label:matplotlib.axes.Axes.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_label}}}}} & Set a label that will be displayed in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_path_effects:matplotlib.axes.Axes.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterized:matplotlib.axes.Axes.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_sketch_params:matplotlib.axes.Axes.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_snap:matplotlib.axes.Axes.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_transform:matplotlib.axes.Axes.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_url:matplotlib.axes.Axes.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_visible:matplotlib.axes.Axes.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_zorder:matplotlib.axes.Axes.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_agg_filter:matplotlib.axes.Axes.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_alpha:matplotlib.axes.Axes.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_animated:matplotlib.axes.Axes.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_box:matplotlib.axes.Axes.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_on:matplotlib.axes.Axes.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_path:matplotlib.axes.Axes.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_gid:matplotlib.axes.Axes.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_label:matplotlib.axes.Axes.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_label}}}}} & Return the label used for this artist in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_path_effects:matplotlib.axes.Axes.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterized:matplotlib.axes.Axes.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_sketch_params:matplotlib.axes.Axes.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_snap:matplotlib.axes.Axes.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transform:matplotlib.axes.Axes.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_url:matplotlib.axes.Axes.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_visible:matplotlib.axes.Axes.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_zorder:matplotlib.axes.Axes.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axes:matplotlib.axes.Axes.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} for this {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_figure:matplotlib.axes.Axes.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_agg_filter:matplotlib-axes-axes-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axes.Axes method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_agg_filter:matplotlib.axes.Axes.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_alpha:matplotlib-axes-axes-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_alpha::doc}}\index{set\_alpha() (matplotlib.axes.Axes method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_alpha:matplotlib.axes.Axes.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_animated:matplotlib-axes-axes-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_animated::doc}}\index{set\_animated() (matplotlib.axes.Axes method)@\spxentry{set\_animated()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_animated:matplotlib.axes.Axes.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_box:matplotlib-axes-axes-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axes.Axes method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_box:matplotlib.axes.Axes.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_on:matplotlib-axes-axes-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axes.Axes method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_on:matplotlib.axes.Axes.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_path:matplotlib-axes-axes-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axes.Axes method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_clip_path:matplotlib.axes.Axes.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_gid:matplotlib-axes-axes-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_gid::doc}}\index{set\_gid() (matplotlib.axes.Axes method)@\spxentry{set\_gid()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_gid:matplotlib.axes.Axes.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_label:matplotlib-axes-axes-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_label::doc}}\index{set\_label() (matplotlib.axes.Axes method)@\spxentry{set\_label()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_label:matplotlib.axes.Axes.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_path_effects:matplotlib-axes-axes-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axes.Axes method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_path_effects:matplotlib.axes.Axes.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterized:matplotlib-axes-axes-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axes.Axes method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterized:matplotlib.axes.Axes.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_sketch_params:matplotlib-axes-axes-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axes.Axes method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_sketch_params:matplotlib.axes.Axes.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_snap:matplotlib-axes-axes-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_snap::doc}}\index{set\_snap() (matplotlib.axes.Axes method)@\spxentry{set\_snap()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_snap:matplotlib.axes.Axes.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_transform:matplotlib-axes-axes-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_transform::doc}}\index{set\_transform() (matplotlib.axes.Axes method)@\spxentry{set\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_transform:matplotlib.axes.Axes.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_url:matplotlib-axes-axes-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_url::doc}}\index{set\_url() (matplotlib.axes.Axes method)@\spxentry{set\_url()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_url:matplotlib.axes.Axes.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_visible:matplotlib-axes-axes-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_visible::doc}}\index{set\_visible() (matplotlib.axes.Axes method)@\spxentry{set\_visible()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_visible:matplotlib.axes.Axes.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_zorder:matplotlib-axes-axes-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_zorder::doc}}\index{set\_zorder() (matplotlib.axes.Axes method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_zorder:matplotlib.axes.Axes.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_agg_filter:matplotlib-axes-axes-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axes.Axes method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_agg_filter:matplotlib.axes.Axes.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_alpha:matplotlib-axes-axes-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_alpha::doc}}\index{get\_alpha() (matplotlib.axes.Axes method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_alpha:matplotlib.axes.Axes.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_animated:matplotlib-axes-axes-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_animated::doc}}\index{get\_animated() (matplotlib.axes.Axes method)@\spxentry{get\_animated()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_animated:matplotlib.axes.Axes.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_box:matplotlib-axes-axes-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axes.Axes method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_box:matplotlib.axes.Axes.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_on:matplotlib-axes-axes-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axes.Axes method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_on:matplotlib.axes.Axes.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_path:matplotlib-axes-axes-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axes.Axes method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_clip_path:matplotlib.axes.Axes.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_gid:matplotlib-axes-axes-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_gid::doc}}\index{get\_gid() (matplotlib.axes.Axes method)@\spxentry{get\_gid()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_gid:matplotlib.axes.Axes.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_label:matplotlib-axes-axes-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_label::doc}}\index{get\_label() (matplotlib.axes.Axes method)@\spxentry{get\_label()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_label:matplotlib.axes.Axes.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_path_effects:matplotlib-axes-axes-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axes.Axes method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_path_effects:matplotlib.axes.Axes.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterized:matplotlib-axes-axes-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axes.Axes method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_rasterized:matplotlib.axes.Axes.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_sketch_params:matplotlib-axes-axes-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axes.Axes method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_sketch_params:matplotlib.axes.Axes.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_snap:matplotlib-axes-axes-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_snap::doc}}\index{get\_snap() (matplotlib.axes.Axes method)@\spxentry{get\_snap()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_snap:matplotlib.axes.Axes.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_snap:matplotlib.axes.Axes.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transform:matplotlib-axes-axes-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transform::doc}}\index{get\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transform:matplotlib.axes.Axes.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_url:matplotlib-axes-axes-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_url::doc}}\index{get\_url() (matplotlib.axes.Axes method)@\spxentry{get\_url()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_url:matplotlib.axes.Axes.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_visible:matplotlib-axes-axes-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_visible::doc}}\index{get\_visible() (matplotlib.axes.Axes method)@\spxentry{get\_visible()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_visible:matplotlib.axes.Axes.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_zorder:matplotlib-axes-axes-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_zorder::doc}}\index{get\_zorder() (matplotlib.axes.Axes method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_zorder:matplotlib.axes.Axes.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.axes} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axes:matplotlib-axes-axes-axes}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axes::doc}}\index{axes (matplotlib.axes.Axes attribute)@\spxentry{axes}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.axes:matplotlib.axes.Axes.axes}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib-axes-axes-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure::doc}}\index{set\_figure() (matplotlib.axes.Axes method)@\spxentry{set\_figure()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} for this {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_figure:matplotlib-axes-axes-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_figure::doc}}\index{get\_figure() (matplotlib.axes.Axes method)@\spxentry{get\_figure()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_figure:matplotlib.axes.Axes.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subsection{Artist Methods} \label{\detokenize{api/axes_api:artist-methods}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.remove:matplotlib.axes.Axes.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.is_transform_set:matplotlib.axes.Axes.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.remove} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove:matplotlib-axes-axes-remove}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove::doc}}\index{remove() (matplotlib.axes.Axes method)@\spxentry{remove()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.remove:matplotlib.axes.Axes.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.is_transform_set:matplotlib-axes-axes-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axes.Axes method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.is_transform_set:matplotlib.axes.Axes.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_transform:matplotlib.axes.Axes.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subsection{Projection} \label{\detokenize{api/axes_api:projection}} Methods used by {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} that must be overridden for non-rectilinear Axes. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.name:matplotlib.axes.Axes.name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.name}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform:matplotlib.axes.Axes.get_xaxis_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xaxis\_transform}}}}} & Get the transformation used for drawing x-axis labels, ticks and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform:matplotlib.axes.Axes.get_yaxis_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yaxis\_transform}}}}} & Get the transformation used for drawing y-axis labels, ticks and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio:matplotlib.axes.Axes.get_data_ratio}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_data\_ratio}}}}} & Return the aspect ratio of the raw data. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio_log:matplotlib.axes.Axes.get_data_ratio_log}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_data\_ratio\_log}}}}} & Return the aspect ratio of the raw data in log scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text1_transform:matplotlib.axes.Axes.get_xaxis_text1_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xaxis\_text1\_transform}}}}} & \begin{quote}\begin{description} \item[{Returns}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text2_transform:matplotlib.axes.Axes.get_xaxis_text2_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_xaxis\_text2\_transform}}}}} & \begin{quote}\begin{description} \item[{Returns}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text1_transform:matplotlib.axes.Axes.get_yaxis_text1_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yaxis\_text1\_transform}}}}} & \begin{quote}\begin{description} \item[{Returns}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text2_transform:matplotlib.axes.Axes.get_yaxis_text2_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_yaxis\_text2\_transform}}}}} & \begin{quote}\begin{description} \item[{Returns}] \leavevmode \end{description}\end{quote} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.name} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.name:matplotlib-axes-axes-name}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.name::doc}}\index{name (matplotlib.axes.Axes attribute)@\spxentry{name}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.name:matplotlib.axes.Axes.name}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'rectilinear'}}} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_xaxis\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform:matplotlib-axes-axes-get-xaxis-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform::doc}}\index{get\_xaxis\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_xaxis\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform:matplotlib.axes.Axes.get_xaxis_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xaxis\_transform}}}{\emph{self}, \emph{which='grid'}}{} Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates. \begin{sphinxadmonition}{note}{Note:} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{sphinxadmonition} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.get\_xaxis\_transform}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_transform:examples-using-matplotlib-axes-axes-get-xaxis-transform}} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \subsubsection{matplotlib.axes.Axes.get\_yaxis\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform:matplotlib-axes-axes-get-yaxis-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform::doc}}\index{get\_yaxis\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_yaxis\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform:matplotlib.axes.Axes.get_yaxis_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yaxis\_transform}}}{\emph{self}, \emph{which='grid'}}{} Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates. \begin{sphinxadmonition}{note}{Note:} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{sphinxadmonition} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axes.Axes.get\_yaxis\_transform}}} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_transform:examples-using-matplotlib-axes-axes-get-yaxis-transform}} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \subsubsection{matplotlib.axes.Axes.get\_data\_ratio} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio:matplotlib-axes-axes-get-data-ratio}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio::doc}}\index{get\_data\_ratio() (matplotlib.axes.Axes method)@\spxentry{get\_data\_ratio()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio:matplotlib.axes.Axes.get_data_ratio}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_data\_ratio}}}{\emph{self}}{} Return the aspect ratio of the raw data. \subsubsection*{Notes} This method is intended to be overridden by new projection types. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_data\_ratio\_log} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio_log:matplotlib-axes-axes-get-data-ratio-log}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio_log::doc}}\index{get\_data\_ratio\_log() (matplotlib.axes.Axes method)@\spxentry{get\_data\_ratio\_log()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_data_ratio_log:matplotlib.axes.Axes.get_data_ratio_log}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_data\_ratio\_log}}}{\emph{self}}{} Return the aspect ratio of the raw data in log scale. \subsubsection*{Notes} Will be used when both axis are in log scale. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_xaxis\_text1\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text1_transform:matplotlib-axes-axes-get-xaxis-text1-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text1_transform::doc}}\index{get\_xaxis\_text1\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_xaxis\_text1\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text1_transform:matplotlib.axes.Axes.get_xaxis_text1_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xaxis\_text1\_transform}}}{\emph{self}, \emph{pad\_points}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing x-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_xaxis\_text2\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text2_transform:matplotlib-axes-axes-get-xaxis-text2-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text2_transform::doc}}\index{get\_xaxis\_text2\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_xaxis\_text2\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xaxis_text2_transform:matplotlib.axes.Axes.get_xaxis_text2_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_xaxis\_text2\_transform}}}{\emph{self}, \emph{pad\_points}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing secondary x-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_yaxis\_text1\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text1_transform:matplotlib-axes-axes-get-yaxis-text1-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text1_transform::doc}}\index{get\_yaxis\_text1\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_yaxis\_text1\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text1_transform:matplotlib.axes.Axes.get_yaxis_text1_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yaxis\_text1\_transform}}}{\emph{self}, \emph{pad\_points}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing y-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_yaxis\_text2\_transform} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text2_transform:matplotlib-axes-axes-get-yaxis-text2-transform}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text2_transform::doc}}\index{get\_yaxis\_text2\_transform() (matplotlib.axes.Axes method)@\spxentry{get\_yaxis\_text2\_transform()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yaxis_text2_transform:matplotlib.axes.Axes.get_yaxis_text2_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_yaxis\_text2\_transform}}}{\emph{self}, \emph{pad\_points}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing secondart y-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \subsection{Other} \label{\detokenize{api/axes_api:other}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.zorder:matplotlib.axes.Axes.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_default_bbox_extra_artists:matplotlib.axes.Axes.get_default_bbox_extra_artists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_default\_bbox\_extra\_artists}}}}} & Return a default list of artists that are used for the bounding box calculation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transformed_clip_path_and_affine:matplotlib.axes.Axes.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.has_data:matplotlib.axes.Axes.has_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.has\_data}}}}} & Return \sphinxstyleemphasis{True} if any artists have been added to axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axes.Axes.zorder} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.zorder:matplotlib-axes-axes-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.zorder::doc}}\index{zorder (matplotlib.axes.Axes attribute)@\spxentry{zorder}\spxextra{matplotlib.axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.zorder:matplotlib.axes.Axes.zorder}}\pysigline{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_default\_bbox\_extra\_artists} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_default_bbox_extra_artists:matplotlib-axes-axes-get-default-bbox-extra-artists}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_default_bbox_extra_artists::doc}}\index{get\_default\_bbox\_extra\_artists() (matplotlib.axes.Axes method)@\spxentry{get\_default\_bbox\_extra\_artists()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_default_bbox_extra_artists:matplotlib.axes.Axes.get_default_bbox_extra_artists}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_default\_bbox\_extra\_artists}}}{\emph{self}}{} Return a default list of artists that are used for the bounding box calculation. Artists are excluded either by not being visible or \sphinxcode{\sphinxupquote{artist.set\_in\_layout(False)}}. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transformed_clip_path_and_affine:matplotlib-axes-axes-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axes.Axes method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.get_transformed_clip_path_and_affine:matplotlib.axes.Axes.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subsubsection{matplotlib.axes.Axes.has\_data} \label{\detokenize{api/_as_gen/matplotlib.axes.Axes.has_data:matplotlib-axes-axes-has-data}}\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.has_data::doc}}\index{has\_data() (matplotlib.axes.Axes method)@\spxentry{has\_data()}\spxextra{matplotlib.axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axes.Axes.has_data:matplotlib.axes.Axes.has_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axes.}}\sphinxbfcode{\sphinxupquote{has\_data}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if any artists have been added to axes. This should not be used to determine whether the \sphinxstyleemphasis{dataLim} need to be updated, and may not actually be useful for anything. \end{fulllineitems} \subsection{Inheritance} \label{\detokenize{api/axes_api:inheritance}} \sphinxincludegraphics[]{inheritance-be4216ca106bd081482553dabe62bd485d18c1ad.pdf} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis}}} \label{\detokenize{api/axis_api:matplotlib-axis}}\label{\detokenize{api/axis_api::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Table of Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axis_api:id1}}{\hyperref[\detokenize{api/axis_api:inheritance}]{\sphinxcrossref{Inheritance}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id2}}{\hyperref[\detokenize{api/axis_api:axis-objects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}} objects}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axis_api:id3}}{\hyperref[\detokenize{api/axis_api:formatters-and-locators}]{\sphinxcrossref{Formatters and Locators}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id4}}{\hyperref[\detokenize{api/axis_api:axis-label}]{\sphinxcrossref{Axis Label}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id5}}{\hyperref[\detokenize{api/axis_api:ticks-tick-labels-and-offset-text}]{\sphinxcrossref{Ticks, tick labels and Offset text}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id6}}{\hyperref[\detokenize{api/axis_api:data-and-view-intervals}]{\sphinxcrossref{Data and view intervals}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id7}}{\hyperref[\detokenize{api/axis_api:rendering-helpers}]{\sphinxcrossref{Rendering helpers}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id8}}{\hyperref[\detokenize{api/axis_api:interactive}]{\sphinxcrossref{Interactive}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id9}}{\hyperref[\detokenize{api/axis_api:units}]{\sphinxcrossref{Units}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id10}}{\hyperref[\detokenize{api/axis_api:incremental-navigation}]{\sphinxcrossref{Incremental navigation}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id11}}{\hyperref[\detokenize{api/axis_api:yaxis-specific}]{\sphinxcrossref{YAxis Specific}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id12}}{\hyperref[\detokenize{api/axis_api:xaxis-specific}]{\sphinxcrossref{XAxis Specific}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id13}}{\hyperref[\detokenize{api/axis_api:other}]{\sphinxcrossref{Other}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id14}}{\hyperref[\detokenize{api/axis_api:discouraged}]{\sphinxcrossref{Discouraged}}} \end{itemize} \item {} \phantomsection\label{\detokenize{api/axis_api:id15}}{\hyperref[\detokenize{api/axis_api:tick-objects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}} objects}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id16}}{\hyperref[\detokenize{api/axis_api:common-and-inherited-methods}]{\sphinxcrossref{Common and inherited methods}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axis_api:id17}}{\hyperref[\detokenize{api/axis_api:xtick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick}}}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id18}}{\hyperref[\detokenize{api/axis_api:ytick}]{\sphinxcrossref{YTick}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id19}}{\hyperref[\detokenize{api/axis_api:yaxis}]{\sphinxcrossref{YAxis}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id20}}{\hyperref[\detokenize{api/axis_api:xaxis}]{\sphinxcrossref{XAxis}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id21}}{\hyperref[\detokenize{api/axis_api:inherited-from-artist}]{\sphinxcrossref{Inherited from artist}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/axis_api:id22}}{\hyperref[\detokenize{api/axis_api:ticks}]{\sphinxcrossref{Ticks}}} \item {} \phantomsection\label{\detokenize{api/axis_api:id23}}{\hyperref[\detokenize{api/axis_api:axis}]{\sphinxcrossref{Axis}}} \end{itemize} \end{itemize} \end{itemize} \end{sphinxShadowBox} \phantomsection\label{\detokenize{api/axis_api:module-matplotlib.axis}}\index{matplotlib.axis (module)@\spxentry{matplotlib.axis}\spxextra{module}} Classes for the ticks and x and y axis. \subsection{Inheritance} \label{\detokenize{api/axis_api:inheritance}} \sphinxincludegraphics[]{inheritance-a66b3ec61eed46bd29a97c19ab15d7ed003490e7.pdf} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{Axis}} objects} \label{\detokenize{api/axis_api:axis-objects}}\index{Axis (class in matplotlib.axis)@\spxentry{Axis}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.Axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{Axis}}}{\emph{axes}, \emph{pickradius=15}}{} Base class for {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis}}}}} and {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis}}}}}. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{isDefault\_label}}] \leavevmode{[}bool{]} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.axes:matplotlib.axis.Axis.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes}}}}}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{major}}] \leavevmode{[}{\hyperref[\detokenize{api/axis_api:matplotlib.axis.Ticker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Ticker}}}}}{]} Determines the major tick positions and their label format. \item[{\sphinxstylestrong{minor}}] \leavevmode{[}{\hyperref[\detokenize{api/axis_api:matplotlib.axis.Ticker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.Ticker}}}}}{]} Determines the minor tick positions and their label format. \item[{\sphinxstylestrong{callbacks}}] \leavevmode{[}{\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook.CallbackRegistry}}}}}{]} \item[{\sphinxstylestrong{label}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The axis label. \item[{\sphinxstylestrong{labelpad}}] \leavevmode{[}float{]} The distance between the axis label and the tick labels. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.labelpad"{]}}}} = 4. \item[{\sphinxstylestrong{offsetText}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} A {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object containing the data offset of the ticks (if any). \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} The acceptance radius for containment tests. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}}. \item[{\sphinxstylestrong{majorTicks}}] \leavevmode{[}list of {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}}{]} The major ticks. \item[{\sphinxstylestrong{minorTicks}}] \leavevmode{[}list of {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Tick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick}}}}}{]} The minor ticks. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to which the created Axis belongs. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} The acceptance radius for containment tests. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{XAxis (class in matplotlib.axis)@\spxentry{XAxis}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.XAxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{XAxis}}}{\emph{axes}, \emph{pickradius=15}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to which the created Axis belongs. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} The acceptance radius for containment tests. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{YAxis (class in matplotlib.axis)@\spxentry{YAxis}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.YAxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{YAxis}}}{\emph{axes}, \emph{pickradius=15}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to which the created Axis belongs. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} The acceptance radius for containment tests. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{Ticker (class in matplotlib.axis)@\spxentry{Ticker}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.Ticker}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{Ticker}}} A container for the objects defining tick position and format. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} subclass{]} Determines the positions of the ticks. \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} subclass{]} Determines the format of the tick labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.cla:matplotlib.axis.Axis.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.cla}}}}} & clear the current axis \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_scale:matplotlib.axis.Axis.get_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_scale}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axis.Axis.cla} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.cla:matplotlib-axis-axis-cla}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.cla::doc}}\index{cla() (matplotlib.axis.Axis method)@\spxentry{cla()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.cla:matplotlib.axis.Axis.cla}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} clear the current axis \end{fulllineitems} \subsubsection{matplotlib.axis.Axis.get\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_scale:matplotlib-axis-axis-get-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_scale::doc}}\index{get\_scale() (matplotlib.axis.Axis method)@\spxentry{get\_scale()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_scale:matplotlib.axis.Axis.get_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_scale}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{Formatters and Locators} \label{\detokenize{api/axis_api:formatters-and-locators}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_formatter:matplotlib.axis.Axis.get_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_major\_formatter}}}}} & Get the formatter of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_locator:matplotlib.axis.Axis.get_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_major\_locator}}}}} & Get the locator of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_formatter:matplotlib.axis.Axis.get_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minor\_formatter}}}}} & Get the formatter of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_locator:matplotlib.axis.Axis.get_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minor\_locator}}}}} & Get the locator of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_formatter:matplotlib.axis.Axis.set_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_major\_formatter}}}}} & Set the formatter of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_locator:matplotlib.axis.Axis.set_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_major\_locator}}}}} & Set the locator of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_formatter:matplotlib.axis.Axis.set_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_minor\_formatter}}}}} & Set the formatter of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_locator:matplotlib.axis.Axis.set_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_minor\_locator}}}}} & Set the locator of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs:matplotlib.axis.Axis.remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.remove\_overlapping\_locs}}}}} & If minor ticker locations that overlap with major ticker locations should be trimmed. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs:matplotlib.axis.Axis.get_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_remove\_overlapping\_locs}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs:matplotlib.axis.Axis.set_remove_overlapping_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_remove\_overlapping\_locs}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.get\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_formatter:matplotlib-axis-axis-get-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_formatter::doc}}\index{get\_major\_formatter() (matplotlib.axis.Axis method)@\spxentry{get\_major\_formatter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_formatter:matplotlib.axis.Axis.get_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_major\_formatter}}}{\emph{self}}{} Get the formatter of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_locator:matplotlib-axis-axis-get-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_locator::doc}}\index{get\_major\_locator() (matplotlib.axis.Axis method)@\spxentry{get\_major\_locator()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_locator:matplotlib.axis.Axis.get_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_major\_locator}}}{\emph{self}}{} Get the locator of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_formatter:matplotlib-axis-axis-get-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_formatter::doc}}\index{get\_minor\_formatter() (matplotlib.axis.Axis method)@\spxentry{get\_minor\_formatter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_formatter:matplotlib.axis.Axis.get_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_formatter}}}{\emph{self}}{} Get the formatter of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_locator:matplotlib-axis-axis-get-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_locator::doc}}\index{get\_minor\_locator() (matplotlib.axis.Axis method)@\spxentry{get\_minor\_locator()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_locator:matplotlib.axis.Axis.get_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_locator}}}{\emph{self}}{} Get the locator of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_formatter:matplotlib-axis-axis-set-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_formatter::doc}}\index{set\_major\_formatter() (matplotlib.axis.Axis method)@\spxentry{set\_major\_formatter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_formatter:matplotlib.axis.Axis.set_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_major\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.set\_major\_formatter}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_formatter:examples-using-matplotlib-axis-axis-set-major-formatter}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_dollar\_ticks.py} \end{itemize} \paragraph{matplotlib.axis.Axis.set\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_locator:matplotlib-axis-axis-set-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_locator::doc}}\index{set\_major\_locator() (matplotlib.axis.Axis method)@\spxentry{set\_major\_locator()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_locator:matplotlib.axis.Axis.set_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_major\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.set\_major\_locator}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_major_locator:examples-using-matplotlib-axis-axis-set-major-locator}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_filled\_step.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_scales.py} \end{itemize} \paragraph{matplotlib.axis.Axis.set\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_formatter:matplotlib-axis-axis-set-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_formatter::doc}}\index{set\_minor\_formatter() (matplotlib.axis.Axis method)@\spxentry{set\_minor\_formatter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_formatter:matplotlib.axis.Axis.set_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.set\_minor\_formatter}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_formatter:examples-using-matplotlib-axis-axis-set-minor-formatter}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \paragraph{matplotlib.axis.Axis.set\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_locator:matplotlib-axis-axis-set-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_locator::doc}}\index{set\_minor\_locator() (matplotlib.axis.Axis method)@\spxentry{set\_minor\_locator()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_minor_locator:matplotlib.axis.Axis.set_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.remove\_overlapping\_locs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs:matplotlib-axis-axis-remove-overlapping-locs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs::doc}}\index{remove\_overlapping\_locs (matplotlib.axis.Axis attribute)@\spxentry{remove\_overlapping\_locs}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_overlapping_locs:matplotlib.axis.Axis.remove_overlapping_locs}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{remove\_overlapping\_locs}}} If minor ticker locations that overlap with major ticker locations should be trimmed. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_remove\_overlapping\_locs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs:matplotlib-axis-axis-get-remove-overlapping-locs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs::doc}}\index{get\_remove\_overlapping\_locs() (matplotlib.axis.Axis method)@\spxentry{get\_remove\_overlapping\_locs()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_remove_overlapping_locs:matplotlib.axis.Axis.get_remove_overlapping_locs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_remove\_overlapping\_locs}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_remove\_overlapping\_locs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs:matplotlib-axis-axis-set-remove-overlapping-locs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs::doc}}\index{set\_remove\_overlapping\_locs() (matplotlib.axis.Axis method)@\spxentry{set\_remove\_overlapping\_locs()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_remove_overlapping_locs:matplotlib.axis.Axis.set_remove_overlapping_locs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_remove\_overlapping\_locs}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \subsubsection{Axis Label} \label{\detokenize{api/axis_api:axis-label}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_coords:matplotlib.axis.Axis.set_label_coords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_label\_coords}}}}} & Set the coordinates of the label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_position:matplotlib.axis.Axis.set_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_label\_position}}}}} & Set the label position (top or bottom) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_text:matplotlib.axis.Axis.set_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_label\_text}}}}} & Set the text value of the axis label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_position:matplotlib.axis.Axis.get_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_label\_position}}}}} & Return the label position (top or bottom) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_text:matplotlib.axis.Axis.get_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_label\_text}}}}} & Get the text of the label \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.set\_label\_coords} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_coords:matplotlib-axis-axis-set-label-coords}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_coords::doc}}\index{set\_label\_coords() (matplotlib.axis.Axis method)@\spxentry{set\_label\_coords()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_coords:matplotlib.axis.Axis.set_label_coords}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_label\_coords}}}{\emph{self}, \emph{x}, \emph{y}, \emph{transform=None}}{} Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coordinate of the x label. You can also specify the coordinate system of the label with the transform. If None, the default coordinate system will be the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5) is middle, etc \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.set\_label\_coords}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_coords:examples-using-matplotlib-axis-axis-set-label-coords}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \paragraph{matplotlib.axis.Axis.set\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_position:matplotlib-axis-axis-set-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_position::doc}}\index{set\_label\_position() (matplotlib.axis.Axis method)@\spxentry{set\_label\_position()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_position:matplotlib.axis.Axis.set_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_label\_position}}}{\emph{self}, \emph{position}}{} Set the label position (top or bottom) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'top', 'bottom'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_text:matplotlib-axis-axis-set-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_text::doc}}\index{set\_label\_text() (matplotlib.axis.Axis method)@\spxentry{set\_label\_text()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label_text:matplotlib.axis.Axis.set_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_label\_text}}}{\emph{self}, \emph{label}, \emph{fontdict=None}, \emph{**kwargs}}{} Set the text value of the axis label. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text string. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} Text properties. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Merged into fontdict. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_position:matplotlib-axis-axis-get-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_position::doc}}\index{get\_label\_position() (matplotlib.axis.Axis method)@\spxentry{get\_label\_position()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_position:matplotlib.axis.Axis.get_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_label\_position}}}{\emph{self}}{} Return the label position (top or bottom) \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_text:matplotlib-axis-axis-get-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_text::doc}}\index{get\_label\_text() (matplotlib.axis.Axis method)@\spxentry{get\_label\_text()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label_text:matplotlib.axis.Axis.get_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_label\_text}}}{\emph{self}}{} Get the text of the label \end{fulllineitems} \subsubsection{Ticks, tick labels and Offset text} \label{\detokenize{api/axis_api:ticks-tick-labels-and-offset-text}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks:matplotlib.axis.Axis.get_major_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_major\_ticks}}}}} & Get the tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklabels:matplotlib.axis.Axis.get_majorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_majorticklabels}}}}} & Return a list of Text instances for the major ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklines:matplotlib.axis.Axis.get_majorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_majorticklines}}}}} & Return the major tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklocs:matplotlib.axis.Axis.get_majorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_majorticklocs}}}}} & Get the array of major tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_ticks:matplotlib.axis.Axis.get_minor_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minor\_ticks}}}}} & Get the minor tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklabels:matplotlib.axis.Axis.get_minorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minorticklabels}}}}} & Return a list of Text instances for the minor ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklines:matplotlib.axis.Axis.get_minorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minorticklines}}}}} & Return the minor tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklocs:matplotlib.axis.Axis.get_minorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minorticklocs}}}}} & Get the array of minor tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_offset_text:matplotlib.axis.Axis.get_offset_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_offset\_text}}}}} & Return the axis offsetText as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_padding:matplotlib.axis.Axis.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_tick\_padding}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabels}}}}} & Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklines:matplotlib.axis.Axis.get_ticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklines}}}}} & Return the tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklocs:matplotlib.axis.Axis.get_ticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklocs}}}}} & Get the array of tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gridlines}}}}} & Return the grid lines as a list of Line2D instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.grid:matplotlib.axis.Axis.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.grid}}}}} & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib.axis.Axis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_tick\_params}}}}} & Set appearance parameters for ticks, ticklabels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.axis_date:matplotlib.axis.Axis.axis_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.axis\_date}}}}} & Sets up x-axis ticks and labels that treat the x data as dates. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.get\_major\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks:matplotlib-axis-axis-get-major-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks::doc}}\index{get\_major\_ticks() (matplotlib.axis.Axis method)@\spxentry{get\_major\_ticks()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks:matplotlib.axis.Axis.get_major_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_major\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the tick instances; grow as necessary. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.get\_major\_ticks}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_major_ticks:examples-using-matplotlib-axis-axis-get-major-ticks}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_dollar\_ticks.py} \end{itemize} \paragraph{matplotlib.axis.Axis.get\_majorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklabels:matplotlib-axis-axis-get-majorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklabels::doc}}\index{get\_majorticklabels() (matplotlib.axis.Axis method)@\spxentry{get\_majorticklabels()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklabels:matplotlib.axis.Axis.get_majorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklabels}}}{\emph{self}}{} Return a list of Text instances for the major ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_majorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklines:matplotlib-axis-axis-get-majorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklines::doc}}\index{get\_majorticklines() (matplotlib.axis.Axis method)@\spxentry{get\_majorticklines()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklines:matplotlib.axis.Axis.get_majorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklines}}}{\emph{self}}{} Return the major tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_majorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklocs:matplotlib-axis-axis-get-majorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklocs::doc}}\index{get\_majorticklocs() (matplotlib.axis.Axis method)@\spxentry{get\_majorticklocs()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_majorticklocs:matplotlib.axis.Axis.get_majorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklocs}}}{\emph{self}}{} Get the array of major tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minor\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_ticks:matplotlib-axis-axis-get-minor-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_ticks::doc}}\index{get\_minor\_ticks() (matplotlib.axis.Axis method)@\spxentry{get\_minor\_ticks()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minor_ticks:matplotlib.axis.Axis.get_minor_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the minor tick instances; grow as necessary. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklabels:matplotlib-axis-axis-get-minorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklabels::doc}}\index{get\_minorticklabels() (matplotlib.axis.Axis method)@\spxentry{get\_minorticklabels()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklabels:matplotlib.axis.Axis.get_minorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklabels}}}{\emph{self}}{} Return a list of Text instances for the minor ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklines:matplotlib-axis-axis-get-minorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklines::doc}}\index{get\_minorticklines() (matplotlib.axis.Axis method)@\spxentry{get\_minorticklines()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklines:matplotlib.axis.Axis.get_minorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklines}}}{\emph{self}}{} Return the minor tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_minorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklocs:matplotlib-axis-axis-get-minorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklocs::doc}}\index{get\_minorticklocs() (matplotlib.axis.Axis method)@\spxentry{get\_minorticklocs()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minorticklocs:matplotlib.axis.Axis.get_minorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklocs}}}{\emph{self}}{} Get the array of minor tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_offset\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_offset_text:matplotlib-axis-axis-get-offset-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_offset_text::doc}}\index{get\_offset\_text() (matplotlib.axis.Axis method)@\spxentry{get\_offset\_text()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_offset_text:matplotlib.axis.Axis.get_offset_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_offset\_text}}}{\emph{self}}{} Return the axis offsetText as a Text instance \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_padding:matplotlib-axis-axis-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.Axis method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_padding:matplotlib.axis.Axis.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib-axis-axis-get-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels::doc}}\index{get\_ticklabels() (matplotlib.axis.Axis method)@\spxentry{get\_ticklabels()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabels}}}{\emph{self}, \emph{minor=False}, \emph{which=None}}{} Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True return the minor ticklabels, else return the major ticklabels \item[{\sphinxstylestrong{which}}] \leavevmode{[}None, ('minor', 'major', 'both'){]} Overrides \sphinxcode{\sphinxupquote{minor}}. Selects which ticklabels to return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.get\_ticklabels}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:examples-using-matplotlib-axis-axis-get-ticklabels}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_customize\_simple.py} \end{itemize} \paragraph{matplotlib.axis.Axis.get\_ticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklines:matplotlib-axis-axis-get-ticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklines::doc}}\index{get\_ticklines() (matplotlib.axis.Axis method)@\spxentry{get\_ticklines()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklines:matplotlib.axis.Axis.get_ticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_ticklines}}}{\emph{self}, \emph{minor=False}}{} Return the tick lines as a list of Line2D instances \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.get\_ticklines}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklines:examples-using-matplotlib-axis-axis-get-ticklines}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_customize\_simple.py} \end{itemize} \paragraph{matplotlib.axis.Axis.get\_ticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklocs:matplotlib-axis-axis-get-ticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklocs::doc}}\index{get\_ticklocs() (matplotlib.axis.Axis method)@\spxentry{get\_ticklocs()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklocs:matplotlib.axis.Axis.get_ticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_ticklocs}}}{\emph{self}, \emph{minor=False}}{} Get the array of tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_gridlines} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib-axis-axis-get-gridlines}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines::doc}}\index{get\_gridlines() (matplotlib.axis.Axis method)@\spxentry{get\_gridlines()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}}{} Return the grid lines as a list of Line2D instance \end{fulllineitems} \paragraph{matplotlib.axis.Axis.grid} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.grid:matplotlib-axis-axis-grid}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.grid::doc}}\index{grid() (matplotlib.axis.Axis method)@\spxentry{grid()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.grid:matplotlib.axis.Axis.grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=None}, \emph{which='major'}, \emph{**kwargs}}{} Configure the grid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None{]} Whether to show the grid lines. If any \sphinxstyleemphasis{kwargs} are supplied, it is assumed you want the grid on and \sphinxstyleemphasis{b} will be set to True. If \sphinxstyleemphasis{b} is \sphinxstyleemphasis{None} and there are no \sphinxstyleemphasis{kwargs}, this toggles the visibility of the lines. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}{]} The grid lines to apply the changes on. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties{]} Define the line properties of the grid, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_tick\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib-axis-axis-set-tick-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params::doc}}\index{set\_tick\_params() (matplotlib.axis.Axis method)@\spxentry{set\_tick\_params()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_tick_params:matplotlib.axis.Axis.set_tick_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_tick\_params}}}{\emph{self}, \emph{which='major'}, \emph{reset=False}, \emph{**kw}}{} Set appearance parameters for ticks, ticklabels, and gridlines. For documentation of keyword arguments, see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tick\_params()}}}}}. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.axis\_date} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axis_date:matplotlib-axis-axis-axis-date}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axis_date::doc}}\index{axis\_date() (matplotlib.axis.Axis method)@\spxentry{axis\_date()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axis_date:matplotlib.axis.Axis.axis_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{axis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up x-axis ticks and labels that treat the x data as dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tz}}] \leavevmode{[}tzinfo or str or None{]} The timezone used to create date labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{Data and view intervals} \label{\detokenize{api/axis_api:data-and-view-intervals}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_data_interval:matplotlib.axis.Axis.get_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_data\_interval}}}}} & Return the Interval instance for this axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_view_interval:matplotlib.axis.Axis.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_view\_interval}}}}} & Return the Interval instance for this axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_data_interval:matplotlib.axis.Axis.set_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_data\_interval}}}}} & Set the axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_view_interval:matplotlib.axis.Axis.set_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_view\_interval}}}}} & Set the axis view limits. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.get\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_data_interval:matplotlib-axis-axis-get-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_data_interval::doc}}\index{get\_data\_interval() (matplotlib.axis.Axis method)@\spxentry{get\_data\_interval()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_data_interval:matplotlib.axis.Axis.get_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_data\_interval}}}{\emph{self}}{} Return the Interval instance for this axis data limits. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_view_interval:matplotlib-axis-axis-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.Axis method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_view_interval:matplotlib.axis.Axis.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} Return the Interval instance for this axis view limits. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_data_interval:matplotlib-axis-axis-set-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_data_interval::doc}}\index{set\_data\_interval() (matplotlib.axis.Axis method)@\spxentry{set\_data\_interval()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_data_interval:matplotlib.axis.Axis.set_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_data\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis data limits. This method is for internal use. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting data limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the data limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_view_interval:matplotlib-axis-axis-set-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_view_interval::doc}}\index{set\_view\_interval() (matplotlib.axis.Axis method)@\spxentry{set\_view\_interval()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_view_interval:matplotlib.axis.Axis.set_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis view limits. This method is for internal use; Matplotlib users should typically use e.g. \sphinxcode{\sphinxupquote{set\_xlim}} and \sphinxcode{\sphinxupquote{set\_ylim}}. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting view limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the view limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \subsubsection{Rendering helpers} \label{\detokenize{api/axis_api:rendering-helpers}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minpos:matplotlib.axis.Axis.get_minpos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_minpos}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_space:matplotlib.axis.Axis.get_tick_space}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_tick\_space}}}}} & Return the estimated number of ticks that can fit on the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabel_extents:matplotlib.axis.Axis.get_ticklabel_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabel\_extents}}}}} & Get the extents of the tick labels on either side of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox:matplotlib.axis.Axis.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_tightbbox}}}}} & Return a bounding box that encloses the axis. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.get\_minpos} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minpos:matplotlib-axis-axis-get-minpos}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minpos::doc}}\index{get\_minpos() (matplotlib.axis.Axis method)@\spxentry{get\_minpos()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_minpos:matplotlib.axis.Axis.get_minpos}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_minpos}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_tick\_space} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_space:matplotlib-axis-axis-get-tick-space}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_space::doc}}\index{get\_tick\_space() (matplotlib.axis.Axis method)@\spxentry{get\_tick\_space()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tick_space:matplotlib.axis.Axis.get_tick_space}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_space}}}{\emph{self}}{} Return the estimated number of ticks that can fit on the axis. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_ticklabel\_extents} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabel_extents:matplotlib-axis-axis-get-ticklabel-extents}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabel_extents::doc}}\index{get\_ticklabel\_extents() (matplotlib.axis.Axis method)@\spxentry{get\_ticklabel\_extents()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabel_extents:matplotlib.axis.Axis.get_ticklabel_extents}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabel\_extents}}}{\emph{self}, \emph{renderer}}{} Get the extents of the tick labels on either side of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_tightbbox} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox:matplotlib-axis-axis-get-tightbbox}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox::doc}}\index{get\_tightbbox() (matplotlib.axis.Axis method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_tightbbox:matplotlib.axis.Axis.get_tightbbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Return a bounding box that encloses the axis. It only accounts tick labels, axis label, and offsetText. \end{fulllineitems} \subsubsection{Interactive} \label{\detokenize{api/axis_api:interactive}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_pickradius:matplotlib.axis.Axis.get_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_pickradius}}}}} & Return the depth of the axis used by the picker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_pickradius:matplotlib.axis.Axis.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_pickradius}}}}} & Set the depth of the axis used by the picker. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.get\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_pickradius:matplotlib-axis-axis-get-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_pickradius::doc}}\index{get\_pickradius() (matplotlib.axis.Axis method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_pickradius:matplotlib.axis.Axis.get_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{} Return the depth of the axis used by the picker \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_pickradius:matplotlib-axis-axis-set-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_pickradius::doc}}\index{set\_pickradius() (matplotlib.axis.Axis method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_pickradius:matplotlib.axis.Axis.set_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pickradius}}{} Set the depth of the axis used by the picker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{Units} \label{\detokenize{api/axis_api:units}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_units:matplotlib.axis.Axis.convert_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.convert\_units}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_units:matplotlib.axis.Axis.set_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_units}}}}} & Set the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_units:matplotlib.axis.Axis.get_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_units}}}}} & Return the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.update_units:matplotlib.axis.Axis.update_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.update\_units}}}}} & introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.convert\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_units:matplotlib-axis-axis-convert-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_units::doc}}\index{convert\_units() (matplotlib.axis.Axis method)@\spxentry{convert\_units()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_units:matplotlib.axis.Axis.convert_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{convert\_units}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_units:matplotlib-axis-axis-set-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_units::doc}}\index{set\_units() (matplotlib.axis.Axis method)@\spxentry{set\_units()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_units:matplotlib.axis.Axis.set_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_units}}}{\emph{self}, \emph{u}}{} Set the units for axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{u}}] \leavevmode{[}units tag{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_units:matplotlib-axis-axis-get-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_units::doc}}\index{get\_units() (matplotlib.axis.Axis method)@\spxentry{get\_units()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_units:matplotlib.axis.Axis.get_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_units}}}{\emph{self}}{} Return the units for axis. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.update\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_units:matplotlib-axis-axis-update-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_units::doc}}\index{update\_units() (matplotlib.axis.Axis method)@\spxentry{update\_units()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_units:matplotlib.axis.Axis.update_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{update\_units}}}{\emph{self}, \emph{data}}{} introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. Return \sphinxstyleemphasis{True} if \sphinxstyleemphasis{data} is registered for unit conversion. \end{fulllineitems} \subsubsection{Incremental navigation} \label{\detokenize{api/axis_api:incremental-navigation}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pan:matplotlib.axis.Axis.pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.pan}}}}} & Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.zoom:matplotlib.axis.Axis.zoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.zoom}}}}} & Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.pan} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pan:matplotlib-axis-axis-pan}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pan::doc}}\index{pan() (matplotlib.axis.Axis method)@\spxentry{pan()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pan:matplotlib.axis.Axis.pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \end{fulllineitems} \paragraph{matplotlib.axis.Axis.zoom} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zoom:matplotlib-axis-axis-zoom}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zoom::doc}}\index{zoom() (matplotlib.axis.Axis method)@\spxentry{zoom()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zoom:matplotlib.axis.Axis.zoom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \subsubsection{YAxis Specific} \label{\detokenize{api/axis_api:yaxis-specific}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_name:matplotlib.axis.YAxis.axis_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.axis\_name}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_text_widths:matplotlib.axis.YAxis.get_text_widths}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_text\_widths}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticks_position:matplotlib.axis.YAxis.get_ticks_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_ticks\_position}}}}} & Return the ticks position ("left", "right", "default", or "unknown"). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_offset_position:matplotlib.axis.YAxis.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_offset\_position}}}}} & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks_position:matplotlib.axis.YAxis.set_ticks_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_ticks\_position}}}}} & Set the ticks position (left, right, both, default or none) 'both' sets the ticks to appear on both positions, but does not change the tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_left:matplotlib.axis.YAxis.tick_left}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.tick\_left}}}}} & Move ticks and ticklabels (if present) to the left of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_right:matplotlib.axis.YAxis.tick_right}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.tick\_right}}}}} & Move ticks and ticklabels (if present) to the right of the axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.YAxis.axis\_name} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_name:matplotlib-axis-yaxis-axis-name}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_name::doc}}\index{axis\_name (matplotlib.axis.YAxis attribute)@\spxentry{axis\_name}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_name:matplotlib.axis.YAxis.axis_name}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{axis\_name}}\sphinxbfcode{\sphinxupquote{ = 'y'}}} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_text\_widths} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_text_widths:matplotlib-axis-yaxis-get-text-widths}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_text_widths::doc}}\index{get\_text\_widths() (matplotlib.axis.YAxis method)@\spxentry{get\_text\_widths()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_text_widths:matplotlib.axis.YAxis.get_text_widths}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_text\_widths}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_ticks\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticks_position:matplotlib-axis-yaxis-get-ticks-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticks_position::doc}}\index{get\_ticks\_position() (matplotlib.axis.YAxis method)@\spxentry{get\_ticks\_position()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticks_position:matplotlib.axis.YAxis.get_ticks_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticks\_position}}}{\emph{self}}{} Return the ticks position ("left", "right", "default", or "unknown"). \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_offset\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_offset_position:matplotlib-axis-yaxis-set-offset-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_offset_position::doc}}\index{set\_offset\_position() (matplotlib.axis.YAxis method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_offset_position:matplotlib.axis.YAxis.set_offset_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{position}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'left', 'right'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_ticks\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks_position:matplotlib-axis-yaxis-set-ticks-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks_position::doc}}\index{set\_ticks\_position() (matplotlib.axis.YAxis method)@\spxentry{set\_ticks\_position()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks_position:matplotlib.axis.YAxis.set_ticks_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticks\_position}}}{\emph{self}, \emph{position}}{} Set the ticks position (left, right, both, default or none) 'both' sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at left. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'left', 'right', 'both', 'default', 'none'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.YAxis.set\_ticks\_position}}} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks_position:examples-using-matplotlib-axis-yaxis-set-ticks-position}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_spines.py} \end{itemize} \paragraph{matplotlib.axis.YAxis.tick\_left} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_left:matplotlib-axis-yaxis-tick-left}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_left::doc}}\index{tick\_left() (matplotlib.axis.YAxis method)@\spxentry{tick\_left()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_left:matplotlib.axis.YAxis.tick_left}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{tick\_left}}}{\emph{self}}{} Move ticks and ticklabels (if present) to the left of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.tick\_right} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_right:matplotlib-axis-yaxis-tick-right}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_right::doc}}\index{tick\_right() (matplotlib.axis.YAxis method)@\spxentry{tick\_right()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.tick_right:matplotlib.axis.YAxis.tick_right}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{tick\_right}}}{\emph{self}}{} Move ticks and ticklabels (if present) to the right of the axes. \end{fulllineitems} \subsubsection{XAxis Specific} \label{\detokenize{api/axis_api:xaxis-specific}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_name:matplotlib.axis.XAxis.axis_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.axis\_name}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_text_heights:matplotlib.axis.XAxis.get_text_heights}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_text\_heights}}}}} & Returns the amount of space one should reserve for text above and below the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticks_position:matplotlib.axis.XAxis.get_ticks_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_ticks\_position}}}}} & Return the ticks position ("top", "bottom", "default", or "unknown"). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks_position:matplotlib.axis.XAxis.set_ticks_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_ticks\_position}}}}} & Set the ticks position (top, bottom, both, default or none) both sets the ticks to appear on both positions, but does not change the tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_bottom:matplotlib.axis.XAxis.tick_bottom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.tick\_bottom}}}}} & Move ticks and ticklabels (if present) to the bottom of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_top:matplotlib.axis.XAxis.tick_top}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.tick\_top}}}}} & Move ticks and ticklabels (if present) to the top of the axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.XAxis.axis\_name} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_name:matplotlib-axis-xaxis-axis-name}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_name::doc}}\index{axis\_name (matplotlib.axis.XAxis attribute)@\spxentry{axis\_name}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_name:matplotlib.axis.XAxis.axis_name}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{axis\_name}}\sphinxbfcode{\sphinxupquote{ = 'x'}}} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_text\_heights} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_text_heights:matplotlib-axis-xaxis-get-text-heights}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_text_heights::doc}}\index{get\_text\_heights() (matplotlib.axis.XAxis method)@\spxentry{get\_text\_heights()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_text_heights:matplotlib.axis.XAxis.get_text_heights}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_text\_heights}}}{\emph{self}, \emph{renderer}}{} Returns the amount of space one should reserve for text above and below the axes. Returns a tuple (above, below) \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_ticks\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticks_position:matplotlib-axis-xaxis-get-ticks-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticks_position::doc}}\index{get\_ticks\_position() (matplotlib.axis.XAxis method)@\spxentry{get\_ticks\_position()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticks_position:matplotlib.axis.XAxis.get_ticks_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticks\_position}}}{\emph{self}}{} Return the ticks position ("top", "bottom", "default", or "unknown"). \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_ticks\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks_position:matplotlib-axis-xaxis-set-ticks-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks_position::doc}}\index{set\_ticks\_position() (matplotlib.axis.XAxis method)@\spxentry{set\_ticks\_position()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks_position:matplotlib.axis.XAxis.set_ticks_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticks\_position}}}{\emph{self}, \emph{position}}{} Set the ticks position (top, bottom, both, default or none) both sets the ticks to appear on both positions, but does not change the tick labels. 'default' resets the tick positions to the default: ticks on both positions, labels at bottom. 'none' can be used if you don't want any ticks. 'none' and 'both' affect only the ticks, not the labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'top', 'bottom', 'both', 'default', 'none'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.XAxis.set\_ticks\_position}}} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks_position:examples-using-matplotlib-axis-xaxis-set-ticks-position}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_spines.py} \end{itemize} \paragraph{matplotlib.axis.XAxis.tick\_bottom} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_bottom:matplotlib-axis-xaxis-tick-bottom}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_bottom::doc}}\index{tick\_bottom() (matplotlib.axis.XAxis method)@\spxentry{tick\_bottom()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_bottom:matplotlib.axis.XAxis.tick_bottom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{tick\_bottom}}}{\emph{self}}{} Move ticks and ticklabels (if present) to the bottom of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.tick\_top} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_top:matplotlib-axis-xaxis-tick-top}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_top::doc}}\index{tick\_top() (matplotlib.axis.XAxis method)@\spxentry{tick\_top()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.tick_top:matplotlib.axis.XAxis.tick_top}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{tick\_top}}}{\emph{self}}{} Move ticks and ticklabels (if present) to the top of the axes. \end{fulllineitems} \subsubsection{Other} \label{\detokenize{api/axis_api:other}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.OFFSETTEXTPAD:matplotlib.axis.Axis.OFFSETTEXTPAD}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.OFFSETTEXTPAD}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.limit_range_for_scale:matplotlib.axis.Axis.limit_range_for_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.limit\_range\_for\_scale}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.reset_ticks:matplotlib.axis.Axis.reset_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.reset\_ticks}}}}} & Re-initialize the major and minor Tick lists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_default_intervals:matplotlib.axis.Axis.set_default_intervals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_default\_intervals}}}}} & Set the default limits for the axis data and view interval if they have not been not mutated yet. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_smart_bounds:matplotlib.axis.Axis.get_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_smart\_bounds}}}}} & get whether the axis has smart bounds \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_smart_bounds:matplotlib.axis.Axis.set_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_smart\_bounds}}}}} & set the axis to have smart bounds \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.OFFSETTEXTPAD} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.OFFSETTEXTPAD:matplotlib-axis-axis-offsettextpad}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.OFFSETTEXTPAD::doc}}\index{OFFSETTEXTPAD (matplotlib.axis.Axis attribute)@\spxentry{OFFSETTEXTPAD}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.OFFSETTEXTPAD:matplotlib.axis.Axis.OFFSETTEXTPAD}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{OFFSETTEXTPAD}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.limit\_range\_for\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.limit_range_for_scale:matplotlib-axis-axis-limit-range-for-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.limit_range_for_scale::doc}}\index{limit\_range\_for\_scale() (matplotlib.axis.Axis method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.limit_range_for_scale:matplotlib.axis.Axis.limit_range_for_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.Axis.reset\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.reset_ticks:matplotlib-axis-axis-reset-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.reset_ticks::doc}}\index{reset\_ticks() (matplotlib.axis.Axis method)@\spxentry{reset\_ticks()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.reset_ticks:matplotlib.axis.Axis.reset_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{reset\_ticks}}}{\emph{self}}{} Re-initialize the major and minor Tick lists. Each list starts with a single fresh Tick. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_default\_intervals} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_default_intervals:matplotlib-axis-axis-set-default-intervals}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_default_intervals::doc}}\index{set\_default\_intervals() (matplotlib.axis.Axis method)@\spxentry{set\_default\_intervals()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_default_intervals:matplotlib.axis.Axis.set_default_intervals}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_default\_intervals}}}{\emph{self}}{} Set the default limits for the axis data and view interval if they have not been not mutated yet. \end{fulllineitems} \paragraph{matplotlib.axis.Axis.get\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_smart_bounds:matplotlib-axis-axis-get-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_smart_bounds::doc}}\index{get\_smart\_bounds() (matplotlib.axis.Axis method)@\spxentry{get\_smart\_bounds()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_smart_bounds:matplotlib.axis.Axis.get_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_smart\_bounds}}}{\emph{self}}{} get whether the axis has smart bounds \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_smart_bounds:matplotlib-axis-axis-set-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_smart_bounds::doc}}\index{set\_smart\_bounds() (matplotlib.axis.Axis method)@\spxentry{set\_smart\_bounds()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_smart_bounds:matplotlib.axis.Axis.set_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_smart\_bounds}}}{\emph{self}, \emph{value}}{} set the axis to have smart bounds \end{fulllineitems} \subsubsection{Discouraged} \label{\detokenize{api/axis_api:discouraged}} These methods implicitly use {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FixedLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedLocator}}}}} and {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FixedFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedFormatter}}}}}. They can be convenient, but if not used together may de-couple your tick labels from your data. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels:matplotlib.axis.Axis.set_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_ticklabels}}}}} & Set the text values of the tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticks:matplotlib.axis.Axis.set_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_ticks}}}}} & Set the locations of the tick marks from sequence ticks \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.Axis.set\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels:matplotlib-axis-axis-set-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels::doc}}\index{set\_ticklabels() (matplotlib.axis.Axis method)@\spxentry{set\_ticklabels()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticklabels:matplotlib.axis.Axis.set_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_ticklabels}}}{\emph{self}, \emph{ticklabels}, \emph{*args}, \emph{minor=False}, \emph{**kwargs}}{} Set the text values of the tick labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticklabels}}] \leavevmode{[}sequence of str or of \sphinxcode{\sphinxupquote{Text}}s{]} List of texts for tick labels; must include values for non-visible labels. \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True, set minor ticks instead of major ticks. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Text properties. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{Text}}s{]} For each tick, includes \sphinxcode{\sphinxupquote{tick.label1}} if it is visible, then \sphinxcode{\sphinxupquote{tick.label2}} if it is visible, in that order. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.Axis.set\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticks:matplotlib-axis-axis-set-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticks::doc}}\index{set\_ticks() (matplotlib.axis.Axis method)@\spxentry{set\_ticks()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticks:matplotlib.axis.Axis.set_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_ticks}}}{\emph{self}, \emph{ticks}, \emph{minor=False}}{} Set the locations of the tick marks from sequence ticks \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}sequence of floats{]} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.axis.Axis.set\_ticks}}} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_ticks:examples-using-matplotlib-axis-axis-set-ticks}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_spines.py} \end{itemize} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{Tick}} objects} \label{\detokenize{api/axis_api:tick-objects}}\index{Tick (class in matplotlib.axis)@\spxentry{Tick}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.Tick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{Tick}}}{\emph{axes}, \emph{loc}, \emph{label}, \emph{size=None}, \emph{width=None}, \emph{color=None}, \emph{tickdir=None}, \emph{pad=None}, \emph{labelsize=None}, \emph{labelcolor=None}, \emph{zorder=None}, \emph{gridOn=None}, \emph{tick1On=True}, \emph{tick2On=True}, \emph{label1On=True}, \emph{label2On=False}, \emph{major=True}, \emph{labelrotation=0}, \emph{grid\_color=None}, \emph{grid\_linestyle=None}, \emph{grid\_linewidth=None}, \emph{grid\_alpha=None}, \emph{**kw}}{} Abstract base class for the axis ticks, grid lines and labels. Ticks mark a position on an Axis. They contain two lines as markers and two labels; one each for the bottom and top positions (in case of an {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis}}}}}) or for the left and right positions (in case of a {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis}}}}}). \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tick1line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The left/bottom tick marker. \item[{\sphinxstylestrong{tick2line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The right/top tick marker. \item[{\sphinxstylestrong{gridline}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The grid line associated with the label position. \item[{\sphinxstylestrong{label1}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The left/bottom tick label. \item[{\sphinxstylestrong{label2}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The right/top tick label. \end{description} \end{description}\end{quote} bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points \end{fulllineitems} \index{XTick (class in matplotlib.axis)@\spxentry{XTick}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.XTick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{XTick}}}{\emph{axes}, \emph{loc}, \emph{label}, \emph{size=None}, \emph{width=None}, \emph{color=None}, \emph{tickdir=None}, \emph{pad=None}, \emph{labelsize=None}, \emph{labelcolor=None}, \emph{zorder=None}, \emph{gridOn=None}, \emph{tick1On=True}, \emph{tick2On=True}, \emph{label1On=True}, \emph{label2On=False}, \emph{major=True}, \emph{labelrotation=0}, \emph{grid\_color=None}, \emph{grid\_linestyle=None}, \emph{grid\_linewidth=None}, \emph{grid\_alpha=None}, \emph{**kw}}{} Contains all the Artists needed to make an x tick - the tick line, the label text and the grid line bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points \end{fulllineitems} \index{YTick (class in matplotlib.axis)@\spxentry{YTick}\spxextra{class in matplotlib.axis}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/axis_api:matplotlib.axis.YTick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.axis.}}\sphinxbfcode{\sphinxupquote{YTick}}}{\emph{axes}, \emph{loc}, \emph{label}, \emph{size=None}, \emph{width=None}, \emph{color=None}, \emph{tickdir=None}, \emph{pad=None}, \emph{labelsize=None}, \emph{labelcolor=None}, \emph{zorder=None}, \emph{gridOn=None}, \emph{tick1On=True}, \emph{tick2On=True}, \emph{label1On=True}, \emph{label2On=False}, \emph{major=True}, \emph{labelrotation=0}, \emph{grid\_color=None}, \emph{grid\_linestyle=None}, \emph{grid\_linewidth=None}, \emph{grid\_alpha=None}, \emph{**kw}}{} Contains all the Artists needed to make a Y tick - the tick line, the label text and the grid line bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points \end{fulllineitems} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.apply_tickdir:matplotlib.axis.Tick.apply_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.apply\_tickdir}}}}} & Calculate self.\_pad and self.\_tickmarkers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_loc:matplotlib.axis.Tick.get_loc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_loc}}}}} & Return the tick location (data coords) as a scalar \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad:matplotlib.axis.Tick.get_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_pad}}}}} & Get the value of the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad_pixels:matplotlib.axis.Tick.get_pad_pixels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_pad\_pixels}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tick_padding:matplotlib.axis.Tick.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_tick\_padding}}}}} & Get the length of the tick outside of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tickdir:matplotlib.axis.Tick.get_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_tickdir}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_view_interval:matplotlib.axis.Tick.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_view\_interval}}}}} & return the view Interval instance for the axis this tick is ticking \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label1:matplotlib.axis.Tick.set_label1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_label1}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label2:matplotlib.axis.Tick.set_label2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_label2}}}}} & Set the label2 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_pad:matplotlib.axis.Tick.set_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_pad}}}}} & Set the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.update_position:matplotlib.axis.Tick.update_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.update\_position}}}}} & Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.axis.Tick.apply\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.apply_tickdir:matplotlib-axis-tick-apply-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.apply_tickdir::doc}}\index{apply\_tickdir() (matplotlib.axis.Tick method)@\spxentry{apply\_tickdir()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.apply_tickdir:matplotlib.axis.Tick.apply_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{apply\_tickdir}}}{\emph{self}, \emph{tickdir}}{} Calculate self.\_pad and self.\_tickmarkers. \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_loc} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_loc:matplotlib-axis-tick-get-loc}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_loc::doc}}\index{get\_loc() (matplotlib.axis.Tick method)@\spxentry{get\_loc()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_loc:matplotlib.axis.Tick.get_loc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_loc}}}{\emph{self}}{} Return the tick location (data coords) as a scalar \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad:matplotlib-axis-tick-get-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad::doc}}\index{get\_pad() (matplotlib.axis.Tick method)@\spxentry{get\_pad()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad:matplotlib.axis.Tick.get_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_pad}}}{\emph{self}}{} Get the value of the tick label pad in points \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_pad\_pixels} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad_pixels:matplotlib-axis-tick-get-pad-pixels}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad_pixels::doc}}\index{get\_pad\_pixels() (matplotlib.axis.Tick method)@\spxentry{get\_pad\_pixels()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_pad_pixels:matplotlib.axis.Tick.get_pad_pixels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_pad\_pixels}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tick_padding:matplotlib-axis-tick-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.Tick method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tick_padding:matplotlib.axis.Tick.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{} Get the length of the tick outside of the axes. \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tickdir:matplotlib-axis-tick-get-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tickdir::doc}}\index{get\_tickdir() (matplotlib.axis.Tick method)@\spxentry{get\_tickdir()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_tickdir:matplotlib.axis.Tick.get_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_tickdir}}}{\emph{self}}{}~ \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_view_interval:matplotlib-axis-tick-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.Tick method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_view_interval:matplotlib.axis.Tick.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} return the view Interval instance for the axis this tick is ticking \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.set\_label1} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label1:matplotlib-axis-tick-set-label1}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label1::doc}}\index{set\_label1() (matplotlib.axis.Tick method)@\spxentry{set\_label1()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label1:matplotlib.axis.Tick.set_label1}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_label1}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.set\_label2} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label2:matplotlib-axis-tick-set-label2}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label2::doc}}\index{set\_label2() (matplotlib.axis.Tick method)@\spxentry{set\_label2()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label2:matplotlib.axis.Tick.set_label2}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_label2}}}{\emph{self}, \emph{s}}{} Set the label2 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.set\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_pad:matplotlib-axis-tick-set-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_pad::doc}}\index{set\_pad() (matplotlib.axis.Tick method)@\spxentry{set\_pad()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_pad:matplotlib.axis.Tick.set_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_pad}}}{\emph{self}, \emph{val}}{} Set the tick label pad in points \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.axis.Tick.update\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_position:matplotlib-axis-tick-update-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_position::doc}}\index{update\_position() (matplotlib.axis.Tick method)@\spxentry{update\_position()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_position:matplotlib.axis.Tick.update_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{update\_position}}}{\emph{self}, \emph{loc}}{} Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc} \end{fulllineitems} \subsection{Common and inherited methods} \label{\detokenize{api/axis_api:common-and-inherited-methods}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{XTick}}} \label{\detokenize{api/axis_api:xtick}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.apply_tickdir:matplotlib.axis.XTick.apply_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.apply\_tickdir}}}}} & Calculate self.\_pad and self.\_tickmarkers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_loc:matplotlib.axis.XTick.get_loc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_loc}}}}} & Return the tick location (data coords) as a scalar \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad:matplotlib.axis.XTick.get_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_pad}}}}} & Get the value of the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad_pixels:matplotlib.axis.XTick.get_pad_pixels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_pad\_pixels}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tick_padding:matplotlib.axis.XTick.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_tick\_padding}}}}} & Get the length of the tick outside of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tickdir:matplotlib.axis.XTick.get_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_tickdir}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_view_interval:matplotlib.axis.XTick.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_view\_interval}}}}} & return the view Interval instance for the axis this tick is ticking \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label1:matplotlib.axis.XTick.set_label1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_label1}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label2:matplotlib.axis.XTick.set_label2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_label2}}}}} & Set the label2 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_pad:matplotlib.axis.XTick.set_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_pad}}}}} & Set the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.update_position:matplotlib.axis.XTick.update_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.update\_position}}}}} & Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.XTick.apply\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.apply_tickdir:matplotlib-axis-xtick-apply-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.apply_tickdir::doc}}\index{apply\_tickdir() (matplotlib.axis.XTick method)@\spxentry{apply\_tickdir()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.apply_tickdir:matplotlib.axis.XTick.apply_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{apply\_tickdir}}}{\emph{self}, \emph{tickdir}}{} Calculate self.\_pad and self.\_tickmarkers. \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_loc} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_loc:matplotlib-axis-xtick-get-loc}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_loc::doc}}\index{get\_loc() (matplotlib.axis.XTick method)@\spxentry{get\_loc()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_loc:matplotlib.axis.XTick.get_loc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_loc}}}{\emph{self}}{} Return the tick location (data coords) as a scalar \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad:matplotlib-axis-xtick-get-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad::doc}}\index{get\_pad() (matplotlib.axis.XTick method)@\spxentry{get\_pad()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad:matplotlib.axis.XTick.get_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_pad}}}{\emph{self}}{} Get the value of the tick label pad in points \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_pad\_pixels} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad_pixels:matplotlib-axis-xtick-get-pad-pixels}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad_pixels::doc}}\index{get\_pad\_pixels() (matplotlib.axis.XTick method)@\spxentry{get\_pad\_pixels()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_pad_pixels:matplotlib.axis.XTick.get_pad_pixels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_pad\_pixels}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tick_padding:matplotlib-axis-xtick-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.XTick method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tick_padding:matplotlib.axis.XTick.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{} Get the length of the tick outside of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tickdir:matplotlib-axis-xtick-get-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tickdir::doc}}\index{get\_tickdir() (matplotlib.axis.XTick method)@\spxentry{get\_tickdir()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_tickdir:matplotlib.axis.XTick.get_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_tickdir}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XTick.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_view_interval:matplotlib-axis-xtick-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.XTick method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_view_interval:matplotlib.axis.XTick.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} return the view Interval instance for the axis this tick is ticking \end{fulllineitems} \paragraph{matplotlib.axis.XTick.set\_label1} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label1:matplotlib-axis-xtick-set-label1}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label1::doc}}\index{set\_label1() (matplotlib.axis.XTick method)@\spxentry{set\_label1()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label1:matplotlib.axis.XTick.set_label1}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_label1}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XTick.set\_label2} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label2:matplotlib-axis-xtick-set-label2}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label2::doc}}\index{set\_label2() (matplotlib.axis.XTick method)@\spxentry{set\_label2()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label2:matplotlib.axis.XTick.set_label2}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_label2}}}{\emph{self}, \emph{s}}{} Set the label2 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XTick.set\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_pad:matplotlib-axis-xtick-set-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_pad::doc}}\index{set\_pad() (matplotlib.axis.XTick method)@\spxentry{set\_pad()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_pad:matplotlib.axis.XTick.set_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_pad}}}{\emph{self}, \emph{val}}{} Set the tick label pad in points \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XTick.update\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_position:matplotlib-axis-xtick-update-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_position::doc}}\index{update\_position() (matplotlib.axis.XTick method)@\spxentry{update\_position()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_position:matplotlib.axis.XTick.update_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{update\_position}}}{\emph{self}, \emph{loc}}{} Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \end{fulllineitems} \subsubsection{YTick} \label{\detokenize{api/axis_api:ytick}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.apply_tickdir:matplotlib.axis.YTick.apply_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.apply\_tickdir}}}}} & Calculate self.\_pad and self.\_tickmarkers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_loc:matplotlib.axis.YTick.get_loc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_loc}}}}} & Return the tick location (data coords) as a scalar \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad:matplotlib.axis.YTick.get_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_pad}}}}} & Get the value of the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad_pixels:matplotlib.axis.YTick.get_pad_pixels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_pad\_pixels}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tick_padding:matplotlib.axis.YTick.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_tick\_padding}}}}} & Get the length of the tick outside of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tickdir:matplotlib.axis.YTick.get_tickdir}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_tickdir}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_view_interval:matplotlib.axis.YTick.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_view\_interval}}}}} & Return the Interval instance for this axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label1:matplotlib.axis.YTick.set_label1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_label1}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label2:matplotlib.axis.YTick.set_label2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_label2}}}}} & Set the label2 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_pad:matplotlib.axis.YTick.set_pad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_pad}}}}} & Set the tick label pad in points \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.update_position:matplotlib.axis.YTick.update_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.update\_position}}}}} & Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.YTick.apply\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.apply_tickdir:matplotlib-axis-ytick-apply-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.apply_tickdir::doc}}\index{apply\_tickdir() (matplotlib.axis.YTick method)@\spxentry{apply\_tickdir()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.apply_tickdir:matplotlib.axis.YTick.apply_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{apply\_tickdir}}}{\emph{self}, \emph{tickdir}}{} Calculate self.\_pad and self.\_tickmarkers. \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_loc} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_loc:matplotlib-axis-ytick-get-loc}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_loc::doc}}\index{get\_loc() (matplotlib.axis.YTick method)@\spxentry{get\_loc()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_loc:matplotlib.axis.YTick.get_loc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_loc}}}{\emph{self}}{} Return the tick location (data coords) as a scalar \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad:matplotlib-axis-ytick-get-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad::doc}}\index{get\_pad() (matplotlib.axis.YTick method)@\spxentry{get\_pad()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad:matplotlib.axis.YTick.get_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_pad}}}{\emph{self}}{} Get the value of the tick label pad in points \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_pad\_pixels} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad_pixels:matplotlib-axis-ytick-get-pad-pixels}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad_pixels::doc}}\index{get\_pad\_pixels() (matplotlib.axis.YTick method)@\spxentry{get\_pad\_pixels()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_pad_pixels:matplotlib.axis.YTick.get_pad_pixels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_pad\_pixels}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tick_padding:matplotlib-axis-ytick-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.YTick method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tick_padding:matplotlib.axis.YTick.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{} Get the length of the tick outside of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_tickdir} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tickdir:matplotlib-axis-ytick-get-tickdir}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tickdir::doc}}\index{get\_tickdir() (matplotlib.axis.YTick method)@\spxentry{get\_tickdir()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_tickdir:matplotlib.axis.YTick.get_tickdir}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_tickdir}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YTick.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_view_interval:matplotlib-axis-ytick-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.YTick method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_view_interval:matplotlib.axis.YTick.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} Return the Interval instance for this axis view limits. \end{fulllineitems} \paragraph{matplotlib.axis.YTick.set\_label1} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label1:matplotlib-axis-ytick-set-label1}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label1::doc}}\index{set\_label1() (matplotlib.axis.YTick method)@\spxentry{set\_label1()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label1:matplotlib.axis.YTick.set_label1}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_label1}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YTick.set\_label2} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label2:matplotlib-axis-ytick-set-label2}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label2::doc}}\index{set\_label2() (matplotlib.axis.YTick method)@\spxentry{set\_label2()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label2:matplotlib.axis.YTick.set_label2}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_label2}}}{\emph{self}, \emph{s}}{} Set the label2 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YTick.set\_pad} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_pad:matplotlib-axis-ytick-set-pad}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_pad::doc}}\index{set\_pad() (matplotlib.axis.YTick method)@\spxentry{set\_pad()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_pad:matplotlib.axis.YTick.set_pad}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_pad}}}{\emph{self}, \emph{val}}{} Set the tick label pad in points \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YTick.update\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_position:matplotlib-axis-ytick-update-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_position::doc}}\index{update\_position() (matplotlib.axis.YTick method)@\spxentry{update\_position()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_position:matplotlib.axis.YTick.update_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{update\_position}}}{\emph{self}, \emph{loc}}{} Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \end{fulllineitems} \subsubsection{YAxis} \label{\detokenize{api/axis_api:yaxis}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.OFFSETTEXTPAD:matplotlib.axis.YAxis.OFFSETTEXTPAD}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.OFFSETTEXTPAD}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_date:matplotlib.axis.YAxis.axis_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.axis\_date}}}}} & Sets up x-axis ticks and labels that treat the x data as dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.cla:matplotlib.axis.YAxis.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.cla}}}}} & clear the current axis \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_units:matplotlib.axis.YAxis.convert_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.convert\_units}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_data_interval:matplotlib.axis.YAxis.get_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_data\_interval}}}}} & Return the Interval instance for this axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gridlines:matplotlib.axis.YAxis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_gridlines}}}}} & Return the grid lines as a list of Line2D instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_position:matplotlib.axis.YAxis.get_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_label\_position}}}}} & Return the label position (top or bottom) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_text:matplotlib.axis.YAxis.get_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_label\_text}}}}} & Get the text of the label \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_formatter:matplotlib.axis.YAxis.get_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_major\_formatter}}}}} & Get the formatter of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_locator:matplotlib.axis.YAxis.get_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_major\_locator}}}}} & Get the locator of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_ticks:matplotlib.axis.YAxis.get_major_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_major\_ticks}}}}} & Get the tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklabels:matplotlib.axis.YAxis.get_majorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_majorticklabels}}}}} & Return a list of Text instances for the major ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklines:matplotlib.axis.YAxis.get_majorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_majorticklines}}}}} & Return the major tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklocs:matplotlib.axis.YAxis.get_majorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_majorticklocs}}}}} & Get the array of major tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_formatter:matplotlib.axis.YAxis.get_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minor\_formatter}}}}} & Get the formatter of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_locator:matplotlib.axis.YAxis.get_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minor\_locator}}}}} & Get the locator of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_ticks:matplotlib.axis.YAxis.get_minor_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minor\_ticks}}}}} & Get the minor tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklabels:matplotlib.axis.YAxis.get_minorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minorticklabels}}}}} & Return a list of Text instances for the minor ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklines:matplotlib.axis.YAxis.get_minorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minorticklines}}}}} & Return the minor tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklocs:matplotlib.axis.YAxis.get_minorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minorticklocs}}}}} & Get the array of minor tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minpos:matplotlib.axis.YAxis.get_minpos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_minpos}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_offset_text:matplotlib.axis.YAxis.get_offset_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_offset\_text}}}}} & Return the axis offsetText as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_pickradius:matplotlib.axis.YAxis.get_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_pickradius}}}}} & Return the depth of the axis used by the picker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_scale:matplotlib.axis.YAxis.get_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_scale}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_smart_bounds:matplotlib.axis.YAxis.get_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_smart\_bounds}}}}} & get whether the axis has smart bounds \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_padding:matplotlib.axis.YAxis.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_tick\_padding}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_space:matplotlib.axis.YAxis.get_tick_space}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_tick\_space}}}}} & Return the estimated number of ticks that can fit on the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabel_extents:matplotlib.axis.YAxis.get_ticklabel_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_ticklabel\_extents}}}}} & Get the extents of the tick labels on either side of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabels:matplotlib.axis.YAxis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_ticklabels}}}}} & Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklines:matplotlib.axis.YAxis.get_ticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_ticklines}}}}} & Return the tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklocs:matplotlib.axis.YAxis.get_ticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_ticklocs}}}}} & Get the array of tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tightbbox:matplotlib.axis.YAxis.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_tightbbox}}}}} & Return a bounding box that encloses the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_units:matplotlib.axis.YAxis.get_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_units}}}}} & Return the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_view_interval:matplotlib.axis.YAxis.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_view\_interval}}}}} & Return the Interval instance for this axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.grid:matplotlib.axis.YAxis.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.grid}}}}} & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.limit_range_for_scale:matplotlib.axis.YAxis.limit_range_for_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.limit\_range\_for\_scale}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pan:matplotlib.axis.YAxis.pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.pan}}}}} & Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.reset_ticks:matplotlib.axis.YAxis.reset_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.reset\_ticks}}}}} & Re-initialize the major and minor Tick lists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_data_interval:matplotlib.axis.YAxis.set_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_data\_interval}}}}} & Set the axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_default_intervals:matplotlib.axis.YAxis.set_default_intervals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_default\_intervals}}}}} & Set the default limits for the axis data and view interval if they have not been not mutated yet. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_coords:matplotlib.axis.YAxis.set_label_coords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_label\_coords}}}}} & Set the coordinates of the label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_position:matplotlib.axis.YAxis.set_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_label\_position}}}}} & Set the label position (left or right) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_text:matplotlib.axis.YAxis.set_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_label\_text}}}}} & Set the text value of the axis label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_formatter:matplotlib.axis.YAxis.set_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_major\_formatter}}}}} & Set the formatter of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_locator:matplotlib.axis.YAxis.set_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_major\_locator}}}}} & Set the locator of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_formatter:matplotlib.axis.YAxis.set_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_minor\_formatter}}}}} & Set the formatter of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_locator:matplotlib.axis.YAxis.set_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_minor\_locator}}}}} & Set the locator of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_pickradius:matplotlib.axis.YAxis.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_pickradius}}}}} & Set the depth of the axis used by the picker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_smart_bounds:matplotlib.axis.YAxis.set_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_smart\_bounds}}}}} & set the axis to have smart bounds \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_tick_params:matplotlib.axis.YAxis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_tick\_params}}}}} & Set appearance parameters for ticks, ticklabels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticklabels:matplotlib.axis.YAxis.set_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_ticklabels}}}}} & Set the text values of the tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks:matplotlib.axis.YAxis.set_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_ticks}}}}} & Set the locations of the tick marks from sequence ticks \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_units:matplotlib.axis.YAxis.set_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_units}}}}} & Set the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_view_interval:matplotlib.axis.YAxis.set_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_view\_interval}}}}} & Set the axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_units:matplotlib.axis.YAxis.update_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.update\_units}}}}} & introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.zoom:matplotlib.axis.YAxis.zoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.zoom}}}}} & Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.YAxis.OFFSETTEXTPAD} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.OFFSETTEXTPAD:matplotlib-axis-yaxis-offsettextpad}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.OFFSETTEXTPAD::doc}}\index{OFFSETTEXTPAD (matplotlib.axis.YAxis attribute)@\spxentry{OFFSETTEXTPAD}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.OFFSETTEXTPAD:matplotlib.axis.YAxis.OFFSETTEXTPAD}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{OFFSETTEXTPAD}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.axis\_date} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_date:matplotlib-axis-yaxis-axis-date}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_date::doc}}\index{axis\_date() (matplotlib.axis.YAxis method)@\spxentry{axis\_date()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axis_date:matplotlib.axis.YAxis.axis_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{axis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up x-axis ticks and labels that treat the x data as dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tz}}] \leavevmode{[}tzinfo or str or None{]} The timezone used to create date labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.cla} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.cla:matplotlib-axis-yaxis-cla}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.cla::doc}}\index{cla() (matplotlib.axis.YAxis method)@\spxentry{cla()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.cla:matplotlib.axis.YAxis.cla}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} clear the current axis \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.convert\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_units:matplotlib-axis-yaxis-convert-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_units::doc}}\index{convert\_units() (matplotlib.axis.YAxis method)@\spxentry{convert\_units()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_units:matplotlib.axis.YAxis.convert_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{convert\_units}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_data_interval:matplotlib-axis-yaxis-get-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_data_interval::doc}}\index{get\_data\_interval() (matplotlib.axis.YAxis method)@\spxentry{get\_data\_interval()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_data_interval:matplotlib.axis.YAxis.get_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_data\_interval}}}{\emph{self}}{} Return the Interval instance for this axis data limits. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_gridlines} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gridlines:matplotlib-axis-yaxis-get-gridlines}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gridlines::doc}}\index{get\_gridlines() (matplotlib.axis.YAxis method)@\spxentry{get\_gridlines()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gridlines:matplotlib.axis.YAxis.get_gridlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}}{} Return the grid lines as a list of Line2D instance \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_position:matplotlib-axis-yaxis-get-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_position::doc}}\index{get\_label\_position() (matplotlib.axis.YAxis method)@\spxentry{get\_label\_position()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_position:matplotlib.axis.YAxis.get_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_label\_position}}}{\emph{self}}{} Return the label position (top or bottom) \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_text:matplotlib-axis-yaxis-get-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_text::doc}}\index{get\_label\_text() (matplotlib.axis.YAxis method)@\spxentry{get\_label\_text()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label_text:matplotlib.axis.YAxis.get_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_label\_text}}}{\emph{self}}{} Get the text of the label \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_formatter:matplotlib-axis-yaxis-get-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_formatter::doc}}\index{get\_major\_formatter() (matplotlib.axis.YAxis method)@\spxentry{get\_major\_formatter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_formatter:matplotlib.axis.YAxis.get_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_formatter}}}{\emph{self}}{} Get the formatter of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_locator:matplotlib-axis-yaxis-get-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_locator::doc}}\index{get\_major\_locator() (matplotlib.axis.YAxis method)@\spxentry{get\_major\_locator()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_locator:matplotlib.axis.YAxis.get_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_locator}}}{\emph{self}}{} Get the locator of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_major\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_ticks:matplotlib-axis-yaxis-get-major-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_ticks::doc}}\index{get\_major\_ticks() (matplotlib.axis.YAxis method)@\spxentry{get\_major\_ticks()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_major_ticks:matplotlib.axis.YAxis.get_major_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the tick instances; grow as necessary. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_majorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklabels:matplotlib-axis-yaxis-get-majorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklabels::doc}}\index{get\_majorticklabels() (matplotlib.axis.YAxis method)@\spxentry{get\_majorticklabels()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklabels:matplotlib.axis.YAxis.get_majorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklabels}}}{\emph{self}}{} Return a list of Text instances for the major ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_majorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklines:matplotlib-axis-yaxis-get-majorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklines::doc}}\index{get\_majorticklines() (matplotlib.axis.YAxis method)@\spxentry{get\_majorticklines()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklines:matplotlib.axis.YAxis.get_majorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklines}}}{\emph{self}}{} Return the major tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_majorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklocs:matplotlib-axis-yaxis-get-majorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklocs::doc}}\index{get\_majorticklocs() (matplotlib.axis.YAxis method)@\spxentry{get\_majorticklocs()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_majorticklocs:matplotlib.axis.YAxis.get_majorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklocs}}}{\emph{self}}{} Get the array of major tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_formatter:matplotlib-axis-yaxis-get-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_formatter::doc}}\index{get\_minor\_formatter() (matplotlib.axis.YAxis method)@\spxentry{get\_minor\_formatter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_formatter:matplotlib.axis.YAxis.get_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_formatter}}}{\emph{self}}{} Get the formatter of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_locator:matplotlib-axis-yaxis-get-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_locator::doc}}\index{get\_minor\_locator() (matplotlib.axis.YAxis method)@\spxentry{get\_minor\_locator()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_locator:matplotlib.axis.YAxis.get_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_locator}}}{\emph{self}}{} Get the locator of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minor\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_ticks:matplotlib-axis-yaxis-get-minor-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_ticks::doc}}\index{get\_minor\_ticks() (matplotlib.axis.YAxis method)@\spxentry{get\_minor\_ticks()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minor_ticks:matplotlib.axis.YAxis.get_minor_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the minor tick instances; grow as necessary. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklabels:matplotlib-axis-yaxis-get-minorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklabels::doc}}\index{get\_minorticklabels() (matplotlib.axis.YAxis method)@\spxentry{get\_minorticklabels()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklabels:matplotlib.axis.YAxis.get_minorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklabels}}}{\emph{self}}{} Return a list of Text instances for the minor ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklines:matplotlib-axis-yaxis-get-minorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklines::doc}}\index{get\_minorticklines() (matplotlib.axis.YAxis method)@\spxentry{get\_minorticklines()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklines:matplotlib.axis.YAxis.get_minorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklines}}}{\emph{self}}{} Return the minor tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklocs:matplotlib-axis-yaxis-get-minorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklocs::doc}}\index{get\_minorticklocs() (matplotlib.axis.YAxis method)@\spxentry{get\_minorticklocs()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minorticklocs:matplotlib.axis.YAxis.get_minorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklocs}}}{\emph{self}}{} Get the array of minor tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_minpos} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minpos:matplotlib-axis-yaxis-get-minpos}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minpos::doc}}\index{get\_minpos() (matplotlib.axis.YAxis method)@\spxentry{get\_minpos()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_minpos:matplotlib.axis.YAxis.get_minpos}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_minpos}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_offset\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_offset_text:matplotlib-axis-yaxis-get-offset-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_offset_text::doc}}\index{get\_offset\_text() (matplotlib.axis.YAxis method)@\spxentry{get\_offset\_text()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_offset_text:matplotlib.axis.YAxis.get_offset_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_offset\_text}}}{\emph{self}}{} Return the axis offsetText as a Text instance \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_pickradius:matplotlib-axis-yaxis-get-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_pickradius::doc}}\index{get\_pickradius() (matplotlib.axis.YAxis method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_pickradius:matplotlib.axis.YAxis.get_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{} Return the depth of the axis used by the picker \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_scale:matplotlib-axis-yaxis-get-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_scale::doc}}\index{get\_scale() (matplotlib.axis.YAxis method)@\spxentry{get\_scale()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_scale:matplotlib.axis.YAxis.get_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_scale}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_smart_bounds:matplotlib-axis-yaxis-get-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_smart_bounds::doc}}\index{get\_smart\_bounds() (matplotlib.axis.YAxis method)@\spxentry{get\_smart\_bounds()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_smart_bounds:matplotlib.axis.YAxis.get_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_smart\_bounds}}}{\emph{self}}{} get whether the axis has smart bounds \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_padding:matplotlib-axis-yaxis-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.YAxis method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_padding:matplotlib.axis.YAxis.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_tick\_space} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_space:matplotlib-axis-yaxis-get-tick-space}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_space::doc}}\index{get\_tick\_space() (matplotlib.axis.YAxis method)@\spxentry{get\_tick\_space()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tick_space:matplotlib.axis.YAxis.get_tick_space}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_space}}}{\emph{self}}{} Return the estimated number of ticks that can fit on the axis. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_ticklabel\_extents} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabel_extents:matplotlib-axis-yaxis-get-ticklabel-extents}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabel_extents::doc}}\index{get\_ticklabel\_extents() (matplotlib.axis.YAxis method)@\spxentry{get\_ticklabel\_extents()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabel_extents:matplotlib.axis.YAxis.get_ticklabel_extents}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabel\_extents}}}{\emph{self}, \emph{renderer}}{} Get the extents of the tick labels on either side of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabels:matplotlib-axis-yaxis-get-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabels::doc}}\index{get\_ticklabels() (matplotlib.axis.YAxis method)@\spxentry{get\_ticklabels()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklabels:matplotlib.axis.YAxis.get_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabels}}}{\emph{self}, \emph{minor=False}, \emph{which=None}}{} Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True return the minor ticklabels, else return the major ticklabels \item[{\sphinxstylestrong{which}}] \leavevmode{[}None, ('minor', 'major', 'both'){]} Overrides \sphinxcode{\sphinxupquote{minor}}. Selects which ticklabels to return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_ticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklines:matplotlib-axis-yaxis-get-ticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklines::doc}}\index{get\_ticklines() (matplotlib.axis.YAxis method)@\spxentry{get\_ticklines()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklines:matplotlib.axis.YAxis.get_ticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklines}}}{\emph{self}, \emph{minor=False}}{} Return the tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_ticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklocs:matplotlib-axis-yaxis-get-ticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklocs::doc}}\index{get\_ticklocs() (matplotlib.axis.YAxis method)@\spxentry{get\_ticklocs()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_ticklocs:matplotlib.axis.YAxis.get_ticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklocs}}}{\emph{self}, \emph{minor=False}}{} Get the array of tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_tightbbox} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tightbbox:matplotlib-axis-yaxis-get-tightbbox}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tightbbox::doc}}\index{get\_tightbbox() (matplotlib.axis.YAxis method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_tightbbox:matplotlib.axis.YAxis.get_tightbbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Return a bounding box that encloses the axis. It only accounts tick labels, axis label, and offsetText. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_units:matplotlib-axis-yaxis-get-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_units::doc}}\index{get\_units() (matplotlib.axis.YAxis method)@\spxentry{get\_units()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_units:matplotlib.axis.YAxis.get_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_units}}}{\emph{self}}{} Return the units for axis. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_view_interval:matplotlib-axis-yaxis-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.YAxis method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_view_interval:matplotlib.axis.YAxis.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} Return the Interval instance for this axis view limits. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.grid} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.grid:matplotlib-axis-yaxis-grid}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.grid::doc}}\index{grid() (matplotlib.axis.YAxis method)@\spxentry{grid()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.grid:matplotlib.axis.YAxis.grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=None}, \emph{which='major'}, \emph{**kwargs}}{} Configure the grid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None{]} Whether to show the grid lines. If any \sphinxstyleemphasis{kwargs} are supplied, it is assumed you want the grid on and \sphinxstyleemphasis{b} will be set to True. If \sphinxstyleemphasis{b} is \sphinxstyleemphasis{None} and there are no \sphinxstyleemphasis{kwargs}, this toggles the visibility of the lines. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}{]} The grid lines to apply the changes on. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties{]} Define the line properties of the grid, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.limit\_range\_for\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.limit_range_for_scale:matplotlib-axis-yaxis-limit-range-for-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.limit_range_for_scale::doc}}\index{limit\_range\_for\_scale() (matplotlib.axis.YAxis method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.limit_range_for_scale:matplotlib.axis.YAxis.limit_range_for_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.pan} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pan:matplotlib-axis-yaxis-pan}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pan::doc}}\index{pan() (matplotlib.axis.YAxis method)@\spxentry{pan()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pan:matplotlib.axis.YAxis.pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.reset\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.reset_ticks:matplotlib-axis-yaxis-reset-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.reset_ticks::doc}}\index{reset\_ticks() (matplotlib.axis.YAxis method)@\spxentry{reset\_ticks()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.reset_ticks:matplotlib.axis.YAxis.reset_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{reset\_ticks}}}{\emph{self}}{} Re-initialize the major and minor Tick lists. Each list starts with a single fresh Tick. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_data_interval:matplotlib-axis-yaxis-set-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_data_interval::doc}}\index{set\_data\_interval() (matplotlib.axis.YAxis method)@\spxentry{set\_data\_interval()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_data_interval:matplotlib.axis.YAxis.set_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_data\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis data limits. This method is for internal use. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting data limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the data limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_default\_intervals} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_default_intervals:matplotlib-axis-yaxis-set-default-intervals}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_default_intervals::doc}}\index{set\_default\_intervals() (matplotlib.axis.YAxis method)@\spxentry{set\_default\_intervals()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_default_intervals:matplotlib.axis.YAxis.set_default_intervals}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_default\_intervals}}}{\emph{self}}{} Set the default limits for the axis data and view interval if they have not been not mutated yet. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_label\_coords} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_coords:matplotlib-axis-yaxis-set-label-coords}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_coords::doc}}\index{set\_label\_coords() (matplotlib.axis.YAxis method)@\spxentry{set\_label\_coords()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_coords:matplotlib.axis.YAxis.set_label_coords}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_coords}}}{\emph{self}, \emph{x}, \emph{y}, \emph{transform=None}}{} Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coordinate of the x label. You can also specify the coordinate system of the label with the transform. If None, the default coordinate system will be the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5) is middle, etc \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_position:matplotlib-axis-yaxis-set-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_position::doc}}\index{set\_label\_position() (matplotlib.axis.YAxis method)@\spxentry{set\_label\_position()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_position:matplotlib.axis.YAxis.set_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_position}}}{\emph{self}, \emph{position}}{} Set the label position (left or right) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'left', 'right'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_text:matplotlib-axis-yaxis-set-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_text::doc}}\index{set\_label\_text() (matplotlib.axis.YAxis method)@\spxentry{set\_label\_text()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label_text:matplotlib.axis.YAxis.set_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_text}}}{\emph{self}, \emph{label}, \emph{fontdict=None}, \emph{**kwargs}}{} Set the text value of the axis label. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text string. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} Text properties. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Merged into fontdict. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_formatter:matplotlib-axis-yaxis-set-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_formatter::doc}}\index{set\_major\_formatter() (matplotlib.axis.YAxis method)@\spxentry{set\_major\_formatter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_formatter:matplotlib.axis.YAxis.set_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_major\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_locator:matplotlib-axis-yaxis-set-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_locator::doc}}\index{set\_major\_locator() (matplotlib.axis.YAxis method)@\spxentry{set\_major\_locator()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_major_locator:matplotlib.axis.YAxis.set_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_major\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_formatter:matplotlib-axis-yaxis-set-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_formatter::doc}}\index{set\_minor\_formatter() (matplotlib.axis.YAxis method)@\spxentry{set\_minor\_formatter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_formatter:matplotlib.axis.YAxis.set_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_locator:matplotlib-axis-yaxis-set-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_locator::doc}}\index{set\_minor\_locator() (matplotlib.axis.YAxis method)@\spxentry{set\_minor\_locator()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_minor_locator:matplotlib.axis.YAxis.set_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_pickradius:matplotlib-axis-yaxis-set-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_pickradius::doc}}\index{set\_pickradius() (matplotlib.axis.YAxis method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_pickradius:matplotlib.axis.YAxis.set_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pickradius}}{} Set the depth of the axis used by the picker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_smart_bounds:matplotlib-axis-yaxis-set-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_smart_bounds::doc}}\index{set\_smart\_bounds() (matplotlib.axis.YAxis method)@\spxentry{set\_smart\_bounds()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_smart_bounds:matplotlib.axis.YAxis.set_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_smart\_bounds}}}{\emph{self}, \emph{value}}{} set the axis to have smart bounds \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_tick\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_tick_params:matplotlib-axis-yaxis-set-tick-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_tick_params::doc}}\index{set\_tick\_params() (matplotlib.axis.YAxis method)@\spxentry{set\_tick\_params()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_tick_params:matplotlib.axis.YAxis.set_tick_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_tick\_params}}}{\emph{self}, \emph{which='major'}, \emph{reset=False}, \emph{**kw}}{} Set appearance parameters for ticks, ticklabels, and gridlines. For documentation of keyword arguments, see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tick\_params()}}}}}. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticklabels:matplotlib-axis-yaxis-set-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticklabels::doc}}\index{set\_ticklabels() (matplotlib.axis.YAxis method)@\spxentry{set\_ticklabels()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticklabels:matplotlib.axis.YAxis.set_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticklabels}}}{\emph{self}, \emph{ticklabels}, \emph{*args}, \emph{minor=False}, \emph{**kwargs}}{} Set the text values of the tick labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticklabels}}] \leavevmode{[}sequence of str or of \sphinxcode{\sphinxupquote{Text}}s{]} List of texts for tick labels; must include values for non-visible labels. \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True, set minor ticks instead of major ticks. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Text properties. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{Text}}s{]} For each tick, includes \sphinxcode{\sphinxupquote{tick.label1}} if it is visible, then \sphinxcode{\sphinxupquote{tick.label2}} if it is visible, in that order. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks:matplotlib-axis-yaxis-set-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks::doc}}\index{set\_ticks() (matplotlib.axis.YAxis method)@\spxentry{set\_ticks()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_ticks:matplotlib.axis.YAxis.set_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticks}}}{\emph{self}, \emph{ticks}, \emph{minor=False}}{} Set the locations of the tick marks from sequence ticks \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}sequence of floats{]} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_units:matplotlib-axis-yaxis-set-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_units::doc}}\index{set\_units() (matplotlib.axis.YAxis method)@\spxentry{set\_units()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_units:matplotlib.axis.YAxis.set_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_units}}}{\emph{self}, \emph{u}}{} Set the units for axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{u}}] \leavevmode{[}units tag{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.set\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_view_interval:matplotlib-axis-yaxis-set-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_view_interval::doc}}\index{set\_view\_interval() (matplotlib.axis.YAxis method)@\spxentry{set\_view\_interval()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_view_interval:matplotlib.axis.YAxis.set_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis view limits. This method is for internal use; Matplotlib users should typically use e.g. \sphinxcode{\sphinxupquote{set\_xlim}} and \sphinxcode{\sphinxupquote{set\_ylim}}. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting view limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the view limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.update\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_units:matplotlib-axis-yaxis-update-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_units::doc}}\index{update\_units() (matplotlib.axis.YAxis method)@\spxentry{update\_units()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_units:matplotlib.axis.YAxis.update_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{update\_units}}}{\emph{self}, \emph{data}}{} introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. Return \sphinxstyleemphasis{True} if \sphinxstyleemphasis{data} is registered for unit conversion. \end{fulllineitems} \paragraph{matplotlib.axis.YAxis.zoom} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zoom:matplotlib-axis-yaxis-zoom}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zoom::doc}}\index{zoom() (matplotlib.axis.YAxis method)@\spxentry{zoom()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zoom:matplotlib.axis.YAxis.zoom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \subsubsection{XAxis} \label{\detokenize{api/axis_api:xaxis}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.OFFSETTEXTPAD:matplotlib.axis.XAxis.OFFSETTEXTPAD}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.OFFSETTEXTPAD}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_date:matplotlib.axis.XAxis.axis_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.axis\_date}}}}} & Sets up x-axis ticks and labels that treat the x data as dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.cla:matplotlib.axis.XAxis.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.cla}}}}} & clear the current axis \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_units:matplotlib.axis.XAxis.convert_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.convert\_units}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_data_interval:matplotlib.axis.XAxis.get_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_data\_interval}}}}} & Return the Interval instance for this axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gridlines:matplotlib.axis.XAxis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_gridlines}}}}} & Return the grid lines as a list of Line2D instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_position:matplotlib.axis.XAxis.get_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_label\_position}}}}} & Return the label position (top or bottom) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_text:matplotlib.axis.XAxis.get_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_label\_text}}}}} & Get the text of the label \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_formatter:matplotlib.axis.XAxis.get_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_major\_formatter}}}}} & Get the formatter of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_locator:matplotlib.axis.XAxis.get_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_major\_locator}}}}} & Get the locator of the major ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_ticks:matplotlib.axis.XAxis.get_major_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_major\_ticks}}}}} & Get the tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklabels:matplotlib.axis.XAxis.get_majorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_majorticklabels}}}}} & Return a list of Text instances for the major ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklines:matplotlib.axis.XAxis.get_majorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_majorticklines}}}}} & Return the major tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklocs:matplotlib.axis.XAxis.get_majorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_majorticklocs}}}}} & Get the array of major tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_formatter:matplotlib.axis.XAxis.get_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minor\_formatter}}}}} & Get the formatter of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_locator:matplotlib.axis.XAxis.get_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minor\_locator}}}}} & Get the locator of the minor ticker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_ticks:matplotlib.axis.XAxis.get_minor_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minor\_ticks}}}}} & Get the minor tick instances; grow as necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklabels:matplotlib.axis.XAxis.get_minorticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minorticklabels}}}}} & Return a list of Text instances for the minor ticklabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklines:matplotlib.axis.XAxis.get_minorticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minorticklines}}}}} & Return the minor tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklocs:matplotlib.axis.XAxis.get_minorticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minorticklocs}}}}} & Get the array of minor tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minpos:matplotlib.axis.XAxis.get_minpos}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_minpos}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_offset_text:matplotlib.axis.XAxis.get_offset_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_offset\_text}}}}} & Return the axis offsetText as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_pickradius:matplotlib.axis.XAxis.get_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_pickradius}}}}} & Return the depth of the axis used by the picker \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_scale:matplotlib.axis.XAxis.get_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_scale}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_smart_bounds:matplotlib.axis.XAxis.get_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_smart\_bounds}}}}} & get whether the axis has smart bounds \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_padding:matplotlib.axis.XAxis.get_tick_padding}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_tick\_padding}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_space:matplotlib.axis.XAxis.get_tick_space}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_tick\_space}}}}} & Return the estimated number of ticks that can fit on the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabel_extents:matplotlib.axis.XAxis.get_ticklabel_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_ticklabel\_extents}}}}} & Get the extents of the tick labels on either side of the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabels:matplotlib.axis.XAxis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_ticklabels}}}}} & Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklines:matplotlib.axis.XAxis.get_ticklines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_ticklines}}}}} & Return the tick lines as a list of Line2D instances \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklocs:matplotlib.axis.XAxis.get_ticklocs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_ticklocs}}}}} & Get the array of tick locations in data coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tightbbox:matplotlib.axis.XAxis.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_tightbbox}}}}} & Return a bounding box that encloses the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_units:matplotlib.axis.XAxis.get_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_units}}}}} & Return the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_view_interval:matplotlib.axis.XAxis.get_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_view\_interval}}}}} & Return the Interval instance for this axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.grid:matplotlib.axis.XAxis.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.grid}}}}} & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.limit_range_for_scale:matplotlib.axis.XAxis.limit_range_for_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.limit\_range\_for\_scale}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pan:matplotlib.axis.XAxis.pan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.pan}}}}} & Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.reset_ticks:matplotlib.axis.XAxis.reset_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.reset\_ticks}}}}} & Re-initialize the major and minor Tick lists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_data_interval:matplotlib.axis.XAxis.set_data_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_data\_interval}}}}} & Set the axis data limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_default_intervals:matplotlib.axis.XAxis.set_default_intervals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_default\_intervals}}}}} & Set the default limits for the axis data and view interval if they have not been not mutated yet. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_coords:matplotlib.axis.XAxis.set_label_coords}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_label\_coords}}}}} & Set the coordinates of the label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_position:matplotlib.axis.XAxis.set_label_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_label\_position}}}}} & Set the label position (top or bottom) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_text:matplotlib.axis.XAxis.set_label_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_label\_text}}}}} & Set the text value of the axis label. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_formatter:matplotlib.axis.XAxis.set_major_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_major\_formatter}}}}} & Set the formatter of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_locator:matplotlib.axis.XAxis.set_major_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_major\_locator}}}}} & Set the locator of the major ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_formatter:matplotlib.axis.XAxis.set_minor_formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_minor\_formatter}}}}} & Set the formatter of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_locator:matplotlib.axis.XAxis.set_minor_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_minor\_locator}}}}} & Set the locator of the minor ticker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_pickradius:matplotlib.axis.XAxis.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_pickradius}}}}} & Set the depth of the axis used by the picker. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_smart_bounds:matplotlib.axis.XAxis.set_smart_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_smart\_bounds}}}}} & set the axis to have smart bounds \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_tick_params:matplotlib.axis.XAxis.set_tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_tick\_params}}}}} & Set appearance parameters for ticks, ticklabels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticklabels:matplotlib.axis.XAxis.set_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_ticklabels}}}}} & Set the text values of the tick labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks:matplotlib.axis.XAxis.set_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_ticks}}}}} & Set the locations of the tick marks from sequence ticks \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_units:matplotlib.axis.XAxis.set_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_units}}}}} & Set the units for axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_view_interval:matplotlib.axis.XAxis.set_view_interval}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_view\_interval}}}}} & Set the axis view limits. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_units:matplotlib.axis.XAxis.update_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.update\_units}}}}} & introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.zoom:matplotlib.axis.XAxis.zoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.zoom}}}}} & Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \paragraph{matplotlib.axis.XAxis.OFFSETTEXTPAD} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.OFFSETTEXTPAD:matplotlib-axis-xaxis-offsettextpad}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.OFFSETTEXTPAD::doc}}\index{OFFSETTEXTPAD (matplotlib.axis.XAxis attribute)@\spxentry{OFFSETTEXTPAD}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.OFFSETTEXTPAD:matplotlib.axis.XAxis.OFFSETTEXTPAD}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{OFFSETTEXTPAD}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.axis\_date} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_date:matplotlib-axis-xaxis-axis-date}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_date::doc}}\index{axis\_date() (matplotlib.axis.XAxis method)@\spxentry{axis\_date()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axis_date:matplotlib.axis.XAxis.axis_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{axis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up x-axis ticks and labels that treat the x data as dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tz}}] \leavevmode{[}tzinfo or str or None{]} The timezone used to create date labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.cla} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.cla:matplotlib-axis-xaxis-cla}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.cla::doc}}\index{cla() (matplotlib.axis.XAxis method)@\spxentry{cla()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.cla:matplotlib.axis.XAxis.cla}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} clear the current axis \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.convert\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_units:matplotlib-axis-xaxis-convert-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_units::doc}}\index{convert\_units() (matplotlib.axis.XAxis method)@\spxentry{convert\_units()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_units:matplotlib.axis.XAxis.convert_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{convert\_units}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_data_interval:matplotlib-axis-xaxis-get-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_data_interval::doc}}\index{get\_data\_interval() (matplotlib.axis.XAxis method)@\spxentry{get\_data\_interval()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_data_interval:matplotlib.axis.XAxis.get_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_data\_interval}}}{\emph{self}}{} Return the Interval instance for this axis data limits. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_gridlines} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gridlines:matplotlib-axis-xaxis-get-gridlines}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gridlines::doc}}\index{get\_gridlines() (matplotlib.axis.XAxis method)@\spxentry{get\_gridlines()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gridlines:matplotlib.axis.XAxis.get_gridlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}}{} Return the grid lines as a list of Line2D instance \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_position:matplotlib-axis-xaxis-get-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_position::doc}}\index{get\_label\_position() (matplotlib.axis.XAxis method)@\spxentry{get\_label\_position()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_position:matplotlib.axis.XAxis.get_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_label\_position}}}{\emph{self}}{} Return the label position (top or bottom) \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_text:matplotlib-axis-xaxis-get-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_text::doc}}\index{get\_label\_text() (matplotlib.axis.XAxis method)@\spxentry{get\_label\_text()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label_text:matplotlib.axis.XAxis.get_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_label\_text}}}{\emph{self}}{} Get the text of the label \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_formatter:matplotlib-axis-xaxis-get-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_formatter::doc}}\index{get\_major\_formatter() (matplotlib.axis.XAxis method)@\spxentry{get\_major\_formatter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_formatter:matplotlib.axis.XAxis.get_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_formatter}}}{\emph{self}}{} Get the formatter of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_locator:matplotlib-axis-xaxis-get-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_locator::doc}}\index{get\_major\_locator() (matplotlib.axis.XAxis method)@\spxentry{get\_major\_locator()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_locator:matplotlib.axis.XAxis.get_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_locator}}}{\emph{self}}{} Get the locator of the major ticker \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_major\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_ticks:matplotlib-axis-xaxis-get-major-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_ticks::doc}}\index{get\_major\_ticks() (matplotlib.axis.XAxis method)@\spxentry{get\_major\_ticks()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_major_ticks:matplotlib.axis.XAxis.get_major_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_major\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the tick instances; grow as necessary. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_majorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklabels:matplotlib-axis-xaxis-get-majorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklabels::doc}}\index{get\_majorticklabels() (matplotlib.axis.XAxis method)@\spxentry{get\_majorticklabels()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklabels:matplotlib.axis.XAxis.get_majorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklabels}}}{\emph{self}}{} Return a list of Text instances for the major ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_majorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklines:matplotlib-axis-xaxis-get-majorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklines::doc}}\index{get\_majorticklines() (matplotlib.axis.XAxis method)@\spxentry{get\_majorticklines()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklines:matplotlib.axis.XAxis.get_majorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklines}}}{\emph{self}}{} Return the major tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_majorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklocs:matplotlib-axis-xaxis-get-majorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklocs::doc}}\index{get\_majorticklocs() (matplotlib.axis.XAxis method)@\spxentry{get\_majorticklocs()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_majorticklocs:matplotlib.axis.XAxis.get_majorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_majorticklocs}}}{\emph{self}}{} Get the array of major tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_formatter:matplotlib-axis-xaxis-get-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_formatter::doc}}\index{get\_minor\_formatter() (matplotlib.axis.XAxis method)@\spxentry{get\_minor\_formatter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_formatter:matplotlib.axis.XAxis.get_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_formatter}}}{\emph{self}}{} Get the formatter of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_locator:matplotlib-axis-xaxis-get-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_locator::doc}}\index{get\_minor\_locator() (matplotlib.axis.XAxis method)@\spxentry{get\_minor\_locator()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_locator:matplotlib.axis.XAxis.get_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_locator}}}{\emph{self}}{} Get the locator of the minor ticker \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minor\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_ticks:matplotlib-axis-xaxis-get-minor-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_ticks::doc}}\index{get\_minor\_ticks() (matplotlib.axis.XAxis method)@\spxentry{get\_minor\_ticks()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minor_ticks:matplotlib.axis.XAxis.get_minor_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minor\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the minor tick instances; grow as necessary. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minorticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklabels:matplotlib-axis-xaxis-get-minorticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklabels::doc}}\index{get\_minorticklabels() (matplotlib.axis.XAxis method)@\spxentry{get\_minorticklabels()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklabels:matplotlib.axis.XAxis.get_minorticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklabels}}}{\emph{self}}{} Return a list of Text instances for the minor ticklabels. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minorticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklines:matplotlib-axis-xaxis-get-minorticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklines::doc}}\index{get\_minorticklines() (matplotlib.axis.XAxis method)@\spxentry{get\_minorticklines()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklines:matplotlib.axis.XAxis.get_minorticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklines}}}{\emph{self}}{} Return the minor tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minorticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklocs:matplotlib-axis-xaxis-get-minorticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklocs::doc}}\index{get\_minorticklocs() (matplotlib.axis.XAxis method)@\spxentry{get\_minorticklocs()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minorticklocs:matplotlib.axis.XAxis.get_minorticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minorticklocs}}}{\emph{self}}{} Get the array of minor tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_minpos} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minpos:matplotlib-axis-xaxis-get-minpos}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minpos::doc}}\index{get\_minpos() (matplotlib.axis.XAxis method)@\spxentry{get\_minpos()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_minpos:matplotlib.axis.XAxis.get_minpos}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_minpos}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_offset\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_offset_text:matplotlib-axis-xaxis-get-offset-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_offset_text::doc}}\index{get\_offset\_text() (matplotlib.axis.XAxis method)@\spxentry{get\_offset\_text()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_offset_text:matplotlib.axis.XAxis.get_offset_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_offset\_text}}}{\emph{self}}{} Return the axis offsetText as a Text instance \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_pickradius:matplotlib-axis-xaxis-get-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_pickradius::doc}}\index{get\_pickradius() (matplotlib.axis.XAxis method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_pickradius:matplotlib.axis.XAxis.get_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{} Return the depth of the axis used by the picker \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_scale:matplotlib-axis-xaxis-get-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_scale::doc}}\index{get\_scale() (matplotlib.axis.XAxis method)@\spxentry{get\_scale()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_scale:matplotlib.axis.XAxis.get_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_scale}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_smart_bounds:matplotlib-axis-xaxis-get-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_smart_bounds::doc}}\index{get\_smart\_bounds() (matplotlib.axis.XAxis method)@\spxentry{get\_smart\_bounds()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_smart_bounds:matplotlib.axis.XAxis.get_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_smart\_bounds}}}{\emph{self}}{} get whether the axis has smart bounds \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_tick\_padding} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_padding:matplotlib-axis-xaxis-get-tick-padding}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_padding::doc}}\index{get\_tick\_padding() (matplotlib.axis.XAxis method)@\spxentry{get\_tick\_padding()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_padding:matplotlib.axis.XAxis.get_tick_padding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_padding}}}{\emph{self}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_tick\_space} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_space:matplotlib-axis-xaxis-get-tick-space}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_space::doc}}\index{get\_tick\_space() (matplotlib.axis.XAxis method)@\spxentry{get\_tick\_space()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tick_space:matplotlib.axis.XAxis.get_tick_space}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_tick\_space}}}{\emph{self}}{} Return the estimated number of ticks that can fit on the axis. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_ticklabel\_extents} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabel_extents:matplotlib-axis-xaxis-get-ticklabel-extents}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabel_extents::doc}}\index{get\_ticklabel\_extents() (matplotlib.axis.XAxis method)@\spxentry{get\_ticklabel\_extents()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabel_extents:matplotlib.axis.XAxis.get_ticklabel_extents}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabel\_extents}}}{\emph{self}, \emph{renderer}}{} Get the extents of the tick labels on either side of the axes. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabels:matplotlib-axis-xaxis-get-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabels::doc}}\index{get\_ticklabels() (matplotlib.axis.XAxis method)@\spxentry{get\_ticklabels()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklabels:matplotlib.axis.XAxis.get_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklabels}}}{\emph{self}, \emph{minor=False}, \emph{which=None}}{} Get the tick labels as a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True return the minor ticklabels, else return the major ticklabels \item[{\sphinxstylestrong{which}}] \leavevmode{[}None, ('minor', 'major', 'both'){]} Overrides \sphinxcode{\sphinxupquote{minor}}. Selects which ticklabels to return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}list{]} List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_ticklines} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklines:matplotlib-axis-xaxis-get-ticklines}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklines::doc}}\index{get\_ticklines() (matplotlib.axis.XAxis method)@\spxentry{get\_ticklines()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklines:matplotlib.axis.XAxis.get_ticklines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklines}}}{\emph{self}, \emph{minor=False}}{} Return the tick lines as a list of Line2D instances \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_ticklocs} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklocs:matplotlib-axis-xaxis-get-ticklocs}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklocs::doc}}\index{get\_ticklocs() (matplotlib.axis.XAxis method)@\spxentry{get\_ticklocs()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_ticklocs:matplotlib.axis.XAxis.get_ticklocs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_ticklocs}}}{\emph{self}, \emph{minor=False}}{} Get the array of tick locations in data coordinates. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_tightbbox} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tightbbox:matplotlib-axis-xaxis-get-tightbbox}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tightbbox::doc}}\index{get\_tightbbox() (matplotlib.axis.XAxis method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_tightbbox:matplotlib.axis.XAxis.get_tightbbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Return a bounding box that encloses the axis. It only accounts tick labels, axis label, and offsetText. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_units:matplotlib-axis-xaxis-get-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_units::doc}}\index{get\_units() (matplotlib.axis.XAxis method)@\spxentry{get\_units()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_units:matplotlib.axis.XAxis.get_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_units}}}{\emph{self}}{} Return the units for axis. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.get\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_view_interval:matplotlib-axis-xaxis-get-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_view_interval::doc}}\index{get\_view\_interval() (matplotlib.axis.XAxis method)@\spxentry{get\_view\_interval()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_view_interval:matplotlib.axis.XAxis.get_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} Return the Interval instance for this axis view limits. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.grid} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.grid:matplotlib-axis-xaxis-grid}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.grid::doc}}\index{grid() (matplotlib.axis.XAxis method)@\spxentry{grid()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.grid:matplotlib.axis.XAxis.grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=None}, \emph{which='major'}, \emph{**kwargs}}{} Configure the grid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None{]} Whether to show the grid lines. If any \sphinxstyleemphasis{kwargs} are supplied, it is assumed you want the grid on and \sphinxstyleemphasis{b} will be set to True. If \sphinxstyleemphasis{b} is \sphinxstyleemphasis{None} and there are no \sphinxstyleemphasis{kwargs}, this toggles the visibility of the lines. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}{]} The grid lines to apply the changes on. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties{]} Define the line properties of the grid, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.limit\_range\_for\_scale} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.limit_range_for_scale:matplotlib-axis-xaxis-limit-range-for-scale}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.limit_range_for_scale::doc}}\index{limit\_range\_for\_scale() (matplotlib.axis.XAxis method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.limit_range_for_scale:matplotlib.axis.XAxis.limit_range_for_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.pan} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pan:matplotlib-axis-xaxis-pan}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pan::doc}}\index{pan() (matplotlib.axis.XAxis method)@\spxentry{pan()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pan:matplotlib.axis.XAxis.pan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan \sphinxstyleemphasis{numsteps} (can be positive or negative) \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.reset\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.reset_ticks:matplotlib-axis-xaxis-reset-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.reset_ticks::doc}}\index{reset\_ticks() (matplotlib.axis.XAxis method)@\spxentry{reset\_ticks()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.reset_ticks:matplotlib.axis.XAxis.reset_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{reset\_ticks}}}{\emph{self}}{} Re-initialize the major and minor Tick lists. Each list starts with a single fresh Tick. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_data\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_data_interval:matplotlib-axis-xaxis-set-data-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_data_interval::doc}}\index{set\_data\_interval() (matplotlib.axis.XAxis method)@\spxentry{set\_data\_interval()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_data_interval:matplotlib.axis.XAxis.set_data_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_data\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis data limits. This method is for internal use. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting data limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the data limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_default\_intervals} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_default_intervals:matplotlib-axis-xaxis-set-default-intervals}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_default_intervals::doc}}\index{set\_default\_intervals() (matplotlib.axis.XAxis method)@\spxentry{set\_default\_intervals()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_default_intervals:matplotlib.axis.XAxis.set_default_intervals}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_default\_intervals}}}{\emph{self}}{} Set the default limits for the axis data and view interval if they have not been not mutated yet. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_label\_coords} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_coords:matplotlib-axis-xaxis-set-label-coords}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_coords::doc}}\index{set\_label\_coords() (matplotlib.axis.XAxis method)@\spxentry{set\_label\_coords()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_coords:matplotlib.axis.XAxis.set_label_coords}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_coords}}}{\emph{self}, \emph{x}, \emph{y}, \emph{transform=None}}{} Set the coordinates of the label. By default, the x coordinate of the y label is determined by the tick label bounding boxes, but this can lead to poor alignment of multiple ylabels if there are multiple axes. Ditto for the y coordinate of the x label. You can also specify the coordinate system of the label with the transform. If None, the default coordinate system will be the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5) is middle, etc \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_label\_position} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_position:matplotlib-axis-xaxis-set-label-position}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_position::doc}}\index{set\_label\_position() (matplotlib.axis.XAxis method)@\spxentry{set\_label\_position()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_position:matplotlib.axis.XAxis.set_label_position}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_position}}}{\emph{self}, \emph{position}}{} Set the label position (top or bottom) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{position}}] \leavevmode{[}\{'top', 'bottom'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_label\_text} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_text:matplotlib-axis-xaxis-set-label-text}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_text::doc}}\index{set\_label\_text() (matplotlib.axis.XAxis method)@\spxentry{set\_label\_text()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label_text:matplotlib.axis.XAxis.set_label_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_label\_text}}}{\emph{self}, \emph{label}, \emph{fontdict=None}, \emph{**kwargs}}{} Set the text value of the axis label. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text string. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} Text properties. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Merged into fontdict. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_major\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_formatter:matplotlib-axis-xaxis-set-major-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_formatter::doc}}\index{set\_major\_formatter() (matplotlib.axis.XAxis method)@\spxentry{set\_major\_formatter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_formatter:matplotlib.axis.XAxis.set_major_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_major\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_major\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_locator:matplotlib-axis-xaxis-set-major-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_locator::doc}}\index{set\_major\_locator() (matplotlib.axis.XAxis method)@\spxentry{set\_major\_locator()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_major_locator:matplotlib.axis.XAxis.set_major_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_major\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the major ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_minor\_formatter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_formatter:matplotlib-axis-xaxis-set-minor-formatter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_formatter::doc}}\index{set\_minor\_formatter() (matplotlib.axis.XAxis method)@\spxentry{set\_minor\_formatter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_formatter:matplotlib.axis.XAxis.set_minor_formatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_formatter}}}{\emph{self}, \emph{formatter}}{} Set the formatter of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{formatter}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Formatter{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_minor\_locator} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_locator:matplotlib-axis-xaxis-set-minor-locator}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_locator::doc}}\index{set\_minor\_locator() (matplotlib.axis.XAxis method)@\spxentry{set\_minor\_locator()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_minor_locator:matplotlib.axis.XAxis.set_minor_locator}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_minor\_locator}}}{\emph{self}, \emph{locator}}{} Set the locator of the minor ticker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}\textasciitilde{}matplotlib.ticker.Locator{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_pickradius} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_pickradius:matplotlib-axis-xaxis-set-pickradius}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_pickradius::doc}}\index{set\_pickradius() (matplotlib.axis.XAxis method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_pickradius:matplotlib.axis.XAxis.set_pickradius}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pickradius}}{} Set the depth of the axis used by the picker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_smart\_bounds} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_smart_bounds:matplotlib-axis-xaxis-set-smart-bounds}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_smart_bounds::doc}}\index{set\_smart\_bounds() (matplotlib.axis.XAxis method)@\spxentry{set\_smart\_bounds()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_smart_bounds:matplotlib.axis.XAxis.set_smart_bounds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_smart\_bounds}}}{\emph{self}, \emph{value}}{} set the axis to have smart bounds \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_tick\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_tick_params:matplotlib-axis-xaxis-set-tick-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_tick_params::doc}}\index{set\_tick\_params() (matplotlib.axis.XAxis method)@\spxentry{set\_tick\_params()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_tick_params:matplotlib.axis.XAxis.set_tick_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_tick\_params}}}{\emph{self}, \emph{which='major'}, \emph{reset=False}, \emph{**kw}}{} Set appearance parameters for ticks, ticklabels, and gridlines. For documentation of keyword arguments, see {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tick\_params()}}}}}. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_ticklabels} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticklabels:matplotlib-axis-xaxis-set-ticklabels}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticklabels::doc}}\index{set\_ticklabels() (matplotlib.axis.XAxis method)@\spxentry{set\_ticklabels()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticklabels:matplotlib.axis.XAxis.set_ticklabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticklabels}}}{\emph{self}, \emph{ticklabels}, \emph{*args}, \emph{minor=False}, \emph{**kwargs}}{} Set the text values of the tick labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticklabels}}] \leavevmode{[}sequence of str or of \sphinxcode{\sphinxupquote{Text}}s{]} List of texts for tick labels; must include values for non-visible labels. \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} If True, set minor ticks instead of major ticks. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Text properties. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{Text}}s{]} For each tick, includes \sphinxcode{\sphinxupquote{tick.label1}} if it is visible, then \sphinxcode{\sphinxupquote{tick.label2}} if it is visible, in that order. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_ticks} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks:matplotlib-axis-xaxis-set-ticks}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks::doc}}\index{set\_ticks() (matplotlib.axis.XAxis method)@\spxentry{set\_ticks()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_ticks:matplotlib.axis.XAxis.set_ticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_ticks}}}{\emph{self}, \emph{ticks}, \emph{minor=False}}{} Set the locations of the tick marks from sequence ticks \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}sequence of floats{]} \item[{\sphinxstylestrong{minor}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_units:matplotlib-axis-xaxis-set-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_units::doc}}\index{set\_units() (matplotlib.axis.XAxis method)@\spxentry{set\_units()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_units:matplotlib.axis.XAxis.set_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_units}}}{\emph{self}, \emph{u}}{} Set the units for axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{u}}] \leavevmode{[}units tag{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.set\_view\_interval} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_view_interval:matplotlib-axis-xaxis-set-view-interval}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_view_interval::doc}}\index{set\_view\_interval() (matplotlib.axis.XAxis method)@\spxentry{set\_view\_interval()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_view_interval:matplotlib.axis.XAxis.set_view_interval}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis view limits. This method is for internal use; Matplotlib users should typically use e.g. \sphinxcode{\sphinxupquote{set\_xlim}} and \sphinxcode{\sphinxupquote{set\_ylim}}. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting view limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the view limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.update\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_units:matplotlib-axis-xaxis-update-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_units::doc}}\index{update\_units() (matplotlib.axis.XAxis method)@\spxentry{update\_units()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_units:matplotlib.axis.XAxis.update_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{update\_units}}}{\emph{self}, \emph{data}}{} introspect \sphinxstyleemphasis{data} for units converter and update the axis.converter instance if necessary. Return \sphinxstyleemphasis{True} if \sphinxstyleemphasis{data} is registered for unit conversion. \end{fulllineitems} \paragraph{matplotlib.axis.XAxis.zoom} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zoom:matplotlib-axis-xaxis-zoom}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zoom::doc}}\index{zoom() (matplotlib.axis.XAxis method)@\spxentry{zoom()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zoom:matplotlib.axis.XAxis.zoom}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if \sphinxstyleemphasis{direction} is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \subsubsection{Inherited from artist} \label{\detokenize{api/axis_api:inherited-from-artist}} \paragraph{Ticks} \label{\detokenize{api/axis_api:ticks}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback:matplotlib.axis.Tick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.axes:matplotlib.axis.Tick.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.contains:matplotlib.axis.Tick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.contains}}}}} & Test whether the mouse event occurred in the Tick marks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_xunits:matplotlib.axis.Tick.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_yunits:matplotlib.axis.Tick.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.draw:matplotlib.axis.Tick.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.draw}}}}} & Draw the Artist using the given renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.findobj:matplotlib.axis.Tick.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data:matplotlib.axis.Tick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_agg_filter:matplotlib.axis.Tick.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_alpha:matplotlib.axis.Tick.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_animated:matplotlib.axis.Tick.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_children:matplotlib.axis.Tick.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_box:matplotlib.axis.Tick.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_on:matplotlib.axis.Tick.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_path:matplotlib.axis.Tick.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_contains:matplotlib.axis.Tick.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_cursor_data:matplotlib.axis.Tick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_figure:matplotlib.axis.Tick.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_gid:matplotlib.axis.Tick.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_label:matplotlib.axis.Tick.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_label}}}}} & Return the label used for this artist in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_path_effects:matplotlib.axis.Tick.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker:matplotlib.axis.Tick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_rasterized:matplotlib.axis.Tick.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_sketch_params:matplotlib.axis.Tick.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_snap:matplotlib.axis.Tick.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transform:matplotlib.axis.Tick.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transformed_clip_path_and_affine:matplotlib.axis.Tick.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_url:matplotlib.axis.Tick.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_visible:matplotlib.axis.Tick.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_window_extent:matplotlib.axis.Tick.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_zorder:matplotlib.axis.Tick.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.have_units:matplotlib.axis.Tick.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.is_transform_set:matplotlib.axis.Tick.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.mouseover:matplotlib.axis.Tick.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pchanged:matplotlib.axis.Tick.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pick:matplotlib.axis.Tick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable:matplotlib.axis.Tick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.properties:matplotlib.axis.Tick.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.remove:matplotlib.axis.Tick.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib.axis.Tick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set:matplotlib.axis.Tick.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_agg_filter:matplotlib.axis.Tick.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_alpha:matplotlib.axis.Tick.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_animated:matplotlib.axis.Tick.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_box:matplotlib.axis.Tick.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_on:matplotlib.axis.Tick.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_path:matplotlib.axis.Tick.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_contains:matplotlib.axis.Tick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_figure:matplotlib.axis.Tick.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_gid:matplotlib.axis.Tick.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label:matplotlib.axis.Tick.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_label}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_path_effects:matplotlib.axis.Tick.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_rasterized:matplotlib.axis.Tick.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_sketch_params:matplotlib.axis.Tick.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_snap:matplotlib.axis.Tick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_transform:matplotlib.axis.Tick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_url:matplotlib.axis.Tick.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_visible:matplotlib.axis.Tick.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_zorder:matplotlib.axis.Tick.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.stale:matplotlib.axis.Tick.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.update:matplotlib.axis.Tick.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.update_from:matplotlib.axis.Tick.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.zorder:matplotlib.axis.Tick.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Tick.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback:matplotlib.axis.XTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.axes:matplotlib.axis.XTick.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.contains:matplotlib.axis.XTick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.contains}}}}} & Test whether the mouse event occurred in the Tick marks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_xunits:matplotlib.axis.XTick.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_yunits:matplotlib.axis.XTick.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.draw:matplotlib.axis.XTick.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.draw}}}}} & Draw the Artist using the given renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.findobj:matplotlib.axis.XTick.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data:matplotlib.axis.XTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_agg_filter:matplotlib.axis.XTick.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_alpha:matplotlib.axis.XTick.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_animated:matplotlib.axis.XTick.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_children:matplotlib.axis.XTick.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_box:matplotlib.axis.XTick.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_on:matplotlib.axis.XTick.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_path:matplotlib.axis.XTick.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_contains:matplotlib.axis.XTick.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_cursor_data:matplotlib.axis.XTick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_figure:matplotlib.axis.XTick.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_gid:matplotlib.axis.XTick.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_label:matplotlib.axis.XTick.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_label}}}}} & Return the label used for this artist in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_path_effects:matplotlib.axis.XTick.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker:matplotlib.axis.XTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_rasterized:matplotlib.axis.XTick.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_sketch_params:matplotlib.axis.XTick.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_snap:matplotlib.axis.XTick.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transform:matplotlib.axis.XTick.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transformed_clip_path_and_affine:matplotlib.axis.XTick.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_url:matplotlib.axis.XTick.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_visible:matplotlib.axis.XTick.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_window_extent:matplotlib.axis.XTick.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_zorder:matplotlib.axis.XTick.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.have_units:matplotlib.axis.XTick.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.is_transform_set:matplotlib.axis.XTick.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.mouseover:matplotlib.axis.XTick.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pchanged:matplotlib.axis.XTick.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pick:matplotlib.axis.XTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable:matplotlib.axis.XTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.properties:matplotlib.axis.XTick.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.remove:matplotlib.axis.XTick.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib.axis.XTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set:matplotlib.axis.XTick.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_agg_filter:matplotlib.axis.XTick.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_alpha:matplotlib.axis.XTick.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_animated:matplotlib.axis.XTick.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_box:matplotlib.axis.XTick.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_on:matplotlib.axis.XTick.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_path:matplotlib.axis.XTick.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_contains:matplotlib.axis.XTick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_figure:matplotlib.axis.XTick.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_gid:matplotlib.axis.XTick.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label:matplotlib.axis.XTick.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_label}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_path_effects:matplotlib.axis.XTick.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_rasterized:matplotlib.axis.XTick.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_sketch_params:matplotlib.axis.XTick.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_snap:matplotlib.axis.XTick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_transform:matplotlib.axis.XTick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_url:matplotlib.axis.XTick.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_visible:matplotlib.axis.XTick.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_zorder:matplotlib.axis.XTick.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.stale:matplotlib.axis.XTick.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.update:matplotlib.axis.XTick.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.update_from:matplotlib.axis.XTick.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.zorder:matplotlib.axis.XTick.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XTick.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback:matplotlib.axis.YTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.axes:matplotlib.axis.YTick.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.contains:matplotlib.axis.YTick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.contains}}}}} & Test whether the mouse event occurred in the Tick marks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_xunits:matplotlib.axis.YTick.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_yunits:matplotlib.axis.YTick.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.draw:matplotlib.axis.YTick.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.draw}}}}} & Draw the Artist using the given renderer. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.findobj:matplotlib.axis.YTick.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data:matplotlib.axis.YTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_agg_filter:matplotlib.axis.YTick.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_alpha:matplotlib.axis.YTick.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_animated:matplotlib.axis.YTick.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_children:matplotlib.axis.YTick.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_box:matplotlib.axis.YTick.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_on:matplotlib.axis.YTick.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_path:matplotlib.axis.YTick.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_contains:matplotlib.axis.YTick.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_cursor_data:matplotlib.axis.YTick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_figure:matplotlib.axis.YTick.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_gid:matplotlib.axis.YTick.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_label:matplotlib.axis.YTick.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_label}}}}} & Return the label used for this artist in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_path_effects:matplotlib.axis.YTick.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker:matplotlib.axis.YTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_rasterized:matplotlib.axis.YTick.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_sketch_params:matplotlib.axis.YTick.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_snap:matplotlib.axis.YTick.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transform:matplotlib.axis.YTick.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transformed_clip_path_and_affine:matplotlib.axis.YTick.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_url:matplotlib.axis.YTick.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_visible:matplotlib.axis.YTick.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_window_extent:matplotlib.axis.YTick.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_zorder:matplotlib.axis.YTick.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.have_units:matplotlib.axis.YTick.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.is_transform_set:matplotlib.axis.YTick.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.mouseover:matplotlib.axis.YTick.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pchanged:matplotlib.axis.YTick.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pick:matplotlib.axis.YTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable:matplotlib.axis.YTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.properties:matplotlib.axis.YTick.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.remove:matplotlib.axis.YTick.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib.axis.YTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set:matplotlib.axis.YTick.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_agg_filter:matplotlib.axis.YTick.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_alpha:matplotlib.axis.YTick.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_animated:matplotlib.axis.YTick.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_box:matplotlib.axis.YTick.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_on:matplotlib.axis.YTick.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_path:matplotlib.axis.YTick.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_contains:matplotlib.axis.YTick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_figure:matplotlib.axis.YTick.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_gid:matplotlib.axis.YTick.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label:matplotlib.axis.YTick.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_label}}}}} & Set the label1 text. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_path_effects:matplotlib.axis.YTick.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_rasterized:matplotlib.axis.YTick.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_sketch_params:matplotlib.axis.YTick.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_snap:matplotlib.axis.YTick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_transform:matplotlib.axis.YTick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_url:matplotlib.axis.YTick.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_visible:matplotlib.axis.YTick.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_zorder:matplotlib.axis.YTick.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.stale:matplotlib.axis.YTick.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.update:matplotlib.axis.YTick.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.update_from:matplotlib.axis.YTick.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.zorder:matplotlib.axis.YTick.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YTick.zorder}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{matplotlib.axis.Tick.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback:matplotlib-axis-tick-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback::doc}}\index{add\_callback() (matplotlib.axis.Tick method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback:matplotlib.axis.Tick.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib.axis.Tick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib.axis.Tick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.axes:matplotlib-axis-tick-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.axes::doc}}\index{axes (matplotlib.axis.Tick attribute)@\spxentry{axes}\spxextra{matplotlib.axis.Tick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.axes:matplotlib.axis.Tick.axes}}\pysigline{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.contains:matplotlib-axis-tick-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.contains::doc}}\index{contains() (matplotlib.axis.Tick method)@\spxentry{contains()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.contains:matplotlib.axis.Tick.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_xunits:matplotlib-axis-tick-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.Tick method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_xunits:matplotlib.axis.Tick.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_yunits:matplotlib-axis-tick-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.Tick method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.convert_yunits:matplotlib.axis.Tick.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.draw:matplotlib-axis-tick-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.draw::doc}}\index{draw() (matplotlib.axis.Tick method)@\spxentry{draw()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.draw:matplotlib.axis.Tick.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.findobj:matplotlib-axis-tick-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.findobj::doc}}\index{findobj() (matplotlib.axis.Tick method)@\spxentry{findobj()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.findobj:matplotlib.axis.Tick.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data:matplotlib-axis-tick-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.Tick method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data:matplotlib.axis.Tick.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_cursor_data:matplotlib.axis.Tick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_agg_filter:matplotlib-axis-tick-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.Tick method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_agg_filter:matplotlib.axis.Tick.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_alpha:matplotlib-axis-tick-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.Tick method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_alpha:matplotlib.axis.Tick.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_animated:matplotlib-axis-tick-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_animated::doc}}\index{get\_animated() (matplotlib.axis.Tick method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_animated:matplotlib.axis.Tick.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_children:matplotlib-axis-tick-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_children::doc}}\index{get\_children() (matplotlib.axis.Tick method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_children:matplotlib.axis.Tick.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_box:matplotlib-axis-tick-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.Tick method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_box:matplotlib.axis.Tick.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_on:matplotlib-axis-tick-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.Tick method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_on:matplotlib.axis.Tick.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_path:matplotlib-axis-tick-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.Tick method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_clip_path:matplotlib.axis.Tick.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_contains:matplotlib-axis-tick-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_contains::doc}}\index{get\_contains() (matplotlib.axis.Tick method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_contains:matplotlib.axis.Tick.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_contains:matplotlib.axis.Tick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_cursor_data:matplotlib-axis-tick-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.Tick method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_cursor_data:matplotlib.axis.Tick.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data:matplotlib.axis.Tick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.format_cursor_data:matplotlib.axis.Tick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_figure:matplotlib-axis-tick-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_figure::doc}}\index{get\_figure() (matplotlib.axis.Tick method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_figure:matplotlib.axis.Tick.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_gid:matplotlib-axis-tick-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_gid::doc}}\index{get\_gid() (matplotlib.axis.Tick method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_gid:matplotlib.axis.Tick.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_label:matplotlib-axis-tick-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_label::doc}}\index{get\_label() (matplotlib.axis.Tick method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_label:matplotlib.axis.Tick.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_path_effects:matplotlib-axis-tick-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.Tick method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_path_effects:matplotlib.axis.Tick.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker:matplotlib-axis-tick-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker::doc}}\index{get\_picker() (matplotlib.axis.Tick method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker:matplotlib.axis.Tick.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable:matplotlib.axis.Tick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pick:matplotlib.axis.Tick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_rasterized:matplotlib-axis-tick-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.Tick method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_rasterized:matplotlib.axis.Tick.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_sketch_params:matplotlib-axis-tick-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.Tick method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_sketch_params:matplotlib.axis.Tick.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_snap:matplotlib-axis-tick-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_snap::doc}}\index{get\_snap() (matplotlib.axis.Tick method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_snap:matplotlib.axis.Tick.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_snap:matplotlib.axis.Tick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transform:matplotlib-axis-tick-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transform::doc}}\index{get\_transform() (matplotlib.axis.Tick method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transform:matplotlib.axis.Tick.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transformed_clip_path_and_affine:matplotlib-axis-tick-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.Tick method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_transformed_clip_path_and_affine:matplotlib.axis.Tick.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_url:matplotlib-axis-tick-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_url::doc}}\index{get\_url() (matplotlib.axis.Tick method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_url:matplotlib.axis.Tick.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_visible:matplotlib-axis-tick-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_visible::doc}}\index{get\_visible() (matplotlib.axis.Tick method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_visible:matplotlib.axis.Tick.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_window_extent:matplotlib-axis-tick-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.Tick method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_window_extent:matplotlib.axis.Tick.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_zorder:matplotlib-axis-tick-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.Tick method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.get_zorder:matplotlib.axis.Tick.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.have_units:matplotlib-axis-tick-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.have_units::doc}}\index{have\_units() (matplotlib.axis.Tick method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.have_units:matplotlib.axis.Tick.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.is_transform_set:matplotlib-axis-tick-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.Tick method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.is_transform_set:matplotlib.axis.Tick.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_transform:matplotlib.axis.Tick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.mouseover:matplotlib-axis-tick-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.mouseover::doc}}\index{mouseover (matplotlib.axis.Tick attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.Tick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.mouseover:matplotlib.axis.Tick.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pchanged:matplotlib-axis-tick-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pchanged::doc}}\index{pchanged() (matplotlib.axis.Tick method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pchanged:matplotlib.axis.Tick.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback:matplotlib.axis.Tick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib.axis.Tick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pick:matplotlib-axis-tick-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pick::doc}}\index{pick() (matplotlib.axis.Tick method)@\spxentry{pick()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pick:matplotlib.axis.Tick.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker:matplotlib.axis.Tick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable:matplotlib.axis.Tick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable:matplotlib-axis-tick-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable::doc}}\index{pickable() (matplotlib.axis.Tick method)@\spxentry{pickable()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.pickable:matplotlib.axis.Tick.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.get_picker:matplotlib.axis.Tick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.pick:matplotlib.axis.Tick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.properties:matplotlib-axis-tick-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.properties::doc}}\index{properties() (matplotlib.axis.Tick method)@\spxentry{properties()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.properties:matplotlib.axis.Tick.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove:matplotlib-axis-tick-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove::doc}}\index{remove() (matplotlib.axis.Tick method)@\spxentry{remove()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove:matplotlib.axis.Tick.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib-axis-tick-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.Tick method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.remove_callback:matplotlib.axis.Tick.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.add_callback:matplotlib.axis.Tick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set:matplotlib-axis-tick-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set::doc}}\index{set() (matplotlib.axis.Tick method)@\spxentry{set()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set:matplotlib.axis.Tick.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_agg_filter:matplotlib-axis-tick-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.Tick method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_agg_filter:matplotlib.axis.Tick.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_alpha:matplotlib-axis-tick-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.Tick method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_alpha:matplotlib.axis.Tick.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_animated:matplotlib-axis-tick-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_animated::doc}}\index{set\_animated() (matplotlib.axis.Tick method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_animated:matplotlib.axis.Tick.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_box:matplotlib-axis-tick-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.Tick method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_box:matplotlib.axis.Tick.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_on:matplotlib-axis-tick-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.Tick method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_on:matplotlib.axis.Tick.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_path:matplotlib-axis-tick-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.Tick method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_clip_path:matplotlib.axis.Tick.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_contains:matplotlib-axis-tick-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_contains::doc}}\index{set\_contains() (matplotlib.axis.Tick method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_contains:matplotlib.axis.Tick.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Tick.contains:matplotlib.axis.Tick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_figure:matplotlib-axis-tick-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_figure::doc}}\index{set\_figure() (matplotlib.axis.Tick method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_figure:matplotlib.axis.Tick.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_gid:matplotlib-axis-tick-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_gid::doc}}\index{set\_gid() (matplotlib.axis.Tick method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_gid:matplotlib.axis.Tick.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label:matplotlib-axis-tick-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label::doc}}\index{set\_label() (matplotlib.axis.Tick method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_label:matplotlib.axis.Tick.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_path_effects:matplotlib-axis-tick-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.Tick method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_path_effects:matplotlib.axis.Tick.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib-axis-tick-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker::doc}}\index{set\_picker() (matplotlib.axis.Tick method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_picker:matplotlib.axis.Tick.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_rasterized:matplotlib-axis-tick-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.Tick method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_rasterized:matplotlib.axis.Tick.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_sketch_params:matplotlib-axis-tick-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.Tick method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_sketch_params:matplotlib.axis.Tick.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_snap:matplotlib-axis-tick-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_snap::doc}}\index{set\_snap() (matplotlib.axis.Tick method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_snap:matplotlib.axis.Tick.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_transform:matplotlib-axis-tick-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_transform::doc}}\index{set\_transform() (matplotlib.axis.Tick method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_transform:matplotlib.axis.Tick.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_url:matplotlib-axis-tick-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_url::doc}}\index{set\_url() (matplotlib.axis.Tick method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_url:matplotlib.axis.Tick.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_visible:matplotlib-axis-tick-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_visible::doc}}\index{set\_visible() (matplotlib.axis.Tick method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_visible:matplotlib.axis.Tick.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_zorder:matplotlib-axis-tick-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.Tick method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.set_zorder:matplotlib.axis.Tick.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.stale:matplotlib-axis-tick-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.stale::doc}}\index{stale (matplotlib.axis.Tick attribute)@\spxentry{stale}\spxextra{matplotlib.axis.Tick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.stale:matplotlib.axis.Tick.stale}}\pysigline{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.update} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update:matplotlib-axis-tick-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update::doc}}\index{update() (matplotlib.axis.Tick method)@\spxentry{update()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update:matplotlib.axis.Tick.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_from:matplotlib-axis-tick-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_from::doc}}\index{update\_from() (matplotlib.axis.Tick method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.Tick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.update_from:matplotlib.axis.Tick.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.Tick.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Tick.zorder:matplotlib-axis-tick-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.zorder::doc}}\index{zorder (matplotlib.axis.Tick attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.Tick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Tick.zorder:matplotlib.axis.Tick.zorder}}\pysigline{\sphinxcode{\sphinxupquote{Tick.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback:matplotlib-axis-xtick-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback::doc}}\index{add\_callback() (matplotlib.axis.XTick method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback:matplotlib.axis.XTick.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib.axis.XTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib.axis.XTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.axes:matplotlib-axis-xtick-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.axes::doc}}\index{axes (matplotlib.axis.XTick attribute)@\spxentry{axes}\spxextra{matplotlib.axis.XTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.axes:matplotlib.axis.XTick.axes}}\pysigline{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.contains:matplotlib-axis-xtick-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.contains::doc}}\index{contains() (matplotlib.axis.XTick method)@\spxentry{contains()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.contains:matplotlib.axis.XTick.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_xunits:matplotlib-axis-xtick-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.XTick method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_xunits:matplotlib.axis.XTick.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_yunits:matplotlib-axis-xtick-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.XTick method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.convert_yunits:matplotlib.axis.XTick.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.draw:matplotlib-axis-xtick-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.draw::doc}}\index{draw() (matplotlib.axis.XTick method)@\spxentry{draw()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.draw:matplotlib.axis.XTick.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.findobj:matplotlib-axis-xtick-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.findobj::doc}}\index{findobj() (matplotlib.axis.XTick method)@\spxentry{findobj()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.findobj:matplotlib.axis.XTick.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data:matplotlib-axis-xtick-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.XTick method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data:matplotlib.axis.XTick.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_cursor_data:matplotlib.axis.XTick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_agg_filter:matplotlib-axis-xtick-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.XTick method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_agg_filter:matplotlib.axis.XTick.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_alpha:matplotlib-axis-xtick-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.XTick method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_alpha:matplotlib.axis.XTick.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_animated:matplotlib-axis-xtick-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_animated::doc}}\index{get\_animated() (matplotlib.axis.XTick method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_animated:matplotlib.axis.XTick.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_children:matplotlib-axis-xtick-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_children::doc}}\index{get\_children() (matplotlib.axis.XTick method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_children:matplotlib.axis.XTick.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_box:matplotlib-axis-xtick-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.XTick method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_box:matplotlib.axis.XTick.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_on:matplotlib-axis-xtick-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.XTick method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_on:matplotlib.axis.XTick.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_path:matplotlib-axis-xtick-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.XTick method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_clip_path:matplotlib.axis.XTick.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_contains:matplotlib-axis-xtick-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_contains::doc}}\index{get\_contains() (matplotlib.axis.XTick method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_contains:matplotlib.axis.XTick.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_contains:matplotlib.axis.XTick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_cursor_data:matplotlib-axis-xtick-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.XTick method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_cursor_data:matplotlib.axis.XTick.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data:matplotlib.axis.XTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.format_cursor_data:matplotlib.axis.XTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_figure:matplotlib-axis-xtick-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_figure::doc}}\index{get\_figure() (matplotlib.axis.XTick method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_figure:matplotlib.axis.XTick.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_gid:matplotlib-axis-xtick-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_gid::doc}}\index{get\_gid() (matplotlib.axis.XTick method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_gid:matplotlib.axis.XTick.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_label:matplotlib-axis-xtick-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_label::doc}}\index{get\_label() (matplotlib.axis.XTick method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_label:matplotlib.axis.XTick.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_path_effects:matplotlib-axis-xtick-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.XTick method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_path_effects:matplotlib.axis.XTick.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker:matplotlib-axis-xtick-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker::doc}}\index{get\_picker() (matplotlib.axis.XTick method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker:matplotlib.axis.XTick.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable:matplotlib.axis.XTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pick:matplotlib.axis.XTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_rasterized:matplotlib-axis-xtick-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.XTick method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_rasterized:matplotlib.axis.XTick.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_sketch_params:matplotlib-axis-xtick-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.XTick method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_sketch_params:matplotlib.axis.XTick.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_snap:matplotlib-axis-xtick-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_snap::doc}}\index{get\_snap() (matplotlib.axis.XTick method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_snap:matplotlib.axis.XTick.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_snap:matplotlib.axis.XTick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transform:matplotlib-axis-xtick-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transform::doc}}\index{get\_transform() (matplotlib.axis.XTick method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transform:matplotlib.axis.XTick.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transformed_clip_path_and_affine:matplotlib-axis-xtick-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.XTick method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_transformed_clip_path_and_affine:matplotlib.axis.XTick.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_url:matplotlib-axis-xtick-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_url::doc}}\index{get\_url() (matplotlib.axis.XTick method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_url:matplotlib.axis.XTick.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_visible:matplotlib-axis-xtick-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_visible::doc}}\index{get\_visible() (matplotlib.axis.XTick method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_visible:matplotlib.axis.XTick.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_window_extent:matplotlib-axis-xtick-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.XTick method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_window_extent:matplotlib.axis.XTick.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_zorder:matplotlib-axis-xtick-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.XTick method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.get_zorder:matplotlib.axis.XTick.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.have_units:matplotlib-axis-xtick-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.have_units::doc}}\index{have\_units() (matplotlib.axis.XTick method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.have_units:matplotlib.axis.XTick.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.is_transform_set:matplotlib-axis-xtick-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.XTick method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.is_transform_set:matplotlib.axis.XTick.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_transform:matplotlib.axis.XTick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.mouseover:matplotlib-axis-xtick-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.mouseover::doc}}\index{mouseover (matplotlib.axis.XTick attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.XTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.mouseover:matplotlib.axis.XTick.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pchanged:matplotlib-axis-xtick-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pchanged::doc}}\index{pchanged() (matplotlib.axis.XTick method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pchanged:matplotlib.axis.XTick.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback:matplotlib.axis.XTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib.axis.XTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pick:matplotlib-axis-xtick-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pick::doc}}\index{pick() (matplotlib.axis.XTick method)@\spxentry{pick()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pick:matplotlib.axis.XTick.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker:matplotlib.axis.XTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable:matplotlib.axis.XTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable:matplotlib-axis-xtick-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable::doc}}\index{pickable() (matplotlib.axis.XTick method)@\spxentry{pickable()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.pickable:matplotlib.axis.XTick.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.get_picker:matplotlib.axis.XTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.pick:matplotlib.axis.XTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.properties:matplotlib-axis-xtick-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.properties::doc}}\index{properties() (matplotlib.axis.XTick method)@\spxentry{properties()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.properties:matplotlib.axis.XTick.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove:matplotlib-axis-xtick-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove::doc}}\index{remove() (matplotlib.axis.XTick method)@\spxentry{remove()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove:matplotlib.axis.XTick.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib-axis-xtick-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.XTick method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.remove_callback:matplotlib.axis.XTick.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.add_callback:matplotlib.axis.XTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set:matplotlib-axis-xtick-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set::doc}}\index{set() (matplotlib.axis.XTick method)@\spxentry{set()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set:matplotlib.axis.XTick.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_agg_filter:matplotlib-axis-xtick-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.XTick method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_agg_filter:matplotlib.axis.XTick.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_alpha:matplotlib-axis-xtick-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.XTick method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_alpha:matplotlib.axis.XTick.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_animated:matplotlib-axis-xtick-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_animated::doc}}\index{set\_animated() (matplotlib.axis.XTick method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_animated:matplotlib.axis.XTick.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_box:matplotlib-axis-xtick-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.XTick method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_box:matplotlib.axis.XTick.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_on:matplotlib-axis-xtick-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.XTick method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_on:matplotlib.axis.XTick.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_path:matplotlib-axis-xtick-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.XTick method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_clip_path:matplotlib.axis.XTick.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_contains:matplotlib-axis-xtick-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_contains::doc}}\index{set\_contains() (matplotlib.axis.XTick method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_contains:matplotlib.axis.XTick.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XTick.contains:matplotlib.axis.XTick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_figure:matplotlib-axis-xtick-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_figure::doc}}\index{set\_figure() (matplotlib.axis.XTick method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_figure:matplotlib.axis.XTick.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_gid:matplotlib-axis-xtick-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_gid::doc}}\index{set\_gid() (matplotlib.axis.XTick method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_gid:matplotlib.axis.XTick.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label:matplotlib-axis-xtick-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label::doc}}\index{set\_label() (matplotlib.axis.XTick method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_label:matplotlib.axis.XTick.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_path_effects:matplotlib-axis-xtick-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.XTick method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_path_effects:matplotlib.axis.XTick.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib-axis-xtick-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker::doc}}\index{set\_picker() (matplotlib.axis.XTick method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_picker:matplotlib.axis.XTick.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_rasterized:matplotlib-axis-xtick-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.XTick method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_rasterized:matplotlib.axis.XTick.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_sketch_params:matplotlib-axis-xtick-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.XTick method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_sketch_params:matplotlib.axis.XTick.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_snap:matplotlib-axis-xtick-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_snap::doc}}\index{set\_snap() (matplotlib.axis.XTick method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_snap:matplotlib.axis.XTick.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_transform:matplotlib-axis-xtick-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_transform::doc}}\index{set\_transform() (matplotlib.axis.XTick method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_transform:matplotlib.axis.XTick.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_url:matplotlib-axis-xtick-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_url::doc}}\index{set\_url() (matplotlib.axis.XTick method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_url:matplotlib.axis.XTick.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_visible:matplotlib-axis-xtick-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_visible::doc}}\index{set\_visible() (matplotlib.axis.XTick method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_visible:matplotlib.axis.XTick.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_zorder:matplotlib-axis-xtick-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.XTick method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.set_zorder:matplotlib.axis.XTick.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.stale:matplotlib-axis-xtick-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.stale::doc}}\index{stale (matplotlib.axis.XTick attribute)@\spxentry{stale}\spxextra{matplotlib.axis.XTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.stale:matplotlib.axis.XTick.stale}}\pysigline{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.update} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update:matplotlib-axis-xtick-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update::doc}}\index{update() (matplotlib.axis.XTick method)@\spxentry{update()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update:matplotlib.axis.XTick.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_from:matplotlib-axis-xtick-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_from::doc}}\index{update\_from() (matplotlib.axis.XTick method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.XTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.update_from:matplotlib.axis.XTick.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.XTick.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XTick.zorder:matplotlib-axis-xtick-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.zorder::doc}}\index{zorder (matplotlib.axis.XTick attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.XTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XTick.zorder:matplotlib.axis.XTick.zorder}}\pysigline{\sphinxcode{\sphinxupquote{XTick.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback:matplotlib-axis-ytick-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback::doc}}\index{add\_callback() (matplotlib.axis.YTick method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback:matplotlib.axis.YTick.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib.axis.YTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib.axis.YTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.axes:matplotlib-axis-ytick-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.axes::doc}}\index{axes (matplotlib.axis.YTick attribute)@\spxentry{axes}\spxextra{matplotlib.axis.YTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.axes:matplotlib.axis.YTick.axes}}\pysigline{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.contains:matplotlib-axis-ytick-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.contains::doc}}\index{contains() (matplotlib.axis.YTick method)@\spxentry{contains()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.contains:matplotlib.axis.YTick.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the Tick marks. This function always returns false. It is more useful to test if the axis as a whole contains the mouse rather than the set of tick marks. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_xunits:matplotlib-axis-ytick-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.YTick method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_xunits:matplotlib.axis.YTick.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_yunits:matplotlib-axis-ytick-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.YTick method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.convert_yunits:matplotlib.axis.YTick.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.draw:matplotlib-axis-ytick-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.draw::doc}}\index{draw() (matplotlib.axis.YTick method)@\spxentry{draw()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.draw:matplotlib.axis.YTick.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.findobj:matplotlib-axis-ytick-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.findobj::doc}}\index{findobj() (matplotlib.axis.YTick method)@\spxentry{findobj()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.findobj:matplotlib.axis.YTick.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data:matplotlib-axis-ytick-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.YTick method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data:matplotlib.axis.YTick.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_cursor_data:matplotlib.axis.YTick.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_agg_filter:matplotlib-axis-ytick-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.YTick method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_agg_filter:matplotlib.axis.YTick.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_alpha:matplotlib-axis-ytick-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.YTick method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_alpha:matplotlib.axis.YTick.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_animated:matplotlib-axis-ytick-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_animated::doc}}\index{get\_animated() (matplotlib.axis.YTick method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_animated:matplotlib.axis.YTick.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_children:matplotlib-axis-ytick-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_children::doc}}\index{get\_children() (matplotlib.axis.YTick method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_children:matplotlib.axis.YTick.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_box:matplotlib-axis-ytick-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.YTick method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_box:matplotlib.axis.YTick.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_on:matplotlib-axis-ytick-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.YTick method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_on:matplotlib.axis.YTick.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_path:matplotlib-axis-ytick-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.YTick method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_clip_path:matplotlib.axis.YTick.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_contains:matplotlib-axis-ytick-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_contains::doc}}\index{get\_contains() (matplotlib.axis.YTick method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_contains:matplotlib.axis.YTick.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_contains:matplotlib.axis.YTick.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_cursor_data:matplotlib-axis-ytick-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.YTick method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_cursor_data:matplotlib.axis.YTick.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data:matplotlib.axis.YTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.format_cursor_data:matplotlib.axis.YTick.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_figure:matplotlib-axis-ytick-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_figure::doc}}\index{get\_figure() (matplotlib.axis.YTick method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_figure:matplotlib.axis.YTick.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_gid:matplotlib-axis-ytick-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_gid::doc}}\index{get\_gid() (matplotlib.axis.YTick method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_gid:matplotlib.axis.YTick.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_label:matplotlib-axis-ytick-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_label::doc}}\index{get\_label() (matplotlib.axis.YTick method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_label:matplotlib.axis.YTick.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_path_effects:matplotlib-axis-ytick-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.YTick method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_path_effects:matplotlib.axis.YTick.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker:matplotlib-axis-ytick-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker::doc}}\index{get\_picker() (matplotlib.axis.YTick method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker:matplotlib.axis.YTick.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable:matplotlib.axis.YTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pick:matplotlib.axis.YTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_rasterized:matplotlib-axis-ytick-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.YTick method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_rasterized:matplotlib.axis.YTick.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_sketch_params:matplotlib-axis-ytick-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.YTick method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_sketch_params:matplotlib.axis.YTick.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_snap:matplotlib-axis-ytick-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_snap::doc}}\index{get\_snap() (matplotlib.axis.YTick method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_snap:matplotlib.axis.YTick.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_snap:matplotlib.axis.YTick.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transform:matplotlib-axis-ytick-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transform::doc}}\index{get\_transform() (matplotlib.axis.YTick method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transform:matplotlib.axis.YTick.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transformed_clip_path_and_affine:matplotlib-axis-ytick-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.YTick method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_transformed_clip_path_and_affine:matplotlib.axis.YTick.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_url:matplotlib-axis-ytick-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_url::doc}}\index{get\_url() (matplotlib.axis.YTick method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_url:matplotlib.axis.YTick.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_visible:matplotlib-axis-ytick-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_visible::doc}}\index{get\_visible() (matplotlib.axis.YTick method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_visible:matplotlib.axis.YTick.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_window_extent:matplotlib-axis-ytick-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.YTick method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_window_extent:matplotlib.axis.YTick.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_zorder:matplotlib-axis-ytick-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.YTick method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.get_zorder:matplotlib.axis.YTick.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.have_units:matplotlib-axis-ytick-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.have_units::doc}}\index{have\_units() (matplotlib.axis.YTick method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.have_units:matplotlib.axis.YTick.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.is_transform_set:matplotlib-axis-ytick-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.YTick method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.is_transform_set:matplotlib.axis.YTick.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_transform:matplotlib.axis.YTick.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.mouseover:matplotlib-axis-ytick-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.mouseover::doc}}\index{mouseover (matplotlib.axis.YTick attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.YTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.mouseover:matplotlib.axis.YTick.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pchanged:matplotlib-axis-ytick-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pchanged::doc}}\index{pchanged() (matplotlib.axis.YTick method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pchanged:matplotlib.axis.YTick.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback:matplotlib.axis.YTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib.axis.YTick.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pick:matplotlib-axis-ytick-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pick::doc}}\index{pick() (matplotlib.axis.YTick method)@\spxentry{pick()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pick:matplotlib.axis.YTick.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker:matplotlib.axis.YTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable:matplotlib.axis.YTick.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable:matplotlib-axis-ytick-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable::doc}}\index{pickable() (matplotlib.axis.YTick method)@\spxentry{pickable()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.pickable:matplotlib.axis.YTick.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.get_picker:matplotlib.axis.YTick.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.pick:matplotlib.axis.YTick.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.properties:matplotlib-axis-ytick-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.properties::doc}}\index{properties() (matplotlib.axis.YTick method)@\spxentry{properties()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.properties:matplotlib.axis.YTick.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove:matplotlib-axis-ytick-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove::doc}}\index{remove() (matplotlib.axis.YTick method)@\spxentry{remove()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove:matplotlib.axis.YTick.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib-axis-ytick-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.YTick method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.remove_callback:matplotlib.axis.YTick.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.add_callback:matplotlib.axis.YTick.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set:matplotlib-axis-ytick-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set::doc}}\index{set() (matplotlib.axis.YTick method)@\spxentry{set()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set:matplotlib.axis.YTick.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_agg_filter:matplotlib-axis-ytick-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.YTick method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_agg_filter:matplotlib.axis.YTick.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_alpha:matplotlib-axis-ytick-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.YTick method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_alpha:matplotlib.axis.YTick.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_animated:matplotlib-axis-ytick-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_animated::doc}}\index{set\_animated() (matplotlib.axis.YTick method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_animated:matplotlib.axis.YTick.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_box:matplotlib-axis-ytick-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.YTick method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_box:matplotlib.axis.YTick.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_on:matplotlib-axis-ytick-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.YTick method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_on:matplotlib.axis.YTick.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_path:matplotlib-axis-ytick-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.YTick method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_clip_path:matplotlib.axis.YTick.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_contains:matplotlib-axis-ytick-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_contains::doc}}\index{set\_contains() (matplotlib.axis.YTick method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_contains:matplotlib.axis.YTick.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YTick.contains:matplotlib.axis.YTick.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_figure:matplotlib-axis-ytick-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_figure::doc}}\index{set\_figure() (matplotlib.axis.YTick method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_figure:matplotlib.axis.YTick.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_gid:matplotlib-axis-ytick-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_gid::doc}}\index{set\_gid() (matplotlib.axis.YTick method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_gid:matplotlib.axis.YTick.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label:matplotlib-axis-ytick-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label::doc}}\index{set\_label() (matplotlib.axis.YTick method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_label:matplotlib.axis.YTick.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set the label1 text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_path_effects:matplotlib-axis-ytick-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.YTick method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_path_effects:matplotlib.axis.YTick.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib-axis-ytick-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker::doc}}\index{set\_picker() (matplotlib.axis.YTick method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_picker:matplotlib.axis.YTick.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_rasterized:matplotlib-axis-ytick-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.YTick method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_rasterized:matplotlib.axis.YTick.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_sketch_params:matplotlib-axis-ytick-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.YTick method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_sketch_params:matplotlib.axis.YTick.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_snap:matplotlib-axis-ytick-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_snap::doc}}\index{set\_snap() (matplotlib.axis.YTick method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_snap:matplotlib.axis.YTick.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_transform:matplotlib-axis-ytick-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_transform::doc}}\index{set\_transform() (matplotlib.axis.YTick method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_transform:matplotlib.axis.YTick.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_url:matplotlib-axis-ytick-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_url::doc}}\index{set\_url() (matplotlib.axis.YTick method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_url:matplotlib.axis.YTick.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_visible:matplotlib-axis-ytick-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_visible::doc}}\index{set\_visible() (matplotlib.axis.YTick method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_visible:matplotlib.axis.YTick.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_zorder:matplotlib-axis-ytick-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.YTick method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.set_zorder:matplotlib.axis.YTick.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.stale:matplotlib-axis-ytick-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.stale::doc}}\index{stale (matplotlib.axis.YTick attribute)@\spxentry{stale}\spxextra{matplotlib.axis.YTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.stale:matplotlib.axis.YTick.stale}}\pysigline{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.update} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update:matplotlib-axis-ytick-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update::doc}}\index{update() (matplotlib.axis.YTick method)@\spxentry{update()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update:matplotlib.axis.YTick.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_from:matplotlib-axis-ytick-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_from::doc}}\index{update\_from() (matplotlib.axis.YTick method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.YTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.update_from:matplotlib.axis.YTick.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.YTick.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YTick.zorder:matplotlib-axis-ytick-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.zorder::doc}}\index{zorder (matplotlib.axis.YTick attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.YTick attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YTick.zorder:matplotlib.axis.YTick.zorder}}\pysigline{\sphinxcode{\sphinxupquote{YTick.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \paragraph{Axis} \label{\detokenize{api/axis_api:axis}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback:matplotlib.axis.Axis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.axes:matplotlib.axis.Axis.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}} & Test whether the artist contains the mouse event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_xunits:matplotlib.axis.Axis.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_yunits:matplotlib.axis.Axis.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.draw:matplotlib.axis.Axis.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.draw}}}}} & Draw the axis lines, grid lines, tick lines and labels \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.findobj:matplotlib.axis.Axis.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data:matplotlib.axis.Axis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_agg_filter:matplotlib.axis.Axis.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_alpha:matplotlib.axis.Axis.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_animated:matplotlib.axis.Axis.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_children:matplotlib.axis.Axis.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_box:matplotlib.axis.Axis.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_on:matplotlib.axis.Axis.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_path:matplotlib.axis.Axis.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_contains:matplotlib.axis.Axis.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_cursor_data:matplotlib.axis.Axis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_figure:matplotlib.axis.Axis.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gid:matplotlib.axis.Axis.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label:matplotlib.axis.Axis.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_label}}}}} & Return the axis label as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_path_effects:matplotlib.axis.Axis.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker:matplotlib.axis.Axis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_rasterized:matplotlib.axis.Axis.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_sketch_params:matplotlib.axis.Axis.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_snap:matplotlib.axis.Axis.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transform:matplotlib.axis.Axis.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transformed_clip_path_and_affine:matplotlib.axis.Axis.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_url:matplotlib.axis.Axis.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_visible:matplotlib.axis.Axis.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_window_extent:matplotlib.axis.Axis.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_zorder:matplotlib.axis.Axis.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.have_units:matplotlib.axis.Axis.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.is_transform_set:matplotlib.axis.Axis.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.mouseover:matplotlib.axis.Axis.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pchanged:matplotlib.axis.Axis.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pick:matplotlib.axis.Axis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable:matplotlib.axis.Axis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.properties:matplotlib.axis.Axis.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove:matplotlib.axis.Axis.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib.axis.Axis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set:matplotlib.axis.Axis.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_agg_filter:matplotlib.axis.Axis.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_alpha:matplotlib.axis.Axis.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_animated:matplotlib.axis.Axis.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_box:matplotlib.axis.Axis.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_on:matplotlib.axis.Axis.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_path:matplotlib.axis.Axis.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains:matplotlib.axis.Axis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_figure:matplotlib.axis.Axis.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_gid:matplotlib.axis.Axis.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label:matplotlib.axis.Axis.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_label}}}}} & Set a label that will be displayed in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_path_effects:matplotlib.axis.Axis.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_rasterized:matplotlib.axis.Axis.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_sketch_params:matplotlib.axis.Axis.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_snap:matplotlib.axis.Axis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_transform:matplotlib.axis.Axis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_url:matplotlib.axis.Axis.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_visible:matplotlib.axis.Axis.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder:matplotlib.axis.Axis.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.stale:matplotlib.axis.Axis.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.update:matplotlib.axis.Axis.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.update_from:matplotlib.axis.Axis.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.zorder:matplotlib.axis.Axis.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback:matplotlib.axis.XAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.axes:matplotlib.axis.XAxis.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.contains:matplotlib.axis.XAxis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.contains}}}}} & Test whether the mouse event occurred in the x axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_xunits:matplotlib.axis.XAxis.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_yunits:matplotlib.axis.XAxis.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.draw:matplotlib.axis.XAxis.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.draw}}}}} & Draw the axis lines, grid lines, tick lines and labels \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.findobj:matplotlib.axis.XAxis.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data:matplotlib.axis.XAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_agg_filter:matplotlib.axis.XAxis.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_alpha:matplotlib.axis.XAxis.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_animated:matplotlib.axis.XAxis.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_children:matplotlib.axis.XAxis.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_box:matplotlib.axis.XAxis.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_on:matplotlib.axis.XAxis.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_path:matplotlib.axis.XAxis.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_contains:matplotlib.axis.XAxis.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_cursor_data:matplotlib.axis.XAxis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_figure:matplotlib.axis.XAxis.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gid:matplotlib.axis.XAxis.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label:matplotlib.axis.XAxis.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_label}}}}} & Return the axis label as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_path_effects:matplotlib.axis.XAxis.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker:matplotlib.axis.XAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_rasterized:matplotlib.axis.XAxis.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_sketch_params:matplotlib.axis.XAxis.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_snap:matplotlib.axis.XAxis.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transform:matplotlib.axis.XAxis.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transformed_clip_path_and_affine:matplotlib.axis.XAxis.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_url:matplotlib.axis.XAxis.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_visible:matplotlib.axis.XAxis.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_window_extent:matplotlib.axis.XAxis.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_zorder:matplotlib.axis.XAxis.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.have_units:matplotlib.axis.XAxis.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.is_transform_set:matplotlib.axis.XAxis.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.mouseover:matplotlib.axis.XAxis.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pchanged:matplotlib.axis.XAxis.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick:matplotlib.axis.XAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable:matplotlib.axis.XAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.properties:matplotlib.axis.XAxis.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove:matplotlib.axis.XAxis.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib.axis.XAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set:matplotlib.axis.XAxis.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_agg_filter:matplotlib.axis.XAxis.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_alpha:matplotlib.axis.XAxis.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_animated:matplotlib.axis.XAxis.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_box:matplotlib.axis.XAxis.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_on:matplotlib.axis.XAxis.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_path:matplotlib.axis.XAxis.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_contains:matplotlib.axis.XAxis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_figure:matplotlib.axis.XAxis.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_gid:matplotlib.axis.XAxis.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label:matplotlib.axis.XAxis.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_label}}}}} & Set a label that will be displayed in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_path_effects:matplotlib.axis.XAxis.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_rasterized:matplotlib.axis.XAxis.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_sketch_params:matplotlib.axis.XAxis.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_snap:matplotlib.axis.XAxis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_transform:matplotlib.axis.XAxis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_url:matplotlib.axis.XAxis.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_visible:matplotlib.axis.XAxis.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_zorder:matplotlib.axis.XAxis.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.stale:matplotlib.axis.XAxis.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.update:matplotlib.axis.XAxis.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_from:matplotlib.axis.XAxis.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.zorder:matplotlib.axis.XAxis.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{XAxis.zorder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback:matplotlib.axis.YAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.add\_callback}}}}} & Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.axes:matplotlib.axis.YAxis.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.axes}}}}} & The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.contains:matplotlib.axis.YAxis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.contains}}}}} & Test whether the mouse event occurred in the y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_xunits:matplotlib.axis.YAxis.convert_xunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.convert\_xunits}}}}} & Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_yunits:matplotlib.axis.YAxis.convert_yunits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.convert\_yunits}}}}} & Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.draw:matplotlib.axis.YAxis.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.draw}}}}} & Draw the axis lines, grid lines, tick lines and labels \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.findobj:matplotlib.axis.YAxis.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data:matplotlib.axis.YAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.format\_cursor\_data}}}}} & Return a string representation of \sphinxstyleemphasis{data}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_agg_filter:matplotlib.axis.YAxis.get_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_agg\_filter}}}}} & Return filter function to be used for agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_alpha:matplotlib.axis.YAxis.get_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_alpha}}}}} & Return the alpha value used for blending - not supported on all backends \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_animated:matplotlib.axis.YAxis.get_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_animated}}}}} & Return the animated state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_children:matplotlib.axis.YAxis.get_children}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_children}}}}} & Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_box:matplotlib.axis.YAxis.get_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_clip\_box}}}}} & Return the clipbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_on:matplotlib.axis.YAxis.get_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_clip\_on}}}}} & Return whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_path:matplotlib.axis.YAxis.get_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_clip\_path}}}}} & Return the clip path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_contains:matplotlib.axis.YAxis.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_contains}}}}} & Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_cursor_data:matplotlib.axis.YAxis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_cursor\_data}}}}} & Return the cursor data for a given event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_figure:matplotlib.axis.YAxis.get_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_figure}}}}} & Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gid:matplotlib.axis.YAxis.get_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_gid}}}}} & Return the group id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label:matplotlib.axis.YAxis.get_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_label}}}}} & Return the axis label as a Text instance \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_path_effects:matplotlib.axis.YAxis.get_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_path\_effects}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker:matplotlib.axis.YAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_picker}}}}} & Return the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_rasterized:matplotlib.axis.YAxis.get_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_rasterized}}}}} & Return whether the artist is to be rasterized. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_sketch_params:matplotlib.axis.YAxis.get_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_sketch\_params}}}}} & Returns the sketch parameters for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_snap:matplotlib.axis.YAxis.get_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_snap}}}}} & Returns the snap setting. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transform:matplotlib.axis.YAxis.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_transform}}}}} & Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transformed_clip_path_and_affine:matplotlib.axis.YAxis.get_transformed_clip_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_transformed\_clip\_path\_and\_affine}}}}} & Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_url:matplotlib.axis.YAxis.get_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_url}}}}} & Return the url. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_visible:matplotlib.axis.YAxis.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_visible}}}}} & Return the visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_window_extent:matplotlib.axis.YAxis.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_window\_extent}}}}} & Get the axes bounding box in display space. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_zorder:matplotlib.axis.YAxis.get_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.get\_zorder}}}}} & Return the artist's zorder. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.have_units:matplotlib.axis.YAxis.have_units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.have\_units}}}}} & Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.is_transform_set:matplotlib.axis.YAxis.is_transform_set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.is\_transform\_set}}}}} & Return whether the Artist has an explicitly set transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.mouseover:matplotlib.axis.YAxis.mouseover}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.mouseover}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pchanged:matplotlib.axis.YAxis.pchanged}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.pchanged}}}}} & Call all of the registered callbacks. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick:matplotlib.axis.YAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.pick}}}}} & Process a pick event. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable:matplotlib.axis.YAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.pickable}}}}} & Return whether the artist is pickable. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.properties:matplotlib.axis.YAxis.properties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.properties}}}}} & Return a dictionary of all the properties of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove:matplotlib.axis.YAxis.remove}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.remove}}}}} & Remove the artist from the figure if possible. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib.axis.YAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.remove\_callback}}}}} & Remove a callback based on its observer id. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set:matplotlib.axis.YAxis.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set}}}}} & A property batch setter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_agg_filter:matplotlib.axis.YAxis.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_agg\_filter}}}}} & Set the agg filter. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_alpha:matplotlib.axis.YAxis.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_alpha}}}}} & Set the alpha value used for blending - not supported on all backends. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_animated:matplotlib.axis.YAxis.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_animated}}}}} & Set the artist's animation state. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_box:matplotlib.axis.YAxis.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_clip\_box}}}}} & Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_on:matplotlib.axis.YAxis.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_clip\_on}}}}} & Set whether the artist uses clipping. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_path:matplotlib.axis.YAxis.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_clip\_path}}}}} & Set the artist's clip path, which may be: \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_contains:matplotlib.axis.YAxis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_contains}}}}} & Define a custom contains test for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_figure:matplotlib.axis.YAxis.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_figure}}}}} & Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_gid:matplotlib.axis.YAxis.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_gid}}}}} & Set the (group) id for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label:matplotlib.axis.YAxis.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_label}}}}} & Set a label that will be displayed in the legend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_path_effects:matplotlib.axis.YAxis.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_path\_effects}}}}} & Set the path effects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_picker}}}}} & Define the picking behavior of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_rasterized:matplotlib.axis.YAxis.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_rasterized}}}}} & Force rasterized (bitmap) drawing in vector backend output. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_sketch_params:matplotlib.axis.YAxis.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_sketch\_params}}}}} & Sets the sketch parameters. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_snap:matplotlib.axis.YAxis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_snap}}}}} & Set the snapping behavior. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_transform:matplotlib.axis.YAxis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_transform}}}}} & Set the artist transform. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_url:matplotlib.axis.YAxis.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_url}}}}} & Set the url for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_visible:matplotlib.axis.YAxis.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_visible}}}}} & Set the artist's visibility. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_zorder:matplotlib.axis.YAxis.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.set\_zorder}}}}} & Set the zorder for the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.stale:matplotlib.axis.YAxis.stale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.stale}}}}} & Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.update:matplotlib.axis.YAxis.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.update}}}}} & Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_from:matplotlib.axis.YAxis.update_from}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.update\_from}}}}} & Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.zorder:matplotlib.axis.YAxis.zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAxis.zorder}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{matplotlib.axis.Axis.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback:matplotlib-axis-axis-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback::doc}}\index{add\_callback() (matplotlib.axis.Axis method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback:matplotlib.axis.Axis.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib.axis.Axis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib.axis.Axis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axes:matplotlib-axis-axis-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axes::doc}}\index{axes (matplotlib.axis.Axis attribute)@\spxentry{axes}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.axes:matplotlib.axis.Axis.axes}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib-axis-axis-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.contains::doc}}\index{contains() (matplotlib.axis.Axis method)@\spxentry{contains()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains:matplotlib.axis.Axis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_contains:matplotlib.axis.Axis.get_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_xunits:matplotlib-axis-axis-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.Axis method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_xunits:matplotlib.axis.Axis.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_yunits:matplotlib-axis-axis-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.Axis method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.convert_yunits:matplotlib.axis.Axis.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.draw:matplotlib-axis-axis-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.draw::doc}}\index{draw() (matplotlib.axis.Axis method)@\spxentry{draw()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.draw:matplotlib.axis.Axis.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}, \emph{*args}, \emph{**kwargs}}{} Draw the axis lines, grid lines, tick lines and labels \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.findobj:matplotlib-axis-axis-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.findobj::doc}}\index{findobj() (matplotlib.axis.Axis method)@\spxentry{findobj()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.findobj:matplotlib.axis.Axis.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data:matplotlib-axis-axis-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.Axis method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data:matplotlib.axis.Axis.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_cursor_data:matplotlib.axis.Axis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_agg_filter:matplotlib-axis-axis-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.Axis method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_agg_filter:matplotlib.axis.Axis.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_alpha:matplotlib-axis-axis-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.Axis method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_alpha:matplotlib.axis.Axis.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_animated:matplotlib-axis-axis-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_animated::doc}}\index{get\_animated() (matplotlib.axis.Axis method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_animated:matplotlib.axis.Axis.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_children:matplotlib-axis-axis-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_children::doc}}\index{get\_children() (matplotlib.axis.Axis method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_children:matplotlib.axis.Axis.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_box:matplotlib-axis-axis-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.Axis method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_box:matplotlib.axis.Axis.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_on:matplotlib-axis-axis-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.Axis method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_on:matplotlib.axis.Axis.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_path:matplotlib-axis-axis-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.Axis method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_clip_path:matplotlib.axis.Axis.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_contains:matplotlib-axis-axis-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_contains::doc}}\index{get\_contains() (matplotlib.axis.Axis method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_contains:matplotlib.axis.Axis.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains:matplotlib.axis.Axis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_cursor_data:matplotlib-axis-axis-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.Axis method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_cursor_data:matplotlib.axis.Axis.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data:matplotlib.axis.Axis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.format_cursor_data:matplotlib.axis.Axis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_figure:matplotlib-axis-axis-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_figure::doc}}\index{get\_figure() (matplotlib.axis.Axis method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_figure:matplotlib.axis.Axis.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gid:matplotlib-axis-axis-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gid::doc}}\index{get\_gid() (matplotlib.axis.Axis method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gid:matplotlib.axis.Axis.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label:matplotlib-axis-axis-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label::doc}}\index{get\_label() (matplotlib.axis.Axis method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_label:matplotlib.axis.Axis.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the axis label as a Text instance \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_path_effects:matplotlib-axis-axis-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.Axis method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_path_effects:matplotlib.axis.Axis.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker:matplotlib-axis-axis-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker::doc}}\index{get\_picker() (matplotlib.axis.Axis method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker:matplotlib.axis.Axis.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable:matplotlib.axis.Axis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pick:matplotlib.axis.Axis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_rasterized:matplotlib-axis-axis-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.Axis method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_rasterized:matplotlib.axis.Axis.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_sketch_params:matplotlib-axis-axis-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.Axis method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_sketch_params:matplotlib.axis.Axis.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_snap:matplotlib-axis-axis-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_snap::doc}}\index{get\_snap() (matplotlib.axis.Axis method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_snap:matplotlib.axis.Axis.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_snap:matplotlib.axis.Axis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transform:matplotlib-axis-axis-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transform::doc}}\index{get\_transform() (matplotlib.axis.Axis method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transform:matplotlib.axis.Axis.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transformed_clip_path_and_affine:matplotlib-axis-axis-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.Axis method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_transformed_clip_path_and_affine:matplotlib.axis.Axis.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_url:matplotlib-axis-axis-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_url::doc}}\index{get\_url() (matplotlib.axis.Axis method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_url:matplotlib.axis.Axis.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_visible:matplotlib-axis-axis-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_visible::doc}}\index{get\_visible() (matplotlib.axis.Axis method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_visible:matplotlib.axis.Axis.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_window_extent:matplotlib-axis-axis-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.Axis method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_window_extent:matplotlib.axis.Axis.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_zorder:matplotlib-axis-axis-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.Axis method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.get_zorder:matplotlib.axis.Axis.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.have_units:matplotlib-axis-axis-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.have_units::doc}}\index{have\_units() (matplotlib.axis.Axis method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.have_units:matplotlib.axis.Axis.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.is_transform_set:matplotlib-axis-axis-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.Axis method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.is_transform_set:matplotlib.axis.Axis.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_transform:matplotlib.axis.Axis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.mouseover:matplotlib-axis-axis-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.mouseover::doc}}\index{mouseover (matplotlib.axis.Axis attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.mouseover:matplotlib.axis.Axis.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pchanged:matplotlib-axis-axis-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pchanged::doc}}\index{pchanged() (matplotlib.axis.Axis method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pchanged:matplotlib.axis.Axis.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback:matplotlib.axis.Axis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib.axis.Axis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pick:matplotlib-axis-axis-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pick::doc}}\index{pick() (matplotlib.axis.Axis method)@\spxentry{pick()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pick:matplotlib.axis.Axis.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker:matplotlib.axis.Axis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable:matplotlib.axis.Axis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable:matplotlib-axis-axis-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable::doc}}\index{pickable() (matplotlib.axis.Axis method)@\spxentry{pickable()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.pickable:matplotlib.axis.Axis.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_picker:matplotlib.axis.Axis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.pick:matplotlib.axis.Axis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.properties:matplotlib-axis-axis-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.properties::doc}}\index{properties() (matplotlib.axis.Axis method)@\spxentry{properties()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.properties:matplotlib.axis.Axis.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove:matplotlib-axis-axis-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove::doc}}\index{remove() (matplotlib.axis.Axis method)@\spxentry{remove()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove:matplotlib.axis.Axis.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib-axis-axis-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.Axis method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.remove_callback:matplotlib.axis.Axis.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.add_callback:matplotlib.axis.Axis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set:matplotlib-axis-axis-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set::doc}}\index{set() (matplotlib.axis.Axis method)@\spxentry{set()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set:matplotlib.axis.Axis.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_agg_filter:matplotlib-axis-axis-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.Axis method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_agg_filter:matplotlib.axis.Axis.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_alpha:matplotlib-axis-axis-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.Axis method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_alpha:matplotlib.axis.Axis.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_animated:matplotlib-axis-axis-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_animated::doc}}\index{set\_animated() (matplotlib.axis.Axis method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_animated:matplotlib.axis.Axis.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_box:matplotlib-axis-axis-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.Axis method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_box:matplotlib.axis.Axis.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_on:matplotlib-axis-axis-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.Axis method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_on:matplotlib.axis.Axis.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_path:matplotlib-axis-axis-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.Axis method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_clip_path:matplotlib.axis.Axis.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains:matplotlib-axis-axis-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains::doc}}\index{set\_contains() (matplotlib.axis.Axis method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_contains:matplotlib.axis.Axis.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_figure:matplotlib-axis-axis-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_figure::doc}}\index{set\_figure() (matplotlib.axis.Axis method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_figure:matplotlib.axis.Axis.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_gid:matplotlib-axis-axis-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_gid::doc}}\index{set\_gid() (matplotlib.axis.Axis method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_gid:matplotlib.axis.Axis.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label:matplotlib-axis-axis-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label::doc}}\index{set\_label() (matplotlib.axis.Axis method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_label:matplotlib.axis.Axis.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_path_effects:matplotlib-axis-axis-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.Axis method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_path_effects:matplotlib.axis.Axis.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib-axis-axis-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker::doc}}\index{set\_picker() (matplotlib.axis.Axis method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_picker:matplotlib.axis.Axis.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_rasterized:matplotlib-axis-axis-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.Axis method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_rasterized:matplotlib.axis.Axis.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_sketch_params:matplotlib-axis-axis-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.Axis method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_sketch_params:matplotlib.axis.Axis.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_snap:matplotlib-axis-axis-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_snap::doc}}\index{set\_snap() (matplotlib.axis.Axis method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_snap:matplotlib.axis.Axis.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_transform:matplotlib-axis-axis-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_transform::doc}}\index{set\_transform() (matplotlib.axis.Axis method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_transform:matplotlib.axis.Axis.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_url:matplotlib-axis-axis-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_url::doc}}\index{set\_url() (matplotlib.axis.Axis method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_url:matplotlib.axis.Axis.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_visible:matplotlib-axis-axis-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_visible::doc}}\index{set\_visible() (matplotlib.axis.Axis method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_visible:matplotlib.axis.Axis.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder:matplotlib-axis-axis-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.Axis method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder:matplotlib.axis.Axis.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.stale:matplotlib-axis-axis-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.stale::doc}}\index{stale (matplotlib.axis.Axis attribute)@\spxentry{stale}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.stale:matplotlib.axis.Axis.stale}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.update} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update:matplotlib-axis-axis-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update::doc}}\index{update() (matplotlib.axis.Axis method)@\spxentry{update()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update:matplotlib.axis.Axis.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_from:matplotlib-axis-axis-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_from::doc}}\index{update\_from() (matplotlib.axis.Axis method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.update_from:matplotlib.axis.Axis.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.Axis.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zorder:matplotlib-axis-axis-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zorder::doc}}\index{zorder (matplotlib.axis.Axis attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.Axis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.Axis.zorder:matplotlib.axis.Axis.zorder}}\pysigline{\sphinxcode{\sphinxupquote{Axis.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback:matplotlib-axis-xaxis-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback::doc}}\index{add\_callback() (matplotlib.axis.XAxis method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback:matplotlib.axis.XAxis.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib.axis.XAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib.axis.XAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axes:matplotlib-axis-xaxis-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axes::doc}}\index{axes (matplotlib.axis.XAxis attribute)@\spxentry{axes}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.axes:matplotlib.axis.XAxis.axes}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.contains:matplotlib-axis-xaxis-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.contains::doc}}\index{contains() (matplotlib.axis.XAxis method)@\spxentry{contains()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.contains:matplotlib.axis.XAxis.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the x axis. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_xunits:matplotlib-axis-xaxis-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.XAxis method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_xunits:matplotlib.axis.XAxis.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_yunits:matplotlib-axis-xaxis-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.XAxis method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.convert_yunits:matplotlib.axis.XAxis.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.draw:matplotlib-axis-xaxis-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.draw::doc}}\index{draw() (matplotlib.axis.XAxis method)@\spxentry{draw()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.draw:matplotlib.axis.XAxis.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}, \emph{*args}, \emph{**kwargs}}{} Draw the axis lines, grid lines, tick lines and labels \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.findobj:matplotlib-axis-xaxis-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.findobj::doc}}\index{findobj() (matplotlib.axis.XAxis method)@\spxentry{findobj()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.findobj:matplotlib.axis.XAxis.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data:matplotlib-axis-xaxis-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.XAxis method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data:matplotlib.axis.XAxis.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_cursor_data:matplotlib.axis.XAxis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_agg_filter:matplotlib-axis-xaxis-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.XAxis method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_agg_filter:matplotlib.axis.XAxis.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_alpha:matplotlib-axis-xaxis-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.XAxis method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_alpha:matplotlib.axis.XAxis.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_animated:matplotlib-axis-xaxis-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_animated::doc}}\index{get\_animated() (matplotlib.axis.XAxis method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_animated:matplotlib.axis.XAxis.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_children:matplotlib-axis-xaxis-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_children::doc}}\index{get\_children() (matplotlib.axis.XAxis method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_children:matplotlib.axis.XAxis.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_box:matplotlib-axis-xaxis-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.XAxis method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_box:matplotlib.axis.XAxis.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_on:matplotlib-axis-xaxis-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.XAxis method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_on:matplotlib.axis.XAxis.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_path:matplotlib-axis-xaxis-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.XAxis method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_clip_path:matplotlib.axis.XAxis.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_contains:matplotlib-axis-xaxis-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_contains::doc}}\index{get\_contains() (matplotlib.axis.XAxis method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_contains:matplotlib.axis.XAxis.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_contains:matplotlib.axis.XAxis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_cursor_data:matplotlib-axis-xaxis-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.XAxis method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_cursor_data:matplotlib.axis.XAxis.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data:matplotlib.axis.XAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.format_cursor_data:matplotlib.axis.XAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_figure:matplotlib-axis-xaxis-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_figure::doc}}\index{get\_figure() (matplotlib.axis.XAxis method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_figure:matplotlib.axis.XAxis.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gid:matplotlib-axis-xaxis-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gid::doc}}\index{get\_gid() (matplotlib.axis.XAxis method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_gid:matplotlib.axis.XAxis.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label:matplotlib-axis-xaxis-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label::doc}}\index{get\_label() (matplotlib.axis.XAxis method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_label:matplotlib.axis.XAxis.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the axis label as a Text instance \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_path_effects:matplotlib-axis-xaxis-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.XAxis method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_path_effects:matplotlib.axis.XAxis.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker:matplotlib-axis-xaxis-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker::doc}}\index{get\_picker() (matplotlib.axis.XAxis method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker:matplotlib.axis.XAxis.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable:matplotlib.axis.XAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick:matplotlib.axis.XAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_rasterized:matplotlib-axis-xaxis-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.XAxis method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_rasterized:matplotlib.axis.XAxis.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_sketch_params:matplotlib-axis-xaxis-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.XAxis method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_sketch_params:matplotlib.axis.XAxis.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_snap:matplotlib-axis-xaxis-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_snap::doc}}\index{get\_snap() (matplotlib.axis.XAxis method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_snap:matplotlib.axis.XAxis.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_snap:matplotlib.axis.XAxis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transform:matplotlib-axis-xaxis-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transform::doc}}\index{get\_transform() (matplotlib.axis.XAxis method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transform:matplotlib.axis.XAxis.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transformed_clip_path_and_affine:matplotlib-axis-xaxis-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.XAxis method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_transformed_clip_path_and_affine:matplotlib.axis.XAxis.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_url:matplotlib-axis-xaxis-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_url::doc}}\index{get\_url() (matplotlib.axis.XAxis method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_url:matplotlib.axis.XAxis.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_visible:matplotlib-axis-xaxis-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_visible::doc}}\index{get\_visible() (matplotlib.axis.XAxis method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_visible:matplotlib.axis.XAxis.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_window_extent:matplotlib-axis-xaxis-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.XAxis method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_window_extent:matplotlib.axis.XAxis.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_zorder:matplotlib-axis-xaxis-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.XAxis method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_zorder:matplotlib.axis.XAxis.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.have_units:matplotlib-axis-xaxis-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.have_units::doc}}\index{have\_units() (matplotlib.axis.XAxis method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.have_units:matplotlib.axis.XAxis.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.is_transform_set:matplotlib-axis-xaxis-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.XAxis method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.is_transform_set:matplotlib.axis.XAxis.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_transform:matplotlib.axis.XAxis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.mouseover:matplotlib-axis-xaxis-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.mouseover::doc}}\index{mouseover (matplotlib.axis.XAxis attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.mouseover:matplotlib.axis.XAxis.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pchanged:matplotlib-axis-xaxis-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pchanged::doc}}\index{pchanged() (matplotlib.axis.XAxis method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pchanged:matplotlib.axis.XAxis.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback:matplotlib.axis.XAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib.axis.XAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick:matplotlib-axis-xaxis-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick::doc}}\index{pick() (matplotlib.axis.XAxis method)@\spxentry{pick()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick:matplotlib.axis.XAxis.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker:matplotlib.axis.XAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable:matplotlib.axis.XAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable:matplotlib-axis-xaxis-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable::doc}}\index{pickable() (matplotlib.axis.XAxis method)@\spxentry{pickable()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.pickable:matplotlib.axis.XAxis.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.get_picker:matplotlib.axis.XAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.pick:matplotlib.axis.XAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.properties:matplotlib-axis-xaxis-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.properties::doc}}\index{properties() (matplotlib.axis.XAxis method)@\spxentry{properties()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.properties:matplotlib.axis.XAxis.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove:matplotlib-axis-xaxis-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove::doc}}\index{remove() (matplotlib.axis.XAxis method)@\spxentry{remove()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove:matplotlib.axis.XAxis.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib-axis-xaxis-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.XAxis method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.remove_callback:matplotlib.axis.XAxis.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.add_callback:matplotlib.axis.XAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set:matplotlib-axis-xaxis-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set::doc}}\index{set() (matplotlib.axis.XAxis method)@\spxentry{set()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set:matplotlib.axis.XAxis.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_agg_filter:matplotlib-axis-xaxis-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.XAxis method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_agg_filter:matplotlib.axis.XAxis.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_alpha:matplotlib-axis-xaxis-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.XAxis method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_alpha:matplotlib.axis.XAxis.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_animated:matplotlib-axis-xaxis-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_animated::doc}}\index{set\_animated() (matplotlib.axis.XAxis method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_animated:matplotlib.axis.XAxis.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_box:matplotlib-axis-xaxis-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.XAxis method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_box:matplotlib.axis.XAxis.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_on:matplotlib-axis-xaxis-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.XAxis method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_on:matplotlib.axis.XAxis.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_path:matplotlib-axis-xaxis-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.XAxis method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_clip_path:matplotlib.axis.XAxis.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_contains:matplotlib-axis-xaxis-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_contains::doc}}\index{set\_contains() (matplotlib.axis.XAxis method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_contains:matplotlib.axis.XAxis.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.XAxis.contains:matplotlib.axis.XAxis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_figure:matplotlib-axis-xaxis-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_figure::doc}}\index{set\_figure() (matplotlib.axis.XAxis method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_figure:matplotlib.axis.XAxis.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_gid:matplotlib-axis-xaxis-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_gid::doc}}\index{set\_gid() (matplotlib.axis.XAxis method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_gid:matplotlib.axis.XAxis.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label:matplotlib-axis-xaxis-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label::doc}}\index{set\_label() (matplotlib.axis.XAxis method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_label:matplotlib.axis.XAxis.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_path_effects:matplotlib-axis-xaxis-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.XAxis method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_path_effects:matplotlib.axis.XAxis.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib-axis-xaxis-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker::doc}}\index{set\_picker() (matplotlib.axis.XAxis method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_picker:matplotlib.axis.XAxis.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_rasterized:matplotlib-axis-xaxis-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.XAxis method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_rasterized:matplotlib.axis.XAxis.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_sketch_params:matplotlib-axis-xaxis-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.XAxis method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_sketch_params:matplotlib.axis.XAxis.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_snap:matplotlib-axis-xaxis-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_snap::doc}}\index{set\_snap() (matplotlib.axis.XAxis method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_snap:matplotlib.axis.XAxis.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_transform:matplotlib-axis-xaxis-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_transform::doc}}\index{set\_transform() (matplotlib.axis.XAxis method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_transform:matplotlib.axis.XAxis.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_url:matplotlib-axis-xaxis-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_url::doc}}\index{set\_url() (matplotlib.axis.XAxis method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_url:matplotlib.axis.XAxis.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_visible:matplotlib-axis-xaxis-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_visible::doc}}\index{set\_visible() (matplotlib.axis.XAxis method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_visible:matplotlib.axis.XAxis.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_zorder:matplotlib-axis-xaxis-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.XAxis method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.set_zorder:matplotlib.axis.XAxis.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.stale:matplotlib-axis-xaxis-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.stale::doc}}\index{stale (matplotlib.axis.XAxis attribute)@\spxentry{stale}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.stale:matplotlib.axis.XAxis.stale}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.update} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update:matplotlib-axis-xaxis-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update::doc}}\index{update() (matplotlib.axis.XAxis method)@\spxentry{update()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update:matplotlib.axis.XAxis.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_from:matplotlib-axis-xaxis-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_from::doc}}\index{update\_from() (matplotlib.axis.XAxis method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.XAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.update_from:matplotlib.axis.XAxis.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.XAxis.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zorder:matplotlib-axis-xaxis-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zorder::doc}}\index{zorder (matplotlib.axis.XAxis attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.XAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.XAxis.zorder:matplotlib.axis.XAxis.zorder}}\pysigline{\sphinxcode{\sphinxupquote{XAxis.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.add\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback:matplotlib-axis-yaxis-add-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback::doc}}\index{add\_callback() (matplotlib.axis.YAxis method)@\spxentry{add\_callback()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback:matplotlib.axis.YAxis.add_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib.axis.YAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib.axis.YAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.axes} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axes:matplotlib-axis-yaxis-axes}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axes::doc}}\index{axes (matplotlib.axis.YAxis attribute)@\spxentry{axes}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.axes:matplotlib.axis.YAxis.axes}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.contains:matplotlib-axis-yaxis-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.contains::doc}}\index{contains() (matplotlib.axis.YAxis method)@\spxentry{contains()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.contains:matplotlib.axis.YAxis.contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the y axis. Returns \sphinxstyleemphasis{True} \textbar{} \sphinxstyleemphasis{False} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.convert\_xunits} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_xunits:matplotlib-axis-yaxis-convert-xunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_xunits::doc}}\index{convert\_xunits() (matplotlib.axis.YAxis method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_xunits:matplotlib.axis.YAxis.convert_xunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.convert\_yunits} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_yunits:matplotlib-axis-yaxis-convert-yunits}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_yunits::doc}}\index{convert\_yunits() (matplotlib.axis.YAxis method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.convert_yunits:matplotlib.axis.YAxis.convert_yunits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.draw} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.draw:matplotlib-axis-yaxis-draw}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.draw::doc}}\index{draw() (matplotlib.axis.YAxis method)@\spxentry{draw()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.draw:matplotlib.axis.YAxis.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}, \emph{*args}, \emph{**kwargs}}{} Draw the axis lines, grid lines, tick lines and labels \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.findobj} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.findobj:matplotlib-axis-yaxis-findobj}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.findobj::doc}}\index{findobj() (matplotlib.axis.YAxis method)@\spxentry{findobj()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.findobj:matplotlib.axis.YAxis.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.format\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data:matplotlib-axis-yaxis-format-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data::doc}}\index{format\_cursor\_data() (matplotlib.axis.YAxis method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data:matplotlib.axis.YAxis.format_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_cursor_data:matplotlib.axis.YAxis.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_agg_filter:matplotlib-axis-yaxis-get-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_agg_filter::doc}}\index{get\_agg\_filter() (matplotlib.axis.YAxis method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_agg_filter:matplotlib.axis.YAxis.get_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_alpha:matplotlib-axis-yaxis-get-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_alpha::doc}}\index{get\_alpha() (matplotlib.axis.YAxis method)@\spxentry{get\_alpha()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_alpha:matplotlib.axis.YAxis.get_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_animated:matplotlib-axis-yaxis-get-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_animated::doc}}\index{get\_animated() (matplotlib.axis.YAxis method)@\spxentry{get\_animated()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_animated:matplotlib.axis.YAxis.get_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_children} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_children:matplotlib-axis-yaxis-get-children}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_children::doc}}\index{get\_children() (matplotlib.axis.YAxis method)@\spxentry{get\_children()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_children:matplotlib.axis.YAxis.get_children}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_box:matplotlib-axis-yaxis-get-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_box::doc}}\index{get\_clip\_box() (matplotlib.axis.YAxis method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_box:matplotlib.axis.YAxis.get_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_on:matplotlib-axis-yaxis-get-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_on::doc}}\index{get\_clip\_on() (matplotlib.axis.YAxis method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_on:matplotlib.axis.YAxis.get_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_path:matplotlib-axis-yaxis-get-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_path::doc}}\index{get\_clip\_path() (matplotlib.axis.YAxis method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_clip_path:matplotlib.axis.YAxis.get_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_contains:matplotlib-axis-yaxis-get-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_contains::doc}}\index{get\_contains() (matplotlib.axis.YAxis method)@\spxentry{get\_contains()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_contains:matplotlib.axis.YAxis.get_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_contains:matplotlib.axis.YAxis.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_cursor\_data} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_cursor_data:matplotlib-axis-yaxis-get-cursor-data}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_cursor_data::doc}}\index{get\_cursor\_data() (matplotlib.axis.YAxis method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_cursor_data:matplotlib.axis.YAxis.get_cursor_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data:matplotlib.axis.YAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.format_cursor_data:matplotlib.axis.YAxis.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_figure:matplotlib-axis-yaxis-get-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_figure::doc}}\index{get\_figure() (matplotlib.axis.YAxis method)@\spxentry{get\_figure()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_figure:matplotlib.axis.YAxis.get_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gid:matplotlib-axis-yaxis-get-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gid::doc}}\index{get\_gid() (matplotlib.axis.YAxis method)@\spxentry{get\_gid()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_gid:matplotlib.axis.YAxis.get_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label:matplotlib-axis-yaxis-get-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label::doc}}\index{get\_label() (matplotlib.axis.YAxis method)@\spxentry{get\_label()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_label:matplotlib.axis.YAxis.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the axis label as a Text instance \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_path_effects:matplotlib-axis-yaxis-get-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_path_effects::doc}}\index{get\_path\_effects() (matplotlib.axis.YAxis method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_path_effects:matplotlib.axis.YAxis.get_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker:matplotlib-axis-yaxis-get-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker::doc}}\index{get\_picker() (matplotlib.axis.YAxis method)@\spxentry{get\_picker()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker:matplotlib.axis.YAxis.get_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable:matplotlib.axis.YAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick:matplotlib.axis.YAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_rasterized:matplotlib-axis-yaxis-get-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_rasterized::doc}}\index{get\_rasterized() (matplotlib.axis.YAxis method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_rasterized:matplotlib.axis.YAxis.get_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_sketch_params:matplotlib-axis-yaxis-get-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_sketch_params::doc}}\index{get\_sketch\_params() (matplotlib.axis.YAxis method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_sketch_params:matplotlib.axis.YAxis.get_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_snap:matplotlib-axis-yaxis-get-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_snap::doc}}\index{get\_snap() (matplotlib.axis.YAxis method)@\spxentry{get\_snap()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_snap:matplotlib.axis.YAxis.get_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_snap:matplotlib.axis.YAxis.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transform:matplotlib-axis-yaxis-get-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transform::doc}}\index{get\_transform() (matplotlib.axis.YAxis method)@\spxentry{get\_transform()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transform:matplotlib.axis.YAxis.get_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_transformed\_clip\_path\_and\_affine} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transformed_clip_path_and_affine:matplotlib-axis-yaxis-get-transformed-clip-path-and-affine}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transformed_clip_path_and_affine::doc}}\index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.axis.YAxis method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_transformed_clip_path_and_affine:matplotlib.axis.YAxis.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_url:matplotlib-axis-yaxis-get-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_url::doc}}\index{get\_url() (matplotlib.axis.YAxis method)@\spxentry{get\_url()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_url:matplotlib.axis.YAxis.get_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_visible:matplotlib-axis-yaxis-get-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_visible::doc}}\index{get\_visible() (matplotlib.axis.YAxis method)@\spxentry{get\_visible()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_visible:matplotlib.axis.YAxis.get_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_window\_extent} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_window_extent:matplotlib-axis-yaxis-get-window-extent}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_window_extent::doc}}\index{get\_window\_extent() (matplotlib.axis.YAxis method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_window_extent:matplotlib.axis.YAxis.get_window_extent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.get\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_zorder:matplotlib-axis-yaxis-get-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_zorder::doc}}\index{get\_zorder() (matplotlib.axis.YAxis method)@\spxentry{get\_zorder()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_zorder:matplotlib.axis.YAxis.get_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.have\_units} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.have_units:matplotlib-axis-yaxis-have-units}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.have_units::doc}}\index{have\_units() (matplotlib.axis.YAxis method)@\spxentry{have\_units()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.have_units:matplotlib.axis.YAxis.have_units}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.is\_transform\_set} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.is_transform_set:matplotlib-axis-yaxis-is-transform-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.is_transform_set::doc}}\index{is\_transform\_set() (matplotlib.axis.YAxis method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.is_transform_set:matplotlib.axis.YAxis.is_transform_set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_transform:matplotlib.axis.YAxis.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.mouseover} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.mouseover:matplotlib-axis-yaxis-mouseover}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.mouseover::doc}}\index{mouseover (matplotlib.axis.YAxis attribute)@\spxentry{mouseover}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.mouseover:matplotlib.axis.YAxis.mouseover}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.pchanged} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pchanged:matplotlib-axis-yaxis-pchanged}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pchanged::doc}}\index{pchanged() (matplotlib.axis.YAxis method)@\spxentry{pchanged()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pchanged:matplotlib.axis.YAxis.pchanged}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback:matplotlib.axis.YAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib.axis.YAxis.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.pick} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick:matplotlib-axis-yaxis-pick}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick::doc}}\index{pick() (matplotlib.axis.YAxis method)@\spxentry{pick()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick:matplotlib.axis.YAxis.pick}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker:matplotlib.axis.YAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable:matplotlib.axis.YAxis.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.pickable} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable:matplotlib-axis-yaxis-pickable}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable::doc}}\index{pickable() (matplotlib.axis.YAxis method)@\spxentry{pickable()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.pickable:matplotlib.axis.YAxis.pickable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.get_picker:matplotlib.axis.YAxis.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.pick:matplotlib.axis.YAxis.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.properties} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.properties:matplotlib-axis-yaxis-properties}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.properties::doc}}\index{properties() (matplotlib.axis.YAxis method)@\spxentry{properties()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.properties:matplotlib.axis.YAxis.properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.remove} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove:matplotlib-axis-yaxis-remove}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove::doc}}\index{remove() (matplotlib.axis.YAxis method)@\spxentry{remove()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove:matplotlib.axis.YAxis.remove}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.remove\_callback} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib-axis-yaxis-remove-callback}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback::doc}}\index{remove\_callback() (matplotlib.axis.YAxis method)@\spxentry{remove\_callback()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.remove_callback:matplotlib.axis.YAxis.remove_callback}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.add_callback:matplotlib.axis.YAxis.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set:matplotlib-axis-yaxis-set}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set::doc}}\index{set() (matplotlib.axis.YAxis method)@\spxentry{set()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set:matplotlib.axis.YAxis.set}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_agg\_filter} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_agg_filter:matplotlib-axis-yaxis-set-agg-filter}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_agg_filter::doc}}\index{set\_agg\_filter() (matplotlib.axis.YAxis method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_agg_filter:matplotlib.axis.YAxis.set_agg_filter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_alpha} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_alpha:matplotlib-axis-yaxis-set-alpha}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_alpha::doc}}\index{set\_alpha() (matplotlib.axis.YAxis method)@\spxentry{set\_alpha()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_alpha:matplotlib.axis.YAxis.set_alpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_animated} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_animated:matplotlib-axis-yaxis-set-animated}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_animated::doc}}\index{set\_animated() (matplotlib.axis.YAxis method)@\spxentry{set\_animated()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_animated:matplotlib.axis.YAxis.set_animated}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_clip\_box} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_box:matplotlib-axis-yaxis-set-clip-box}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_box::doc}}\index{set\_clip\_box() (matplotlib.axis.YAxis method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_box:matplotlib.axis.YAxis.set_clip_box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_clip\_on} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_on:matplotlib-axis-yaxis-set-clip-on}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_on::doc}}\index{set\_clip\_on() (matplotlib.axis.YAxis method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_on:matplotlib.axis.YAxis.set_clip_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_clip\_path} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_path:matplotlib-axis-yaxis-set-clip-path}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_path::doc}}\index{set\_clip\_path() (matplotlib.axis.YAxis method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_clip_path:matplotlib.axis.YAxis.set_clip_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{clippath}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_contains} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_contains:matplotlib-axis-yaxis-set-contains}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_contains::doc}}\index{set\_contains() (matplotlib.axis.YAxis method)@\spxentry{set\_contains()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_contains:matplotlib.axis.YAxis.set_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.YAxis.contains:matplotlib.axis.YAxis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_figure} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_figure:matplotlib-axis-yaxis-set-figure}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_figure::doc}}\index{set\_figure() (matplotlib.axis.YAxis method)@\spxentry{set\_figure()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_figure:matplotlib.axis.YAxis.set_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_gid} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_gid:matplotlib-axis-yaxis-set-gid}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_gid::doc}}\index{set\_gid() (matplotlib.axis.YAxis method)@\spxentry{set\_gid()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_gid:matplotlib.axis.YAxis.set_gid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_label} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label:matplotlib-axis-yaxis-set-label}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label::doc}}\index{set\_label() (matplotlib.axis.YAxis method)@\spxentry{set\_label()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_label:matplotlib.axis.YAxis.set_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_path\_effects} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_path_effects:matplotlib-axis-yaxis-set-path-effects}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_path_effects::doc}}\index{set\_path\_effects() (matplotlib.axis.YAxis method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_path_effects:matplotlib.axis.YAxis.set_path_effects}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_picker} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib-axis-yaxis-set-picker}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker::doc}}\index{set\_picker() (matplotlib.axis.YAxis method)@\spxentry{set\_picker()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_picker:matplotlib.axis.YAxis.set_picker}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_rasterized} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_rasterized:matplotlib-axis-yaxis-set-rasterized}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_rasterized::doc}}\index{set\_rasterized() (matplotlib.axis.YAxis method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_rasterized:matplotlib.axis.YAxis.set_rasterized}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_sketch\_params} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_sketch_params:matplotlib-axis-yaxis-set-sketch-params}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_sketch_params::doc}}\index{set\_sketch\_params() (matplotlib.axis.YAxis method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_sketch_params:matplotlib.axis.YAxis.set_sketch_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_snap} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_snap:matplotlib-axis-yaxis-set-snap}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_snap::doc}}\index{set\_snap() (matplotlib.axis.YAxis method)@\spxentry{set\_snap()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_snap:matplotlib.axis.YAxis.set_snap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_transform} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_transform:matplotlib-axis-yaxis-set-transform}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_transform::doc}}\index{set\_transform() (matplotlib.axis.YAxis method)@\spxentry{set\_transform()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_transform:matplotlib.axis.YAxis.set_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_url} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_url:matplotlib-axis-yaxis-set-url}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_url::doc}}\index{set\_url() (matplotlib.axis.YAxis method)@\spxentry{set\_url()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_url:matplotlib.axis.YAxis.set_url}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_visible} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_visible:matplotlib-axis-yaxis-set-visible}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_visible::doc}}\index{set\_visible() (matplotlib.axis.YAxis method)@\spxentry{set\_visible()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_visible:matplotlib.axis.YAxis.set_visible}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.set\_zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_zorder:matplotlib-axis-yaxis-set-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_zorder::doc}}\index{set\_zorder() (matplotlib.axis.YAxis method)@\spxentry{set\_zorder()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.set_zorder:matplotlib.axis.YAxis.set_zorder}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.stale} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.stale:matplotlib-axis-yaxis-stale}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.stale::doc}}\index{stale (matplotlib.axis.YAxis attribute)@\spxentry{stale}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.stale:matplotlib.axis.YAxis.stale}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.update} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update:matplotlib-axis-yaxis-update}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update::doc}}\index{update() (matplotlib.axis.YAxis method)@\spxentry{update()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update:matplotlib.axis.YAxis.update}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.update\_from} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_from:matplotlib-axis-yaxis-update-from}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_from::doc}}\index{update\_from() (matplotlib.axis.YAxis method)@\spxentry{update\_from()}\spxextra{matplotlib.axis.YAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.update_from:matplotlib.axis.YAxis.update_from}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from \sphinxstyleemphasis{other} to \sphinxstyleemphasis{self}. \end{fulllineitems} \subparagraph{matplotlib.axis.YAxis.zorder} \label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zorder:matplotlib-axis-yaxis-zorder}}\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zorder::doc}}\index{zorder (matplotlib.axis.YAxis attribute)@\spxentry{zorder}\spxextra{matplotlib.axis.YAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.axis.YAxis.zorder:matplotlib.axis.YAxis.zorder}}\pysigline{\sphinxcode{\sphinxupquote{YAxis.}}\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_bases}}} \label{\detokenize{api/backend_bases_api:module-matplotlib.backend_bases}}\label{\detokenize{api/backend_bases_api:matplotlib-backend-bases}}\label{\detokenize{api/backend_bases_api::doc}}\index{matplotlib.backend\_bases (module)@\spxentry{matplotlib.backend\_bases}\spxextra{module}} Abstract base classes define the primitives that renderers and graphics contexts must implement to serve as a matplotlib backend \begin{description} \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}}}] \leavevmode An abstract base class to handle drawing/rendering operations. \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}}] \leavevmode The abstraction layer that separates the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}} from the backend specific details like a user interface drawing area \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}}] \leavevmode An abstract base class that provides color, line styles, etc... \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}}}] \leavevmode The base class for all of the matplotlib event handling. Derived classes such as {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} store the meta data like keys and buttons pressed, x and y locations in pixel and {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} coordinates. \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.ShowBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ShowBase}}}}}}] \leavevmode The base class for the Show class of each interactive backend; the 'show' callable is then set to Show.\_\_call\_\_, inherited from ShowBase. \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolContainerBase}}}}}}] \leavevmode The base class for the Toolbar class of each interactive backend. \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.StatusbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StatusbarBase}}}}}}] \leavevmode The base class for the messaging area. \end{description} \index{CloseEvent (class in matplotlib.backend\_bases)@\spxentry{CloseEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.CloseEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{CloseEvent}}}{\emph{name}, \emph{canvas}, \emph{guiEvent=None}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}} An event triggered by a figure being closed. \end{fulllineitems} \index{DrawEvent (class in matplotlib.backend\_bases)@\spxentry{DrawEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.DrawEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{DrawEvent}}}{\emph{name}, \emph{canvas}, \emph{renderer}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}} An event triggered by a draw operation on the canvas In most backends callbacks subscribed to this callback will be fired after the rendering is complete but before the screen is updated. Any extra artists drawn to the canvas's renderer will be reflected without an explicit call to \sphinxcode{\sphinxupquote{blit}}. \begin{sphinxadmonition}{warning}{Warning:} Calling \sphinxcode{\sphinxupquote{canvas.draw}} and \sphinxcode{\sphinxupquote{canvas.blit}} in these callbacks may not be safe with all backends and may cause infinite recursion. \end{sphinxadmonition} In addition to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} attributes, the following event attributes are defined: \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}}{]} the renderer for the draw event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{Event (class in matplotlib.backend\_bases)@\spxentry{Event}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{Event}}}{\emph{name}, \emph{canvas}, \emph{guiEvent=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A matplotlib event. Attach additional attributes as defined in {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.mpl\_connect()}}}}}. The following attributes are defined and shown with their default values \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str{]} the event name \item[{\sphinxstylestrong{canvas}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}{]} the backend-specific canvas instance generating the event \item[{\sphinxstylestrong{guiEvent}}] \leavevmode the GUI event that triggered the matplotlib event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{FigureCanvasBase (class in matplotlib.backend\_bases)@\spxentry{FigureCanvasBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{FigureCanvasBase}}}{\emph{figure}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The canvas the figure renders into. Public attributes \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} A high-level figure instance \end{description} \end{description}\end{quote} \index{blit() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{blit()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.blit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{blit}}}{\emph{self}, \emph{bbox=None}}{} Blit the canvas in bbox (default entire canvas). \end{fulllineitems} \index{button\_press\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{button\_press\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.button_press_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{button\_press\_event}}}{\emph{self}, \emph{x}, \emph{y}, \emph{button}, \emph{dblclick=False}, \emph{guiEvent=None}}{} Backend derived classes should call this function on any mouse button press. x,y are the canvas coords: 0,0 is lower, left. button and key are as defined in {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}. This method will be call all functions connected to the 'button\_press\_event' with a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instance. \end{fulllineitems} \index{button\_release\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{button\_release\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.button_release_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{button\_release\_event}}}{\emph{self}, \emph{x}, \emph{y}, \emph{button}, \emph{guiEvent=None}}{} Backend derived classes should call this function on any mouse button release. This method will call all functions connected to the 'button\_release\_event' with a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the canvas coordinates where 0=left \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the canvas coordinates where 0=bottom \item[{\sphinxstylestrong{guiEvent}}] \leavevmode the native UI event that generated the mpl event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{close\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{close\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.close_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close\_event}}}{\emph{self}, \emph{guiEvent=None}}{} Pass a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.CloseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CloseEvent}}}}} to all functions connected to \sphinxcode{\sphinxupquote{close\_event}}. \end{fulllineitems} \index{draw() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{draw()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Render the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \end{fulllineitems} \index{draw\_cursor() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{draw\_cursor()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_cursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_cursor}}}{\emph{self}, \emph{event}}{} Draw a cursor in the event.axes if inaxes is not None. Use native GUI drawing for efficiency if possible \end{fulllineitems} \index{draw\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{draw\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_event}}}{\emph{self}, \emph{renderer}}{} Pass a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.DrawEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DrawEvent}}}}} to all functions connected to \sphinxcode{\sphinxupquote{draw\_event}}. \end{fulllineitems} \index{draw\_idle() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{draw\_idle()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_idle}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Request a widget redraw once control returns to the GUI event loop. Even if multiple calls to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_idle}}}}} occur before control returns to the GUI event loop, the figure will only be rendered once. \subsubsection*{Notes} Backends may choose to override the method and implement their own strategy to prevent multiple renderings. \end{fulllineitems} \index{enter\_notify\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{enter\_notify\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.enter_notify_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{enter\_notify\_event}}}{\emph{self}, \emph{guiEvent=None}, \emph{xy=None}}{} Backend derived classes should call this function when entering canvas \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{guiEvent}}] \leavevmode the native UI event that generated the mpl event \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} the coordinate location of the pointer when the canvas is entered \end{description} \end{description}\end{quote} \end{fulllineitems} \index{events (matplotlib.backend\_bases.FigureCanvasBase attribute)@\spxentry{events}\spxextra{matplotlib.backend\_bases.FigureCanvasBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.events}}\pysigline{\sphinxbfcode{\sphinxupquote{events}}\sphinxbfcode{\sphinxupquote{ = {[}'resize\_event', 'draw\_event', 'key\_press\_event', 'key\_release\_event', 'button\_press\_event', 'button\_release\_event', 'scroll\_event', 'motion\_notify\_event', 'pick\_event', 'idle\_event', 'figure\_enter\_event', 'figure\_leave\_event', 'axes\_enter\_event', 'axes\_leave\_event', 'close\_event'{]}}}} \end{fulllineitems} \index{filetypes (matplotlib.backend\_bases.FigureCanvasBase attribute)@\spxentry{filetypes}\spxextra{matplotlib.backend\_bases.FigureCanvasBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.filetypes}}\pysigline{\sphinxbfcode{\sphinxupquote{filetypes}}\sphinxbfcode{\sphinxupquote{ = \{'eps': 'Encapsulated Postscript', 'jpeg': 'Joint Photographic Experts Group', 'jpg': 'Joint Photographic Experts Group', 'pdf': 'Portable Document Format', 'pgf': 'PGF code for LaTeX', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics', 'tif': 'Tagged Image File Format', 'tiff': 'Tagged Image File Format'\}}}} \end{fulllineitems} \index{fixed\_dpi (matplotlib.backend\_bases.FigureCanvasBase attribute)@\spxentry{fixed\_dpi}\spxextra{matplotlib.backend\_bases.FigureCanvasBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.fixed_dpi}}\pysigline{\sphinxbfcode{\sphinxupquote{fixed\_dpi}}\sphinxbfcode{\sphinxupquote{ = None}}} \end{fulllineitems} \index{flush\_events() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{flush\_events()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.flush_events}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{flush\_events}}}{\emph{self}}{} Flush the GUI events for the figure. Interactive backends need to reimplement this method. \end{fulllineitems} \index{get\_default\_filename() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{get\_default\_filename()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_default_filename}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_filename}}}{\emph{self}}{} Return a string, which includes extension, suitable for use as a default filename. \end{fulllineitems} \index{get\_default\_filetype() (matplotlib.backend\_bases.FigureCanvasBase class method)@\spxentry{get\_default\_filetype()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_default_filetype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{get\_default\_filetype}}}{}{} Get the default savefig file format as specified in rcParam \sphinxcode{\sphinxupquote{savefig.format}}. Returned string excludes period. Overridden in backends that only support a single file type. \end{fulllineitems} \index{get\_supported\_filetypes() (matplotlib.backend\_bases.FigureCanvasBase class method)@\spxentry{get\_supported\_filetypes()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_supported_filetypes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{get\_supported\_filetypes}}}{}{} Return dict of savefig file formats supported by this backend \end{fulllineitems} \index{get\_supported\_filetypes\_grouped() (matplotlib.backend\_bases.FigureCanvasBase class method)@\spxentry{get\_supported\_filetypes\_grouped()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_supported_filetypes_grouped}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{get\_supported\_filetypes\_grouped}}}{}{} Return a dict of savefig file formats supported by this backend, where the keys are a file type name, such as 'Joint Photographic Experts Group', and the values are a list of filename extensions used for that filetype, such as {[}'jpg', 'jpeg'{]}. \end{fulllineitems} \index{get\_width\_height() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{get\_width\_height()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width\_height}}}{\emph{self}}{} Return the figure width and height in points or pixels (depending on the backend), truncated to integers \end{fulllineitems} \index{get\_window\_title() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{get\_window\_title()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.get_window_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_title}}}{\emph{self}}{} Get the title text of the window containing the figure. Return None if there is no window (e.g., a PS backend). \end{fulllineitems} \index{grab\_mouse() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{grab\_mouse()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.grab_mouse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grab\_mouse}}}{\emph{self}, \emph{ax}}{} Set the child axes which are currently grabbing the mouse events. Usually called by the widgets themselves. It is an error to call this if the mouse is already grabbed by another axes. \end{fulllineitems} \index{inaxes() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{inaxes()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.inaxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inaxes}}}{\emph{self}, \emph{xy}}{} Check if a point is in an axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}tuple or list{]} (x,y) coordinates. x position - pixels from left of canvas. y position - pixels from bottom of canvas. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{axes: topmost axes containing the point, or None if no axes.}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{is\_saving() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{is\_saving()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.is_saving}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_saving}}}{\emph{self}}{} Returns whether the renderer is in the process of saving to a file, rather than rendering for an on-screen buffer. \end{fulllineitems} \index{key\_press\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{key\_press\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.key_press_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{key\_press\_event}}}{\emph{self}, \emph{key}, \emph{guiEvent=None}}{} Pass a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} to all functions connected to \sphinxcode{\sphinxupquote{key\_press\_event}}. \end{fulllineitems} \index{key\_release\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{key\_release\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.key_release_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{key\_release\_event}}}{\emph{self}, \emph{key}, \emph{guiEvent=None}}{} Pass a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} to all functions connected to \sphinxcode{\sphinxupquote{key\_release\_event}}. \end{fulllineitems} \index{leave\_notify\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{leave\_notify\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.leave_notify_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{leave\_notify\_event}}}{\emph{self}, \emph{guiEvent=None}}{} Backend derived classes should call this function when leaving canvas \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{guiEvent}}] \leavevmode the native UI event that generated the mpl event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{motion\_notify\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{motion\_notify\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.motion_notify_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{motion\_notify\_event}}}{\emph{self}, \emph{x}, \emph{y}, \emph{guiEvent=None}}{} Backend derived classes should call this function on any motion-notify-event. This method will call all functions connected to the 'motion\_notify\_event' with a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the canvas coordinates where 0=left \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the canvas coordinates where 0=bottom \item[{\sphinxstylestrong{guiEvent}}] \leavevmode the native UI event that generated the mpl event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{mpl\_connect() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{mpl\_connect()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mpl\_connect}}}{\emph{self}, \emph{s}, \emph{func}}{} Connect event with string \sphinxstyleemphasis{s} to \sphinxstyleemphasis{func}. The signature of \sphinxstyleemphasis{func} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)} \end{sphinxVerbatim} where event is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}}. The following events are recognized \begin{itemize} \item {} 'button\_press\_event' \item {} 'button\_release\_event' \item {} 'draw\_event' \item {} 'key\_press\_event' \item {} 'key\_release\_event' \item {} 'motion\_notify\_event' \item {} 'pick\_event' \item {} 'resize\_event' \item {} 'scroll\_event' \item {} 'figure\_enter\_event', \item {} 'figure\_leave\_event', \item {} 'axes\_enter\_event', \item {} 'axes\_leave\_event' \item {} 'close\_event' \end{itemize} For the location events (button and key press/release), if the mouse is over the axes, the variable \sphinxcode{\sphinxupquote{event.inaxes}} will be set to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} the event occurs is over, and additionally, the variables \sphinxcode{\sphinxupquote{event.xdata}} and \sphinxcode{\sphinxupquote{event.ydata}} will be defined. This is the mouse location in data coords. See {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} for more info. Return value is a connection id that can be used with \sphinxcode{\sphinxupquote{mpl\_disconnect()}}. \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}press}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{you pressed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{button}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}press}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{mpl\_disconnect() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{mpl\_disconnect()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mpl\_disconnect}}}{\emph{self}, \emph{cid}}{} Disconnect callback id cid \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cid} \PYG{o}{=} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}press}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}...later} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n}{cid}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{new\_timer() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{new\_timer()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.new_timer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_timer}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Creates a new backend-specific subclass of \sphinxcode{\sphinxupquote{backend\_bases.Timer}}. This is useful for getting periodic events through the backend's native event loop. Implemented only for backends with GUIs. \begin{quote}\begin{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}scalar{]} Timer interval in milliseconds \item[{\sphinxstylestrong{callbacks}}] \leavevmode{[}List{[}Tuple{[}callable, Tuple, Dict{]}{]}{]} Sequence of (func, args, kwargs) where \sphinxcode{\sphinxupquote{func(*args, **kwargs)}} will be executed by the timer every \sphinxstyleemphasis{interval}. callbacks which return \sphinxcode{\sphinxupquote{False}} or \sphinxcode{\sphinxupquote{0}} will be removed from the timer. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{timer} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{new\PYGZus{}timer}\PYG{p}{(}\PYG{n}{callbacks}\PYG{o}{=}\PYG{p}{[}\PYG{p}{(}\PYG{n}{f1}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{)}\PYG{p}{,} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{\PYGZcb{}}\PYG{p}{)}\PYG{p}{,}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{pick() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{pick()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{}~ \end{fulllineitems} \index{pick\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{pick\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.pick_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick\_event}}}{\emph{self}, \emph{mouseevent}, \emph{artist}, \emph{**kwargs}}{} This method will be called by artists who are picked and will fire off {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.PickEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PickEvent}}}}} callbacks registered listeners \end{fulllineitems} \index{print\_figure() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{print\_figure()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.print_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_figure}}}{\emph{self}, \emph{filename}, \emph{dpi=None}, \emph{facecolor=None}, \emph{edgecolor=None}, \emph{orientation='portrait'}, \emph{format=None}, \emph{*}, \emph{bbox\_inches=None}, \emph{**kwargs}}{} Render the figure to hardcopy. Set the figure patch face and edge colors. This is useful because some of the GUIs have a gray figure face color background and you'll probably want to override this on hardcopy. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode can also be a file object on image backends \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'landscape', 'portrait'\}, optional{]} only currently applies to PostScript printing. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}scalar, optional{]} the dots per inch to save the figure in; if None, use savefig.dpi \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}color or None, optional{]} the facecolor of the figure; if None, defaults to savefig.facecolor \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}color or None, optional{]} the edgecolor of the figure; if None, defaults to savefig.edgecolor \item[{\sphinxstylestrong{format}}] \leavevmode{[}str, optional{]} when set, forcibly set the file format to save to \item[{\sphinxstylestrong{bbox\_inches}}] \leavevmode{[}str or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} Bbox in inches. Only the given portion of the figure is saved. If 'tight', try to figure out the tight bbox of the figure. If None, use savefig.bbox \item[{\sphinxstylestrong{pad\_inches}}] \leavevmode{[}scalar, optional{]} Amount of padding around the figure when bbox\_inches is 'tight'. If None, use savefig.pad\_inches \item[{\sphinxstylestrong{bbox\_extra\_artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of extra artists that will be considered when the tight bbox is calculated. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{release\_mouse() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{release\_mouse()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.release_mouse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{release\_mouse}}}{\emph{self}, \emph{ax}}{} Release the mouse grab held by the axes, ax. Usually called by the widgets. It is ok to call this even if you ax doesn't have the mouse grab currently. \end{fulllineitems} \index{resize() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{resize()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.resize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{resize}}}{\emph{self}, \emph{w}, \emph{h}}{} Set the canvas size in pixels. \end{fulllineitems} \index{resize\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{resize\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.resize_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{resize\_event}}}{\emph{self}}{} Pass a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.ResizeEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ResizeEvent}}}}} to all functions connected to \sphinxcode{\sphinxupquote{resize\_event}}. \end{fulllineitems} \index{scroll\_event() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{scroll\_event()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.scroll_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scroll\_event}}}{\emph{self}, \emph{x}, \emph{y}, \emph{step}, \emph{guiEvent=None}}{} Backend derived classes should call this function on any scroll wheel event. x,y are the canvas coords: 0,0 is lower, left. button and key are as defined in MouseEvent. This method will be call all functions connected to the 'scroll\_event' with a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} instance. \end{fulllineitems} \index{set\_window\_title() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{set\_window\_title()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.set_window_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_window\_title}}}{\emph{self}, \emph{title}}{} Set the title text of the window containing the figure. Note that this has no effect if there is no window (e.g., a PS backend). \end{fulllineitems} \index{start\_event\_loop() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{start\_event\_loop()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.start_event_loop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_event\_loop}}}{\emph{self}, \emph{timeout=0}}{} Start a blocking event loop. Such an event loop is used by interactive functions, such as \sphinxcode{\sphinxupquote{ginput}} and \sphinxcode{\sphinxupquote{waitforbuttonpress}}, to wait for events. The event loop blocks until a callback function triggers {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.stop_event_loop}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stop\_event\_loop}}}}}, or \sphinxstyleemphasis{timeout} is reached. If \sphinxstyleemphasis{timeout} is negative, never timeout. Only interactive backends need to reimplement this method and it relies on {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.flush_events}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flush\_events}}}}} being properly implemented. Interactive backends should implement this in a more native way. \end{fulllineitems} \index{stop\_event\_loop() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{stop\_event\_loop()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.stop_event_loop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_event\_loop}}}{\emph{self}}{} Stop the current blocking event loop. Interactive backends need to reimplement this to match {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.start_event_loop}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{start\_event\_loop}}}}} \end{fulllineitems} \index{supports\_blit (matplotlib.backend\_bases.FigureCanvasBase attribute)@\spxentry{supports\_blit}\spxextra{matplotlib.backend\_bases.FigureCanvasBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.supports_blit}}\pysigline{\sphinxbfcode{\sphinxupquote{supports\_blit}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{switch\_backends() (matplotlib.backend\_bases.FigureCanvasBase method)@\spxentry{switch\_backends()}\spxextra{matplotlib.backend\_bases.FigureCanvasBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.switch_backends}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{switch\_backends}}}{\emph{self}, \emph{FigureCanvasClass}}{} Instantiate an instance of FigureCanvasClass This is used for backend switching, e.g., to instantiate a FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is not done, so any changes to one of the instances (e.g., setting figure size or line props), will be reflected in the other \end{fulllineitems} \end{fulllineitems} \index{FigureManagerBase (class in matplotlib.backend\_bases)@\spxentry{FigureManagerBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{FigureManagerBase}}}{\emph{canvas}, \emph{num}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Helper class for pyplot mode, wraps everything up into a neat bundle \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{canvas}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}{]} The backend-specific canvas instance \item[{\sphinxstylestrong{num}}] \leavevmode{[}int or str{]} The figure number \item[{\sphinxstylestrong{key\_press\_handler\_id}}] \leavevmode{[}int{]} The default key handler cid, when using the toolmanager. To disable the default key press handling use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(} \PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{key\PYGZus{}press\PYGZus{}handler\PYGZus{}id}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{button\_press\_handler\_id}}] \leavevmode{[}int{]} The default mouse button handler cid, when using the toolmanager. To disable the default button press handling use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(} \PYG{n}{figure}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{manager}\PYG{o}{.}\PYG{n}{button\PYGZus{}press\PYGZus{}handler\PYGZus{}id}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \index{button\_press() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{button\_press()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.button_press}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{button\_press}}}{\emph{self}, \emph{event}}{} The default Matplotlib button actions for extra mouse buttons. \end{fulllineitems} \index{destroy() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{destroy()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.destroy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{destroy}}}{\emph{self}}{}~ \end{fulllineitems} \index{full\_screen\_toggle() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{full\_screen\_toggle()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.full_screen_toggle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{full\_screen\_toggle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_window\_title() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{get\_window\_title()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.get_window_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_title}}}{\emph{self}}{} Get the title text of the window containing the figure. Return None for non-GUI (e.g., PS) backends. \end{fulllineitems} \index{key\_press() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{key\_press()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.key_press}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{key\_press}}}{\emph{self}, \emph{event}}{} Implement the default mpl key bindings defined at {\hyperref[\detokenize{users/navigation_toolbar:key-event-handling}]{\sphinxcrossref{\DUrole{std,std-ref}{Navigation Keyboard Shortcuts}}}} \end{fulllineitems} \index{resize() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{resize()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.resize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{resize}}}{\emph{self}, \emph{w}, \emph{h}}{} "For GUI backends, resize the window (in pixels). \end{fulllineitems} \index{set\_window\_title() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{set\_window\_title()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.set_window_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_window\_title}}}{\emph{self}, \emph{title}}{} Set the title text of the window containing the figure. This has no effect for non-GUI (e.g., PS) backends. \end{fulllineitems} \index{show() (matplotlib.backend\_bases.FigureManagerBase method)@\spxentry{show()}\spxextra{matplotlib.backend\_bases.FigureManagerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase.show}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{show}}}{\emph{self}}{} For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception to be caught by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}}, for an optional warning. \end{fulllineitems} \end{fulllineitems} \index{GraphicsContextBase (class in matplotlib.backend\_bases)@\spxentry{GraphicsContextBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{GraphicsContextBase}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} An abstract base class that provides color, line styles, etc. \index{copy\_properties() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{copy\_properties()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.copy_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy\_properties}}}{\emph{self}, \emph{gc}}{} Copy properties from gc to self \end{fulllineitems} \index{get\_alpha() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_alpha()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends. \end{fulllineitems} \index{get\_antialiased() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_antialiased()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_antialiased}}}{\emph{self}}{} Return whether the object should try to do antialiased rendering. \end{fulllineitems} \index{get\_capstyle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{} Return the capstyle as a string in ('butt', 'round', 'projecting'). \end{fulllineitems} \index{get\_clip\_path() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path in the form (path, transform), where path is a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, and transform is an affine transform to apply to the path before clipping. \end{fulllineitems} \index{get\_clip\_rectangle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_clip\_rectangle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_clip_rectangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_rectangle}}}{\emph{self}}{} Return the clip rectangle as a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} instance. \end{fulllineitems} \index{get\_dashes() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_dashes()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Return the dash information as an offset dashlist tuple. The dash list is a even size list that gives the ink on, ink off in pixels. See p107 of to PostScript \sphinxhref{https://www-cdf.fnal.gov/offline/PostScript/BLUEBOOK.PDF}{BLUEBOOK} for more info. Default value is None \end{fulllineitems} \index{get\_forced\_alpha() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_forced\_alpha()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_forced_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_forced\_alpha}}}{\emph{self}}{} Return whether the value given by get\_alpha() should be used to override any other alpha-channel values. \end{fulllineitems} \index{get\_gid() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_gid()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the object identifier if one is set, None otherwise. \end{fulllineitems} \index{get\_hatch() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_hatch()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Get the current hatch style. \end{fulllineitems} \index{get\_hatch\_color() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_hatch\_color()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch\_color}}}{\emph{self}}{} Get the hatch color. \end{fulllineitems} \index{get\_hatch\_linewidth() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_hatch\_linewidth()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch\_linewidth}}}{\emph{self}}{} Get the hatch linewidth. \end{fulllineitems} \index{get\_hatch\_path() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_hatch\_path()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_hatch_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch\_path}}}{\emph{self}, \emph{density=6.0}}{} Return a \sphinxcode{\sphinxupquote{Path}} for the current hatch. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{} Return the line join style as one of ('miter', 'round', 'bevel'). \end{fulllineitems} \index{get\_linewidth() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{} Return the line width in points. \end{fulllineitems} \index{get\_rgb() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_rgb()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rgb}}}{\emph{self}}{} Return a tuple of three or four floats from 0-1. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Return the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{scale}}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxcode{\sphinxupquote{length}}: The length of the wiggle along the line. \item {} \sphinxcode{\sphinxupquote{randomness}}: The scale factor by which the length is shrunken or expanded. \end{itemize} May return \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_snap()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting, which can be: \begin{itemize} \item {} True: snap vertices to the nearest pixel center \item {} False: leave vertices as-is \item {} None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center \end{itemize} \end{fulllineitems} \index{get\_url() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{get\_url()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return a url if one is set, None otherwise. \end{fulllineitems} \index{restore() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{restore()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.restore}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{restore}}}{\emph{self}}{} Restore the graphics context from the stack - needed only for backends that save graphics contexts on a stack. \end{fulllineitems} \index{set\_alpha() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_alpha()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. If \sphinxcode{\sphinxupquote{alpha=None}} (the default), the alpha components of the foreground and fill colors will be used to set their respective transparencies (where applicable); otherwise, \sphinxcode{\sphinxupquote{alpha}} will override them. \end{fulllineitems} \index{set\_antialiased() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{b}}{} Set whether object should be drawn with antialiased rendering. \end{fulllineitems} \index{set\_capstyle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle to be one of ('butt', 'round', 'projecting'). \end{fulllineitems} \index{set\_clip\_path() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}}{} Set the clip path and transformation. Path should be a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPath}}}}} instance. \end{fulllineitems} \index{set\_clip\_rectangle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_clip\_rectangle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_clip_rectangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_rectangle}}}{\emph{self}, \emph{rectangle}}{} Set the clip rectangle with sequence (left, bottom, width, height) \end{fulllineitems} \index{set\_dashes() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_dashes()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{dash\_offset}, \emph{dash\_list}}{} Set the dash style for the gc. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dash\_offset}}] \leavevmode{[}float{]} is the offset (usually 0). \item[{\sphinxstylestrong{dash\_list}}] \leavevmode{[}array\_like{]} specifies the on-off sequence as points. \sphinxcode{\sphinxupquote{(None, None)}} specifies a solid line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_foreground() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_foreground()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_foreground}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_foreground}}}{\emph{self}, \emph{fg}, \emph{isRGBA=False}}{} Set the foreground color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fg}}] \leavevmode{[}color{]} \item[{\sphinxstylestrong{isRGBA}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{fg} is known to be an \sphinxcode{\sphinxupquote{(r, g, b, a)}} tuple, \sphinxstyleemphasis{isRGBA} can be set to True to improve performance. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_gid()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{id}}{} Set the id. \end{fulllineitems} \index{set\_hatch() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_hatch()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatch style (for fills). \end{fulllineitems} \index{set\_hatch\_color() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_hatch\_color()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_hatch_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch\_color}}}{\emph{self}, \emph{hatch\_color}}{} Set the hatch color. \end{fulllineitems} \index{set\_joinstyle() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the join style to be one of ('miter', 'round', 'bevel'). \end{fulllineitems} \index{set\_linewidth() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{w}}{} Set the linewidth in points. \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Set the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128). \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_snap()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snap setting which may be: \begin{itemize} \item {} True: snap vertices to the nearest pixel center \item {} False: leave vertices as-is \item {} None: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center \end{itemize} \end{fulllineitems} \index{set\_url() (matplotlib.backend\_bases.GraphicsContextBase method)@\spxentry{set\_url()}\spxextra{matplotlib.backend\_bases.GraphicsContextBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for links in compatible backends. \end{fulllineitems} \end{fulllineitems} \index{KeyEvent (class in matplotlib.backend\_bases)@\spxentry{KeyEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{KeyEvent}}}{\emph{name}, \emph{canvas}, \emph{key}, \emph{x=0}, \emph{y=0}, \emph{guiEvent=None}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.LocationEvent}}}}} A key event (key press, key release). Attach additional attributes as defined in {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.mpl\_connect()}}}}}. In addition to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} attributes, the following attributes are defined: \subsubsection*{Notes} Modifier keys will be prefixed to the pressed key and will be in the order "ctrl", "alt", "super". The exception to this rule is when the pressed key is itself a modifier key, therefore "ctrl+alt" and "alt+control" can both be valid key values. \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}key}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{you pressed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{key}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{key\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}key}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{key}}] \leavevmode{[}None or str{]} the key(s) pressed. Could be \sphinxstylestrong{None}, a single case sensitive ascii character ("g", "G", "\#", etc.), a special key ("control", "shift", "f1", "up", etc.) or a combination of the above (e.g., "ctrl+alt+g", "ctrl+alt+G"). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{LocationEvent (class in matplotlib.backend\_bases)@\spxentry{LocationEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{LocationEvent}}}{\emph{name}, \emph{canvas}, \emph{x}, \emph{y}, \emph{guiEvent=None}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}} An event that has a screen location. The following additional attributes are defined and shown with their default values. In addition to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} attributes, the following event attributes are defined: \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} x position - pixels from left of canvas \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} y position - pixels from bottom of canvas \item[{\sphinxstylestrong{inaxes}}] \leavevmode{[}bool{]} the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance if mouse is over axes \item[{\sphinxstylestrong{xdata}}] \leavevmode{[}scalar{]} x coord of mouse in data coords \item[{\sphinxstylestrong{ydata}}] \leavevmode{[}scalar{]} y coord of mouse in data coords \end{description} \end{description}\end{quote} \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} in figure coords, 0,0 = bottom, left \index{lastevent (matplotlib.backend\_bases.LocationEvent attribute)@\spxentry{lastevent}\spxextra{matplotlib.backend\_bases.LocationEvent attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent.lastevent}}\pysigline{\sphinxbfcode{\sphinxupquote{lastevent}}\sphinxbfcode{\sphinxupquote{ = None}}} \end{fulllineitems} \end{fulllineitems} \index{MouseButton (class in matplotlib.backend\_bases)@\spxentry{MouseButton}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{MouseButton}}} Bases: \sphinxhref{https://docs.python.org/3/library/enum.html\#enum.IntEnum}{\sphinxcode{\sphinxupquote{enum.IntEnum}}} An enumeration. \index{BACK (matplotlib.backend\_bases.MouseButton attribute)@\spxentry{BACK}\spxextra{matplotlib.backend\_bases.MouseButton attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton.BACK}}\pysigline{\sphinxbfcode{\sphinxupquote{BACK}}\sphinxbfcode{\sphinxupquote{ = 8}}} \end{fulllineitems} \index{FORWARD (matplotlib.backend\_bases.MouseButton attribute)@\spxentry{FORWARD}\spxextra{matplotlib.backend\_bases.MouseButton attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton.FORWARD}}\pysigline{\sphinxbfcode{\sphinxupquote{FORWARD}}\sphinxbfcode{\sphinxupquote{ = 9}}} \end{fulllineitems} \index{LEFT (matplotlib.backend\_bases.MouseButton attribute)@\spxentry{LEFT}\spxextra{matplotlib.backend\_bases.MouseButton attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton.LEFT}}\pysigline{\sphinxbfcode{\sphinxupquote{LEFT}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{MIDDLE (matplotlib.backend\_bases.MouseButton attribute)@\spxentry{MIDDLE}\spxextra{matplotlib.backend\_bases.MouseButton attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton.MIDDLE}}\pysigline{\sphinxbfcode{\sphinxupquote{MIDDLE}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{RIGHT (matplotlib.backend\_bases.MouseButton attribute)@\spxentry{RIGHT}\spxextra{matplotlib.backend\_bases.MouseButton attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseButton.RIGHT}}\pysigline{\sphinxbfcode{\sphinxupquote{RIGHT}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \end{fulllineitems} \index{MouseEvent (class in matplotlib.backend\_bases)@\spxentry{MouseEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{MouseEvent}}}{\emph{name}, \emph{canvas}, \emph{x}, \emph{y}, \emph{button=None}, \emph{key=None}, \emph{step=0}, \emph{dblclick=False}, \emph{guiEvent=None}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.LocationEvent}}}}} \begin{description} \item[{A mouse event ('button\_press\_event',}] \leavevmode 'button\_release\_event', 'scroll\_event', 'motion\_notify\_event'). \end{description} In addition to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.LocationEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocationEvent}}}}} attributes, the following attributes are defined: \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}press}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{you pressed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{button}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}press}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{button}}] \leavevmode{[}\{None, MouseButton.LEFT, MouseButton.MIDDLE, MouseButton.RIGHT, 'up', 'down'\}{]} The button pressed. 'up' and 'down' are used for scroll events. Note that in the nbagg backend, both the middle and right clicks return RIGHT since right clicking will bring up the context menu in some browsers. Note that LEFT and RIGHT actually refer to the "primary" and "secondary" buttons, i.e. if the user inverts their left and right buttons ("left-handed setting") then the LEFT button will be the one physically on the right. \item[{\sphinxstylestrong{key}}] \leavevmode{[}None or str{]} The key pressed when the mouse event triggered, e.g. 'shift'. See {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}}. \item[{\sphinxstylestrong{step}}] \leavevmode{[}scalar{]} The number of scroll steps (positive for 'up', negative for 'down'). This applies only to 'scroll\_event' and defaults to 0 otherwise. \item[{\sphinxstylestrong{dblclick}}] \leavevmode{[}bool{]} Whether the event is a double-click. This applies only to 'button\_press\_event' and is False otherwise. In particular, it's not used in 'button\_release\_event'. \end{description} \end{description}\end{quote} x, y in figure coords, 0,0 = bottom, left button pressed None, 1, 2, 3, 'up', 'down' \end{fulllineitems} \index{NavigationToolbar2 (class in matplotlib.backend\_bases)@\spxentry{NavigationToolbar2}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{NavigationToolbar2}}}{\emph{canvas}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Base class for the navigation cursor, version 2 backends must implement a canvas that handles connections for 'button\_press\_event' and 'button\_release\_event'. See {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.mpl_connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.mpl\_connect()}}}}} for more information They must also define \begin{quote} \begin{description} \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.save_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{save\_figure()}}}}}}] \leavevmode save the current figure \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_cursor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cursor()}}}}}}] \leavevmode if you want the pointer icon to change \item[{\sphinxcode{\sphinxupquote{\_init\_toolbar()}}}] \leavevmode create your toolbar widget \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.draw_rubberband}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_rubberband()}}}}} (optional)}] \leavevmode draw the zoom to rect "rubberband" rectangle \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.press}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{press()}}}}} (optional)}] \leavevmode whenever a mouse button is pressed, you'll be notified with the event \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.release}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{release()}}}}} (optional)}] \leavevmode whenever a mouse button is released, you'll be notified with the event \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_message}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_message()}}}}} (optional)}] \leavevmode display message \item[{{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_history_buttons}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_history\_buttons()}}}}} (optional)}] \leavevmode you can change the history back / forward buttons to indicate disabled / enabled state. \end{description} \end{quote} That's it, we'll do the rest! \index{back() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{back()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.back}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{back}}}{\emph{self}, \emph{*args}}{} move back up the view lim stack \end{fulllineitems} \index{drag\_pan() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{drag\_pan()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.drag_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{drag\_pan}}}{\emph{self}, \emph{event}}{} Callback for dragging in pan/zoom mode. \end{fulllineitems} \index{drag\_zoom() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{drag\_zoom()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.drag_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{drag\_zoom}}}{\emph{self}, \emph{event}}{} Callback for dragging in zoom mode. \end{fulllineitems} \index{draw() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{draw()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}}{} Redraw the canvases, update the locators. \end{fulllineitems} \index{draw\_rubberband() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{draw\_rubberband()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.draw_rubberband}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_rubberband}}}{\emph{self}, \emph{event}, \emph{x0}, \emph{y0}, \emph{x1}, \emph{y1}}{} Draw a rectangle rubberband to indicate zoom limits. Note that it is not guaranteed that \sphinxcode{\sphinxupquote{x0 \textless{}= x1}} and \sphinxcode{\sphinxupquote{y0 \textless{}= y1}}. \end{fulllineitems} \index{forward() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{forward()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.forward}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{forward}}}{\emph{self}, \emph{*args}}{} Move forward in the view lim stack. \end{fulllineitems} \index{home() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{home()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.home}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{home}}}{\emph{self}, \emph{*args}}{} Restore the original view. \end{fulllineitems} \index{mouse\_move() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{mouse\_move()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.mouse_move}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_move}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \index{pan() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{pan()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{*args}}{} Activate the pan/zoom tool. pan with left button, zoom with right \end{fulllineitems} \index{press() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{press()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.press}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{press}}}{\emph{self}, \emph{event}}{} Called whenever a mouse button is pressed. \end{fulllineitems} \index{press\_pan() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{press\_pan()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.press_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{press\_pan}}}{\emph{self}, \emph{event}}{} Callback for mouse button press in pan/zoom mode. \end{fulllineitems} \index{press\_zoom() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{press\_zoom()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.press_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{press\_zoom}}}{\emph{self}, \emph{event}}{} Callback for mouse button press in zoom to rect mode. \end{fulllineitems} \index{push\_current() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{push\_current()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.push_current}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{push\_current}}}{\emph{self}}{} Push the current view limits and position onto the stack. \end{fulllineitems} \index{release() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{release()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.release}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{release}}}{\emph{self}, \emph{event}}{} Callback for mouse button release. \end{fulllineitems} \index{release\_pan() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{release\_pan()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.release_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{release\_pan}}}{\emph{self}, \emph{event}}{} Callback for mouse button release in pan/zoom mode. \end{fulllineitems} \index{release\_zoom() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{release\_zoom()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.release_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{release\_zoom}}}{\emph{self}, \emph{event}}{} Callback for mouse button release in zoom to rect mode. \end{fulllineitems} \index{remove\_rubberband() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{remove\_rubberband()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.remove_rubberband}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_rubberband}}}{\emph{self}}{} Remove the rubberband. \end{fulllineitems} \index{save\_figure() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{save\_figure()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.save_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{save\_figure}}}{\emph{self}, \emph{*args}}{} Save the current figure. \end{fulllineitems} \index{set\_cursor() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{set\_cursor()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_cursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cursor}}}{\emph{self}, \emph{cursor}}{} Set the current cursor to one of the \sphinxcode{\sphinxupquote{Cursors}} enums values. If required by the backend, this method should trigger an update in the backend event loop after the cursor is set, as this method may be called e.g. before a long-running task during which the GUI is not updated. \end{fulllineitems} \index{set\_history\_buttons() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{set\_history\_buttons()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_history_buttons}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_history\_buttons}}}{\emph{self}}{} Enable or disable the back/forward button. \end{fulllineitems} \index{set\_message() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{set\_message()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.set_message}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_message}}}{\emph{self}, \emph{s}}{} Display a message on toolbar or in status bar. \end{fulllineitems} \index{toolitems (matplotlib.backend\_bases.NavigationToolbar2 attribute)@\spxentry{toolitems}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.toolitems}}\pysigline{\sphinxbfcode{\sphinxupquote{toolitems}}\sphinxbfcode{\sphinxupquote{ = (('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous view', 'back', 'back'), ('Forward', 'Forward to next view', 'forward', 'forward'), (None, None, None, None), ('Pan', 'Pan axes with left mouse, zoom with right', 'move', 'pan'), ('Zoom', 'Zoom to rectangle', 'zoom\_to\_rect', 'zoom'), ('Subplots', 'Configure subplots', 'subplots', 'configure\_subplots'), (None, None, None, None), ('Save', 'Save the figure', 'filesave', 'save\_figure'))}}} \end{fulllineitems} \index{update() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{update()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}}{} Reset the axes stack. \end{fulllineitems} \index{zoom() (matplotlib.backend\_bases.NavigationToolbar2 method)@\spxentry{zoom()}\spxextra{matplotlib.backend\_bases.NavigationToolbar2 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{*args}}{} Activate zoom to rect mode. \end{fulllineitems} \end{fulllineitems} \index{NonGuiException@\spxentry{NonGuiException}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.NonGuiException}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{NonGuiException}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#Exception}{\sphinxcode{\sphinxupquote{Exception}}} \end{fulllineitems} \index{PickEvent (class in matplotlib.backend\_bases)@\spxentry{PickEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.PickEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{PickEvent}}}{\emph{name}, \emph{canvas}, \emph{mouseevent}, \emph{artist}, \emph{guiEvent=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}} a pick event, fired when the user picks a location on the canvas sufficiently close to an artist. Attrs: all the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} attributes plus \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{100}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{picker}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 5 points tolerance} \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}pick}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n}{line} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{artist} \PYG{n}{xdata}\PYG{p}{,} \PYG{n}{ydata} \PYG{o}{=} \PYG{n}{line}\PYG{o}{.}\PYG{n}{get\PYGZus{}data}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ind} \PYG{o}{=} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ind} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{on pick line:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{array}\PYG{p}{(}\PYG{p}{[}\PYG{n}{xdata}\PYG{p}{[}\PYG{n}{ind}\PYG{p}{]}\PYG{p}{,} \PYG{n}{ydata}\PYG{p}{[}\PYG{n}{ind}\PYG{p}{]}\PYG{p}{]}\PYG{p}{)}\PYG{o}{.}\PYG{n}{T}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pick\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}pick}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} the mouse event that generated the pick \item[{\sphinxstylestrong{artist}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}}{]} the picked artist \item[{\sphinxstylestrong{other}}] \leavevmode extra class dependent attrs -- e.g., a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} pick may define different extra attributes than a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}} pick event \end{description} \end{description}\end{quote} \end{fulllineitems} \index{RendererBase (class in matplotlib.backend\_bases)@\spxentry{RendererBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{RendererBase}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} An abstract base class to handle drawing/rendering operations. The following methods must be implemented in the backend for full functionality (though just implementing {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}} alone would give a highly capable backend): \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_gouraud_triangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_gouraud\_triangle()}}}}} \end{itemize} The following methods \sphinxstyleemphasis{should} be implemented in the backend for optimization reasons: \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_text()}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_markers()}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} \item {} {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_quad_mesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_quad\_mesh()}}}}} \end{itemize} \index{close\_group() (matplotlib.backend\_bases.RendererBase method)@\spxentry{close\_group()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.close_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close\_group}}}{\emph{self}, \emph{s}}{} Close a grouping element with label \sphinxstyleemphasis{s} Only used by the SVG renderer. \end{fulllineitems} \index{draw\_gouraud\_triangle() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_gouraud\_triangle()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_gouraud_triangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangle}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{transform}}{} Draw a Gouraud-shaded triangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(3, 2){]} Array of (x, y) points for the triangle. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(3, 4){]} RGBA colors for each point of the triangle. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_gouraud\_triangles() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_gouraud\_triangles()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_gouraud_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangles}}}{\emph{self}, \emph{gc}, \emph{triangles\_array}, \emph{colors\_array}, \emph{transform}}{} Draws a series of Gouraud triangles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(N, 3, 2){]} Array of \sphinxstyleemphasis{N} (x, y) points for the triangles. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(N, 3, 4){]} Array of \sphinxstyleemphasis{N} RGBA colors for each point of the triangles. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_image() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_image()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}, \emph{transform=None}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.option_scale_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{option\_scale\_image()}}}}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{trans}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_path() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_path()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_path\_collection() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_path\_collection()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path\_collection}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{paths}, \emph{all\_transforms}, \emph{offsets}, \emph{offsetTrans}, \emph{facecolors}, \emph{edgecolors}, \emph{linewidths}, \emph{linestyles}, \emph{antialiaseds}, \emph{urls}, \emph{offset\_position}}{} Draws a collection of paths selecting drawing properties from the lists \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{linestyles} and \sphinxstyleemphasis{antialiaseds}. \sphinxstyleemphasis{offsets} is a list of offsets to apply to each of the paths. The offsets in \sphinxstyleemphasis{offsets} are first transformed by \sphinxstyleemphasis{offsetTrans} before being applied. \sphinxstyleemphasis{offset\_position} may be either "screen" or "data" depending on the space that the offsets are in. This provides a fallback implementation of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} that makes multiple calls to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods \sphinxcode{\sphinxupquote{\_iter\_collection\_raw\_paths()}} and \sphinxcode{\sphinxupquote{\_iter\_collection()}} are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} can be made globally. \end{fulllineitems} \index{draw\_quad\_mesh() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_quad\_mesh()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_quad_mesh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_quad\_mesh}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{meshWidth}, \emph{meshHeight}, \emph{coordinates}, \emph{offsets}, \emph{offsetTrans}, \emph{facecolors}, \emph{antialiased}, \emph{edgecolors}}{} This provides a fallback implementation of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_quad_mesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_quad\_mesh()}}}}} that generates paths and then calls {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}}. \end{fulllineitems} \index{draw\_tex() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backend\_bases.RendererBase method)@\spxentry{draw\_text()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{flipy() (matplotlib.backend\_bases.RendererBase method)@\spxentry{flipy()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.flipy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{flipy}}}{\emph{self}}{} Return whether y values increase from top to bottom. Note that this only affects drawing of texts and images. \end{fulllineitems} \index{get\_canvas\_width\_height() (matplotlib.backend\_bases.RendererBase method)@\spxentry{get\_canvas\_width\_height()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.get_canvas_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_canvas\_width\_height}}}{\emph{self}}{} Return the canvas width and height in display coords. \end{fulllineitems} \index{get\_image\_magnification() (matplotlib.backend\_bases.RendererBase method)@\spxentry{get\_image\_magnification()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.get_image_magnification}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_image\_magnification}}}{\emph{self}}{} Get the factor by which to magnify images passed to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. Allows a backend to have images at a different resolution to other artists. \end{fulllineitems} \index{get\_texmanager() (matplotlib.backend\_bases.RendererBase method)@\spxentry{get\_texmanager()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.get_texmanager}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_texmanager}}}{\emph{self}}{} Return the \sphinxcode{\sphinxupquote{TexManager}} instance. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.backend\_bases.RendererBase method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{} Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string \sphinxstyleemphasis{s} with {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} \sphinxstyleemphasis{prop} \end{fulllineitems} \index{new\_gc() (matplotlib.backend\_bases.RendererBase method)@\spxentry{new\_gc()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GraphicsContextBase}}}}}. \end{fulllineitems} \index{open\_group() (matplotlib.backend\_bases.RendererBase method)@\spxentry{open\_group()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.open_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{open\_group}}}{\emph{self}, \emph{s}, \emph{gid=None}}{} Open a grouping element with label \sphinxstyleemphasis{s} and \sphinxstyleemphasis{gid} (if set) as id. Only used by the SVG renderer. \end{fulllineitems} \index{option\_image\_nocomposite() (matplotlib.backend\_bases.RendererBase method)@\spxentry{option\_image\_nocomposite()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.option_image_nocomposite}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_image\_nocomposite}}}{\emph{self}}{} Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return \sphinxcode{\sphinxupquote{not rcParams{[}"image.composite\_image"{]}}}. \end{fulllineitems} \index{option\_scale\_image() (matplotlib.backend\_bases.RendererBase method)@\spxentry{option\_scale\_image()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.option_scale_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_scale\_image}}}{\emph{self}}{} Return whether arbitrary affine transformations in {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}} are supported (True for most vector backends). \end{fulllineitems} \index{points\_to\_pixels() (matplotlib.backend\_bases.RendererBase method)@\spxentry{points\_to\_pixels()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.points_to_pixels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{points\_to\_pixels}}}{\emph{self}, \emph{points}}{} Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{points} \PYG{n}{to} \PYG{n}{pixels} \PYG{o}{=} \PYG{n}{points} \PYG{o}{*} \PYG{n}{pixels\PYGZus{}per\PYGZus{}inch}\PYG{o}{/}\PYG{l+m+mf}{72.0} \PYG{o}{*} \PYG{n}{dpi}\PYG{o}{/}\PYG{l+m+mf}{72.0} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar or array\_like{]} a float or a numpy array of float \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Points converted to pixels}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{start\_filter() (matplotlib.backend\_bases.RendererBase method)@\spxentry{start\_filter()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.start_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_filter}}}{\emph{self}}{} Switch to a temporary renderer for image filtering effects. Currently only supported by the agg renderer. \end{fulllineitems} \index{start\_rasterizing() (matplotlib.backend\_bases.RendererBase method)@\spxentry{start\_rasterizing()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.start_rasterizing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_rasterizing}}}{\emph{self}}{} Switch to the raster renderer. Used by \sphinxcode{\sphinxupquote{MixedModeRenderer}}. \end{fulllineitems} \index{stop\_filter() (matplotlib.backend\_bases.RendererBase method)@\spxentry{stop\_filter()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.stop_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_filter}}}{\emph{self}, \emph{filter\_func}}{} Switch back to the original renderer. The contents of the temporary renderer is processed with the \sphinxstyleemphasis{filter\_func} and is drawn on the original renderer as an image. Currently only supported by the agg renderer. \end{fulllineitems} \index{stop\_rasterizing() (matplotlib.backend\_bases.RendererBase method)@\spxentry{stop\_rasterizing()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.stop_rasterizing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_rasterizing}}}{\emph{self}}{} Switch back to the vector renderer and draw the contents of the raster renderer as an image on the vector renderer. Used by \sphinxcode{\sphinxupquote{MixedModeRenderer}}. \end{fulllineitems} \index{strip\_math() (matplotlib.backend\_bases.RendererBase method)@\spxentry{strip\_math()}\spxextra{matplotlib.backend\_bases.RendererBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.strip_math}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{strip\_math}}}{\emph{self}, \emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \end{fulllineitems} \index{ResizeEvent (class in matplotlib.backend\_bases)@\spxentry{ResizeEvent}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ResizeEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{ResizeEvent}}}{\emph{name}, \emph{canvas}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}} An event triggered by a canvas resize In addition to the {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Event}}}}} attributes, the following event attributes are defined: \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar{]} width of the canvas in pixels \item[{\sphinxstylestrong{height}}] \leavevmode{[}scalar{]} height of the canvas in pixels \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ShowBase (class in matplotlib.backend\_bases)@\spxentry{ShowBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ShowBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{ShowBase}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.backend\_bases.\_Backend}} Simple base class to generate a show() callable in backends. Subclass must override mainloop() method. \end{fulllineitems} \index{StatusbarBase (class in matplotlib.backend\_bases)@\spxentry{StatusbarBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.StatusbarBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{StatusbarBase}}}{\emph{toolmanager}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Base class for the statusbar \index{set\_message() (matplotlib.backend\_bases.StatusbarBase method)@\spxentry{set\_message()}\spxextra{matplotlib.backend\_bases.StatusbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.StatusbarBase.set_message}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_message}}}{\emph{self}, \emph{s}}{} Display a message on toolbar or in status bar \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} Message text \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{TimerBase (class in matplotlib.backend\_bases)@\spxentry{TimerBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{TimerBase}}}{\emph{interval=None}, \emph{callbacks=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A base class for providing timer events, useful for things animations. Backends need to implement a few specific methods in order to use their own timing mechanisms so that the timer events are integrated into their event loops. Mandatory functions that must be implemented: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{\_timer\_start}}: Contains backend-specific code for starting the timer \item {} \sphinxcode{\sphinxupquote{\_timer\_stop}}: Contains backend-specific code for stopping the timer \end{itemize} Optional overrides: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{\_timer\_set\_single\_shot}}: Code for setting the timer to single shot operating mode, if supported by the timer object. If not, the \sphinxcode{\sphinxupquote{Timer}} class itself will store the flag and the \sphinxcode{\sphinxupquote{\_on\_timer}} method should be overridden to support such behavior. \item {} \sphinxcode{\sphinxupquote{\_timer\_set\_interval}}: Code for setting the interval on the timer, if there is a method for doing so on the timer object. \item {} \sphinxcode{\sphinxupquote{\_on\_timer}}: This is the internal function that any timer object should call, which will handle the task of running all callbacks that have been set. \end{itemize} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}scalar{]} The time between timer events in milliseconds. Default is 1000 ms. \item[{\sphinxstylestrong{single\_shot}}] \leavevmode{[}bool{]} Boolean flag indicating whether this timer should operate as single shot (run once and then stop). Defaults to \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}. \item[{\sphinxstylestrong{callbacks}}] \leavevmode{[}List{[}Tuple{[}callable, Tuple, Dict{]}{]}{]} Stores list of (func, args, kwargs) tuples that will be called upon timer events. This list can be manipulated directly, or the functions {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} can be used. \end{description} \end{description}\end{quote} \index{add\_callback() (matplotlib.backend\_bases.TimerBase method)@\spxentry{add\_callback()}\spxextra{matplotlib.backend\_bases.TimerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}, \emph{*args}, \emph{**kwargs}}{} Register \sphinxstyleemphasis{func} to be called by timer when the event fires. Any additional arguments provided will be passed to \sphinxstyleemphasis{func}. This function returns \sphinxstyleemphasis{func}, which makes it possible to use it as a decorator. \end{fulllineitems} \index{interval (matplotlib.backend\_bases.TimerBase attribute)@\spxentry{interval}\spxextra{matplotlib.backend\_bases.TimerBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.interval}}\pysigline{\sphinxbfcode{\sphinxupquote{interval}}}~ \end{fulllineitems} \index{remove\_callback() (matplotlib.backend\_bases.TimerBase method)@\spxentry{remove\_callback()}\spxextra{matplotlib.backend\_bases.TimerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{func}, \emph{*args}, \emph{**kwargs}}{} Remove \sphinxstyleemphasis{func} from list of callbacks. \sphinxstyleemphasis{args} and \sphinxstyleemphasis{kwargs} are optional and used to distinguish between copies of the same function registered to be called with different arguments. This behavior is deprecated. In the future, \sphinxcode{\sphinxupquote{*args, **kwargs}} won't be considered anymore; to keep a specific callback removable by itself, pass it to {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}} as a \sphinxhref{https://docs.python.org/3/library/functools.html\#functools.partial}{\sphinxcode{\sphinxupquote{functools.partial}}} object. \end{fulllineitems} \index{single\_shot (matplotlib.backend\_bases.TimerBase attribute)@\spxentry{single\_shot}\spxextra{matplotlib.backend\_bases.TimerBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.single_shot}}\pysigline{\sphinxbfcode{\sphinxupquote{single\_shot}}}~ \end{fulllineitems} \index{start() (matplotlib.backend\_bases.TimerBase method)@\spxentry{start()}\spxextra{matplotlib.backend\_bases.TimerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.start}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start}}}{\emph{self}, \emph{interval=None}}{} Start the timer object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}int, optional{]} Timer interval in milliseconds; overrides a previously set interval if provided. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stop() (matplotlib.backend\_bases.TimerBase method)@\spxentry{stop()}\spxextra{matplotlib.backend\_bases.TimerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.TimerBase.stop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop}}}{\emph{self}}{} Stop the timer. \end{fulllineitems} \end{fulllineitems} \index{ToolContainerBase (class in matplotlib.backend\_bases)@\spxentry{ToolContainerBase}\spxextra{class in matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{ToolContainerBase}}}{\emph{toolmanager}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Base class for all tool containers, e.g. toolbars. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{toolmanager}}] \leavevmode{[}\sphinxcode{\sphinxupquote{ToolManager}}{]} The tools with which this \sphinxcode{\sphinxupquote{ToolContainer}} wants to communicate. \end{description} \end{description}\end{quote} \index{add\_tool() (matplotlib.backend\_bases.ToolContainerBase method)@\spxentry{add\_tool()}\spxextra{matplotlib.backend\_bases.ToolContainerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase.add_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_tool}}}{\emph{self}, \emph{tool}, \emph{group}, \emph{position=-1}}{} Adds a tool to this container \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tool}}] \leavevmode{[}tool\_like{]} The tool to add, see \sphinxcode{\sphinxupquote{ToolManager.get\_tool}}. \item[{\sphinxstylestrong{group}}] \leavevmode{[}str{]} The name of the group to add this tool to. \item[{\sphinxstylestrong{position}}] \leavevmode{[}int (optional){]} The position within the group to place this tool. Defaults to end. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{add\_toolitem() (matplotlib.backend\_bases.ToolContainerBase method)@\spxentry{add\_toolitem()}\spxextra{matplotlib.backend\_bases.ToolContainerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase.add_toolitem}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_toolitem}}}{\emph{self}, \emph{name}, \emph{group}, \emph{position}, \emph{image}, \emph{description}, \emph{toggle}}{} Add a toolitem to the container This method must get implemented per backend The callback associated with the button click event, must be \sphinxstylestrong{EXACTLY} \sphinxcode{\sphinxupquote{self.trigger\_tool(name)}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the tool to add, this gets used as the tool's ID and as the default label of the buttons \item[{\sphinxstylestrong{group}}] \leavevmode{[}String{]} Name of the group that this tool belongs to \item[{\sphinxstylestrong{position}}] \leavevmode{[}Int{]} Position of the tool within its group, if -1 it goes at the End \item[{\sphinxstylestrong{image\_file}}] \leavevmode{[}String{]} Filename of the image for the button or \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} \item[{\sphinxstylestrong{description}}] \leavevmode{[}String{]} Description of the tool, used for the tooltips \item[{\sphinxstylestrong{toggle}}] \leavevmode{[}Bool{]}\begin{itemize} \item {} \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} : The button is a toggle (change the pressed/unpressed state between consecutive clicks) \item {} \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} : The button is a normal button (returns to unpressed state after release) \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{remove\_toolitem() (matplotlib.backend\_bases.ToolContainerBase method)@\spxentry{remove\_toolitem()}\spxextra{matplotlib.backend\_bases.ToolContainerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase.remove_toolitem}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_toolitem}}}{\emph{self}, \emph{name}}{} Remove a toolitem from the \sphinxcode{\sphinxupquote{ToolContainer}} This method must get implemented per backend Called when \sphinxcode{\sphinxupquote{ToolManager}} emits a \sphinxcode{\sphinxupquote{tool\_removed\_event}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the tool to remove \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toggle\_toolitem() (matplotlib.backend\_bases.ToolContainerBase method)@\spxentry{toggle\_toolitem()}\spxextra{matplotlib.backend\_bases.ToolContainerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase.toggle_toolitem}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toggle\_toolitem}}}{\emph{self}, \emph{name}, \emph{toggled}}{} Toggle the toolitem without firing event \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}String{]} Id of the tool to toggle \item[{\sphinxstylestrong{toggled}}] \leavevmode{[}bool{]} Whether to set this tool as toggled or not. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{trigger\_tool() (matplotlib.backend\_bases.ToolContainerBase method)@\spxentry{trigger\_tool()}\spxextra{matplotlib.backend\_bases.ToolContainerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.ToolContainerBase.trigger_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger\_tool}}}{\emph{self}, \emph{name}}{} Trigger the tool \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name (id) of the tool triggered from within the container \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{button\_press\_handler() (in module matplotlib.backend\_bases)@\spxentry{button\_press\_handler()}\spxextra{in module matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.button_press_handler}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{button\_press\_handler}}}{\emph{event}, \emph{canvas}, \emph{toolbar=None}}{} The default Matplotlib button actions for extra mouse buttons. \end{fulllineitems} \index{get\_registered\_canvas\_class() (in module matplotlib.backend\_bases)@\spxentry{get\_registered\_canvas\_class()}\spxextra{in module matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.get_registered_canvas_class}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{get\_registered\_canvas\_class}}}{\emph{format}}{} Return the registered default canvas for given file format. Handles deferred import of required backend. \end{fulllineitems} \index{key\_press\_handler() (in module matplotlib.backend\_bases)@\spxentry{key\_press\_handler()}\spxextra{in module matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.key_press_handler}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{key\_press\_handler}}}{\emph{event}, \emph{canvas}, \emph{toolbar=None}}{} Implement the default mpl key bindings for the canvas and toolbar described at {\hyperref[\detokenize{users/navigation_toolbar:key-event-handling}]{\sphinxcrossref{\DUrole{std,std-ref}{Navigation Keyboard Shortcuts}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}}{]} a key press/release event \item[{\sphinxstylestrong{canvas}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}}{]} the backend-specific canvas instance \item[{\sphinxstylestrong{toolbar}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.NavigationToolbar2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NavigationToolbar2}}}}}{]} the navigation cursor toolbar \end{description} \end{description}\end{quote} \end{fulllineitems} \index{register\_backend() (in module matplotlib.backend\_bases)@\spxentry{register\_backend()}\spxextra{in module matplotlib.backend\_bases}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_bases_api:matplotlib.backend_bases.register_backend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.}}\sphinxbfcode{\sphinxupquote{register\_backend}}}{\emph{format}, \emph{backend}, \emph{description=None}}{} Register a backend for saving to a given file format. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{format}}] \leavevmode{[}str{]} File extension \item[{\sphinxstylestrong{backend}}] \leavevmode{[}module string or canvas class{]} Backend for handling file output \item[{\sphinxstylestrong{description}}] \leavevmode{[}str, optional{]} Description of the file type. Defaults to an empty string \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_managers}}} \label{\detokenize{api/backend_managers_api:module-matplotlib.backend_managers}}\label{\detokenize{api/backend_managers_api:matplotlib-backend-managers}}\label{\detokenize{api/backend_managers_api::doc}}\index{matplotlib.backend\_managers (module)@\spxentry{matplotlib.backend\_managers}\spxextra{module}}\index{ToolEvent (class in matplotlib.backend\_managers)@\spxentry{ToolEvent}\spxextra{class in matplotlib.backend\_managers}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.}}\sphinxbfcode{\sphinxupquote{ToolEvent}}}{\emph{name}, \emph{sender}, \emph{tool}, \emph{data=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Event for tool manipulation (add/remove). \end{fulllineitems} \index{ToolManager (class in matplotlib.backend\_managers)@\spxentry{ToolManager}\spxextra{class in matplotlib.backend\_managers}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.}}\sphinxbfcode{\sphinxupquote{ToolManager}}}{\emph{figure=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Manager for actions triggered by user interactions (key press, toolbar clicks, ...) on a Figure. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}{]} Figure that holds the canvas. \item[{\sphinxstylestrong{keypresslock}}] \leavevmode{[}\sphinxcode{\sphinxupquote{widgets.LockDraw}}{]} \sphinxcode{\sphinxupquote{LockDraw}} object to know if the {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.canvas}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{canvas}}}}} key\_press\_event is locked \item[{\sphinxstylestrong{messagelock}}] \leavevmode{[}\sphinxcode{\sphinxupquote{widgets.LockDraw}}{]} \sphinxcode{\sphinxupquote{LockDraw}} object to know if the message is available to write \end{description} \end{description}\end{quote} \index{active\_toggle (matplotlib.backend\_managers.ToolManager attribute)@\spxentry{active\_toggle}\spxextra{matplotlib.backend\_managers.ToolManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.active_toggle}}\pysigline{\sphinxbfcode{\sphinxupquote{active\_toggle}}} Currently toggled tools. \end{fulllineitems} \index{add\_tool() (matplotlib.backend\_managers.ToolManager method)@\spxentry{add\_tool()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.add_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_tool}}}{\emph{self}, \emph{name}, \emph{tool}, \emph{*args}, \emph{**kwargs}}{} Add \sphinxstyleemphasis{tool} to {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolManager}}}}}. If successful, adds a new event \sphinxcode{\sphinxupquote{tool\_trigger\_\{name\}}} where \sphinxcode{\sphinxupquote{\{name\}}} is the \sphinxstyleemphasis{name} of the tool; the event is fired everytime the tool is triggered. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str{]} Name of the tool, treated as the ID, has to be unique. \item[{\sphinxstylestrong{tool}}] \leavevmode{[}class\_like, i.e. str or type{]} Reference to find the class of the Tool to added. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}}}] \leavevmode The base class for tools. \end{description} \subsubsection*{Notes} args and kwargs get passed directly to the tools constructor. \end{fulllineitems} \index{canvas (matplotlib.backend\_managers.ToolManager attribute)@\spxentry{canvas}\spxextra{matplotlib.backend\_managers.ToolManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.canvas}}\pysigline{\sphinxbfcode{\sphinxupquote{canvas}}} Canvas managed by FigureManager. \end{fulllineitems} \index{figure (matplotlib.backend\_managers.ToolManager attribute)@\spxentry{figure}\spxextra{matplotlib.backend\_managers.ToolManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.figure}}\pysigline{\sphinxbfcode{\sphinxupquote{figure}}} Figure that holds the canvas. \end{fulllineitems} \index{get\_tool() (matplotlib.backend\_managers.ToolManager method)@\spxentry{get\_tool()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.get_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tool}}}{\emph{self}, \emph{name}, \emph{warn=True}}{} Return the tool object, also accepts the actual tool for convenience. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str, ToolBase{]} Name of the tool, or the tool itself \item[{\sphinxstylestrong{warn}}] \leavevmode{[}bool, optional{]} If this method should give warnings. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_tool\_keymap() (matplotlib.backend\_managers.ToolManager method)@\spxentry{get\_tool\_keymap()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.get_tool_keymap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tool\_keymap}}}{\emph{self}, \emph{name}}{} Get the keymap associated with the specified tool. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the Tool \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{list}}] \leavevmode{[}list of keys associated with the Tool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{message\_event() (matplotlib.backend\_managers.ToolManager method)@\spxentry{message\_event()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.message_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{message\_event}}}{\emph{self}, \emph{message}, \emph{sender=None}}{} Emit a {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManagerMessageEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolManagerMessageEvent}}}}}. \end{fulllineitems} \index{remove\_tool() (matplotlib.backend\_managers.ToolManager method)@\spxentry{remove\_tool()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.remove_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_tool}}}{\emph{self}, \emph{name}}{} Remove tool named \sphinxstyleemphasis{name}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the Tool \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_figure() (matplotlib.backend\_managers.ToolManager method)@\spxentry{set\_figure()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{figure}, \emph{update\_tools=True}}{} Bind the given figure to the tools. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \item[{\sphinxstylestrong{update\_tools}}] \leavevmode{[}bool{]} Force tools to update figure \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toolmanager\_connect() (matplotlib.backend\_managers.ToolManager method)@\spxentry{toolmanager\_connect()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.toolmanager_connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toolmanager\_connect}}}{\emph{self}, \emph{s}, \emph{func}}{} Connect event with string \sphinxstyleemphasis{s} to \sphinxstyleemphasis{func}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}String{]} Name of the event The following events are recognized \begin{itemize} \item {} 'tool\_message\_event' \item {} 'tool\_removed\_event' \item {} 'tool\_added\_event' \end{itemize} For every tool added a new event is created \begin{itemize} \item {} 'tool\_trigger\_TOOLNAME{}` Where TOOLNAME is the id of the tool. \end{itemize} \item[{\sphinxstylestrong{func}}] \leavevmode{[}function{]} Function to be called with signature def func(event) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toolmanager\_disconnect() (matplotlib.backend\_managers.ToolManager method)@\spxentry{toolmanager\_disconnect()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.toolmanager_disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toolmanager\_disconnect}}}{\emph{self}, \emph{cid}}{} Disconnect callback id \sphinxstyleemphasis{cid}. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cid} \PYG{o}{=} \PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{toolmanager\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tool\PYGZus{}trigger\PYGZus{}zoom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{onpress}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}...later} \PYG{n}{toolmanager}\PYG{o}{.}\PYG{n}{toolmanager\PYGZus{}disconnect}\PYG{p}{(}\PYG{n}{cid}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{tools (matplotlib.backend\_managers.ToolManager attribute)@\spxentry{tools}\spxextra{matplotlib.backend\_managers.ToolManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.tools}}\pysigline{\sphinxbfcode{\sphinxupquote{tools}}} A dict mapping tool name -\textgreater{} controlled tool. \end{fulllineitems} \index{trigger\_tool() (matplotlib.backend\_managers.ToolManager method)@\spxentry{trigger\_tool()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger\_tool}}}{\emph{self}, \emph{name}, \emph{sender=None}, \emph{canvasevent=None}, \emph{data=None}}{} Trigger a tool and emit the \sphinxcode{\sphinxupquote{tool\_trigger\_\{name\}}} event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the tool \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that wishes to trigger the tool \item[{\sphinxstylestrong{canvasevent}}] \leavevmode{[}Event{]} Original Canvas event or None \item[{\sphinxstylestrong{data}}] \leavevmode{[}Object{]} Extra data to pass to the tool when triggering \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_keymap() (matplotlib.backend\_managers.ToolManager method)@\spxentry{update\_keymap()}\spxextra{matplotlib.backend\_managers.ToolManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.update_keymap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_keymap}}}{\emph{self}, \emph{name}, \emph{*keys}}{} Set the keymap to associate with the specified tool. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}string{]} Name of the Tool \item[{\sphinxstylestrong{keys}}] \leavevmode{[}keys to associate with the Tool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolManagerMessageEvent (class in matplotlib.backend\_managers)@\spxentry{ToolManagerMessageEvent}\spxextra{class in matplotlib.backend\_managers}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManagerMessageEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.}}\sphinxbfcode{\sphinxupquote{ToolManagerMessageEvent}}}{\emph{name}, \emph{sender}, \emph{message}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Event carrying messages from toolmanager. Messages usually get displayed to the user by the toolbar. \end{fulllineitems} \index{ToolTriggerEvent (class in matplotlib.backend\_managers)@\spxentry{ToolTriggerEvent}\spxextra{class in matplotlib.backend\_managers}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolTriggerEvent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.}}\sphinxbfcode{\sphinxupquote{ToolTriggerEvent}}}{\emph{name}, \emph{sender}, \emph{tool}, \emph{canvasevent=None}, \emph{data=None}}{} Bases: {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolEvent}}}}} Event to inform that a tool has been triggered. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backend\_tools}}} \label{\detokenize{api/backend_tools_api:module-matplotlib.backend_tools}}\label{\detokenize{api/backend_tools_api:matplotlib-backend-tools}}\label{\detokenize{api/backend_tools_api::doc}}\index{matplotlib.backend\_tools (module)@\spxentry{matplotlib.backend\_tools}\spxextra{module}} Abstract base classes define the primitives for Tools. These tools are used by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager}}}}} \begin{description} \item[{{\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolBase}}}}}}] \leavevmode Simple stateless tool \item[{{\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolToggleBase}}}}}}] \leavevmode Tool that has two states, only one Toggle tool can be active at any given time for the same {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager}}}}} \end{description} \index{AxisScaleBase (class in matplotlib.backend\_tools)@\spxentry{AxisScaleBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{AxisScaleBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolToggleBase}}}}} Base Tool to toggle between linear and logarithmic \index{disable() (matplotlib.backend\_tools.AxisScaleBase method)@\spxentry{disable()}\spxextra{matplotlib.backend\_tools.AxisScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.disable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disable}}}{\emph{self}, \emph{event}}{} Disable the toggle tool {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.trigger}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trigger}}}}} call this method when \sphinxcode{\sphinxupquote{toggled}} is True. This can happen in different circumstances \begin{itemize} \item {} Click on the toolbar tool button \item {} Call to {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \item {} Another {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolToggleBase}}}}} derived tool is triggered (from the same \sphinxcode{\sphinxupquote{ToolManager}}) \end{itemize} \end{fulllineitems} \index{enable() (matplotlib.backend\_tools.AxisScaleBase method)@\spxentry{enable()}\spxextra{matplotlib.backend\_tools.AxisScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.enable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{enable}}}{\emph{self}, \emph{event}}{} Enable the toggle tool {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.trigger}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trigger}}}}} calls this method when \sphinxcode{\sphinxupquote{toggled}} is False \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.AxisScaleBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.AxisScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Calls {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.enable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{enable}}}}} or {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase.disable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{disable}}}}} based on \sphinxcode{\sphinxupquote{toggled}} value \end{fulllineitems} \end{fulllineitems} \index{ConfigureSubplotsBase (class in matplotlib.backend\_tools)@\spxentry{ConfigureSubplotsBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ConfigureSubplotsBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ConfigureSubplotsBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Base tool for the configuration of subplots \index{description (matplotlib.backend\_tools.ConfigureSubplotsBase attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ConfigureSubplotsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ConfigureSubplotsBase.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Configure subplots'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ConfigureSubplotsBase attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ConfigureSubplotsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ConfigureSubplotsBase.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'subplots'}}} \end{fulllineitems} \end{fulllineitems} \index{Cursors (class in matplotlib.backend\_tools)@\spxentry{Cursors}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{Cursors}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Simple namespace for cursor reference \index{HAND (matplotlib.backend\_tools.Cursors attribute)@\spxentry{HAND}\spxextra{matplotlib.backend\_tools.Cursors attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors.HAND}}\pysigline{\sphinxbfcode{\sphinxupquote{HAND}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \index{MOVE (matplotlib.backend\_tools.Cursors attribute)@\spxentry{MOVE}\spxextra{matplotlib.backend\_tools.Cursors attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors.MOVE}}\pysigline{\sphinxbfcode{\sphinxupquote{MOVE}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \index{POINTER (matplotlib.backend\_tools.Cursors attribute)@\spxentry{POINTER}\spxextra{matplotlib.backend\_tools.Cursors attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors.POINTER}}\pysigline{\sphinxbfcode{\sphinxupquote{POINTER}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{SELECT\_REGION (matplotlib.backend\_tools.Cursors attribute)@\spxentry{SELECT\_REGION}\spxextra{matplotlib.backend\_tools.Cursors attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors.SELECT_REGION}}\pysigline{\sphinxbfcode{\sphinxupquote{SELECT\_REGION}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{WAIT (matplotlib.backend\_tools.Cursors attribute)@\spxentry{WAIT}\spxextra{matplotlib.backend\_tools.Cursors attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.Cursors.WAIT}}\pysigline{\sphinxbfcode{\sphinxupquote{WAIT}}\sphinxbfcode{\sphinxupquote{ = 4}}} \end{fulllineitems} \end{fulllineitems} \index{RubberbandBase (class in matplotlib.backend\_tools)@\spxentry{RubberbandBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{RubberbandBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Draw and remove rubberband \index{draw\_rubberband() (matplotlib.backend\_tools.RubberbandBase method)@\spxentry{draw\_rubberband()}\spxextra{matplotlib.backend\_tools.RubberbandBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase.draw_rubberband}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_rubberband}}}{\emph{self}, \emph{*data}}{} Draw rubberband This method must get implemented per backend \end{fulllineitems} \index{remove\_rubberband() (matplotlib.backend\_tools.RubberbandBase method)@\spxentry{remove\_rubberband()}\spxextra{matplotlib.backend\_tools.RubberbandBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase.remove_rubberband}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_rubberband}}}{\emph{self}}{} Remove rubberband This method should get implemented per backend \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.RubberbandBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.RubberbandBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data}}{} Call {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase.draw_rubberband}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_rubberband}}}}} or {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.RubberbandBase.remove_rubberband}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_rubberband}}}}} based on data \end{fulllineitems} \end{fulllineitems} \index{SaveFigureBase (class in matplotlib.backend\_tools)@\spxentry{SaveFigureBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SaveFigureBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{SaveFigureBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Base tool for figure saving \index{default\_keymap (matplotlib.backend\_tools.SaveFigureBase attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.SaveFigureBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SaveFigureBase.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'s', 'ctrl+s'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.SaveFigureBase attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.SaveFigureBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SaveFigureBase.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Save the figure'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.SaveFigureBase attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.SaveFigureBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SaveFigureBase.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'filesave'}}} \end{fulllineitems} \end{fulllineitems} \index{SetCursorBase (class in matplotlib.backend\_tools)@\spxentry{SetCursorBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SetCursorBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{SetCursorBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Change to the current cursor while inaxes This tool, keeps track of all {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolToggleBase}}}}} derived tools, and calls set\_cursor when a tool gets triggered \index{set\_cursor() (matplotlib.backend\_tools.SetCursorBase method)@\spxentry{set\_cursor()}\spxextra{matplotlib.backend\_tools.SetCursorBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SetCursorBase.set_cursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cursor}}}{\emph{self}, \emph{cursor}}{} Set the cursor This method has to be implemented per backend \end{fulllineitems} \index{set\_figure() (matplotlib.backend\_tools.SetCursorBase method)@\spxentry{set\_figure()}\spxextra{matplotlib.backend\_tools.SetCursorBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.SetCursorBase.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{figure}}{} Assign a figure to the tool \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolBack (class in matplotlib.backend\_tools)@\spxentry{ToolBack}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolBack}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ViewsPositionsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ViewsPositionsBase}}}}} Move back up the view lim stack \index{default\_keymap (matplotlib.backend\_tools.ToolBack attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolBack attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'left', 'c', 'backspace', 'MouseButton.BACK'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolBack attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolBack attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Back to previous view'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolBack attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolBack attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'back'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolBase (class in matplotlib.backend\_tools)@\spxentry{ToolBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Base tool class A base tool, only implements {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.trigger}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trigger}}}}} method or not method at all. The tool is instantiated by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager}}}}} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{toolmanager}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager}}}}}{]} ToolManager that controls this Tool \item[{\sphinxstylestrong{figure}}] \leavevmode{[}\sphinxcode{\sphinxupquote{FigureCanvas}}{]} Figure instance that is affected by this Tool \item[{{\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{name}}}}}}] \leavevmode{[}string{]} Tool Id \end{description} \end{description}\end{quote} \index{canvas (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{canvas}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.canvas}}\pysigline{\sphinxbfcode{\sphinxupquote{canvas}}}~ \end{fulllineitems} \index{default\_keymap (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = None}}} Keymap to associate with this tool \sphinxstylestrong{String}: List of comma separated keys that will be used to call this tool when the keypress event of \sphinxstyleemphasis{self.figure.canvas} is emitted \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = None}}} Description of the Tool \sphinxstylestrong{String}: If the Tool is included in the Toolbar this text is used as a Tooltip \end{fulllineitems} \index{destroy() (matplotlib.backend\_tools.ToolBase method)@\spxentry{destroy()}\spxextra{matplotlib.backend\_tools.ToolBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.destroy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{destroy}}}{\emph{self}}{} Destroy the tool This method is called when the tool is removed by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.remove_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.remove\_tool}}}}} \end{fulllineitems} \index{figure (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{figure}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.figure}}\pysigline{\sphinxbfcode{\sphinxupquote{figure}}}~ \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = None}}} Filename of the image \sphinxstylestrong{String}: Filename of the image to use in the toolbar. If None, the {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{name}}}}} is used as a label in the toolbar button \end{fulllineitems} \index{name (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{name}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}} Tool Id \end{fulllineitems} \index{set\_figure() (matplotlib.backend\_tools.ToolBase method)@\spxentry{set\_figure()}\spxextra{matplotlib.backend\_tools.ToolBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{figure}}{} Assign a figure to the tool \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toolmanager (matplotlib.backend\_tools.ToolBase attribute)@\spxentry{toolmanager}\spxextra{matplotlib.backend\_tools.ToolBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.toolmanager}}\pysigline{\sphinxbfcode{\sphinxupquote{toolmanager}}}~ \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolCopyToClipboard (in module matplotlib.backend\_tools)@\spxentry{ToolCopyToClipboard}\spxextra{in module matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboard}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolCopyToClipboard}}} alias of {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboardBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolCopyToClipboardBase}}}}} \end{fulllineitems} \index{ToolCopyToClipboardBase (class in matplotlib.backend\_tools)@\spxentry{ToolCopyToClipboardBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboardBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolCopyToClipboardBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Tool to copy the figure to the clipboard \index{default\_keymap (matplotlib.backend\_tools.ToolCopyToClipboardBase attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolCopyToClipboardBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboardBase.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'ctrl+c', 'cmd+c'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolCopyToClipboardBase attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolCopyToClipboardBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboardBase.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Copy the canvas figure to clipboard'}}} \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolCopyToClipboardBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolCopyToClipboardBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCopyToClipboardBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolCursorPosition (class in matplotlib.backend\_tools)@\spxentry{ToolCursorPosition}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCursorPosition}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolCursorPosition}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Send message with the current pointer position This tool runs in the background reporting the position of the cursor \index{send\_message() (matplotlib.backend\_tools.ToolCursorPosition method)@\spxentry{send\_message()}\spxextra{matplotlib.backend\_tools.ToolCursorPosition method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCursorPosition.send_message}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{send\_message}}}{\emph{self}, \emph{event}}{} Call {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.message_event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.message\_event}}}}} \end{fulllineitems} \index{set\_figure() (matplotlib.backend\_tools.ToolCursorPosition method)@\spxentry{set\_figure()}\spxextra{matplotlib.backend\_tools.ToolCursorPosition method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolCursorPosition.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{figure}}{} Assign a figure to the tool \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolEnableAllNavigation (class in matplotlib.backend\_tools)@\spxentry{ToolEnableAllNavigation}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableAllNavigation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolEnableAllNavigation}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Tool to enable all axes for toolmanager interaction \index{default\_keymap (matplotlib.backend\_tools.ToolEnableAllNavigation attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolEnableAllNavigation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableAllNavigation.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'a'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolEnableAllNavigation attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolEnableAllNavigation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableAllNavigation.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Enable all axes toolmanager'}}} \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolEnableAllNavigation method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolEnableAllNavigation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableAllNavigation.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolEnableNavigation (class in matplotlib.backend\_tools)@\spxentry{ToolEnableNavigation}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableNavigation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolEnableNavigation}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Tool to enable a specific axes for toolmanager interaction \index{default\_keymap (matplotlib.backend\_tools.ToolEnableNavigation attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolEnableNavigation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableNavigation.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = (1, 2, 3, 4, 5, 6, 7, 8, 9)}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolEnableNavigation attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolEnableNavigation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableNavigation.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Enable one axes toolmanager'}}} \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolEnableNavigation method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolEnableNavigation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolEnableNavigation.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolForward (class in matplotlib.backend\_tools)@\spxentry{ToolForward}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolForward}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ViewsPositionsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ViewsPositionsBase}}}}} Move forward in the view lim stack \index{default\_keymap (matplotlib.backend\_tools.ToolForward attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolForward attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'right', 'v', 'MouseButton.FORWARD'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolForward attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolForward attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Forward to next view'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolForward attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolForward attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'forward'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolFullScreen (class in matplotlib.backend\_tools)@\spxentry{ToolFullScreen}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolFullScreen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolFullScreen}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolToggleBase}}}}} Tool to toggle full screen \index{default\_keymap (matplotlib.backend\_tools.ToolFullScreen attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolFullScreen attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolFullScreen.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'f', 'ctrl+f'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolFullScreen attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolFullScreen attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolFullScreen.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Toggle fullscreen mode'}}} \end{fulllineitems} \index{disable() (matplotlib.backend\_tools.ToolFullScreen method)@\spxentry{disable()}\spxextra{matplotlib.backend\_tools.ToolFullScreen method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolFullScreen.disable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disable}}}{\emph{self}, \emph{event}}{} Disable the toggle tool \sphinxcode{\sphinxupquote{trigger}} call this method when \sphinxcode{\sphinxupquote{toggled}} is True. This can happen in different circumstances \begin{itemize} \item {} Click on the toolbar tool button \item {} Call to {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \item {} Another {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolToggleBase}}}}} derived tool is triggered (from the same \sphinxcode{\sphinxupquote{ToolManager}}) \end{itemize} \end{fulllineitems} \index{enable() (matplotlib.backend\_tools.ToolFullScreen method)@\spxentry{enable()}\spxextra{matplotlib.backend\_tools.ToolFullScreen method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolFullScreen.enable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{enable}}}{\emph{self}, \emph{event}}{} Enable the toggle tool \sphinxcode{\sphinxupquote{trigger}} calls this method when \sphinxcode{\sphinxupquote{toggled}} is False \end{fulllineitems} \end{fulllineitems} \index{ToolGrid (class in matplotlib.backend\_tools)@\spxentry{ToolGrid}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolGrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolGrid}}}{\emph{toolmanager}, \emph{name}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backend\_tools.\_ToolGridBase}} Tool to toggle the major grids of the figure \index{default\_keymap (matplotlib.backend\_tools.ToolGrid attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolGrid attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolGrid.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'g'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolGrid attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolGrid attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolGrid.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Toggle major grids'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolHelpBase (class in matplotlib.backend\_tools)@\spxentry{ToolHelpBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHelpBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolHelpBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} \index{default\_keymap (matplotlib.backend\_tools.ToolHelpBase attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolHelpBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHelpBase.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'f1'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolHelpBase attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolHelpBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHelpBase.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Print tool list, shortcuts and description'}}} \end{fulllineitems} \index{format\_shortcut() (matplotlib.backend\_tools.ToolHelpBase static method)@\spxentry{format\_shortcut()}\spxextra{matplotlib.backend\_tools.ToolHelpBase static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHelpBase.format_shortcut}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{format\_shortcut}}}{\emph{key\_sequence}}{} Converts a shortcut string from the notation used in rc config to the standard notation for displaying shortcuts, e.g. 'ctrl+a' -\textgreater{} 'Ctrl+A'. \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolHelpBase attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolHelpBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHelpBase.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'help.png'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolHome (class in matplotlib.backend\_tools)@\spxentry{ToolHome}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolHome}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ViewsPositionsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ViewsPositionsBase}}}}} Restore the original view lim \index{default\_keymap (matplotlib.backend\_tools.ToolHome attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolHome attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'h', 'r', 'home'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolHome attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolHome attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Reset original view'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolHome attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolHome attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'home'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolMinorGrid (class in matplotlib.backend\_tools)@\spxentry{ToolMinorGrid}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolMinorGrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolMinorGrid}}}{\emph{toolmanager}, \emph{name}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backend\_tools.\_ToolGridBase}} Tool to toggle the major and minor grids of the figure \index{default\_keymap (matplotlib.backend\_tools.ToolMinorGrid attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolMinorGrid attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolMinorGrid.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'G'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolMinorGrid attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolMinorGrid attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolMinorGrid.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Toggle major and minor grids'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolPan (class in matplotlib.backend\_tools)@\spxentry{ToolPan}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolPan}}}{\emph{*args}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ZoomPanBase}}}}} Pan axes with left mouse, zoom with right \index{cursor (matplotlib.backend\_tools.ToolPan attribute)@\spxentry{cursor}\spxextra{matplotlib.backend\_tools.ToolPan attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan.cursor}}\pysigline{\sphinxbfcode{\sphinxupquote{cursor}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \index{default\_keymap (matplotlib.backend\_tools.ToolPan attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolPan attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'p'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolPan attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolPan attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Pan axes with left mouse, zoom with right'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolPan attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolPan attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'move'}}} \end{fulllineitems} \index{radio\_group (matplotlib.backend\_tools.ToolPan attribute)@\spxentry{radio\_group}\spxextra{matplotlib.backend\_tools.ToolPan attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan.radio_group}}\pysigline{\sphinxbfcode{\sphinxupquote{radio\_group}}\sphinxbfcode{\sphinxupquote{ = 'default'}}} \end{fulllineitems} \end{fulllineitems} \index{ToolQuit (class in matplotlib.backend\_tools)@\spxentry{ToolQuit}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolQuit}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Tool to call the figure manager destroy method \index{default\_keymap (matplotlib.backend\_tools.ToolQuit attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolQuit attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuit.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'ctrl+w', 'cmd+w', 'q'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolQuit attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolQuit attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuit.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Quit the figure'}}} \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolQuit method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolQuit method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuit.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolQuitAll (class in matplotlib.backend\_tools)@\spxentry{ToolQuitAll}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuitAll}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolQuitAll}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Tool to call the figure manager destroy method \index{default\_keymap (matplotlib.backend\_tools.ToolQuitAll attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolQuitAll attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuitAll.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'W', 'cmd+W', 'Q'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolQuitAll attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolQuitAll attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuitAll.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Quit all figures'}}} \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolQuitAll method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolQuitAll method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolQuitAll.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ToolToggleBase (class in matplotlib.backend\_tools)@\spxentry{ToolToggleBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolToggleBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Toggleable tool Every time it is triggered, it switches between enable and disable \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{{}`{}`*args{}`{}`}}] \leavevmode Variable length argument to be used by the Tool \item[{\sphinxstylestrong{{}`{}`**kwargs{}`{}`}}] \leavevmode {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.toggled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{toggled}}}}} if present and True, sets the initial state of the Tool Arbitrary keyword arguments to be consumed by the Tool \end{description} \end{description}\end{quote} \index{cursor (matplotlib.backend\_tools.ToolToggleBase attribute)@\spxentry{cursor}\spxextra{matplotlib.backend\_tools.ToolToggleBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.cursor}}\pysigline{\sphinxbfcode{\sphinxupquote{cursor}}\sphinxbfcode{\sphinxupquote{ = None}}} Cursor to use when the tool is active \end{fulllineitems} \index{default\_toggled (matplotlib.backend\_tools.ToolToggleBase attribute)@\spxentry{default\_toggled}\spxextra{matplotlib.backend\_tools.ToolToggleBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.default_toggled}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_toggled}}\sphinxbfcode{\sphinxupquote{ = False}}} Default of toggled state \end{fulllineitems} \index{disable() (matplotlib.backend\_tools.ToolToggleBase method)@\spxentry{disable()}\spxextra{matplotlib.backend\_tools.ToolToggleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.disable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disable}}}{\emph{self}, \emph{event=None}}{} Disable the toggle tool {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.trigger}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trigger}}}}} call this method when {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.toggled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{toggled}}}}} is True. This can happen in different circumstances \begin{itemize} \item {} Click on the toolbar tool button \item {} Call to {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \item {} Another {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolToggleBase}}}}} derived tool is triggered (from the same \sphinxcode{\sphinxupquote{ToolManager}}) \end{itemize} \end{fulllineitems} \index{enable() (matplotlib.backend\_tools.ToolToggleBase method)@\spxentry{enable()}\spxextra{matplotlib.backend\_tools.ToolToggleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.enable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{enable}}}{\emph{self}, \emph{event=None}}{} Enable the toggle tool {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.trigger}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{trigger}}}}} calls this method when {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.toggled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{toggled}}}}} is False \end{fulllineitems} \index{radio\_group (matplotlib.backend\_tools.ToolToggleBase attribute)@\spxentry{radio\_group}\spxextra{matplotlib.backend\_tools.ToolToggleBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.radio_group}}\pysigline{\sphinxbfcode{\sphinxupquote{radio\_group}}\sphinxbfcode{\sphinxupquote{ = None}}} Attribute to group 'radio' like tools (mutually exclusive) \sphinxstylestrong{String} that identifies the group or \sphinxstylestrong{None} if not belonging to a group \end{fulllineitems} \index{set\_figure() (matplotlib.backend\_tools.ToolToggleBase method)@\spxentry{set\_figure()}\spxextra{matplotlib.backend\_tools.ToolToggleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{figure}}{} Assign a figure to the tool \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toggled (matplotlib.backend\_tools.ToolToggleBase attribute)@\spxentry{toggled}\spxextra{matplotlib.backend\_tools.ToolToggleBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.toggled}}\pysigline{\sphinxbfcode{\sphinxupquote{toggled}}} State of the toggled tool \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ToolToggleBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ToolToggleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Calls {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.enable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{enable}}}}} or {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.disable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{disable}}}}} based on {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase.toggled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{toggled}}}}} value \end{fulllineitems} \end{fulllineitems} \index{ToolViewsPositions (class in matplotlib.backend\_tools)@\spxentry{ToolViewsPositions}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolViewsPositions}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Auxiliary Tool to handle changes in views and positions Runs in the background and should get used by all the tools that need to access the figure's history of views and positions, e.g. \begin{itemize} \item {} {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolZoom}}}}} \item {} {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolPan}}}}} \item {} {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolHome}}}}} \item {} {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolBack}}}}} \item {} {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolForward}}}}} \end{itemize} \index{add\_figure() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{add\_figure()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.add_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_figure}}}{\emph{self}, \emph{figure}}{} Add the current figure to the stack of views and positions \end{fulllineitems} \index{back() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{back()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.back}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{back}}}{\emph{self}}{} Back one step in the stack of views and positions \end{fulllineitems} \index{clear() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{clear()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}, \emph{figure}}{} Reset the axes stack \end{fulllineitems} \index{forward() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{forward()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.forward}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{forward}}}{\emph{self}}{} Forward one step in the stack of views and positions \end{fulllineitems} \index{home() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{home()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.home}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{home}}}{\emph{self}}{} Recall the first view and position from the stack \end{fulllineitems} \index{push\_current() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{push\_current()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.push_current}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{push\_current}}}{\emph{self}, \emph{figure=None}}{} Push the current view limits and position onto their respective stacks \end{fulllineitems} \index{refresh\_locators() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{refresh\_locators()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.refresh_locators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh\_locators}}}{\emph{self}}{} Redraw the canvases, update the locators \end{fulllineitems} \index{update\_home\_views() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{update\_home\_views()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.update_home_views}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_home\_views}}}{\emph{self}, \emph{figure=None}}{} Make sure that self.home\_views has an entry for all axes present in the figure \end{fulllineitems} \index{update\_view() (matplotlib.backend\_tools.ToolViewsPositions method)@\spxentry{update\_view()}\spxextra{matplotlib.backend\_tools.ToolViewsPositions method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolViewsPositions.update_view}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_view}}}{\emph{self}}{} Update the view limits and position for each axes from the current stack position. If any axes are present in the figure that aren't in the current stack position, use the home view limits for those axes and don't update \sphinxstyleemphasis{any} positions. \end{fulllineitems} \end{fulllineitems} \index{ToolXScale (class in matplotlib.backend\_tools)@\spxentry{ToolXScale}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolXScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolXScale}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.AxisScaleBase}}}}} Tool to toggle between linear and logarithmic scales on the X axis \index{default\_keymap (matplotlib.backend\_tools.ToolXScale attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolXScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolXScale.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'k', 'L'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolXScale attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolXScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolXScale.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Toggle scale X axis'}}} \end{fulllineitems} \index{set\_scale() (matplotlib.backend\_tools.ToolXScale method)@\spxentry{set\_scale()}\spxextra{matplotlib.backend\_tools.ToolXScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolXScale.set_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_scale}}}{\emph{self}, \emph{ax}, \emph{scale}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ToolYScale (class in matplotlib.backend\_tools)@\spxentry{ToolYScale}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolYScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolYScale}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.AxisScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.AxisScaleBase}}}}} Tool to toggle between linear and logarithmic scales on the Y axis \index{default\_keymap (matplotlib.backend\_tools.ToolYScale attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolYScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolYScale.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'l'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolYScale attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolYScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolYScale.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Toggle scale Y axis'}}} \end{fulllineitems} \index{set\_scale() (matplotlib.backend\_tools.ToolYScale method)@\spxentry{set\_scale()}\spxextra{matplotlib.backend\_tools.ToolYScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolYScale.set_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_scale}}}{\emph{self}, \emph{ax}, \emph{scale}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ToolZoom (class in matplotlib.backend\_tools)@\spxentry{ToolZoom}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ToolZoom}}}{\emph{*args}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ZoomPanBase}}}}} Zoom to rectangle \index{cursor (matplotlib.backend\_tools.ToolZoom attribute)@\spxentry{cursor}\spxextra{matplotlib.backend\_tools.ToolZoom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom.cursor}}\pysigline{\sphinxbfcode{\sphinxupquote{cursor}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{default\_keymap (matplotlib.backend\_tools.ToolZoom attribute)@\spxentry{default\_keymap}\spxextra{matplotlib.backend\_tools.ToolZoom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom.default_keymap}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_keymap}}\sphinxbfcode{\sphinxupquote{ = {[}'o'{]}}}} \end{fulllineitems} \index{description (matplotlib.backend\_tools.ToolZoom attribute)@\spxentry{description}\spxextra{matplotlib.backend\_tools.ToolZoom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom.description}}\pysigline{\sphinxbfcode{\sphinxupquote{description}}\sphinxbfcode{\sphinxupquote{ = 'Zoom to rectangle'}}} \end{fulllineitems} \index{image (matplotlib.backend\_tools.ToolZoom attribute)@\spxentry{image}\spxextra{matplotlib.backend\_tools.ToolZoom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom.image}}\pysigline{\sphinxbfcode{\sphinxupquote{image}}\sphinxbfcode{\sphinxupquote{ = 'zoom\_to\_rect'}}} \end{fulllineitems} \index{radio\_group (matplotlib.backend\_tools.ToolZoom attribute)@\spxentry{radio\_group}\spxextra{matplotlib.backend\_tools.ToolZoom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom.radio_group}}\pysigline{\sphinxbfcode{\sphinxupquote{radio\_group}}\sphinxbfcode{\sphinxupquote{ = 'default'}}} \end{fulllineitems} \end{fulllineitems} \index{ViewsPositionsBase (class in matplotlib.backend\_tools)@\spxentry{ViewsPositionsBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ViewsPositionsBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ViewsPositionsBase}}}{\emph{toolmanager}, \emph{name}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolBase}}}}} Base class for {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolHome}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolHome}}}}}, {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolBack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolBack}}}}} and {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolForward}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolForward}}}}} \index{trigger() (matplotlib.backend\_tools.ViewsPositionsBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ViewsPositionsBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ViewsPositionsBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Called when this tool gets used This method is called by {\hyperref[\detokenize{api/backend_managers_api:matplotlib.backend_managers.ToolManager.trigger_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_managers.ToolManager.trigger\_tool}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Event}}{]} The Canvas event that caused this tool to be called \item[{\sphinxstylestrong{sender}}] \leavevmode{[}object{]} Object that requested the tool to be triggered \item[{\sphinxstylestrong{data}}] \leavevmode{[}object{]} Extra data \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{ZoomPanBase (class in matplotlib.backend\_tools)@\spxentry{ZoomPanBase}\spxextra{class in matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{ZoomPanBase}}}{\emph{*args}}{} Bases: {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolToggleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.ToolToggleBase}}}}} Base class for {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolZoom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolZoom}}}}} and {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ToolPan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ToolPan}}}}} \index{disable() (matplotlib.backend\_tools.ZoomPanBase method)@\spxentry{disable()}\spxextra{matplotlib.backend\_tools.ZoomPanBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.disable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disable}}}{\emph{self}, \emph{event}}{} Release the canvas and disconnect press/release events \end{fulllineitems} \index{enable() (matplotlib.backend\_tools.ZoomPanBase method)@\spxentry{enable()}\spxextra{matplotlib.backend\_tools.ZoomPanBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.enable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{enable}}}{\emph{self}, \emph{event}}{} Connect press/release events and lock the canvas \end{fulllineitems} \index{scroll\_zoom() (matplotlib.backend\_tools.ZoomPanBase method)@\spxentry{scroll\_zoom()}\spxextra{matplotlib.backend\_tools.ZoomPanBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.scroll_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scroll\_zoom}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \index{trigger() (matplotlib.backend\_tools.ZoomPanBase method)@\spxentry{trigger()}\spxextra{matplotlib.backend\_tools.ZoomPanBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.trigger}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{trigger}}}{\emph{self}, \emph{sender}, \emph{event}, \emph{data=None}}{} Calls {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.enable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{enable}}}}} or {\hyperref[\detokenize{api/backend_tools_api:matplotlib.backend_tools.ZoomPanBase.disable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{disable}}}}} based on \sphinxcode{\sphinxupquote{toggled}} value \end{fulllineitems} \end{fulllineitems} \index{add\_tools\_to\_container() (in module matplotlib.backend\_tools)@\spxentry{add\_tools\_to\_container()}\spxextra{in module matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.add_tools_to_container}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{add\_tools\_to\_container}}}{\emph{container, tools={[}{[}'navigation', {[}'home', 'back', 'forward'{]}{]}, {[}'zoompan', {[}'pan', 'zoom', 'subplots'{]}{]}, {[}'io', {[}'save', 'help'{]}{]}{]}}}{} Add multiple tools to the container. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}Container{]} \sphinxcode{\sphinxupquote{backend\_bases.ToolContainerBase}} object that will get the tools added \item[{\sphinxstylestrong{tools}}] \leavevmode{[}list, optional{]} List in the form {[}{[}group1, {[}tool1, tool2 ...{]}{]}, {[}group2, {[}...{]}{]}{]} Where the tools given by tool1, and tool2 will display in group1. See \sphinxcode{\sphinxupquote{add\_tool}} for details. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{add\_tools\_to\_manager() (in module matplotlib.backend\_tools)@\spxentry{add\_tools\_to\_manager()}\spxextra{in module matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.add_tools_to_manager}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{add\_tools\_to\_manager}}}{\emph{toolmanager}, \emph{tools=\{'home': \textless{}class 'matplotlib.backend\_tools.ToolHome'\textgreater{}}, \emph{'back': \textless{}class 'matplotlib.backend\_tools.ToolBack'\textgreater{}}, \emph{'forward': \textless{}class 'matplotlib.backend\_tools.ToolForward'\textgreater{}}, \emph{'zoom': \textless{}class 'matplotlib.backend\_tools.ToolZoom'\textgreater{}}, \emph{'pan': \textless{}class 'matplotlib.backend\_tools.ToolPan'\textgreater{}}, \emph{'subplots': 'ToolConfigureSubplots'}, \emph{'save': 'ToolSaveFigure'}, \emph{'grid': \textless{}class 'matplotlib.backend\_tools.ToolGrid'\textgreater{}}, \emph{'grid\_minor': \textless{}class 'matplotlib.backend\_tools.ToolMinorGrid'\textgreater{}}, \emph{'fullscreen': \textless{}class 'matplotlib.backend\_tools.ToolFullScreen'\textgreater{}}, \emph{'quit': \textless{}class 'matplotlib.backend\_tools.ToolQuit'\textgreater{}}, \emph{'quit\_all': \textless{}class 'matplotlib.backend\_tools.ToolQuitAll'\textgreater{}}, \emph{'allnav': \textless{}class 'matplotlib.backend\_tools.ToolEnableAllNavigation'\textgreater{}}, \emph{'nav': \textless{}class 'matplotlib.backend\_tools.ToolEnableNavigation'\textgreater{}}, \emph{'xscale': \textless{}class 'matplotlib.backend\_tools.ToolXScale'\textgreater{}}, \emph{'yscale': \textless{}class 'matplotlib.backend\_tools.ToolYScale'\textgreater{}}, \emph{'position': \textless{}class 'matplotlib.backend\_tools.ToolCursorPosition'\textgreater{}}, \emph{'viewpos': \textless{}class 'matplotlib.backend\_tools.ToolViewsPositions'\textgreater{}}, \emph{'cursor': 'ToolSetCursor'}, \emph{'rubberband': 'ToolRubberband'}, \emph{'help': 'ToolHelp'}, \emph{'copy': 'ToolCopyToClipboard'\}}}{} Add multiple tools to \sphinxcode{\sphinxupquote{ToolManager}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{toolmanager}}] \leavevmode{[}ToolManager{]} \sphinxcode{\sphinxupquote{backend\_managers.ToolManager}} object that will get the tools added \item[{\sphinxstylestrong{tools}}] \leavevmode{[}\{str: class\_like\}, optional{]} The tools to add in a \{name: tool\} dict, see \sphinxcode{\sphinxupquote{add\_tool}} for more info. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{default\_toolbar\_tools (in module matplotlib.backend\_tools)@\spxentry{default\_toolbar\_tools}\spxextra{in module matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.default_toolbar_tools}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{default\_toolbar\_tools}}\sphinxbfcode{\sphinxupquote{ = {[}{[}'navigation', {[}'home', 'back', 'forward'{]}{]}, {[}'zoompan', {[}'pan', 'zoom', 'subplots'{]}{]}, {[}'io', {[}'save', 'help'{]}{]}{]}}}} Default tools in the toolbar \end{fulllineitems} \index{default\_tools (in module matplotlib.backend\_tools)@\spxentry{default\_tools}\spxextra{in module matplotlib.backend\_tools}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tools_api:matplotlib.backend_tools.default_tools}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backend\_tools.}}\sphinxbfcode{\sphinxupquote{default\_tools}}\sphinxbfcode{\sphinxupquote{ = \{'allnav': \textless{}class 'matplotlib.backend\_tools.ToolEnableAllNavigation'\textgreater{}, 'back': \textless{}class 'matplotlib.backend\_tools.ToolBack'\textgreater{}, 'copy': 'ToolCopyToClipboard', 'cursor': 'ToolSetCursor', 'forward': \textless{}class 'matplotlib.backend\_tools.ToolForward'\textgreater{}, 'fullscreen': \textless{}class 'matplotlib.backend\_tools.ToolFullScreen'\textgreater{}, 'grid': \textless{}class 'matplotlib.backend\_tools.ToolGrid'\textgreater{}, 'grid\_minor': \textless{}class 'matplotlib.backend\_tools.ToolMinorGrid'\textgreater{}, 'help': 'ToolHelp', 'home': \textless{}class 'matplotlib.backend\_tools.ToolHome'\textgreater{}, 'nav': \textless{}class 'matplotlib.backend\_tools.ToolEnableNavigation'\textgreater{}, 'pan': \textless{}class 'matplotlib.backend\_tools.ToolPan'\textgreater{}, 'position': \textless{}class 'matplotlib.backend\_tools.ToolCursorPosition'\textgreater{}, 'quit': \textless{}class 'matplotlib.backend\_tools.ToolQuit'\textgreater{}, 'quit\_all': \textless{}class 'matplotlib.backend\_tools.ToolQuitAll'\textgreater{}, 'rubberband': 'ToolRubberband', 'save': 'ToolSaveFigure', 'subplots': 'ToolConfigureSubplots', 'viewpos': \textless{}class 'matplotlib.backend\_tools.ToolViewsPositions'\textgreater{}, 'xscale': \textless{}class 'matplotlib.backend\_tools.ToolXScale'\textgreater{}, 'yscale': \textless{}class 'matplotlib.backend\_tools.ToolYScale'\textgreater{}, 'zoom': \textless{}class 'matplotlib.backend\_tools.ToolZoom'\textgreater{}\}}}} Default tools \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends}}} \label{\detokenize{api/index_backend_api:matplotlib-backends}}\label{\detokenize{api/index_backend_api::doc}} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_mixed}}} \label{\detokenize{api/backend_mixed_api:module-matplotlib.backends.backend_mixed}}\label{\detokenize{api/backend_mixed_api:matplotlib-backends-backend-mixed}}\label{\detokenize{api/backend_mixed_api::doc}}\index{matplotlib.backends.backend\_mixed (module)@\spxentry{matplotlib.backends.backend\_mixed}\spxextra{module}}\index{MixedModeRenderer (class in matplotlib.backends.backend\_mixed)@\spxentry{MixedModeRenderer}\spxextra{class in matplotlib.backends.backend\_mixed}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_mixed_api:matplotlib.backends.backend_mixed.MixedModeRenderer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_mixed.}}\sphinxbfcode{\sphinxupquote{MixedModeRenderer}}}{\emph{figure}, \emph{width}, \emph{height}, \emph{dpi}, \emph{vector\_renderer}, \emph{raster\_renderer\_class=None}, \emph{bbox\_inches\_restore=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A helper class to implement a renderer that switches between vector and raster drawing. An example may be a PDF writer, where most things are drawn with PDF vector commands, but some very complex objects, such as quad meshes, are rasterised and then output as images. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} The figure instance. \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar{]} The width of the canvas in logical units \item[{\sphinxstylestrong{height}}] \leavevmode{[}scalar{]} The height of the canvas in logical units \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}scalar{]} The dpi of the canvas \item[{\sphinxstylestrong{vector\_renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}}{]} An instance of a subclass of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} that will be used for the vector drawing. \item[{\sphinxstylestrong{raster\_renderer\_class}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}}{]} The renderer class to use for the raster drawing. If not provided, this will use the Agg backend (which is currently the only viable option anyway.) \end{description} \end{description}\end{quote} \index{start\_rasterizing() (matplotlib.backends.backend\_mixed.MixedModeRenderer method)@\spxentry{start\_rasterizing()}\spxextra{matplotlib.backends.backend\_mixed.MixedModeRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_mixed_api:matplotlib.backends.backend_mixed.MixedModeRenderer.start_rasterizing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_rasterizing}}}{\emph{self}}{} Enter "raster" mode. All subsequent drawing commands (until stop\_rasterizing is called) will be drawn with the raster backend. If start\_rasterizing is called multiple times before stop\_rasterizing is called, this method has no effect. \end{fulllineitems} \index{stop\_rasterizing() (matplotlib.backends.backend\_mixed.MixedModeRenderer method)@\spxentry{stop\_rasterizing()}\spxextra{matplotlib.backends.backend\_mixed.MixedModeRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_mixed_api:matplotlib.backends.backend_mixed.MixedModeRenderer.stop_rasterizing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_rasterizing}}}{\emph{self}}{} Exit "raster" mode. All of the drawing that was done since the last start\_rasterizing command will be copied to the vector backend by calling draw\_image. If stop\_rasterizing is called multiple times before start\_rasterizing is called, this method has no effect. \end{fulllineitems} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_agg}}} \label{\detokenize{api/backend_agg_api:module-matplotlib.backends.backend_agg}}\label{\detokenize{api/backend_agg_api:matplotlib-backends-backend-agg}}\label{\detokenize{api/backend_agg_api::doc}}\index{matplotlib.backends.backend\_agg (module)@\spxentry{matplotlib.backends.backend\_agg}\spxextra{module}} An agg \sphinxurl{http://antigrain.com/} backend Features that are implemented \begin{itemize} \item {} capstyles and join styles \item {} dashes \item {} linewidth \item {} lines, rectangles, ellipses \item {} clipping to a rectangle \item {} output to RGBA and PNG, optionally JPEG and TIFF \item {} alpha blending \item {} DPI scaling properly - everything scales properly (dashes, linewidths, etc) \item {} draw polygon \item {} freetype2 w/ ft2font \end{itemize} TODO: \begin{itemize} \item {} integrate screen dpi w/ ppi and text \end{itemize} \index{FigureCanvas (in module matplotlib.backends.backend\_agg)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_agg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.FigureCanvasAgg}}}}} \end{fulllineitems} \index{FigureCanvasAgg (class in matplotlib.backends.backend\_agg)@\spxentry{FigureCanvasAgg}\spxextra{class in matplotlib.backends.backend\_agg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.}}\sphinxbfcode{\sphinxupquote{FigureCanvasAgg}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} The canvas the figure renders into. Calls the draw and print fig methods, creates the renderers, etc... \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} A high-level Figure instance \end{description} \end{description}\end{quote} \index{buffer\_rgba() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{buffer\_rgba()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.buffer_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{buffer\_rgba}}}{\emph{self}}{} Get the image as a memoryview to the renderer's buffer. {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}} must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{memoryview}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{copy\_from\_bbox() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{copy\_from\_bbox()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.copy_from_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy\_from\_bbox}}}{\emph{self}, \emph{bbox}}{}~ \end{fulllineitems} \index{draw() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{draw()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}}{} Draw the figure using the renderer. \end{fulllineitems} \index{get\_renderer() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{get\_renderer()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.get_renderer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_renderer}}}{\emph{self}, \emph{cleared=False}}{}~ \end{fulllineitems} \index{print\_jpeg() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_jpeg()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpeg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_jpeg}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{dryrun=False}, \emph{pil\_kwargs=None}, \emph{**kwargs}}{} Write the figure to a JPEG file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename\_or\_obj}}] \leavevmode{[}str or PathLike or file-like object{]} The file to write to. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{quality}}] \leavevmode{[}int{]} The image quality, on a scale from 1 (worst) to 100 (best). The default is \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.jpeg\_quality"{]}}}}. Values above 95 should be avoided; 100 completely disables the JPEG quantization stage. \item[{\sphinxstylestrong{optimize}}] \leavevmode{[}bool{]} If present, indicates that the encoder should make an extra pass over the image in order to select optimal encoder settings. \item[{\sphinxstylestrong{progressive}}] \leavevmode{[}bool{]} If present, indicates that this image should be stored as a progressive JPEG file. \item[{\sphinxstylestrong{pil\_kwargs}}] \leavevmode{[}dict, optional{]} Additional keyword arguments that are passed to \sphinxcode{\sphinxupquote{PIL.Image.save}} when saving the figure. These take precedence over \sphinxstyleemphasis{quality}, \sphinxstyleemphasis{optimize} and \sphinxstyleemphasis{progressive}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{print\_jpg() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_jpg()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_jpg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_jpg}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{dryrun=False}, \emph{pil\_kwargs=None}, \emph{**kwargs}}{} Write the figure to a JPEG file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename\_or\_obj}}] \leavevmode{[}str or PathLike or file-like object{]} The file to write to. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{quality}}] \leavevmode{[}int{]} The image quality, on a scale from 1 (worst) to 100 (best). The default is \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.jpeg\_quality"{]}}}}. Values above 95 should be avoided; 100 completely disables the JPEG quantization stage. \item[{\sphinxstylestrong{optimize}}] \leavevmode{[}bool{]} If present, indicates that the encoder should make an extra pass over the image in order to select optimal encoder settings. \item[{\sphinxstylestrong{progressive}}] \leavevmode{[}bool{]} If present, indicates that this image should be stored as a progressive JPEG file. \item[{\sphinxstylestrong{pil\_kwargs}}] \leavevmode{[}dict, optional{]} Additional keyword arguments that are passed to \sphinxcode{\sphinxupquote{PIL.Image.save}} when saving the figure. These take precedence over \sphinxstyleemphasis{quality}, \sphinxstyleemphasis{optimize} and \sphinxstyleemphasis{progressive}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{print\_png() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_png()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_png}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_png}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{metadata=None}, \emph{pil\_kwargs=None}, \emph{**kwargs}}{} Write the figure to a PNG file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename\_or\_obj}}] \leavevmode{[}str or PathLike or file-like object{]} The file to write to. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}dict, optional{]} Metadata in the PNG file as key-value pairs of bytes or latin-1 encodable strings. According to the PNG specification, keys must be shorter than 79 chars. The \sphinxhref{https://www.w3.org/TR/2003/REC-PNG-20031110/\#11keywords}{PNG specification} defines some common keywords that may be used as appropriate: \begin{itemize} \item {} Title: Short (one line) title or caption for image. \item {} Author: Name of image's creator. \item {} Description: Description of image (possibly long). \item {} Copyright: Copyright notice. \item {} Creation Time: Time of original image creation (usually RFC 1123 format). \item {} Software: Software used to create the image. \item {} Disclaimer: Legal disclaimer. \item {} Warning: Warning of nature of content. \item {} Source: Device used to create the image. \item {} Comment: Miscellaneous comment; conversion from other image format. \end{itemize} Other keywords may be invented for other purposes. If 'Software' is not given, an autogenerated value for matplotlib will be used. For more details see the \sphinxhref{https://www.w3.org/TR/2003/REC-PNG-20031110/\#11keywords}{PNG specification}. \item[{\sphinxstylestrong{pil\_kwargs}}] \leavevmode{[}dict, optional{]} If set to a non-None value, use Pillow to save the figure instead of Matplotlib's builtin PNG support, and pass these keyword arguments to \sphinxcode{\sphinxupquote{PIL.Image.save}}. If the 'pnginfo' key is present, it completely overrides \sphinxstyleemphasis{metadata}, including the default 'Software' key. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{print\_raw() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_raw()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_raw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_raw}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_rgba() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_rgba()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_rgba}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_tif() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_tif()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_tif}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_tif}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{dryrun=False}, \emph{pil\_kwargs=None}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_tiff() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_tiff()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_tiff}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_tiff}}}{\emph{self}, \emph{filename\_or\_obj}, \emph{*args}, \emph{dryrun=False}, \emph{pil\_kwargs=None}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_to\_buffer() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{print\_to\_buffer()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_to_buffer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_to\_buffer}}}{\emph{self}}{}~ \end{fulllineitems} \index{restore\_region() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{restore\_region()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.restore_region}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{restore\_region}}}{\emph{self}, \emph{region}, \emph{bbox=None}, \emph{xy=None}}{}~ \end{fulllineitems} \index{tostring\_argb() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{tostring\_argb()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_argb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tostring\_argb}}}{\emph{self}}{} Get the image as an ARGB byte string. {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}} must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{bytes}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{tostring\_rgb() (matplotlib.backends.backend\_agg.FigureCanvasAgg method)@\spxentry{tostring\_rgb()}\spxextra{matplotlib.backends.backend\_agg.FigureCanvasAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.tostring_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tostring\_rgb}}}{\emph{self}}{} Get the image as an RGB byte string. {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}} must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{bytes}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{RendererAgg (class in matplotlib.backends.backend\_agg)@\spxentry{RendererAgg}\spxextra{class in matplotlib.backends.backend\_agg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.}}\sphinxbfcode{\sphinxupquote{RendererAgg}}}{\emph{width}, \emph{height}, \emph{dpi}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} The renderer handles all the drawing primitives using a graphics context instance that controls the colors/styles \index{buffer\_rgba() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{buffer\_rgba()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.buffer_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{buffer\_rgba}}}{\emph{self}}{}~ \end{fulllineitems} \index{clear() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{clear()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}}{}~ \end{fulllineitems} \index{draw\_mathtext() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{draw\_mathtext()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.draw_mathtext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_mathtext}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}}{} Draw the math text using matplotlib.mathtext \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_tex() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{get\_canvas\_width\_height() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{get\_canvas\_width\_height()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.get_canvas_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_canvas\_width\_height}}}{\emph{self}}{} Return the canvas width and height in display coords. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{} Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string \sphinxstyleemphasis{s} with {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} \sphinxstyleemphasis{prop} \end{fulllineitems} \index{lock (matplotlib.backends.backend\_agg.RendererAgg attribute)@\spxentry{lock}\spxextra{matplotlib.backends.backend\_agg.RendererAgg attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.lock}}\pysigline{\sphinxbfcode{\sphinxupquote{lock}}\sphinxbfcode{\sphinxupquote{ = \textless{}unlocked \_thread.RLock object owner=0 count=0\textgreater{}}}} \end{fulllineitems} \index{option\_image\_nocomposite() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{option\_image\_nocomposite()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.option_image_nocomposite}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_image\_nocomposite}}}{\emph{self}}{} Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return \sphinxcode{\sphinxupquote{not rcParams{[}"image.composite\_image"{]}}}. \end{fulllineitems} \index{option\_scale\_image() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{option\_scale\_image()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.option_scale_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_scale\_image}}}{\emph{self}}{} Return whether arbitrary affine transformations in \sphinxcode{\sphinxupquote{draw\_image()}} are supported (True for most vector backends). \end{fulllineitems} \index{points\_to\_pixels() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{points\_to\_pixels()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.points_to_pixels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{points\_to\_pixels}}}{\emph{self}, \emph{points}}{} Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{points} \PYG{n}{to} \PYG{n}{pixels} \PYG{o}{=} \PYG{n}{points} \PYG{o}{*} \PYG{n}{pixels\PYGZus{}per\PYGZus{}inch}\PYG{o}{/}\PYG{l+m+mf}{72.0} \PYG{o}{*} \PYG{n}{dpi}\PYG{o}{/}\PYG{l+m+mf}{72.0} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar or array\_like{]} a float or a numpy array of float \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Points converted to pixels}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{restore\_region() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{restore\_region()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.restore_region}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{restore\_region}}}{\emph{self}, \emph{region}, \emph{bbox=None}, \emph{xy=None}}{} Restore the saved region. If bbox (instance of BboxBase, or its extents) is given, only the region specified by the bbox will be restored. \sphinxstyleemphasis{xy} (a pair of floats) optionally specifies the new position (the LLC of the original region, not the LLC of the bbox) where the region will be restored. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{region} \PYG{o}{=} \PYG{n}{renderer}\PYG{o}{.}\PYG{n}{copy\PYGZus{}from\PYGZus{}bbox}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2} \PYG{o}{=} \PYG{n}{region}\PYG{o}{.}\PYG{n}{get\PYGZus{}extents}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{renderer}\PYG{o}{.}\PYG{n}{restore\PYGZus{}region}\PYG{p}{(}\PYG{n}{region}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{p}{(}\PYG{n}{x1}\PYG{o}{+}\PYG{n}{dx}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{n}{x1}\PYG{o}{\PYGZhy{}}\PYG{n}{dx}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{start\_filter() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{start\_filter()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.start_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_filter}}}{\emph{self}}{} Start filtering. It simply create a new canvas (the old one is saved). \end{fulllineitems} \index{stop\_filter() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{stop\_filter()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.stop_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_filter}}}{\emph{self}, \emph{post\_processing}}{} Save the plot in the current canvas as a image and apply the \sphinxstyleemphasis{post\_processing} function. \begin{quote} \begin{description} \item[{def post\_processing(image, dpi):}] \leavevmode \# ny, nx, depth = image.shape \# image (numpy array) has RGBA channels and has a depth of 4. ... \# create a new\_image (numpy array of 4 channels, size can be \# different). The resulting image may have offsets from \# lower-left corner of the original image return new\_image, offset\_x, offset\_y \end{description} \end{quote} The saved renderer is restored and the returned image from post\_processing is plotted (using draw\_image) on it. \end{fulllineitems} \index{tostring\_argb() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{tostring\_argb()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.tostring_argb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tostring\_argb}}}{\emph{self}}{}~ \end{fulllineitems} \index{tostring\_rgb() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{tostring\_rgb()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.tostring_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tostring\_rgb}}}{\emph{self}}{}~ \end{fulllineitems} \index{tostring\_rgba\_minimized() (matplotlib.backends.backend\_agg.RendererAgg method)@\spxentry{tostring\_rgba\_minimized()}\spxextra{matplotlib.backends.backend\_agg.RendererAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.RendererAgg.tostring_rgba_minimized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tostring\_rgba\_minimized}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{get\_hinting\_flag() (in module matplotlib.backends.backend\_agg)@\spxentry{get\_hinting\_flag()}\spxextra{in module matplotlib.backends.backend\_agg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.get_hinting_flag}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.}}\sphinxbfcode{\sphinxupquote{get\_hinting\_flag}}}{}{}~ \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_cairo}}} \label{\detokenize{api/backend_cairo_api:module-matplotlib.backends.backend_cairo}}\label{\detokenize{api/backend_cairo_api:matplotlib-backends-backend-cairo}}\label{\detokenize{api/backend_cairo_api::doc}}\index{matplotlib.backends.backend\_cairo (module)@\spxentry{matplotlib.backends.backend\_cairo}\spxextra{module}} \subsubsection{A Cairo backend for matplotlib} \label{\detokenize{api/backend_cairo_api:a-cairo-backend-for-matplotlib}}\begin{quote}\begin{description} \item[{Author}] \leavevmode Steve Chaplin and others \end{description}\end{quote} This backend depends on cairocffi or pycairo. \index{ArrayWrapper (class in matplotlib.backends.backend\_cairo)@\spxentry{ArrayWrapper}\spxextra{class in matplotlib.backends.backend\_cairo}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.ArrayWrapper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.}}\sphinxbfcode{\sphinxupquote{ArrayWrapper}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} Thin wrapper around numpy ndarray to expose the interface expected by cairocffi. Basically replicates the array.array interface. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \index{buffer\_info() (matplotlib.backends.backend\_cairo.ArrayWrapper method)@\spxentry{buffer\_info()}\spxextra{matplotlib.backends.backend\_cairo.ArrayWrapper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.ArrayWrapper.buffer_info}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{buffer\_info}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{FigureCanvas (in module matplotlib.backends.backend\_cairo)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_cairo}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.FigureCanvasCairo}}}}} \end{fulllineitems} \index{FigureCanvasCairo (class in matplotlib.backends.backend\_cairo)@\spxentry{FigureCanvasCairo}\spxextra{class in matplotlib.backends.backend\_cairo}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.}}\sphinxbfcode{\sphinxupquote{FigureCanvasCairo}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} \index{print\_pdf() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_pdf()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_pdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_pdf}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_png() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_png()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_png}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_png}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_ps() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_ps()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_ps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_ps}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_raw() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_raw()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_raw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_raw}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_rgba() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_rgba()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_rgba}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_svg() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_svg()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_svg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_svg}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_svgz() (matplotlib.backends.backend\_cairo.FigureCanvasCairo method)@\spxentry{print\_svgz()}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.print_svgz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_svgz}}}{\emph{self}, \emph{fobj}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{supports\_blit (matplotlib.backends.backend\_cairo.FigureCanvasCairo attribute)@\spxentry{supports\_blit}\spxextra{matplotlib.backends.backend\_cairo.FigureCanvasCairo attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.FigureCanvasCairo.supports_blit}}\pysigline{\sphinxbfcode{\sphinxupquote{supports\_blit}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \end{fulllineitems} \index{GraphicsContextCairo (class in matplotlib.backends.backend\_cairo)@\spxentry{GraphicsContextCairo}\spxextra{class in matplotlib.backends.backend\_cairo}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.}}\sphinxbfcode{\sphinxupquote{GraphicsContextCairo}}}{\emph{renderer}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}} \index{get\_rgb() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{get\_rgb()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.get_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rgb}}}{\emph{self}}{} Return a tuple of three or four floats from 0-1. \end{fulllineitems} \index{restore() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{restore()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.restore}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{restore}}}{\emph{self}}{} Restore the graphics context from the stack - needed only for backends that save graphics contexts on a stack. \end{fulllineitems} \index{set\_alpha() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_alpha()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha value used for blending - not supported on all backends. If \sphinxcode{\sphinxupquote{alpha=None}} (the default), the alpha components of the foreground and fill colors will be used to set their respective transparencies (where applicable); otherwise, \sphinxcode{\sphinxupquote{alpha}} will override them. \end{fulllineitems} \index{set\_capstyle() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle to be one of ('butt', 'round', 'projecting'). \end{fulllineitems} \index{set\_clip\_path() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}}{} Set the clip path and transformation. Path should be a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPath}}}}} instance. \end{fulllineitems} \index{set\_clip\_rectangle() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_clip\_rectangle()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_clip_rectangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_rectangle}}}{\emph{self}, \emph{rectangle}}{} Set the clip rectangle with sequence (left, bottom, width, height) \end{fulllineitems} \index{set\_dashes() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_dashes()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{offset}, \emph{dashes}}{} Set the dash style for the gc. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dash\_offset}}] \leavevmode{[}float{]} is the offset (usually 0). \item[{\sphinxstylestrong{dash\_list}}] \leavevmode{[}array\_like{]} specifies the on-off sequence as points. \sphinxcode{\sphinxupquote{(None, None)}} specifies a solid line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_foreground() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_foreground()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_foreground}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_foreground}}}{\emph{self}, \emph{fg}, \emph{isRGBA=None}}{} Set the foreground color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fg}}] \leavevmode{[}color{]} \item[{\sphinxstylestrong{isRGBA}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{fg} is known to be an \sphinxcode{\sphinxupquote{(r, g, b, a)}} tuple, \sphinxstyleemphasis{isRGBA} can be set to True to improve performance. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the join style to be one of ('miter', 'round', 'bevel'). \end{fulllineitems} \index{set\_linewidth() (matplotlib.backends.backend\_cairo.GraphicsContextCairo method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.backends.backend\_cairo.GraphicsContextCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.GraphicsContextCairo.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{w}}{} Set the linewidth in points. \end{fulllineitems} \end{fulllineitems} \index{RendererCairo (class in matplotlib.backends.backend\_cairo)@\spxentry{RendererCairo}\spxextra{class in matplotlib.backends.backend\_cairo}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_cairo.}}\sphinxbfcode{\sphinxupquote{RendererCairo}}}{\emph{dpi}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} \index{convert\_path() (matplotlib.backends.backend\_cairo.RendererCairo static method)@\spxentry{convert\_path()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.convert_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{convert\_path}}}{\emph{ctx}, \emph{path}, \emph{transform}, \emph{clip=None}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \index{draw\_image() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{draw\_image()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that \sphinxcode{\sphinxupquote{option\_scale\_image()}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{fontangles (matplotlib.backends.backend\_cairo.RendererCairo attribute)@\spxentry{fontangles}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.fontangles}}\pysigline{\sphinxbfcode{\sphinxupquote{fontangles}}\sphinxbfcode{\sphinxupquote{ = \{'italic': \textless{}MyCairoCffi name='mock.FONT\_SLANT\_ITALIC' id='140709215976696'\textgreater{}, 'normal': \textless{}MyCairoCffi name='mock.FONT\_SLANT\_NORMAL' id='140709216108104'\textgreater{}, 'oblique': \textless{}MyCairoCffi name='mock.FONT\_SLANT\_OBLIQUE' id='140709215715224'\textgreater{}\}}}} \end{fulllineitems} \index{fontweights (matplotlib.backends.backend\_cairo.RendererCairo attribute)@\spxentry{fontweights}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.fontweights}}\pysigline{\sphinxbfcode{\sphinxupquote{fontweights}}\sphinxbfcode{\sphinxupquote{ = \{100: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 200: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 300: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 400: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 500: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 600: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 700: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 800: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 900: \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 'ultralight': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 'light': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 'normal': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 'medium': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 'regular': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_NORMAL' id='140709216242208'\textgreater{}, 'semibold': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 'bold': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 'heavy': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 'ultrabold': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}, 'black': \textless{}MyCairoCffi name='mock.FONT\_WEIGHT\_BOLD' id='140709216373672'\textgreater{}\}}}} \end{fulllineitems} \index{get\_canvas\_width\_height() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{get\_canvas\_width\_height()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.get_canvas_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_canvas\_width\_height}}}{\emph{self}}{} Return the canvas width and height in display coords. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{} Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string \sphinxstyleemphasis{s} with {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} \sphinxstyleemphasis{prop} \end{fulllineitems} \index{new\_gc() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{new\_gc()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a \sphinxcode{\sphinxupquote{GraphicsContextBase}}. \end{fulllineitems} \index{points\_to\_pixels() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{points\_to\_pixels()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.points_to_pixels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{points\_to\_pixels}}}{\emph{self}, \emph{points}}{} Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{points} \PYG{n}{to} \PYG{n}{pixels} \PYG{o}{=} \PYG{n}{points} \PYG{o}{*} \PYG{n}{pixels\PYGZus{}per\PYGZus{}inch}\PYG{o}{/}\PYG{l+m+mf}{72.0} \PYG{o}{*} \PYG{n}{dpi}\PYG{o}{/}\PYG{l+m+mf}{72.0} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar or array\_like{]} a float or a numpy array of float \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Points converted to pixels}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ctx\_from\_surface() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{set\_ctx\_from\_surface()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.set_ctx_from_surface}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ctx\_from\_surface}}}{\emph{self}, \emph{surface}}{}~ \end{fulllineitems} \index{set\_width\_height() (matplotlib.backends.backend\_cairo.RendererCairo method)@\spxentry{set\_width\_height()}\spxextra{matplotlib.backends.backend\_cairo.RendererCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_cairo_api:matplotlib.backends.backend_cairo.RendererCairo.set_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width\_height}}}{\emph{self}, \emph{width}, \emph{height}}{}~ \end{fulllineitems} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_gtk3agg}}} \label{\detokenize{api/backend_gtk3agg_api:matplotlib-backends-backend-gtk3agg}}\label{\detokenize{api/backend_gtk3agg_api::doc}} \sphinxstylestrong{TODO} We'll add this later, importing the gtk3 backends requires an active X-session, which is not compatible with cron jobs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_gtk3cairo}}} \label{\detokenize{api/backend_gtk3cairo_api:matplotlib-backends-backend-gtk3cairo}}\label{\detokenize{api/backend_gtk3cairo_api::doc}} \sphinxstylestrong{TODO} We'll add this later, importing the gtk3 backends requires an active X-session, which is not compatible with cron jobs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_nbagg}}} \label{\detokenize{api/backend_nbagg_api:module-matplotlib.backends.backend_nbagg}}\label{\detokenize{api/backend_nbagg_api:matplotlib-backends-backend-nbagg}}\label{\detokenize{api/backend_nbagg_api::doc}}\index{matplotlib.backends.backend\_nbagg (module)@\spxentry{matplotlib.backends.backend\_nbagg}\spxextra{module}} Interactive figures in the IPython notebook \index{CommSocket (class in matplotlib.backends.backend\_nbagg)@\spxentry{CommSocket}\spxextra{class in matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{CommSocket}}}{\emph{manager}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Manages the Comm connection between IPython and the browser (client). Comms are 2 way, with the CommSocket being able to publish a message via the send\_json method, and handle a message with on\_message. On the JS side figure.send\_message and figure.ws.onmessage do the sending and receiving respectively. \index{is\_open() (matplotlib.backends.backend\_nbagg.CommSocket method)@\spxentry{is\_open()}\spxextra{matplotlib.backends.backend\_nbagg.CommSocket method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket.is_open}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_open}}}{\emph{self}}{}~ \end{fulllineitems} \index{on\_close() (matplotlib.backends.backend\_nbagg.CommSocket method)@\spxentry{on\_close()}\spxextra{matplotlib.backends.backend\_nbagg.CommSocket method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket.on_close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_close}}}{\emph{self}}{}~ \end{fulllineitems} \index{on\_message() (matplotlib.backends.backend\_nbagg.CommSocket method)@\spxentry{on\_message()}\spxextra{matplotlib.backends.backend\_nbagg.CommSocket method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket.on_message}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_message}}}{\emph{self}, \emph{message}}{}~ \end{fulllineitems} \index{send\_binary() (matplotlib.backends.backend\_nbagg.CommSocket method)@\spxentry{send\_binary()}\spxextra{matplotlib.backends.backend\_nbagg.CommSocket method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket.send_binary}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{send\_binary}}}{\emph{self}, \emph{blob}}{}~ \end{fulllineitems} \index{send\_json() (matplotlib.backends.backend\_nbagg.CommSocket method)@\spxentry{send\_json()}\spxextra{matplotlib.backends.backend\_nbagg.CommSocket method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.CommSocket.send_json}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{send\_json}}}{\emph{self}, \emph{content}}{}~ \end{fulllineitems} \end{fulllineitems} \index{FigureCanvas (in module matplotlib.backends.backend\_nbagg)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureCanvasNbAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.FigureCanvasNbAgg}}}}} \end{fulllineitems} \index{FigureCanvasNbAgg (class in matplotlib.backends.backend\_nbagg)@\spxentry{FigureCanvasNbAgg}\spxextra{class in matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureCanvasNbAgg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{FigureCanvasNbAgg}}}{\emph{*args}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backends.backend\_webagg\_core.FigureCanvasWebAggCore}} \index{new\_timer() (matplotlib.backends.backend\_nbagg.FigureCanvasNbAgg method)@\spxentry{new\_timer()}\spxextra{matplotlib.backends.backend\_nbagg.FigureCanvasNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureCanvasNbAgg.new_timer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_timer}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Creates a new backend-specific subclass of \sphinxcode{\sphinxupquote{backend\_bases.Timer}}. This is useful for getting periodic events through the backend's native event loop. Implemented only for backends with GUIs. \begin{quote}\begin{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}scalar{]} Timer interval in milliseconds \item[{\sphinxstylestrong{callbacks}}] \leavevmode{[}List{[}Tuple{[}callable, Tuple, Dict{]}{]}{]} Sequence of (func, args, kwargs) where \sphinxcode{\sphinxupquote{func(*args, **kwargs)}} will be executed by the timer every \sphinxstyleemphasis{interval}. callbacks which return \sphinxcode{\sphinxupquote{False}} or \sphinxcode{\sphinxupquote{0}} will be removed from the timer. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{timer} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{new\PYGZus{}timer}\PYG{p}{(}\PYG{n}{callbacks}\PYG{o}{=}\PYG{p}{[}\PYG{p}{(}\PYG{n}{f1}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{p}{)}\PYG{p}{,} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{\PYGZcb{}}\PYG{p}{)}\PYG{p}{,}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \end{fulllineitems} \index{FigureManager (in module matplotlib.backends.backend\_nbagg)@\spxentry{FigureManager}\spxextra{in module matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManager}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{FigureManager}}} alias of {\hyperref[\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg}}}}} \end{fulllineitems} \index{FigureManagerNbAgg (class in matplotlib.backends.backend\_nbagg)@\spxentry{FigureManagerNbAgg}\spxextra{class in matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{FigureManagerNbAgg}}}{\emph{canvas}, \emph{num}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backends.backend\_webagg\_core.FigureManagerWebAgg}} \index{ToolbarCls (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg attribute)@\spxentry{ToolbarCls}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.ToolbarCls}}\pysigline{\sphinxbfcode{\sphinxupquote{ToolbarCls}}} alias of {\hyperref[\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.NavigationIPy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NavigationIPy}}}}} \end{fulllineitems} \index{clearup\_closed() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{clearup\_closed()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.clearup_closed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clearup\_closed}}}{\emph{self}}{} Clear up any closed Comms. \end{fulllineitems} \index{connected (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg attribute)@\spxentry{connected}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.connected}}\pysigline{\sphinxbfcode{\sphinxupquote{connected}}}~ \end{fulllineitems} \index{destroy() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{destroy()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.destroy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{destroy}}}{\emph{self}}{}~ \end{fulllineitems} \index{display\_js() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{display\_js()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.display_js}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{display\_js}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_javascript() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg class method)@\spxentry{get\_javascript()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.get_javascript}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{get\_javascript}}}{\emph{stream=None}}{}~ \end{fulllineitems} \index{remove\_comm() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{remove\_comm()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.remove_comm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_comm}}}{\emph{self}, \emph{comm\_id}}{}~ \end{fulllineitems} \index{reshow() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{reshow()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.reshow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reshow}}}{\emph{self}}{} A special method to re-show the figure in the notebook. \end{fulllineitems} \index{show() (matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method)@\spxentry{show()}\spxextra{matplotlib.backends.backend\_nbagg.FigureManagerNbAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.FigureManagerNbAgg.show}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{show}}}{\emph{self}}{} For GUI backends, show the figure window and redraw. For non-GUI backends, raise an exception to be caught by {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show()}}}}}, for an optional warning. \end{fulllineitems} \end{fulllineitems} \index{NavigationIPy (class in matplotlib.backends.backend\_nbagg)@\spxentry{NavigationIPy}\spxextra{class in matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.NavigationIPy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{NavigationIPy}}}{\emph{canvas}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backends.backend\_webagg\_core.NavigationToolbar2WebAgg}} \index{toolitems (matplotlib.backends.backend\_nbagg.NavigationIPy attribute)@\spxentry{toolitems}\spxextra{matplotlib.backends.backend\_nbagg.NavigationIPy attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.NavigationIPy.toolitems}}\pysigline{\sphinxbfcode{\sphinxupquote{toolitems}}\sphinxbfcode{\sphinxupquote{ = {[}('Home', 'Reset original view', 'fa fa-home icon-home', 'home'), ('Back', 'Back to previous view', 'fa fa-arrow-left icon-arrow-left', 'back'), ('Forward', 'Forward to next view', 'fa fa-arrow-right icon-arrow-right', 'forward'), (None, None, None, None), ('Pan', 'Pan axes with left mouse, zoom with right', 'fa fa-arrows icon-move', 'pan'), ('Zoom', 'Zoom to rectangle', 'fa fa-square-o icon-check-empty', 'zoom'), (None, None, None, None), ('Download', 'Download plot', 'fa fa-floppy-o icon-save', 'download'){]}}}} \end{fulllineitems} \end{fulllineitems} \index{connection\_info() (in module matplotlib.backends.backend\_nbagg)@\spxentry{connection\_info()}\spxextra{in module matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.connection_info}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{connection\_info}}}{}{} Return a string showing the figure and connection status for the backend. This is intended as a diagnostic tool, and not for general use. \end{fulllineitems} \index{new\_figure\_manager\_given\_figure() (in module matplotlib.backends.backend\_nbagg)@\spxentry{new\_figure\_manager\_given\_figure()}\spxextra{in module matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.new_figure_manager_given_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{new\_figure\_manager\_given\_figure}}}{\emph{num}, \emph{figure}}{} Create a new figure manager instance for the given figure. \end{fulllineitems} \index{show() (in module matplotlib.backends.backend\_nbagg)@\spxentry{show()}\spxextra{in module matplotlib.backends.backend\_nbagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.show}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_nbagg.}}\sphinxbfcode{\sphinxupquote{show}}}{\emph{*args}, \emph{block=None}, \emph{**kwargs}}{} Show all figures. {\hyperref[\detokenize{api/backend_nbagg_api:matplotlib.backends.backend_nbagg.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}} blocks by calling \sphinxcode{\sphinxupquote{mainloop}} if \sphinxstyleemphasis{block} is \sphinxcode{\sphinxupquote{True}}, or if it is \sphinxcode{\sphinxupquote{None}} and we are neither in IPython's \sphinxcode{\sphinxupquote{\%pylab}} mode, nor in \sphinxcode{\sphinxupquote{interactive}} mode. \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_pdf}}} \label{\detokenize{api/backend_pdf_api:module-matplotlib.backends.backend_pdf}}\label{\detokenize{api/backend_pdf_api:matplotlib-backends-backend-pdf}}\label{\detokenize{api/backend_pdf_api::doc}}\index{matplotlib.backends.backend\_pdf (module)@\spxentry{matplotlib.backends.backend\_pdf}\spxextra{module}} A PDF matplotlib backend Author: Jouni K Seppänen \textless{}\sphinxhref{mailto:jks@iki.fi}{jks@iki.fi}\textgreater{} \index{FigureCanvas (in module matplotlib.backends.backend\_pdf)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.FigureCanvasPdf}}}}} \end{fulllineitems} \index{FigureCanvasPdf (class in matplotlib.backends.backend\_pdf)@\spxentry{FigureCanvasPdf}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{FigureCanvasPdf}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} The canvas the figure renders into. Calls the draw and print fig methods, creates the renderers, etc... \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} A high-level Figure instance \end{description} \end{description}\end{quote} \index{draw() (matplotlib.backends.backend\_pdf.FigureCanvasPdf method)@\spxentry{draw()}\spxextra{matplotlib.backends.backend\_pdf.FigureCanvasPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}}{} Render the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \end{fulllineitems} \index{filetypes (matplotlib.backends.backend\_pdf.FigureCanvasPdf attribute)@\spxentry{filetypes}\spxextra{matplotlib.backends.backend\_pdf.FigureCanvasPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf.filetypes}}\pysigline{\sphinxbfcode{\sphinxupquote{filetypes}}\sphinxbfcode{\sphinxupquote{ = \{'pdf': 'Portable Document Format'\}}}} \end{fulllineitems} \index{fixed\_dpi (matplotlib.backends.backend\_pdf.FigureCanvasPdf attribute)@\spxentry{fixed\_dpi}\spxextra{matplotlib.backends.backend\_pdf.FigureCanvasPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf.fixed_dpi}}\pysigline{\sphinxbfcode{\sphinxupquote{fixed\_dpi}}\sphinxbfcode{\sphinxupquote{ = 72}}} \end{fulllineitems} \index{get\_default\_filetype() (matplotlib.backends.backend\_pdf.FigureCanvasPdf method)@\spxentry{get\_default\_filetype()}\spxextra{matplotlib.backends.backend\_pdf.FigureCanvasPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf.get_default_filetype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_filetype}}}{\emph{self}}{} Get the default savefig file format as specified in rcParam \sphinxcode{\sphinxupquote{savefig.format}}. Returned string excludes period. Overridden in backends that only support a single file type. \end{fulllineitems} \index{print\_pdf() (matplotlib.backends.backend\_pdf.FigureCanvasPdf method)@\spxentry{print\_pdf()}\spxextra{matplotlib.backends.backend\_pdf.FigureCanvasPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.FigureCanvasPdf.print_pdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_pdf}}}{\emph{self}, \emph{filename}, \emph{*}, \emph{dpi=72}, \emph{bbox\_inches\_restore=None}, \emph{metadata=None}, \emph{**kwargs}}{}~ \end{fulllineitems} \end{fulllineitems} \index{GraphicsContextPdf (class in matplotlib.backends.backend\_pdf)@\spxentry{GraphicsContextPdf}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{GraphicsContextPdf}}}{\emph{file}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}} \index{alpha\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{alpha\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.alpha_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{alpha\_cmd}}}{\emph{self}, \emph{alpha}, \emph{forced}, \emph{effective\_alphas}}{}~ \end{fulllineitems} \index{capstyle\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{capstyle\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.capstyle_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{capstyle\_cmd}}}{\emph{self}, \emph{style}}{}~ \end{fulllineitems} \index{capstyles (matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute)@\spxentry{capstyles}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.capstyles}}\pysigline{\sphinxbfcode{\sphinxupquote{capstyles}}\sphinxbfcode{\sphinxupquote{ = \{'butt': 0, 'projecting': 2, 'round': 1\}}}} \end{fulllineitems} \index{clip\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{clip\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.clip_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clip\_cmd}}}{\emph{self}, \emph{cliprect}, \emph{clippath}}{} Set clip rectangle. Calls self.pop() and self.push(). \end{fulllineitems} \index{commands (matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute)@\spxentry{commands}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.commands}}\pysigline{\sphinxbfcode{\sphinxupquote{commands}}\sphinxbfcode{\sphinxupquote{ = ((('\_cliprect', '\_clippath'), \textless{}function GraphicsContextPdf.clip\_cmd\textgreater{}), (('\_alpha', '\_forced\_alpha', '\_effective\_alphas'), \textless{}function GraphicsContextPdf.alpha\_cmd\textgreater{}), (('\_capstyle',), \textless{}function GraphicsContextPdf.capstyle\_cmd\textgreater{}), (('\_fillcolor',), \textless{}function GraphicsContextPdf.fillcolor\_cmd\textgreater{}), (('\_joinstyle',), \textless{}function GraphicsContextPdf.joinstyle\_cmd\textgreater{}), (('\_linewidth',), \textless{}function GraphicsContextPdf.linewidth\_cmd\textgreater{}), (('\_dashes',), \textless{}function GraphicsContextPdf.dash\_cmd\textgreater{}), (('\_rgb',), \textless{}function GraphicsContextPdf.rgb\_cmd\textgreater{}), (('\_hatch', '\_hatch\_color'), \textless{}function GraphicsContextPdf.hatch\_cmd\textgreater{}))}}} \end{fulllineitems} \index{copy\_properties() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{copy\_properties()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.copy_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy\_properties}}}{\emph{self}, \emph{other}}{} Copy properties of other into self. \end{fulllineitems} \index{dash\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{dash\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.dash_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{dash\_cmd}}}{\emph{self}, \emph{dashes}}{}~ \end{fulllineitems} \index{delta() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{delta()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.delta}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{delta}}}{\emph{self}, \emph{other}}{} Copy properties of other into self and return PDF commands needed to transform self into other. \end{fulllineitems} \index{fill() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{fill()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fill}}}{\emph{self}, \emph{*args}}{} Predicate: does the path need to be filled? An optional argument can be used to specify an alternative \_fillcolor, as needed by RendererPdf.draw\_markers. \end{fulllineitems} \index{fillcolor\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{fillcolor\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.fillcolor_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fillcolor\_cmd}}}{\emph{self}, \emph{rgb}}{}~ \end{fulllineitems} \index{finalize() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{finalize()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.finalize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize}}}{\emph{self}}{} Make sure every pushed graphics state is popped. \end{fulllineitems} \index{hatch\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{hatch\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.hatch_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hatch\_cmd}}}{\emph{self}, \emph{hatch}, \emph{hatch\_color}}{}~ \end{fulllineitems} \index{joinstyle\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{joinstyle\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.joinstyle_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{joinstyle\_cmd}}}{\emph{self}, \emph{style}}{}~ \end{fulllineitems} \index{joinstyles (matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute)@\spxentry{joinstyles}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.joinstyles}}\pysigline{\sphinxbfcode{\sphinxupquote{joinstyles}}\sphinxbfcode{\sphinxupquote{ = \{'bevel': 2, 'miter': 0, 'round': 1\}}}} \end{fulllineitems} \index{linewidth\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{linewidth\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.linewidth_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{linewidth\_cmd}}}{\emph{self}, \emph{width}}{}~ \end{fulllineitems} \index{paint() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{paint()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.paint}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{paint}}}{\emph{self}}{} Return the appropriate pdf operator to cause the path to be stroked, filled, or both. \end{fulllineitems} \index{pop() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{pop()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.pop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop}}}{\emph{self}}{}~ \end{fulllineitems} \index{push() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{push()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.push}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{push}}}{\emph{self}}{}~ \end{fulllineitems} \index{rgb\_cmd() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{rgb\_cmd()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.rgb_cmd}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rgb\_cmd}}}{\emph{self}, \emph{rgb}}{}~ \end{fulllineitems} \index{stroke() (matplotlib.backends.backend\_pdf.GraphicsContextPdf method)@\spxentry{stroke()}\spxextra{matplotlib.backends.backend\_pdf.GraphicsContextPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.GraphicsContextPdf.stroke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stroke}}}{\emph{self}}{} Predicate: does the path need to be stroked (its outline drawn)? This tests for the various conditions that disable stroking the path, in which case it would presumably be filled. \end{fulllineitems} \end{fulllineitems} \index{Name (class in matplotlib.backends.backend\_pdf)@\spxentry{Name}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{Name}}}{\emph{name}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} PDF name object. \index{hexify() (matplotlib.backends.backend\_pdf.Name static method)@\spxentry{hexify()}\spxextra{matplotlib.backends.backend\_pdf.Name static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Name.hexify}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{hexify}}}{\emph{match}}{}~ \end{fulllineitems} \index{name (matplotlib.backends.backend\_pdf.Name attribute)@\spxentry{name}\spxextra{matplotlib.backends.backend\_pdf.Name attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Name.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}}~ \end{fulllineitems} \index{pdfRepr() (matplotlib.backends.backend\_pdf.Name method)@\spxentry{pdfRepr()}\spxextra{matplotlib.backends.backend\_pdf.Name method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Name.pdfRepr}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pdfRepr}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{Operator (class in matplotlib.backends.backend\_pdf)@\spxentry{Operator}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Operator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{Operator}}}{\emph{op}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} PDF operator object. \index{op (matplotlib.backends.backend\_pdf.Operator attribute)@\spxentry{op}\spxextra{matplotlib.backends.backend\_pdf.Operator attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Operator.op}}\pysigline{\sphinxbfcode{\sphinxupquote{op}}}~ \end{fulllineitems} \index{pdfRepr() (matplotlib.backends.backend\_pdf.Operator method)@\spxentry{pdfRepr()}\spxextra{matplotlib.backends.backend\_pdf.Operator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Operator.pdfRepr}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pdfRepr}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{PdfFile (class in matplotlib.backends.backend\_pdf)@\spxentry{PdfFile}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{PdfFile}}}{\emph{filename}, \emph{metadata=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} PDF file object. \index{addGouraudTriangles() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{addGouraudTriangles()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.addGouraudTriangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{addGouraudTriangles}}}{\emph{self}, \emph{points}, \emph{colors}}{}~ \end{fulllineitems} \index{alphaState() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{alphaState()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.alphaState}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{alphaState}}}{\emph{self}, \emph{alpha}}{} Return name of an ExtGState that sets alpha to the given value. \end{fulllineitems} \index{beginStream() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{beginStream()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.beginStream}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{beginStream}}}{\emph{self}, \emph{id}, \emph{len}, \emph{extra=None}, \emph{png=None}}{}~ \end{fulllineitems} \index{close() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{close()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close}}}{\emph{self}}{} Flush all buffers and free all resources. \end{fulllineitems} \index{createType1Descriptor() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{createType1Descriptor()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.createType1Descriptor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{createType1Descriptor}}}{\emph{self}, \emph{t1font}, \emph{fontfile}}{}~ \end{fulllineitems} \index{dviFontName() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{dviFontName()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.dviFontName}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{dviFontName}}}{\emph{self}, \emph{dvifont}}{} Given a dvi font object, return a name suitable for Op.selectfont. This registers the font information in self.dviFontInfo if not yet registered. \end{fulllineitems} \index{embedTTF() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{embedTTF()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.embedTTF}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{embedTTF}}}{\emph{self}, \emph{filename}, \emph{characters}}{} Embed the TTF font from the named file into the document. \end{fulllineitems} \index{endStream() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{endStream()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.endStream}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{endStream}}}{\emph{self}}{}~ \end{fulllineitems} \index{finalize() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{finalize()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.finalize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize}}}{\emph{self}}{} Write out the various deferred objects and the pdf end matter. \end{fulllineitems} \index{fontName() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{fontName()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.fontName}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fontName}}}{\emph{self}, \emph{fontprop}}{} Select a font based on fontprop and return a name suitable for Op.selectfont. If fontprop is a string, it will be interpreted as the filename of the font. \end{fulllineitems} \index{hatchPattern() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{hatchPattern()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.hatchPattern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hatchPattern}}}{\emph{self}, \emph{hatch\_style}}{}~ \end{fulllineitems} \index{imageObject() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{imageObject()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.imageObject}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{imageObject}}}{\emph{self}, \emph{image}}{} Return name of an image XObject representing the given image. \end{fulllineitems} \index{markerObject() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{markerObject()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.markerObject}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{markerObject}}}{\emph{self}, \emph{path}, \emph{trans}, \emph{fill}, \emph{stroke}, \emph{lw}, \emph{joinstyle}, \emph{capstyle}}{} Return name of a marker XObject representing the given path. \end{fulllineitems} \index{newPage() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{newPage()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.newPage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{newPage}}}{\emph{self}, \emph{width}, \emph{height}}{}~ \end{fulllineitems} \index{newTextnote() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{newTextnote()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.newTextnote}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{newTextnote}}}{\emph{self, text, positionRect={[}-100, -100, 0, 0{]}}}{}~ \end{fulllineitems} \index{output() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{output()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.output}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{output}}}{\emph{self}, \emph{*data}}{}~ \end{fulllineitems} \index{pathCollectionObject() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{pathCollectionObject()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.pathCollectionObject}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pathCollectionObject}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{trans}, \emph{padding}, \emph{filled}, \emph{stroked}}{}~ \end{fulllineitems} \index{pathOperations() (matplotlib.backends.backend\_pdf.PdfFile static method)@\spxentry{pathOperations()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.pathOperations}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{pathOperations}}}{\emph{path}, \emph{transform}, \emph{clip=None}, \emph{simplify=None}, \emph{sketch=None}}{}~ \end{fulllineitems} \index{recordXref() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{recordXref()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.recordXref}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{recordXref}}}{\emph{self}, \emph{id}}{}~ \end{fulllineitems} \index{reserveObject() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{reserveObject()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.reserveObject}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reserveObject}}}{\emph{self}, \emph{name=''}}{} Reserve an ID for an indirect object. The name is used for debugging in case we forget to print out the object with writeObject. \end{fulllineitems} \index{texFontMap (matplotlib.backends.backend\_pdf.PdfFile attribute)@\spxentry{texFontMap}\spxextra{matplotlib.backends.backend\_pdf.PdfFile attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.texFontMap}}\pysigline{\sphinxbfcode{\sphinxupquote{texFontMap}}}~ \end{fulllineitems} \index{write() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{write()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.write}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{write}}}{\emph{self}, \emph{data}}{}~ \end{fulllineitems} \index{writeFonts() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeFonts()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeFonts}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeGouraudTriangles() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeGouraudTriangles()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeGouraudTriangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeGouraudTriangles}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeHatches() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeHatches()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeHatches}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeHatches}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeImages() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeImages()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeImages}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeImages}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeInfoDict() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeInfoDict()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeInfoDict}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeInfoDict}}}{\emph{self}}{} Write out the info dictionary, checking it for good form \end{fulllineitems} \index{writeMarkers() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeMarkers()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeMarkers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeMarkers}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeObject() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeObject()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeObject}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeObject}}}{\emph{self}, \emph{object}, \emph{contents}}{}~ \end{fulllineitems} \index{writePath() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writePath()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writePath}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writePath}}}{\emph{self}, \emph{path}, \emph{transform}, \emph{clip=False}, \emph{sketch=None}}{}~ \end{fulllineitems} \index{writePathCollectionTemplates() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writePathCollectionTemplates()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writePathCollectionTemplates}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writePathCollectionTemplates}}}{\emph{self}}{}~ \end{fulllineitems} \index{writeTrailer() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeTrailer()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeTrailer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeTrailer}}}{\emph{self}}{} Write out the PDF trailer. \end{fulllineitems} \index{writeXref() (matplotlib.backends.backend\_pdf.PdfFile method)@\spxentry{writeXref()}\spxextra{matplotlib.backends.backend\_pdf.PdfFile method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile.writeXref}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{writeXref}}}{\emph{self}}{} Write out the xref table. \end{fulllineitems} \end{fulllineitems} \index{PdfPages (class in matplotlib.backends.backend\_pdf)@\spxentry{PdfPages}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{PdfPages}}}{\emph{filename}, \emph{keep\_empty=True}, \emph{metadata=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A multi-page PDF file. \subsubsection*{Notes} In reality {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages}}}}} is a thin wrapper around {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfFile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfFile}}}}}, in order to avoid confusion when using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}} and forgetting the format argument. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{c+c1}{\PYGZsh{} Initialize:} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{PdfPages}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{foo.pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{pdf}\PYG{p}{:} \PYG{g+gp}{... } \PYG{c+c1}{\PYGZsh{} As many times as you like, create a figure fig and save it:} \PYG{g+gp}{... } \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{... } \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \PYG{g+gp}{... } \PYG{c+c1}{\PYGZsh{} When no figure is specified the current figure is saved} \PYG{g+gp}{... } \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Create a new PdfPages object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}str{]} Plots using {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages.savefig()}}}}} will be written to a file at this location. The file is opened at once and any older file with the same name is overwritten. \item[{\sphinxstylestrong{keep\_empty}}] \leavevmode{[}bool, optional{]} If set to False, then empty pdf files will be deleted automatically when closed. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}dictionary, optional{]} Information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'), e.g.: \sphinxcode{\sphinxupquote{\{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome fig'\}}} The standard keys are \sphinxcode{\sphinxupquote{'Title'}}, \sphinxcode{\sphinxupquote{'Author'}}, \sphinxcode{\sphinxupquote{'Subject'}}, \sphinxcode{\sphinxupquote{'Keywords'}}, \sphinxcode{\sphinxupquote{'Creator'}}, \sphinxcode{\sphinxupquote{'Producer'}}, \sphinxcode{\sphinxupquote{'CreationDate'}}, \sphinxcode{\sphinxupquote{'ModDate'}}, and \sphinxcode{\sphinxupquote{'Trapped'}}. Values have been predefined for \sphinxcode{\sphinxupquote{'Creator'}}, \sphinxcode{\sphinxupquote{'Producer'}} and \sphinxcode{\sphinxupquote{'CreationDate'}}. They can be removed by setting them to \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. \end{description} \end{description}\end{quote} \index{attach\_note() (matplotlib.backends.backend\_pdf.PdfPages method)@\spxentry{attach\_note()}\spxextra{matplotlib.backends.backend\_pdf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.attach_note}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{attach\_note}}}{\emph{self, text, positionRect={[}-100, -100, 0, 0{]}}}{} Add a new text note to the page to be saved next. The optional positionRect specifies the position of the new note on the page. It is outside the page per default to make sure it is invisible on printouts. \end{fulllineitems} \index{close() (matplotlib.backends.backend\_pdf.PdfPages method)@\spxentry{close()}\spxextra{matplotlib.backends.backend\_pdf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close}}}{\emph{self}}{} Finalize this object, making the underlying file a complete PDF file. \end{fulllineitems} \index{get\_pagecount() (matplotlib.backends.backend\_pdf.PdfPages method)@\spxentry{get\_pagecount()}\spxextra{matplotlib.backends.backend\_pdf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.get_pagecount}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pagecount}}}{\emph{self}}{} Returns the current number of pages in the multipage pdf file. \end{fulllineitems} \index{infodict() (matplotlib.backends.backend\_pdf.PdfPages method)@\spxentry{infodict()}\spxextra{matplotlib.backends.backend\_pdf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.infodict}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{infodict}}}{\emph{self}}{} Return a modifiable information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'). \end{fulllineitems} \index{keep\_empty (matplotlib.backends.backend\_pdf.PdfPages attribute)@\spxentry{keep\_empty}\spxextra{matplotlib.backends.backend\_pdf.PdfPages attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.keep_empty}}\pysigline{\sphinxbfcode{\sphinxupquote{keep\_empty}}}~ \end{fulllineitems} \index{savefig() (matplotlib.backends.backend\_pdf.PdfPages method)@\spxentry{savefig()}\spxextra{matplotlib.backends.backend\_pdf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages.savefig}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{savefig}}}{\emph{self}, \emph{figure=None}, \emph{**kwargs}}{} Saves a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} to this file as a new page. Any other keyword arguments are passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} or int, optional{]} Specifies what figure is saved to file. If not specified, the active figure is saved. If a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance is provided, this figure is saved. If an int is specified, the figure instance to save is looked up by number. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{Reference (class in matplotlib.backends.backend\_pdf)@\spxentry{Reference}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Reference}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{Reference}}}{\emph{id}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} PDF reference object. Use PdfFile.reserveObject() to create References. \index{pdfRepr() (matplotlib.backends.backend\_pdf.Reference method)@\spxentry{pdfRepr()}\spxextra{matplotlib.backends.backend\_pdf.Reference method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Reference.pdfRepr}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pdfRepr}}}{\emph{self}}{}~ \end{fulllineitems} \index{write() (matplotlib.backends.backend\_pdf.Reference method)@\spxentry{write()}\spxextra{matplotlib.backends.backend\_pdf.Reference method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Reference.write}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{write}}}{\emph{self}, \emph{contents}, \emph{file}}{}~ \end{fulllineitems} \end{fulllineitems} \index{RendererPdf (class in matplotlib.backends.backend\_pdf)@\spxentry{RendererPdf}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{RendererPdf}}}{\emph{file}, \emph{image\_dpi}, \emph{height}, \emph{width}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backends.\_backend\_pdf\_ps.RendererPDFPSBase}} \index{afm\_font\_cache (matplotlib.backends.backend\_pdf.RendererPdf attribute)@\spxentry{afm\_font\_cache}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.afm_font_cache}}\pysigline{\sphinxbfcode{\sphinxupquote{afm\_font\_cache}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{check\_gc() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{check\_gc()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.check_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_gc}}}{\emph{self}, \emph{gc}, \emph{fillcolor=None}}{}~ \end{fulllineitems} \index{draw\_gouraud\_triangle() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_gouraud\_triangle()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_gouraud_triangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangle}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{trans}}{} Draw a Gouraud-shaded triangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(3, 2){]} Array of (x, y) points for the triangle. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(3, 4){]} RGBA colors for each point of the triangle. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_gouraud\_triangles() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_gouraud\_triangles()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_gouraud_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangles}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{trans}}{} Draws a series of Gouraud triangles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(N, 3, 2){]} Array of \sphinxstyleemphasis{N} (x, y) points for the triangles. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(N, 3, 4){]} Array of \sphinxstyleemphasis{N} RGBA colors for each point of the triangles. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_image() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_image()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}, \emph{transform=None}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that \sphinxcode{\sphinxupquote{option\_scale\_image()}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{trans}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_mathtext() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_mathtext()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_mathtext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_mathtext}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}}{}~ \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_path\_collection() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_path\_collection()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path\_collection}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{paths}, \emph{all\_transforms}, \emph{offsets}, \emph{offsetTrans}, \emph{facecolors}, \emph{edgecolors}, \emph{linewidths}, \emph{linestyles}, \emph{antialiaseds}, \emph{urls}, \emph{offset\_position}}{} Draws a collection of paths selecting drawing properties from the lists \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{linestyles} and \sphinxstyleemphasis{antialiaseds}. \sphinxstyleemphasis{offsets} is a list of offsets to apply to each of the paths. The offsets in \sphinxstyleemphasis{offsets} are first transformed by \sphinxstyleemphasis{offsetTrans} before being applied. \sphinxstyleemphasis{offset\_position} may be either "screen" or "data" depending on the space that the offsets are in. This provides a fallback implementation of {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} that makes multiple calls to {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods \sphinxcode{\sphinxupquote{\_iter\_collection\_raw\_paths()}} and \sphinxcode{\sphinxupquote{\_iter\_collection()}} are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} can be made globally. \end{fulllineitems} \index{draw\_tex() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{encode\_string() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{encode\_string()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.encode_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{encode\_string}}}{\emph{self}, \emph{s}, \emph{fonttype}}{}~ \end{fulllineitems} \index{finalize() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{finalize()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.finalize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_image\_magnification() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{get\_image\_magnification()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.get_image_magnification}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_image\_magnification}}}{\emph{self}}{} Get the factor by which to magnify images passed to {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. Allows a backend to have images at a different resolution to other artists. \end{fulllineitems} \index{merge\_used\_characters() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{merge\_used\_characters()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.merge_used_characters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{merge\_used\_characters}}}{\emph{self}, \emph{other}}{}~ \end{fulllineitems} \index{new\_gc() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{new\_gc()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a \sphinxcode{\sphinxupquote{GraphicsContextBase}}. \end{fulllineitems} \index{track\_characters() (matplotlib.backends.backend\_pdf.RendererPdf method)@\spxentry{track\_characters()}\spxextra{matplotlib.backends.backend\_pdf.RendererPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.RendererPdf.track_characters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{track\_characters}}}{\emph{self}, \emph{font}, \emph{s}}{} Keeps track of which characters are required from each font. \end{fulllineitems} \end{fulllineitems} \index{Stream (class in matplotlib.backends.backend\_pdf)@\spxentry{Stream}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{Stream}}}{\emph{id}, \emph{len}, \emph{file}, \emph{extra=None}, \emph{png=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} PDF stream object. This has no pdfRepr method. Instead, call begin(), then output the contents of the stream by calling write(), and finally call end(). id: object id of stream; len: an unused Reference object for the length of the stream, or None (to use a memory buffer); file: a PdfFile; extra: a dictionary of extra key-value pairs to include in the stream header; png: if the data is already png compressed, the decode parameters \index{compressobj (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{compressobj}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.compressobj}}\pysigline{\sphinxbfcode{\sphinxupquote{compressobj}}}~ \end{fulllineitems} \index{end() (matplotlib.backends.backend\_pdf.Stream method)@\spxentry{end()}\spxextra{matplotlib.backends.backend\_pdf.Stream method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{end}}}{\emph{self}}{} Finalize stream. \end{fulllineitems} \index{extra (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{extra}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.extra}}\pysigline{\sphinxbfcode{\sphinxupquote{extra}}}~ \end{fulllineitems} \index{file (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{file}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.file}}\pysigline{\sphinxbfcode{\sphinxupquote{file}}}~ \end{fulllineitems} \index{id (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{id}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.id}}\pysigline{\sphinxbfcode{\sphinxupquote{id}}}~ \end{fulllineitems} \index{len (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{len}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.len}}\pysigline{\sphinxbfcode{\sphinxupquote{len}}}~ \end{fulllineitems} \index{pdfFile (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{pdfFile}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.pdfFile}}\pysigline{\sphinxbfcode{\sphinxupquote{pdfFile}}}~ \end{fulllineitems} \index{pos (matplotlib.backends.backend\_pdf.Stream attribute)@\spxentry{pos}\spxextra{matplotlib.backends.backend\_pdf.Stream attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.pos}}\pysigline{\sphinxbfcode{\sphinxupquote{pos}}}~ \end{fulllineitems} \index{write() (matplotlib.backends.backend\_pdf.Stream method)@\spxentry{write()}\spxextra{matplotlib.backends.backend\_pdf.Stream method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Stream.write}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{write}}}{\emph{self}, \emph{data}}{} Write some data on the stream. \end{fulllineitems} \end{fulllineitems} \index{Verbatim (class in matplotlib.backends.backend\_pdf)@\spxentry{Verbatim}\spxextra{class in matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Verbatim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{Verbatim}}}{\emph{x}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Store verbatim PDF command content for later inclusion in the stream. \index{pdfRepr() (matplotlib.backends.backend\_pdf.Verbatim method)@\spxentry{pdfRepr()}\spxextra{matplotlib.backends.backend\_pdf.Verbatim method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.Verbatim.pdfRepr}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pdfRepr}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{fill() (in module matplotlib.backends.backend\_pdf)@\spxentry{fill()}\spxextra{in module matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.fill}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{fill}}}{\emph{strings}, \emph{linelen=75}}{} Make one string from sequence of strings, with whitespace in between. The whitespace is chosen to form lines of at most linelen characters, if possible. \end{fulllineitems} \index{pdfRepr() (in module matplotlib.backends.backend\_pdf)@\spxentry{pdfRepr()}\spxextra{in module matplotlib.backends.backend\_pdf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.pdfRepr}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.}}\sphinxbfcode{\sphinxupquote{pdfRepr}}}{\emph{obj}}{} Map Python objects to PDF syntax. \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_pgf}}} \label{\detokenize{api/backend_pgf_api:module-matplotlib.backends.backend_pgf}}\label{\detokenize{api/backend_pgf_api:matplotlib-backends-backend-pgf}}\label{\detokenize{api/backend_pgf_api::doc}}\index{matplotlib.backends.backend\_pgf (module)@\spxentry{matplotlib.backends.backend\_pgf}\spxextra{module}}\index{FigureCanvas (in module matplotlib.backends.backend\_pgf)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.FigureCanvasPgf}}}}} \end{fulllineitems} \index{FigureCanvasPgf (class in matplotlib.backends.backend\_pgf)@\spxentry{FigureCanvasPgf}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{FigureCanvasPgf}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} \index{filetypes (matplotlib.backends.backend\_pgf.FigureCanvasPgf attribute)@\spxentry{filetypes}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.filetypes}}\pysigline{\sphinxbfcode{\sphinxupquote{filetypes}}\sphinxbfcode{\sphinxupquote{ = \{'pdf': 'LaTeX compiled PGF picture', 'pgf': 'LaTeX PGF picture', 'png': 'Portable Network Graphics'\}}}} \end{fulllineitems} \index{get\_default\_filetype() (matplotlib.backends.backend\_pgf.FigureCanvasPgf method)@\spxentry{get\_default\_filetype()}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.get_default_filetype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_filetype}}}{\emph{self}}{} Get the default savefig file format as specified in rcParam \sphinxcode{\sphinxupquote{savefig.format}}. Returned string excludes period. Overridden in backends that only support a single file type. \end{fulllineitems} \index{get\_renderer() (matplotlib.backends.backend\_pgf.FigureCanvasPgf method)@\spxentry{get\_renderer()}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.get_renderer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_renderer}}}{\emph{self}}{}~ \end{fulllineitems} \index{print\_pdf() (matplotlib.backends.backend\_pgf.FigureCanvasPgf method)@\spxentry{print\_pdf()}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.print_pdf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_pdf}}}{\emph{self}, \emph{fname\_or\_fh}, \emph{*args}, \emph{**kwargs}}{} Use LaTeX to compile a Pgf generated figure to PDF. \end{fulllineitems} \index{print\_pgf() (matplotlib.backends.backend\_pgf.FigureCanvasPgf method)@\spxentry{print\_pgf()}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.print_pgf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_pgf}}}{\emph{self}, \emph{fname\_or\_fh}, \emph{*args}, \emph{**kwargs}}{} Output pgf commands for drawing the figure so it can be included and rendered in latex documents. \end{fulllineitems} \index{print\_png() (matplotlib.backends.backend\_pgf.FigureCanvasPgf method)@\spxentry{print\_png()}\spxextra{matplotlib.backends.backend\_pgf.FigureCanvasPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureCanvasPgf.print_png}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_png}}}{\emph{self}, \emph{fname\_or\_fh}, \emph{*args}, \emph{**kwargs}}{} Use LaTeX to compile a pgf figure to pdf and convert it to png. \end{fulllineitems} \end{fulllineitems} \index{FigureManager (in module matplotlib.backends.backend\_pgf)@\spxentry{FigureManager}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureManager}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{FigureManager}}} alias of {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureManagerPgf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.FigureManagerPgf}}}}} \end{fulllineitems} \index{FigureManagerPgf (class in matplotlib.backends.backend\_pgf)@\spxentry{FigureManagerPgf}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.FigureManagerPgf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{FigureManagerPgf}}}{\emph{canvas}, \emph{num}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureManagerBase}}}}} \end{fulllineitems} \index{GraphicsContextPgf (class in matplotlib.backends.backend\_pgf)@\spxentry{GraphicsContextPgf}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.GraphicsContextPgf}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{GraphicsContextPgf}}} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}} \end{fulllineitems} \index{LatexError@\spxentry{LatexError}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexError}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{LatexError}}}{\emph{message}, \emph{latex\_output=''}}{} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#Exception}{\sphinxcode{\sphinxupquote{Exception}}} \end{fulllineitems} \index{LatexManager (class in matplotlib.backends.backend\_pgf)@\spxentry{LatexManager}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManager}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{LatexManager}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The LatexManager opens an instance of the LaTeX application for determining the metrics of text elements. The LaTeX environment can be modified by setting fonts and/or a custom preamble in the rc parameters. \index{get\_width\_height\_descent() (matplotlib.backends.backend\_pgf.LatexManager method)@\spxentry{get\_width\_height\_descent()}\spxextra{matplotlib.backends.backend\_pgf.LatexManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManager.get_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width\_height\_descent}}}{\emph{self}, \emph{text}, \emph{prop}}{} Get the width, total height and descent for a text typeset by the current LaTeX environment. \end{fulllineitems} \end{fulllineitems} \index{LatexManagerFactory (class in matplotlib.backends.backend\_pgf)@\spxentry{LatexManagerFactory}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManagerFactory}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{LatexManagerFactory}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{get\_latex\_manager() (matplotlib.backends.backend\_pgf.LatexManagerFactory static method)@\spxentry{get\_latex\_manager()}\spxextra{matplotlib.backends.backend\_pgf.LatexManagerFactory static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManagerFactory.get_latex_manager}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_latex\_manager}}}{}{}~ \end{fulllineitems} \index{previous\_instance (matplotlib.backends.backend\_pgf.LatexManagerFactory attribute)@\spxentry{previous\_instance}\spxextra{matplotlib.backends.backend\_pgf.LatexManagerFactory attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.LatexManagerFactory.previous_instance}}\pysigline{\sphinxbfcode{\sphinxupquote{previous\_instance}}\sphinxbfcode{\sphinxupquote{ = None}}} \end{fulllineitems} \end{fulllineitems} \index{PdfPages (class in matplotlib.backends.backend\_pgf)@\spxentry{PdfPages}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{PdfPages}}}{\emph{filename}, \emph{*}, \emph{keep\_empty=True}, \emph{metadata=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A multi-page PDF file using the pgf backend \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{c+c1}{\PYGZsh{} Initialize:} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{PdfPages}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{foo.pdf}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{pdf}\PYG{p}{:} \PYG{g+gp}{... } \PYG{c+c1}{\PYGZsh{} As many times as you like, create a figure fig and save it:} \PYG{g+gp}{... } \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{... } \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \PYG{g+gp}{... } \PYG{c+c1}{\PYGZsh{} When no figure is specified the current figure is saved} \PYG{g+gp}{... } \PYG{n}{pdf}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Create a new PdfPages object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}str{]} Plots using {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages.savefig()}}}}} will be written to a file at this location. Any older file with the same name is overwritten. \item[{\sphinxstylestrong{keep\_empty}}] \leavevmode{[}bool, optional{]} If set to False, then empty pdf files will be deleted automatically when closed. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}dictionary, optional{]} Information dictionary object (see PDF reference section 10.2.1 'Document Information Dictionary'), e.g.: \sphinxcode{\sphinxupquote{\{'Creator': 'My software', 'Author': 'Me', 'Title': 'Awesome fig'\}}} The standard keys are \sphinxcode{\sphinxupquote{'Title'}}, \sphinxcode{\sphinxupquote{'Author'}}, \sphinxcode{\sphinxupquote{'Subject'}}, \sphinxcode{\sphinxupquote{'Keywords'}}, \sphinxcode{\sphinxupquote{'Producer'}}, \sphinxcode{\sphinxupquote{'Creator'}} and \sphinxcode{\sphinxupquote{'Trapped'}}. Values have been predefined for \sphinxcode{\sphinxupquote{'Creator'}} and \sphinxcode{\sphinxupquote{'Producer'}}. They can be removed by setting them to the empty string. \end{description} \end{description}\end{quote} \index{close() (matplotlib.backends.backend\_pgf.PdfPages method)@\spxentry{close()}\spxextra{matplotlib.backends.backend\_pgf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close}}}{\emph{self}}{} Finalize this object, running LaTeX in a temporary directory and moving the final pdf file to \sphinxcode{\sphinxupquote{filename}}. \end{fulllineitems} \index{get\_pagecount() (matplotlib.backends.backend\_pgf.PdfPages method)@\spxentry{get\_pagecount()}\spxextra{matplotlib.backends.backend\_pgf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.get_pagecount}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pagecount}}}{\emph{self}}{} Returns the current number of pages in the multipage pdf file. \end{fulllineitems} \index{keep\_empty (matplotlib.backends.backend\_pgf.PdfPages attribute)@\spxentry{keep\_empty}\spxextra{matplotlib.backends.backend\_pgf.PdfPages attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.keep_empty}}\pysigline{\sphinxbfcode{\sphinxupquote{keep\_empty}}}~ \end{fulllineitems} \index{metadata (matplotlib.backends.backend\_pgf.PdfPages attribute)@\spxentry{metadata}\spxextra{matplotlib.backends.backend\_pgf.PdfPages attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.metadata}}\pysigline{\sphinxbfcode{\sphinxupquote{metadata}}}~ \end{fulllineitems} \index{savefig() (matplotlib.backends.backend\_pgf.PdfPages method)@\spxentry{savefig()}\spxextra{matplotlib.backends.backend\_pgf.PdfPages method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.PdfPages.savefig}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{savefig}}}{\emph{self}, \emph{figure=None}, \emph{**kwargs}}{} Saves a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} to this file as a new page. Any other keyword arguments are passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig()}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} or int, optional{]} Specifies what figure is saved to file. If not specified, the active figure is saved. If a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance is provided, this figure is saved. If an int is specified, the figure instance to save is looked up by number. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{RendererPgf (class in matplotlib.backends.backend\_pgf)@\spxentry{RendererPgf}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{RendererPgf}}}{\emph{figure}, \emph{fh}, \emph{dummy=False}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} Creates a new PGF renderer that translates any drawing instruction into text commands to be interpreted in a latex pgfpicture environment. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} Matplotlib figure to initialize height, width and dpi from. \item[{\sphinxstylestrong{fh}}] \leavevmode{[}file-like{]} File handle for the output of the drawing commands. \end{description} \end{description}\end{quote} \index{draw\_image() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{draw\_image()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}, \emph{transform=None}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.option_scale_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{option\_scale\_image()}}}}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{trans}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_tex() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{flipy() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{flipy()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.flipy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{flipy}}}{\emph{self}}{} Return whether y values increase from top to bottom. Note that this only affects drawing of texts and images. \end{fulllineitems} \index{get\_canvas\_width\_height() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{get\_canvas\_width\_height()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.get_canvas_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_canvas\_width\_height}}}{\emph{self}}{} Return the canvas width and height in display coords. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{} Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string \sphinxstyleemphasis{s} with {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} \sphinxstyleemphasis{prop} \end{fulllineitems} \index{new\_gc() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{new\_gc()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a \sphinxcode{\sphinxupquote{GraphicsContextBase}}. \end{fulllineitems} \index{option\_image\_nocomposite() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{option\_image\_nocomposite()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.option_image_nocomposite}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_image\_nocomposite}}}{\emph{self}}{} Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return \sphinxcode{\sphinxupquote{not rcParams{[}"image.composite\_image"{]}}}. \end{fulllineitems} \index{option\_scale\_image() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{option\_scale\_image()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.option_scale_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_scale\_image}}}{\emph{self}}{} Return whether arbitrary affine transformations in {\hyperref[\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}} are supported (True for most vector backends). \end{fulllineitems} \index{points\_to\_pixels() (matplotlib.backends.backend\_pgf.RendererPgf method)@\spxentry{points\_to\_pixels()}\spxextra{matplotlib.backends.backend\_pgf.RendererPgf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.RendererPgf.points_to_pixels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{points\_to\_pixels}}}{\emph{self}, \emph{points}}{} Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{points} \PYG{n}{to} \PYG{n}{pixels} \PYG{o}{=} \PYG{n}{points} \PYG{o}{*} \PYG{n}{pixels\PYGZus{}per\PYGZus{}inch}\PYG{o}{/}\PYG{l+m+mf}{72.0} \PYG{o}{*} \PYG{n}{dpi}\PYG{o}{/}\PYG{l+m+mf}{72.0} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar or array\_like{]} a float or a numpy array of float \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Points converted to pixels}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{TmpDirCleaner (class in matplotlib.backends.backend\_pgf)@\spxentry{TmpDirCleaner}\spxextra{class in matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.TmpDirCleaner}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{TmpDirCleaner}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{add() (matplotlib.backends.backend\_pgf.TmpDirCleaner static method)@\spxentry{add()}\spxextra{matplotlib.backends.backend\_pgf.TmpDirCleaner static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.TmpDirCleaner.add}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{add}}}{\emph{tmpdir}}{}~ \end{fulllineitems} \index{cleanup\_remaining\_tmpdirs() (matplotlib.backends.backend\_pgf.TmpDirCleaner static method)@\spxentry{cleanup\_remaining\_tmpdirs()}\spxextra{matplotlib.backends.backend\_pgf.TmpDirCleaner static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.TmpDirCleaner.cleanup_remaining_tmpdirs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{cleanup\_remaining\_tmpdirs}}}{}{}~ \end{fulllineitems} \index{remaining\_tmpdirs (matplotlib.backends.backend\_pgf.TmpDirCleaner attribute)@\spxentry{remaining\_tmpdirs}\spxextra{matplotlib.backends.backend\_pgf.TmpDirCleaner attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.TmpDirCleaner.remaining_tmpdirs}}\pysigline{\sphinxbfcode{\sphinxupquote{remaining\_tmpdirs}}\sphinxbfcode{\sphinxupquote{ = \{\}}}} \end{fulllineitems} \end{fulllineitems} \index{common\_texification() (in module matplotlib.backends.backend\_pgf)@\spxentry{common\_texification()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.common_texification}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{common\_texification}}}{\emph{text}}{} Do some necessary and/or useful substitutions for texts to be included in LaTeX documents. \end{fulllineitems} \index{get\_fontspec() (in module matplotlib.backends.backend\_pgf)@\spxentry{get\_fontspec()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.get_fontspec}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{get\_fontspec}}}{}{} Build fontspec preamble from rc. \end{fulllineitems} \index{get\_preamble() (in module matplotlib.backends.backend\_pgf)@\spxentry{get\_preamble()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.get_preamble}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{get\_preamble}}}{}{} Get LaTeX preamble from rc. \end{fulllineitems} \index{get\_texcommand() (in module matplotlib.backends.backend\_pgf)@\spxentry{get\_texcommand()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.get_texcommand}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{get\_texcommand}}}{}{} {[}\sphinxstyleemphasis{Deprecated}{]} Get chosen TeX system from rc. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{make\_pdf\_to\_png\_converter() (in module matplotlib.backends.backend\_pgf)@\spxentry{make\_pdf\_to\_png\_converter()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.make_pdf_to_png_converter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{make\_pdf\_to\_png\_converter}}}{}{} Returns a function that converts a pdf file to a png file. \end{fulllineitems} \index{repl\_escapetext() (in module matplotlib.backends.backend\_pgf)@\spxentry{repl\_escapetext()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.repl_escapetext}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{repl\_escapetext}}}{\emph{m}}{}~ \end{fulllineitems} \index{repl\_mathdefault() (in module matplotlib.backends.backend\_pgf)@\spxentry{repl\_mathdefault()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.repl_mathdefault}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{repl\_mathdefault}}}{\emph{m}}{}~ \end{fulllineitems} \index{writeln() (in module matplotlib.backends.backend\_pgf)@\spxentry{writeln()}\spxextra{in module matplotlib.backends.backend\_pgf}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_pgf_api:matplotlib.backends.backend_pgf.writeln}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pgf.}}\sphinxbfcode{\sphinxupquote{writeln}}}{\emph{fh}, \emph{line}}{}~ \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_ps}}} \label{\detokenize{api/backend_ps_api:module-matplotlib.backends.backend_ps}}\label{\detokenize{api/backend_ps_api:matplotlib-backends-backend-ps}}\label{\detokenize{api/backend_ps_api::doc}}\index{matplotlib.backends.backend\_ps (module)@\spxentry{matplotlib.backends.backend\_ps}\spxextra{module}} A PostScript backend, which can produce both PostScript .ps and .eps. \index{FigureCanvas (in module matplotlib.backends.backend\_ps)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.FigureCanvasPS}}}}} \end{fulllineitems} \index{FigureCanvasPS (class in matplotlib.backends.backend\_ps)@\spxentry{FigureCanvasPS}\spxextra{class in matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{FigureCanvasPS}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} \index{draw() (matplotlib.backends.backend\_ps.FigureCanvasPS method)@\spxentry{draw()}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}}{} Render the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \end{fulllineitems} \index{filetypes (matplotlib.backends.backend\_ps.FigureCanvasPS attribute)@\spxentry{filetypes}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.filetypes}}\pysigline{\sphinxbfcode{\sphinxupquote{filetypes}}\sphinxbfcode{\sphinxupquote{ = \{'eps': 'Encapsulated Postscript', 'ps': 'Postscript'\}}}} \end{fulllineitems} \index{fixed\_dpi (matplotlib.backends.backend\_ps.FigureCanvasPS attribute)@\spxentry{fixed\_dpi}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.fixed_dpi}}\pysigline{\sphinxbfcode{\sphinxupquote{fixed\_dpi}}\sphinxbfcode{\sphinxupquote{ = 72}}} \end{fulllineitems} \index{get\_default\_filetype() (matplotlib.backends.backend\_ps.FigureCanvasPS method)@\spxentry{get\_default\_filetype()}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.get_default_filetype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_filetype}}}{\emph{self}}{} Get the default savefig file format as specified in rcParam \sphinxcode{\sphinxupquote{savefig.format}}. Returned string excludes period. Overridden in backends that only support a single file type. \end{fulllineitems} \index{print\_eps() (matplotlib.backends.backend\_ps.FigureCanvasPS method)@\spxentry{print\_eps()}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.print_eps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_eps}}}{\emph{self}, \emph{outfile}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_ps() (matplotlib.backends.backend\_ps.FigureCanvasPS method)@\spxentry{print\_ps()}\spxextra{matplotlib.backends.backend\_ps.FigureCanvasPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.FigureCanvasPS.print_ps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_ps}}}{\emph{self}, \emph{outfile}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \end{fulllineitems} \index{GraphicsContextPS (class in matplotlib.backends.backend\_ps)@\spxentry{GraphicsContextPS}\spxextra{class in matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{GraphicsContextPS}}} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.GraphicsContextBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.GraphicsContextBase}}}}} \index{get\_capstyle() (matplotlib.backends.backend\_ps.GraphicsContextPS method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.backends.backend\_ps.GraphicsContextPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{} Return the capstyle as a string in ('butt', 'round', 'projecting'). \end{fulllineitems} \index{get\_joinstyle() (matplotlib.backends.backend\_ps.GraphicsContextPS method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.backends.backend\_ps.GraphicsContextPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{} Return the line join style as one of ('miter', 'round', 'bevel'). \end{fulllineitems} \index{shouldstroke() (matplotlib.backends.backend\_ps.GraphicsContextPS method)@\spxentry{shouldstroke()}\spxextra{matplotlib.backends.backend\_ps.GraphicsContextPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.GraphicsContextPS.shouldstroke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shouldstroke}}}{\emph{self}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \end{fulllineitems} \index{PsBackendHelper (class in matplotlib.backends.backend\_ps)@\spxentry{PsBackendHelper}\spxextra{class in matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.PsBackendHelper}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{PsBackendHelper}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{gs\_exe (matplotlib.backends.backend\_ps.PsBackendHelper attribute)@\spxentry{gs\_exe}\spxextra{matplotlib.backends.backend\_ps.PsBackendHelper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.PsBackendHelper.gs_exe}}\pysigline{\sphinxbfcode{\sphinxupquote{gs\_exe}}}~ \end{fulllineitems} \index{gs\_version (matplotlib.backends.backend\_ps.PsBackendHelper attribute)@\spxentry{gs\_version}\spxextra{matplotlib.backends.backend\_ps.PsBackendHelper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.PsBackendHelper.gs_version}}\pysigline{\sphinxbfcode{\sphinxupquote{gs\_version}}}~ \end{fulllineitems} \index{supports\_ps2write (matplotlib.backends.backend\_ps.PsBackendHelper attribute)@\spxentry{supports\_ps2write}\spxextra{matplotlib.backends.backend\_ps.PsBackendHelper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.PsBackendHelper.supports_ps2write}}\pysigline{\sphinxbfcode{\sphinxupquote{supports\_ps2write}}}~ \end{fulllineitems} \end{fulllineitems} \index{RendererPS (class in matplotlib.backends.backend\_ps)@\spxentry{RendererPS}\spxextra{class in matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{RendererPS}}}{\emph{width}, \emph{height}, \emph{pswriter}, \emph{imagedpi=72}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.backends.\_backend\_pdf\_ps.RendererPDFPSBase}} The renderer handles all the drawing primitives using a graphics context instance that controls the colors/styles. \index{afmfontd (matplotlib.backends.backend\_ps.RendererPS attribute)@\spxentry{afmfontd}\spxextra{matplotlib.backends.backend\_ps.RendererPS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.afmfontd}}\pysigline{\sphinxbfcode{\sphinxupquote{afmfontd}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{create\_hatch() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{create\_hatch()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.create_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_hatch}}}{\emph{self}, \emph{hatch}}{}~ \end{fulllineitems} \index{draw\_gouraud\_triangle() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_gouraud\_triangle()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_gouraud_triangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangle}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{trans}}{} Draw a Gouraud-shaded triangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(3, 2){]} Array of (x, y) points for the triangle. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(3, 4){]} RGBA colors for each point of the triangle. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_gouraud\_triangles() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_gouraud\_triangles()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_gouraud_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangles}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{trans}}{} Draws a series of Gouraud triangles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(N, 3, 2){]} Array of \sphinxstyleemphasis{N} (x, y) points for the triangles. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(N, 3, 4){]} Array of \sphinxstyleemphasis{N} RGBA colors for each point of the triangles. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_image() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_image()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}, \emph{transform=None}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that \sphinxcode{\sphinxupquote{option\_scale\_image()}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{trans}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_mathtext() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_mathtext()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_mathtext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_mathtext}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}}{} Draw the math text using matplotlib.mathtext. \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_path\_collection() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_path\_collection()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path\_collection}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{paths}, \emph{all\_transforms}, \emph{offsets}, \emph{offsetTrans}, \emph{facecolors}, \emph{edgecolors}, \emph{linewidths}, \emph{linestyles}, \emph{antialiaseds}, \emph{urls}, \emph{offset\_position}}{} Draws a collection of paths selecting drawing properties from the lists \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{linestyles} and \sphinxstyleemphasis{antialiaseds}. \sphinxstyleemphasis{offsets} is a list of offsets to apply to each of the paths. The offsets in \sphinxstyleemphasis{offsets} are first transformed by \sphinxstyleemphasis{offsetTrans} before being applied. \sphinxstyleemphasis{offset\_position} may be either "screen" or "data" depending on the space that the offsets are in. This provides a fallback implementation of {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} that makes multiple calls to {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods \sphinxcode{\sphinxupquote{\_iter\_collection\_raw\_paths()}} and \sphinxcode{\sphinxupquote{\_iter\_collection()}} are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of {\hyperref[\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} can be made globally. \end{fulllineitems} \index{draw\_tex() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{get\_image\_magnification() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{get\_image\_magnification()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.get_image_magnification}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_image\_magnification}}}{\emph{self}}{} Get the factor by which to magnify images passed to draw\_image. Allows a backend to have images at a different resolution to other artists. \end{fulllineitems} \index{merge\_used\_characters() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{merge\_used\_characters()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.merge_used_characters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{merge\_used\_characters}}}{\emph{self}, \emph{other}}{}~ \end{fulllineitems} \index{new\_gc() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{new\_gc()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a \sphinxcode{\sphinxupquote{GraphicsContextBase}}. \end{fulllineitems} \index{set\_color() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_color()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{r}, \emph{g}, \emph{b}, \emph{store=1}}{}~ \end{fulllineitems} \index{set\_font() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_font()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_font}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_font}}}{\emph{self}, \emph{fontname}, \emph{fontsize}, \emph{store=1}}{}~ \end{fulllineitems} \index{set\_linecap() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_linecap()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_linecap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linecap}}}{\emph{self}, \emph{linecap}, \emph{store=1}}{}~ \end{fulllineitems} \index{set\_linedash() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_linedash()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_linedash}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linedash}}}{\emph{self}, \emph{offset}, \emph{seq}, \emph{store=1}}{}~ \end{fulllineitems} \index{set\_linejoin() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_linejoin()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_linejoin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linejoin}}}{\emph{self}, \emph{linejoin}, \emph{store=1}}{}~ \end{fulllineitems} \index{set\_linewidth() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{linewidth}, \emph{store=1}}{}~ \end{fulllineitems} \index{track\_characters() (matplotlib.backends.backend\_ps.RendererPS method)@\spxentry{track\_characters()}\spxextra{matplotlib.backends.backend\_ps.RendererPS method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.RendererPS.track_characters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{track\_characters}}}{\emph{self}, \emph{font}, \emph{s}}{} Keeps track of which characters are required from each font. \end{fulllineitems} \end{fulllineitems} \index{convert\_psfrags() (in module matplotlib.backends.backend\_ps)@\spxentry{convert\_psfrags()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.convert_psfrags}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{convert\_psfrags}}}{\emph{tmpfile}, \emph{psfrags}, \emph{font\_preamble}, \emph{custom\_preamble}, \emph{paperWidth}, \emph{paperHeight}, \emph{orientation}}{} When we want to use the LaTeX backend with postscript, we write PSFrag tags to a temporary postscript file, each one marking a position for LaTeX to render some text. convert\_psfrags generates a LaTeX document containing the commands to convert those tags to text. LaTeX/dvips produces the postscript file that includes the actual text. \end{fulllineitems} \index{get\_bbox() (in module matplotlib.backends.backend\_ps)@\spxentry{get\_bbox()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.get_bbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{get\_bbox}}}{\emph{tmpfile}, \emph{bbox}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Use ghostscript's bbox device to find the center of the bounding box. Return an appropriately sized bbox centered around that point. A bit of a hack. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{get\_bbox\_header() (in module matplotlib.backends.backend\_ps)@\spxentry{get\_bbox\_header()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.get_bbox_header}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{get\_bbox\_header}}}{\emph{lbrt}, \emph{rotated=False}}{} return a postscript header string for the given bbox lbrt=(l, b, r, t). Optionally, return rotate command. \end{fulllineitems} \index{gs\_distill() (in module matplotlib.backends.backend\_ps)@\spxentry{gs\_distill()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.gs_distill}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{gs\_distill}}}{\emph{tmpfile}, \emph{eps=False}, \emph{ptype='letter'}, \emph{bbox=None}, \emph{rotated=False}}{} Use ghostscript's pswrite or epswrite device to distill a file. This yields smaller files without illegal encapsulated postscript operators. The output is low-level, converting text to outlines. \end{fulllineitems} \index{pstoeps() (in module matplotlib.backends.backend\_ps)@\spxentry{pstoeps()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.pstoeps}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{pstoeps}}}{\emph{tmpfile}, \emph{bbox=None}, \emph{rotated=False}}{} Convert the postscript to encapsulated postscript. The bbox of the eps file will be replaced with the given \sphinxstyleemphasis{bbox} argument. If None, original bbox will be used. \end{fulllineitems} \index{quote\_ps\_string() (in module matplotlib.backends.backend\_ps)@\spxentry{quote\_ps\_string()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.quote_ps_string}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{quote\_ps\_string}}}{\emph{s}}{} Quote dangerous characters of S for use in a PostScript string constant. \end{fulllineitems} \index{xpdf\_distill() (in module matplotlib.backends.backend\_ps)@\spxentry{xpdf\_distill()}\spxextra{in module matplotlib.backends.backend\_ps}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_ps_api:matplotlib.backends.backend_ps.xpdf_distill}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_ps.}}\sphinxbfcode{\sphinxupquote{xpdf\_distill}}}{\emph{tmpfile}, \emph{eps=False}, \emph{ptype='letter'}, \emph{bbox=None}, \emph{rotated=False}}{} Use ghostscript's ps2pdf and xpdf's/poppler's pdftops to distill a file. This yields smaller files without illegal encapsulated postscript operators. This distiller is preferred, generating high-level postscript output that treats text as text. \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_qt4agg}}} \label{\detokenize{api/backend_qt4agg_api:matplotlib-backends-backend-qt4agg}}\label{\detokenize{api/backend_qt4agg_api::doc}} \sphinxstylestrong{NOTE} Not included, to avoid adding a dependency to building the docs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_qt4cairo}}} \label{\detokenize{api/backend_qt4cairo_api:matplotlib-backends-backend-qt4cairo}}\label{\detokenize{api/backend_qt4cairo_api::doc}} \sphinxstylestrong{NOTE} Not included, to avoid adding a dependency to building the docs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_qt5agg}}} \label{\detokenize{api/backend_qt5agg_api:matplotlib-backends-backend-qt5agg}}\label{\detokenize{api/backend_qt5agg_api::doc}} \sphinxstylestrong{NOTE} Not included, to avoid adding a dependency to building the docs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_qt5cairo}}} \label{\detokenize{api/backend_qt5cairo_api:matplotlib-backends-backend-qt5cairo}}\label{\detokenize{api/backend_qt5cairo_api::doc}} \sphinxstylestrong{NOTE} Not included, to avoid adding a dependency to building the docs. \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_svg}}} \label{\detokenize{api/backend_svg_api:module-matplotlib.backends.backend_svg}}\label{\detokenize{api/backend_svg_api:matplotlib-backends-backend-svg}}\label{\detokenize{api/backend_svg_api::doc}}\index{matplotlib.backends.backend\_svg (module)@\spxentry{matplotlib.backends.backend\_svg}\spxextra{module}}\index{FigureCanvas (in module matplotlib.backends.backend\_svg)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.FigureCanvasSVG}}}}} \end{fulllineitems} \index{FigureCanvasSVG (class in matplotlib.backends.backend\_svg)@\spxentry{FigureCanvasSVG}\spxextra{class in matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{FigureCanvasSVG}}}{\emph{figure}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.FigureCanvasBase}}}}} \index{filetypes (matplotlib.backends.backend\_svg.FigureCanvasSVG attribute)@\spxentry{filetypes}\spxextra{matplotlib.backends.backend\_svg.FigureCanvasSVG attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG.filetypes}}\pysigline{\sphinxbfcode{\sphinxupquote{filetypes}}\sphinxbfcode{\sphinxupquote{ = \{'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics'\}}}} \end{fulllineitems} \index{fixed\_dpi (matplotlib.backends.backend\_svg.FigureCanvasSVG attribute)@\spxentry{fixed\_dpi}\spxextra{matplotlib.backends.backend\_svg.FigureCanvasSVG attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG.fixed_dpi}}\pysigline{\sphinxbfcode{\sphinxupquote{fixed\_dpi}}\sphinxbfcode{\sphinxupquote{ = 72}}} \end{fulllineitems} \index{get\_default\_filetype() (matplotlib.backends.backend\_svg.FigureCanvasSVG method)@\spxentry{get\_default\_filetype()}\spxextra{matplotlib.backends.backend\_svg.FigureCanvasSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG.get_default_filetype}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_filetype}}}{\emph{self}}{} Get the default savefig file format as specified in rcParam \sphinxcode{\sphinxupquote{savefig.format}}. Returned string excludes period. Overridden in backends that only support a single file type. \end{fulllineitems} \index{print\_svg() (matplotlib.backends.backend\_svg.FigureCanvasSVG method)@\spxentry{print\_svg()}\spxextra{matplotlib.backends.backend\_svg.FigureCanvasSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG.print_svg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_svg}}}{\emph{self}, \emph{filename}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{print\_svgz() (matplotlib.backends.backend\_svg.FigureCanvasSVG method)@\spxentry{print\_svgz()}\spxextra{matplotlib.backends.backend\_svg.FigureCanvasSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.FigureCanvasSVG.print_svgz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_svgz}}}{\emph{self}, \emph{filename}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \end{fulllineitems} \index{RendererSVG (class in matplotlib.backends.backend\_svg)@\spxentry{RendererSVG}\spxextra{class in matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{RendererSVG}}}{\emph{width}, \emph{height}, \emph{svgwriter}, \emph{basename=None}, \emph{image\_dpi=72}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} \index{close\_group() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{close\_group()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.close_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close\_group}}}{\emph{self}, \emph{s}}{} Close a grouping element with label \sphinxstyleemphasis{s} Only used by the SVG renderer. \end{fulllineitems} \index{draw\_gouraud\_triangle() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_gouraud\_triangle()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_gouraud_triangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangle}}}{\emph{self}, \emph{gc}, \emph{points}, \emph{colors}, \emph{trans}}{} Draw a Gouraud-shaded triangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(3, 2){]} Array of (x, y) points for the triangle. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(3, 4){]} RGBA colors for each point of the triangle. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_gouraud\_triangles() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_gouraud\_triangles()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_gouraud_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_gouraud\_triangles}}}{\emph{self}, \emph{gc}, \emph{triangles\_array}, \emph{colors\_array}, \emph{transform}}{} Draws a series of Gouraud triangles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}array\_like, shape=(N, 3, 2){]} Array of \sphinxstyleemphasis{N} (x, y) points for the triangles. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like, shape=(N, 3, 4){]} Array of \sphinxstyleemphasis{N} RGBA colors for each point of the triangles. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform to apply to the points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_image() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_image()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_image}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{im}, \emph{transform=None}}{} Draw an RGBA image. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} a graphics context with clipping information. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the left hand side of the canvas. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} the distance in physical units (i.e., dots or pixels) from the bottom side of the canvas. \item[{\sphinxstylestrong{im}}] \leavevmode{[}array\_like, shape=(N, M, 4), dtype=np.uint8{]} An array of RGBA pixels. \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}}{]} If and only if the concrete backend is written such that {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.option_scale_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{option\_scale\_image()}}}}} returns \sphinxcode{\sphinxupquote{True}}, an affine transformation \sphinxstyleemphasis{may} be passed to {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. It takes the form of a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} instance. The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}}, and has to be applied \sphinxstyleemphasis{before} translating the result by \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} (this can be accomplished by adding \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} to the translation vector defined by \sphinxcode{\sphinxupquote{transform}}). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_markers() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_markers()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{trans}, \emph{rgbFace=None}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_path() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_path()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{path}, \emph{transform}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_path\_collection() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_path\_collection()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path\_collection}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{paths}, \emph{all\_transforms}, \emph{offsets}, \emph{offsetTrans}, \emph{facecolors}, \emph{edgecolors}, \emph{linewidths}, \emph{linestyles}, \emph{antialiaseds}, \emph{urls}, \emph{offset\_position}}{} Draws a collection of paths selecting drawing properties from the lists \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{linestyles} and \sphinxstyleemphasis{antialiaseds}. \sphinxstyleemphasis{offsets} is a list of offsets to apply to each of the paths. The offsets in \sphinxstyleemphasis{offsets} are first transformed by \sphinxstyleemphasis{offsetTrans} before being applied. \sphinxstyleemphasis{offset\_position} may be either "screen" or "data" depending on the space that the offsets are in. This provides a fallback implementation of {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} that makes multiple calls to {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods \sphinxcode{\sphinxupquote{\_iter\_collection\_raw\_paths()}} and \sphinxcode{\sphinxupquote{\_iter\_collection()}} are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} can be made globally. \end{fulllineitems} \index{draw\_tex() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_tex()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_tex}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath='TeX!'}, \emph{mtext=None}}{}~ \end{fulllineitems} \index{draw\_text() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{draw\_text()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_text}}}{\emph{self}, \emph{gc}, \emph{x}, \emph{y}, \emph{s}, \emph{prop}, \emph{angle}, \emph{ismath=False}, \emph{mtext=None}}{} Draw the text instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context. \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} The x location of the text in display coords. \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} The y location of the text baseline in display coords. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}{]} The font properties. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar{]} The rotation angle in degrees. \item[{\sphinxstylestrong{mtext}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}{]} The original text object to be rendered. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstylestrong{backend implementers note} When you are trying to determine if you have gotten your bounding box right (which is what enables the text layout/alignment to work properly), it helps to change the line in text.py: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{n}{bbox\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \end{sphinxVerbatim} to if 1, and then the actual bounding box will be plotted along with your text. \end{fulllineitems} \index{finalize() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{finalize()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.finalize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize}}}{\emph{self}}{}~ \end{fulllineitems} \index{flipy() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{flipy()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.flipy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{flipy}}}{\emph{self}}{} Return whether y values increase from top to bottom. Note that this only affects drawing of texts and images. \end{fulllineitems} \index{get\_canvas\_width\_height() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{get\_canvas\_width\_height()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.get_canvas_width_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_canvas\_width\_height}}}{\emph{self}}{} Return the canvas width and height in display coords. \end{fulllineitems} \index{get\_image\_magnification() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{get\_image\_magnification()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.get_image_magnification}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_image\_magnification}}}{\emph{self}}{} Get the factor by which to magnify images passed to {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}}. Allows a backend to have images at a different resolution to other artists. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{} Get the width, height, and descent (offset from the bottom to the baseline), in display coords, of the string \sphinxstyleemphasis{s} with {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} \sphinxstyleemphasis{prop} \end{fulllineitems} \index{open\_group() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{open\_group()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.open_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{open\_group}}}{\emph{self}, \emph{s}, \emph{gid=None}}{} Open a grouping element with label \sphinxstyleemphasis{s} and \sphinxstyleemphasis{gid} (if set) as id. Only used by the SVG renderer. \end{fulllineitems} \index{option\_image\_nocomposite() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{option\_image\_nocomposite()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.option_image_nocomposite}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_image\_nocomposite}}}{\emph{self}}{} Return whether image composition by Matplotlib should be skipped. Raster backends should usually return False (letting the C-level rasterizer take care of image composition); vector backends should usually return \sphinxcode{\sphinxupquote{not rcParams{[}"image.composite\_image"{]}}}. \end{fulllineitems} \index{option\_scale\_image() (matplotlib.backends.backend\_svg.RendererSVG method)@\spxentry{option\_scale\_image()}\spxextra{matplotlib.backends.backend\_svg.RendererSVG method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.option_scale_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{option\_scale\_image}}}{\emph{self}}{} Return whether arbitrary affine transformations in {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.RendererSVG.draw_image}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_image()}}}}} are supported (True for most vector backends). \end{fulllineitems} \end{fulllineitems} \index{XMLWriter (class in matplotlib.backends.backend\_svg)@\spxentry{XMLWriter}\spxextra{class in matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{XMLWriter}}}{\emph{file}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{file}}] \leavevmode{[}writable text file-like object{]} \end{description} \end{description}\end{quote} \index{close() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{close()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close}}}{\emph{self}, \emph{id}}{} Closes open elements, up to (and including) the element identified by the given identifier. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{id}}] \leavevmode Element identifier, as returned by the {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.start}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{start()}}}}} method. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{comment() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{comment()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.comment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{comment}}}{\emph{self}, \emph{comment}}{} Adds a comment to the output stream. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{comment}}] \leavevmode{[}str{]} Comment text. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{data() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{data()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{data}}}{\emph{self}, \emph{text}}{} Adds character data to the output stream. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} Character data. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{element() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{element()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.element}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{element}}}{\emph{self}, \emph{tag}, \emph{text=None}, \emph{attrib=\{\}}, \emph{**extra}}{} Adds an entire element. This is the same as calling {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.start}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{start()}}}}}, {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{data()}}}}}, and {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.end}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{end()}}}}} in sequence. The \sphinxstyleemphasis{text} argument can be omitted. \end{fulllineitems} \index{end() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{end()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.end}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{end}}}{\emph{self}, \emph{tag=None}, \emph{indent=True}}{} Closes the current element (opened by the most recent call to {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.start}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{start()}}}}}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tag}}] \leavevmode Element tag. If given, the tag must match the start tag. If omitted, the current element is closed. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{flush() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{flush()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.flush}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{flush}}}{\emph{self}}{} Flushes the output stream. \end{fulllineitems} \index{start() (matplotlib.backends.backend\_svg.XMLWriter method)@\spxentry{start()}\spxextra{matplotlib.backends.backend\_svg.XMLWriter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.start}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start}}}{\emph{self}, \emph{tag}, \emph{attrib=\{\}}, \emph{**extra}}{} Opens a new element. Attributes can be given as keyword arguments, or as a string/string dictionary. The method returns an opaque identifier that can be passed to the {\hyperref[\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.XMLWriter.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close()}}}}} method, to close all open elements up to and including this one. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tag}}] \leavevmode Element tag. \item[{\sphinxstylestrong{attrib}}] \leavevmode Attribute dictionary. Alternatively, attributes can be given as keyword arguments. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{An element identifier.}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{escape\_attrib() (in module matplotlib.backends.backend\_svg)@\spxentry{escape\_attrib()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.escape_attrib}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{escape\_attrib}}}{\emph{s}}{}~ \end{fulllineitems} \index{escape\_cdata() (in module matplotlib.backends.backend\_svg)@\spxentry{escape\_cdata()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.escape_cdata}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{escape\_cdata}}}{\emph{s}}{}~ \end{fulllineitems} \index{escape\_comment() (in module matplotlib.backends.backend\_svg)@\spxentry{escape\_comment()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.escape_comment}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{escape\_comment}}}{\emph{s}}{}~ \end{fulllineitems} \index{generate\_css() (in module matplotlib.backends.backend\_svg)@\spxentry{generate\_css()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.generate_css}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{generate\_css}}}{\emph{attrib=\{\}}}{}~ \end{fulllineitems} \index{generate\_transform() (in module matplotlib.backends.backend\_svg)@\spxentry{generate\_transform()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.generate_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{generate\_transform}}}{\emph{transform\_list={[}{]}}}{}~ \end{fulllineitems} \index{short\_float\_fmt() (in module matplotlib.backends.backend\_svg)@\spxentry{short\_float\_fmt()}\spxextra{in module matplotlib.backends.backend\_svg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_svg_api:matplotlib.backends.backend_svg.short_float_fmt}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_svg.}}\sphinxbfcode{\sphinxupquote{short\_float\_fmt}}}{\emph{x}}{} Create a short string representation of a float, which is \%f formatting with trailing zeros and the decimal point removed. \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_tkagg}}} \label{\detokenize{api/backend_tkagg_api:module-matplotlib.backends.backend_tkagg}}\label{\detokenize{api/backend_tkagg_api:matplotlib-backends-backend-tkagg}}\label{\detokenize{api/backend_tkagg_api::doc}}\index{matplotlib.backends.backend\_tkagg (module)@\spxentry{matplotlib.backends.backend\_tkagg}\spxextra{module}}\index{FigureCanvas (in module matplotlib.backends.backend\_tkagg)@\spxentry{FigureCanvas}\spxextra{in module matplotlib.backends.backend\_tkagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tkagg_api:matplotlib.backends.backend_tkagg.FigureCanvas}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_tkagg.}}\sphinxbfcode{\sphinxupquote{FigureCanvas}}} alias of {\hyperref[\detokenize{api/backend_tkagg_api:matplotlib.backends.backend_tkagg.FigureCanvasTkAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_tkagg.FigureCanvasTkAgg}}}}} \end{fulllineitems} \index{FigureCanvasTkAgg (class in matplotlib.backends.backend\_tkagg)@\spxentry{FigureCanvasTkAgg}\spxextra{class in matplotlib.backends.backend\_tkagg}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tkagg_api:matplotlib.backends.backend_tkagg.FigureCanvasTkAgg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_tkagg.}}\sphinxbfcode{\sphinxupquote{FigureCanvasTkAgg}}}{\emph{figure}, \emph{master=None}, \emph{resize\_callback=None}}{} Bases: {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_agg.FigureCanvasAgg}}}}}, \sphinxcode{\sphinxupquote{matplotlib.backends.\_backend\_tk.FigureCanvasTk}} \index{blit() (matplotlib.backends.backend\_tkagg.FigureCanvasTkAgg method)@\spxentry{blit()}\spxextra{matplotlib.backends.backend\_tkagg.FigureCanvasTkAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tkagg_api:matplotlib.backends.backend_tkagg.FigureCanvasTkAgg.blit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{blit}}}{\emph{self}, \emph{bbox=None}}{} Blit the canvas in bbox (default entire canvas). \end{fulllineitems} \index{draw() (matplotlib.backends.backend\_tkagg.FigureCanvasTkAgg method)@\spxentry{draw()}\spxextra{matplotlib.backends.backend\_tkagg.FigureCanvasTkAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/backend_tkagg_api:matplotlib.backends.backend_tkagg.FigureCanvasTkAgg.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}}{} Draw the figure using the renderer. \end{fulllineitems} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_webagg}}} \label{\detokenize{api/backend_webagg_api:matplotlib-backends-backend-webagg}}\label{\detokenize{api/backend_webagg_api::doc}} \begin{sphinxadmonition}{note}{Note:} The WebAgg backend is not documented here, in order to avoid adding Tornado to the doc build requirements. \end{sphinxadmonition} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.backends.backend\_wxagg}}} \label{\detokenize{api/backend_wxagg_api:matplotlib-backends-backend-wxagg}}\label{\detokenize{api/backend_wxagg_api::doc}} \sphinxstylestrong{NOTE} Not included, to avoid adding a dependency to building the docs. \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.blocking\_input}}} \label{\detokenize{api/blocking_input_api:module-matplotlib.blocking_input}}\label{\detokenize{api/blocking_input_api:matplotlib-blocking-input}}\label{\detokenize{api/blocking_input_api::doc}}\index{matplotlib.blocking\_input (module)@\spxentry{matplotlib.blocking\_input}\spxextra{module}} This provides several classes used for blocking interaction with figure windows: \begin{description} \item[{{\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BlockingInput}}}}}}] \leavevmode Creates a callable object to retrieve events in a blocking way for interactive sessions. Base class of the other classes listed here. \item[{{\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingKeyMouseInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BlockingKeyMouseInput}}}}}}] \leavevmode Creates a callable object to retrieve key or mouse clicks in a blocking way for interactive sessions. Used by \sphinxcode{\sphinxupquote{waitforbuttonpress}}. \item[{{\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BlockingMouseInput}}}}}}] \leavevmode Creates a callable object to retrieve mouse clicks in a blocking way for interactive sessions. Used by \sphinxcode{\sphinxupquote{ginput}}. \item[{{\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BlockingContourLabeler}}}}}}] \leavevmode Creates a callable object to retrieve mouse clicks in a blocking way that will then be used to place labels on a \sphinxcode{\sphinxupquote{ContourSet}}. Used by \sphinxcode{\sphinxupquote{clabel}}. \end{description} \index{BlockingContourLabeler (class in matplotlib.blocking\_input)@\spxentry{BlockingContourLabeler}\spxextra{class in matplotlib.blocking\_input}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.}}\sphinxbfcode{\sphinxupquote{BlockingContourLabeler}}}{\emph{cs}}{} Bases: {\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.BlockingMouseInput}}}}} Callable for retrieving mouse clicks and key presses in a blocking way. Used to place contour labels. \index{add\_click() (matplotlib.blocking\_input.BlockingContourLabeler method)@\spxentry{add\_click()}\spxextra{matplotlib.blocking\_input.BlockingContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler.add_click}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_click}}}{\emph{self}, \emph{event}}{} Add the coordinates of an event to the list of clicks. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{button1() (matplotlib.blocking\_input.BlockingContourLabeler method)@\spxentry{button1()}\spxextra{matplotlib.blocking\_input.BlockingContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler.button1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{button1}}}{\emph{self}, \emph{event}}{} Process an button-1 event (add a label to a contour). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{button3() (matplotlib.blocking\_input.BlockingContourLabeler method)@\spxentry{button3()}\spxextra{matplotlib.blocking\_input.BlockingContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler.button3}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{button3}}}{\emph{self}, \emph{event}}{} Process an button-3 event (remove a label if not in inline mode). Unfortunately, if one is doing inline labels, then there is currently no way to fix the broken contour - once humpty-dumpty is broken, he can't be put back together. In inline mode, this does nothing. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{pop\_click() (matplotlib.blocking\_input.BlockingContourLabeler method)@\spxentry{pop\_click()}\spxextra{matplotlib.blocking\_input.BlockingContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingContourLabeler.pop_click}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop\_click}}}{\emph{self}, \emph{event}, \emph{index=-1}}{} Remove a click (by default, the last) from the list of clicks. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{BlockingInput (class in matplotlib.blocking\_input)@\spxentry{BlockingInput}\spxextra{class in matplotlib.blocking\_input}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.}}\sphinxbfcode{\sphinxupquote{BlockingInput}}}{\emph{fig}, \emph{eventslist=()}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Callable for retrieving events in a blocking way. \index{add\_event() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{add\_event()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.add_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_event}}}{\emph{self}, \emph{event}}{} For base class, this just appends an event to events. \end{fulllineitems} \index{cleanup() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{cleanup()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.cleanup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cleanup}}}{\emph{self}}{} Disconnect all callbacks. \end{fulllineitems} \index{on\_event() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{on\_event()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.on_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_event}}}{\emph{self}, \emph{event}}{} Event handler; will be passed to the current figure to retrieve events. \end{fulllineitems} \index{pop() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{pop()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.pop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop}}}{\emph{self}, \emph{index=-1}}{} Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception. \end{fulllineitems} \index{pop\_event() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{pop\_event()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.pop_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop\_event}}}{\emph{self}, \emph{index=-1}}{} Remove an event from the event list -- by default, the last. Note that this does not check that there are events, much like the normal pop method. If no events exist, this will throw an exception. \end{fulllineitems} \index{post\_event() (matplotlib.blocking\_input.BlockingInput method)@\spxentry{post\_event()}\spxextra{matplotlib.blocking\_input.BlockingInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput.post_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{post\_event}}}{\emph{self}}{} For baseclass, do nothing but collect events. \end{fulllineitems} \end{fulllineitems} \index{BlockingKeyMouseInput (class in matplotlib.blocking\_input)@\spxentry{BlockingKeyMouseInput}\spxextra{class in matplotlib.blocking\_input}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingKeyMouseInput}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.}}\sphinxbfcode{\sphinxupquote{BlockingKeyMouseInput}}}{\emph{fig}}{} Bases: {\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.BlockingInput}}}}} Callable for retrieving mouse clicks and key presses in a blocking way. \index{post\_event() (matplotlib.blocking\_input.BlockingKeyMouseInput method)@\spxentry{post\_event()}\spxextra{matplotlib.blocking\_input.BlockingKeyMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingKeyMouseInput.post_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{post\_event}}}{\emph{self}}{} Determine if it is a key event. \end{fulllineitems} \end{fulllineitems} \index{BlockingMouseInput (class in matplotlib.blocking\_input)@\spxentry{BlockingMouseInput}\spxextra{class in matplotlib.blocking\_input}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.}}\sphinxbfcode{\sphinxupquote{BlockingMouseInput}}}{\emph{fig}, \emph{mouse\_add=1}, \emph{mouse\_pop=3}, \emph{mouse\_stop=2}}{} Bases: {\hyperref[\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingInput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.blocking\_input.BlockingInput}}}}} Callable for retrieving mouse clicks in a blocking way. This class will also retrieve keypresses and map them to mouse clicks: delete and backspace are like mouse button 3, enter is like mouse button 2 and all others are like mouse button 1. \index{add\_click() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{add\_click()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.add_click}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_click}}}{\emph{self}, \emph{event}}{} Add the coordinates of an event to the list of clicks. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{button\_add (matplotlib.blocking\_input.BlockingMouseInput attribute)@\spxentry{button\_add}\spxextra{matplotlib.blocking\_input.BlockingMouseInput attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.button_add}}\pysigline{\sphinxbfcode{\sphinxupquote{button\_add}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{button\_pop (matplotlib.blocking\_input.BlockingMouseInput attribute)@\spxentry{button\_pop}\spxextra{matplotlib.blocking\_input.BlockingMouseInput attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.button_pop}}\pysigline{\sphinxbfcode{\sphinxupquote{button\_pop}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \index{button\_stop (matplotlib.blocking\_input.BlockingMouseInput attribute)@\spxentry{button\_stop}\spxextra{matplotlib.blocking\_input.BlockingMouseInput attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.button_stop}}\pysigline{\sphinxbfcode{\sphinxupquote{button\_stop}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{cleanup() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{cleanup()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.cleanup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cleanup}}}{\emph{self}, \emph{event=None}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}, optional{]} Not used \end{description} \end{description}\end{quote} \end{fulllineitems} \index{key\_event() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{key\_event()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.key_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{key\_event}}}{\emph{self}}{} Process a key press event, mapping keys to appropriate mouse clicks. \end{fulllineitems} \index{mouse\_event() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{mouse\_event()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.mouse_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_event}}}{\emph{self}}{} Process a mouse click event. \end{fulllineitems} \index{mouse\_event\_add() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{mouse\_event\_add()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.mouse_event_add}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_event\_add}}}{\emph{self}, \emph{event}}{} Process an button-1 event (add a click if inside axes). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{mouse\_event\_pop() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{mouse\_event\_pop()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.mouse_event_pop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_event\_pop}}}{\emph{self}, \emph{event}}{} Process an button-3 event (remove the last click). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{mouse\_event\_stop() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{mouse\_event\_stop()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.mouse_event_stop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_event\_stop}}}{\emph{self}, \emph{event}}{} Process an button-2 event (end blocking input). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{pop() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{pop()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.pop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop}}}{\emph{self}, \emph{event}, \emph{index=-1}}{} Removes a click and the associated event from the list of clicks. Defaults to the last click. \end{fulllineitems} \index{pop\_click() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{pop\_click()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.pop_click}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop\_click}}}{\emph{self}, \emph{event}, \emph{index=-1}}{} Remove a click (by default, the last) from the list of clicks. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{post\_event() (matplotlib.blocking\_input.BlockingMouseInput method)@\spxentry{post\_event()}\spxextra{matplotlib.blocking\_input.BlockingMouseInput method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/blocking_input_api:matplotlib.blocking_input.BlockingMouseInput.post_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{post\_event}}}{\emph{self}}{} Process an event. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.category}}} \label{\detokenize{api/category_api:module-matplotlib.category}}\label{\detokenize{api/category_api:matplotlib-category}}\label{\detokenize{api/category_api::doc}}\index{matplotlib.category (module)@\spxentry{matplotlib.category}\spxextra{module}} Module that allows plotting of string "category" data. i.e. \sphinxcode{\sphinxupquote{plot({[}'d', 'f', 'a'{]},{[}1, 2, 3{]})}} will plot three points with x-axis values of 'd', 'f', 'a'. See \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/categorical\_variables} for an example. The module uses Matplotlib's {\hyperref[\detokenize{api/units_api:module-matplotlib.units}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units}}}}} mechanism to convert from strings to integers, provides a tick locator and formatter, and the class:{\hyperref[\detokenize{api/category_api:matplotlib.category.UnitData}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{UnitData}}}}} that creates and stores the string-to-integer mapping. \index{StrCategoryConverter (class in matplotlib.category)@\spxentry{StrCategoryConverter}\spxextra{class in matplotlib.category}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryConverter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.category.}}\sphinxbfcode{\sphinxupquote{StrCategoryConverter}}} Bases: {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}} \index{axisinfo() (matplotlib.category.StrCategoryConverter static method)@\spxentry{axisinfo()}\spxextra{matplotlib.category.StrCategoryConverter static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryConverter.axisinfo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{axisinfo}}}{\emph{unit}, \emph{axis}}{} Sets the default axis ticks and labels \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{unit}}] \leavevmode{[}{\hyperref[\detokenize{api/category_api:matplotlib.category.UnitData}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{UnitData}}}}}{]} object string unit information for value \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axis}}{]} axis for which information is being set \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axisinfo}}] \leavevmode{[}{\hyperref[\detokenize{api/units_api:matplotlib.units.AxisInfo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisInfo}}}}}{]} Information to support default tick labeling \end{description} \end{description}\end{quote} \end{fulllineitems} \index{convert() (matplotlib.category.StrCategoryConverter static method)@\spxentry{convert()}\spxextra{matplotlib.category.StrCategoryConverter static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryConverter.convert}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{convert}}}{\emph{value}, \emph{unit}, \emph{axis}}{} Convert strings in value to floats using mapping information store in the unit object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}string or iterable{]} Value or list of values to be converted. \item[{\sphinxstylestrong{unit}}] \leavevmode{[}{\hyperref[\detokenize{api/category_api:matplotlib.category.UnitData}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{UnitData}}}}}{]} An object mapping strings to integers. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}{\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}{]} axis on which the converted value is plotted. \begin{sphinxadmonition}{note}{Note:} \sphinxstyleemphasis{axis} is unused. \end{sphinxadmonition} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mapped\_value}}] \leavevmode{[}float or ndarray{[}float{]}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{default\_units() (matplotlib.category.StrCategoryConverter static method)@\spxentry{default\_units()}\spxextra{matplotlib.category.StrCategoryConverter static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryConverter.default_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{default\_units}}}{\emph{data}, \emph{axis}}{} Sets and updates the \sphinxcode{\sphinxupquote{axis}} units. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{data}}] \leavevmode{[}string or iterable of strings{]} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axis}}{]} axis on which the data is plotted \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{class}}] \leavevmode{[}{\hyperref[\detokenize{api/category_api:matplotlib.category.UnitData}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{UnitData}}}}}{]} object storing string to integer mapping \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{StrCategoryFormatter (class in matplotlib.category)@\spxentry{StrCategoryFormatter}\spxextra{class in matplotlib.category}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.category.}}\sphinxbfcode{\sphinxupquote{StrCategoryFormatter}}}{\emph{units\_mapping}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} String representation of the data at every tick \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{units\_mapping}}] \leavevmode{[}Dict{[}Str, int{]}{]} string:integer mapping \end{description} \end{description}\end{quote} \end{fulllineitems} \index{StrCategoryLocator (class in matplotlib.category)@\spxentry{StrCategoryLocator}\spxextra{class in matplotlib.category}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.category.}}\sphinxbfcode{\sphinxupquote{StrCategoryLocator}}}{\emph{units\_mapping}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} tick at every integer mapping of the string data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{units\_mapping}}] \leavevmode{[}Dict{[}str, int{]}{]} string:integer mapping \end{description} \end{description}\end{quote} \index{tick\_values() (matplotlib.category.StrCategoryLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.category.StrCategoryLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.StrCategoryLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{UnitData (class in matplotlib.category)@\spxentry{UnitData}\spxextra{class in matplotlib.category}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.UnitData}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.category.}}\sphinxbfcode{\sphinxupquote{UnitData}}}{\emph{data=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Create mapping between unique categorical values and integer ids. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{data}}] \leavevmode{[}iterable{]} sequence of string values \end{description} \end{description}\end{quote} \index{update() (matplotlib.category.UnitData method)@\spxentry{update()}\spxextra{matplotlib.category.UnitData method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/category_api:matplotlib.category.UnitData.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{data}}{} Maps new values to integer identifiers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{data}}] \leavevmode{[}iterable{]} sequence of string values \end{description} \item[{Raises}] \leavevmode\begin{description} \item[{TypeError}] \leavevmode If the value in data is not a string, unicode, bytes type \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.cbook}}} \label{\detokenize{api/cbook_api:module-matplotlib.cbook}}\label{\detokenize{api/cbook_api:matplotlib-cbook}}\label{\detokenize{api/cbook_api::doc}}\index{matplotlib.cbook (module)@\spxentry{matplotlib.cbook}\spxextra{module}} A collection of utility functions and classes. Originally, many (but not all) were from the Python Cookbook -- hence the name cbook. This module is safe to import from anywhere within matplotlib; it imports matplotlib only at runtime. \index{Bunch (class in matplotlib.cbook)@\spxentry{Bunch}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Bunch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{Bunch}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/types.html\#types.SimpleNamespace}{\sphinxcode{\sphinxupquote{types.SimpleNamespace}}} {[}\sphinxstyleemphasis{Deprecated}{]} Often we want to just collect a bunch of stuff together, naming each item of the bunch; a dictionary's OK for that, but a small do- nothing class is even handier, and prettier to use. Whenever you want to group a few variables: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{point} \PYG{o}{=} \PYG{n}{Bunch}\PYG{p}{(}\PYG{n}{datum}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{squared}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{coord}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{point}\PYG{o}{.}\PYG{n}{datum} \end{sphinxVerbatim} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{CallbackRegistry (class in matplotlib.cbook)@\spxentry{CallbackRegistry}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{CallbackRegistry}}}{\emph{exception\_handler=\textless{}function \_exception\_printer\textgreater{}}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Handle registering and disconnecting for a set of signals and callbacks: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{def} \PYG{n+nf}{oneat}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{eat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{def} \PYG{n+nf}{ondrink}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{drink}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{x}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{import} \PYG{n}{CallbackRegistry} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks} \PYG{o}{=} \PYG{n}{CallbackRegistry}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{id\PYGZus{}eat} \PYG{o}{=} \PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{eat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{oneat}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{id\PYGZus{}drink} \PYG{o}{=} \PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{drink}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ondrink}\PYG{p}{)} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{process}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{drink}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{123}\PYG{p}{)} \PYG{g+go}{drink 123} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{process}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{eat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{456}\PYG{p}{)} \PYG{g+go}{eat 456} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{process}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{be merry}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{456}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} nothing will be called} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{disconnect}\PYG{p}{(}\PYG{n}{id\PYGZus{}eat}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{callbacks}\PYG{o}{.}\PYG{n}{process}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{eat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{456}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} nothing will be called} \end{sphinxVerbatim} In practice, one should always disconnect all callbacks when they are no longer needed to avoid dangling references (and thus memory leaks). However, real code in Matplotlib rarely does so, and due to its design, it is rather difficult to place this kind of code. To get around this, and prevent this class of memory leaks, we instead store weak references to bound methods only, so when the destination object needs to die, the CallbackRegistry won't keep it alive. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{exception\_handler}}] \leavevmode{[}callable, optional{]} If provided must have signature \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{handler}\PYG{p}{(}\PYG{n}{exc}\PYG{p}{:} \PYG{n+ne}{Exception}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{k+kc}{None}\PYG{p}{:} \end{sphinxVerbatim} If not None this function will be called with any \sphinxhref{https://docs.python.org/3/library/exceptions.html\#Exception}{\sphinxcode{\sphinxupquote{Exception}}} subclass raised by the callbacks in {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.process}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry.process}}}}}. The handler may either consume the exception or re-raise. The callable must be pickle-able. The default handler is \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{h}\PYG{p}{(}\PYG{n}{exc}\PYG{p}{)}\PYG{p}{:} \PYG{n}{traceback}\PYG{o}{.}\PYG{n}{print\PYGZus{}exc}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \index{connect() (matplotlib.cbook.CallbackRegistry method)@\spxentry{connect()}\spxextra{matplotlib.cbook.CallbackRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{s}, \emph{func}}{} Register \sphinxstyleemphasis{func} to be called when signal \sphinxstyleemphasis{s} is generated. \end{fulllineitems} \index{disconnect() (matplotlib.cbook.CallbackRegistry method)@\spxentry{disconnect()}\spxextra{matplotlib.cbook.CallbackRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} Disconnect the callback registered with callback id \sphinxstyleemphasis{cid}. \end{fulllineitems} \index{process() (matplotlib.cbook.CallbackRegistry method)@\spxentry{process()}\spxextra{matplotlib.cbook.CallbackRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry.process}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{process}}}{\emph{self}, \emph{s}, \emph{*args}, \emph{**kwargs}}{} Process signal \sphinxstyleemphasis{s}. All of the functions registered to receive callbacks on \sphinxstyleemphasis{s} will be called with \sphinxcode{\sphinxupquote{*args}} and \sphinxcode{\sphinxupquote{**kwargs}}. \end{fulllineitems} \end{fulllineitems} \index{GetRealpathAndStat (class in matplotlib.cbook)@\spxentry{GetRealpathAndStat}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.GetRealpathAndStat}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{GetRealpathAndStat}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \index{Grouper (class in matplotlib.cbook)@\spxentry{Grouper}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{Grouper}}}{\emph{init=()}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} This class provides a lightweight way to group arbitrary objects together into disjoint sets when a full-blown graph data structure would be overkill. Objects can be joined using {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.Grouper.join}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{join()}}}}}, tested for connectedness using {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.Grouper.joined}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joined()}}}}}, and all disjoint sets can be retrieved by using the object as an iterator. The objects being joined must be hashable and weak-referenceable. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{import} \PYG{n}{Grouper} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{class} \PYG{n+nc}{Foo}\PYG{p}{(}\PYG{n+nb}{object}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{s}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{s} \PYG{o}{=} \PYG{n}{s} \PYG{g+gp}{... } \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}repr\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{s} \PYG{g+gp}{...} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{c}\PYG{p}{,} \PYG{n}{d}\PYG{p}{,} \PYG{n}{e}\PYG{p}{,} \PYG{n}{f} \PYG{o}{=} \PYG{p}{[}\PYG{n}{Foo}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{k}{for} \PYG{n}{x} \PYG{o+ow}{in} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{abcdef}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp} \PYG{o}{=} \PYG{n}{Grouper}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{join}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{join}\PYG{p}{(}\PYG{n}{b}\PYG{p}{,} \PYG{n}{c}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{join}\PYG{p}{(}\PYG{n}{d}\PYG{p}{,} \PYG{n}{e}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{sorted}\PYG{p}{(}\PYG{n+nb}{map}\PYG{p}{(}\PYG{n+nb}{tuple}\PYG{p}{,} \PYG{n}{grp}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[(a, b, c), (d, e)]} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{joined}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{b}\PYG{p}{)} \PYG{g+go}{True} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{joined}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{c}\PYG{p}{)} \PYG{g+go}{True} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{grp}\PYG{o}{.}\PYG{n}{joined}\PYG{p}{(}\PYG{n}{a}\PYG{p}{,} \PYG{n}{d}\PYG{p}{)} \PYG{g+go}{False} \end{sphinxVerbatim} \index{clean() (matplotlib.cbook.Grouper method)@\spxentry{clean()}\spxextra{matplotlib.cbook.Grouper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper.clean}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clean}}}{\emph{self}}{} Clean dead weak references from the dictionary. \end{fulllineitems} \index{get\_siblings() (matplotlib.cbook.Grouper method)@\spxentry{get\_siblings()}\spxextra{matplotlib.cbook.Grouper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper.get_siblings}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_siblings}}}{\emph{self}, \emph{a}}{} Return all of the items joined with \sphinxstyleemphasis{a}, including itself. \end{fulllineitems} \index{join() (matplotlib.cbook.Grouper method)@\spxentry{join()}\spxextra{matplotlib.cbook.Grouper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper.join}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{join}}}{\emph{self}, \emph{a}, \emph{*args}}{} Join given arguments into the same set. Accepts one or more arguments. \end{fulllineitems} \index{joined() (matplotlib.cbook.Grouper method)@\spxentry{joined()}\spxextra{matplotlib.cbook.Grouper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper.joined}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{joined}}}{\emph{self}, \emph{a}, \emph{b}}{} Return whether \sphinxstyleemphasis{a} and \sphinxstyleemphasis{b} are members of the same set. \end{fulllineitems} \index{remove() (matplotlib.cbook.Grouper method)@\spxentry{remove()}\spxextra{matplotlib.cbook.Grouper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Grouper.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}, \emph{a}}{}~ \end{fulllineitems} \end{fulllineitems} \index{IgnoredKeywordWarning@\spxentry{IgnoredKeywordWarning}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.IgnoredKeywordWarning}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{IgnoredKeywordWarning}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#UserWarning}{\sphinxcode{\sphinxupquote{UserWarning}}} A class for issuing warnings about keyword arguments that will be ignored by matplotlib \end{fulllineitems} \index{Locked (class in matplotlib.cbook)@\spxentry{Locked}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Locked}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{Locked}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} Context manager to handle locks. Based on code from conda. (c) 2012-2013 Continuum Analytics, Inc. / \sphinxurl{https://www.continuum.io/} All Rights Reserved conda is distributed under the terms of the BSD 3-clause license. Consult LICENSE\_CONDA or \sphinxurl{https://opensource.org/licenses/BSD-3-Clause}. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \index{LOCKFN (matplotlib.cbook.Locked attribute)@\spxentry{LOCKFN}\spxextra{matplotlib.cbook.Locked attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Locked.LOCKFN}}\pysigline{\sphinxbfcode{\sphinxupquote{LOCKFN}}\sphinxbfcode{\sphinxupquote{ = '.matplotlib\_lock'}}} \end{fulllineitems} \index{Locked.TimeoutError@\spxentry{Locked.TimeoutError}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Locked.TimeoutError}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxbfcode{\sphinxupquote{TimeoutError}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#RuntimeError}{\sphinxcode{\sphinxupquote{RuntimeError}}} \end{fulllineitems} \end{fulllineitems} \index{Stack (class in matplotlib.cbook)@\spxentry{Stack}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{Stack}}}{\emph{default=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Stack of elements with a movable cursor. Mimics home/back/forward in a web browser. \index{back() (matplotlib.cbook.Stack method)@\spxentry{back()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.back}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{back}}}{\emph{self}}{} Move the position back and return the current element. \end{fulllineitems} \index{bubble() (matplotlib.cbook.Stack method)@\spxentry{bubble()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.bubble}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{bubble}}}{\emph{self}, \emph{o}}{} Raise \sphinxstyleemphasis{o} to the top of the stack. \sphinxstyleemphasis{o} must be present in the stack. \sphinxstyleemphasis{o} is returned. \end{fulllineitems} \index{clear() (matplotlib.cbook.Stack method)@\spxentry{clear()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}}{} Empty the stack. \end{fulllineitems} \index{empty() (matplotlib.cbook.Stack method)@\spxentry{empty()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.empty}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{empty}}}{\emph{self}}{} Return whether the stack is empty. \end{fulllineitems} \index{forward() (matplotlib.cbook.Stack method)@\spxentry{forward()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.forward}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{forward}}}{\emph{self}}{} Move the position forward and return the current element. \end{fulllineitems} \index{home() (matplotlib.cbook.Stack method)@\spxentry{home()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.home}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{home}}}{\emph{self}}{} Push the first element onto the top of the stack. The first element is returned. \end{fulllineitems} \index{push() (matplotlib.cbook.Stack method)@\spxentry{push()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.push}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{push}}}{\emph{self}, \emph{o}}{} Push \sphinxstyleemphasis{o} to the stack at current position. Discard all later elements. \sphinxstyleemphasis{o} is returned. \end{fulllineitems} \index{remove() (matplotlib.cbook.Stack method)@\spxentry{remove()}\spxextra{matplotlib.cbook.Stack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.Stack.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}, \emph{o}}{} Remove \sphinxstyleemphasis{o} from the stack. \end{fulllineitems} \end{fulllineitems} \index{boxplot\_stats() (in module matplotlib.cbook)@\spxentry{boxplot\_stats()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.boxplot_stats}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{boxplot\_stats}}}{\emph{X}, \emph{whis=1.5}, \emph{bootstrap=None}, \emph{labels=None}, \emph{autorange=False}}{} Returns list of dictionaries of statistics used to draw a series of box and whisker plots. The \sphinxcode{\sphinxupquote{Returns}} section enumerates the required keys of the dictionary. Users can skip this function and pass a user-defined set of dictionaries to the new \sphinxcode{\sphinxupquote{axes.bxp}} method instead of relying on MPL to do the calculations. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode{[}array-like{]} Data that will be represented in the boxplots. Should have 2 or fewer dimensions. \item[{\sphinxstylestrong{whis}}] \leavevmode{[}float, string, or sequence (default = 1.5){]} As a float, determines the reach of the whiskers beyond the first and third quartiles. In other words, where IQR is the interquartile range (\sphinxcode{\sphinxupquote{Q3-Q1}}), the upper whisker will extend to last datum less than \sphinxcode{\sphinxupquote{Q3 + whis*IQR}}. Similarly, the lower whisker will extend to the first datum greater than \sphinxcode{\sphinxupquote{Q1 - whis*IQR}}. Beyond the whiskers, data are considered outliers and are plotted as individual points. This can be set to an ascending sequence of percentiles (e.g., {[}5, 95{]}) to set the whiskers at specific percentiles of the data. Finally, \sphinxcode{\sphinxupquote{whis}} can be the string \sphinxcode{\sphinxupquote{'range'}} to force the whiskers to the minimum and maximum of the data. In the edge case that the 25th and 75th percentiles are equivalent, \sphinxcode{\sphinxupquote{whis}} can be automatically set to \sphinxcode{\sphinxupquote{'range'}} via the \sphinxcode{\sphinxupquote{autorange}} option. \item[{\sphinxstylestrong{bootstrap}}] \leavevmode{[}int, optional{]} Number of times the confidence intervals around the median should be bootstrapped (percentile method). \item[{\sphinxstylestrong{labels}}] \leavevmode{[}array-like, optional{]} Labels for each dataset. Length must be compatible with dimensions of \sphinxcode{\sphinxupquote{X}}. \item[{\sphinxstylestrong{autorange}}] \leavevmode{[}bool, optional (False){]} When \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} and the data are distributed such that the 25th and 75th percentiles are equal, \sphinxcode{\sphinxupquote{whis}} is set to \sphinxcode{\sphinxupquote{'range'}} such that the whisker ends are at the minimum and maximum of the data. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bxpstats}}] \leavevmode{[}list of dict{]} A list of dictionaries containing the results for each column of data. Keys of each dictionary are the following: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Value Description \\ \hline label & tick label for the boxplot \\ \hline mean & arithmetic mean value \\ \hline med & 50th percentile \\ \hline q1 & first quartile (25th percentile) \\ \hline q3 & third quartile (75th percentile) \\ \hline cilo & lower notch around the median \\ \hline cihi & upper notch around the median \\ \hline whislo & end of the lower whisker \\ \hline whishi & end of the upper whisker \\ \hline fliers & outliers \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Non-bootstrapping approach to confidence interval uses Gaussian- based asymptotic approximation: \begin{equation*} \begin{split}\mathrm{med} \pm 1.57 \times \frac{\mathrm{iqr}}{\sqrt{N}}\end{split} \end{equation*} General approach from: McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of Boxplots", The American Statistician, 32:12-16. \end{fulllineitems} \index{contiguous\_regions() (in module matplotlib.cbook)@\spxentry{contiguous\_regions()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.contiguous_regions}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{contiguous\_regions}}}{\emph{mask}}{} Return a list of (ind0, ind1) such that mask{[}ind0:ind1{]}.all() is True and we cover all such regions \end{fulllineitems} \index{dedent() (in module matplotlib.cbook)@\spxentry{dedent()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.dedent}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{dedent}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Remove excess indentation from docstring \sphinxstyleemphasis{s}. Discards any leading blank lines, then removes up to n whitespace characters from each line, where n is the number of leading whitespace characters in the first line. It differs from textwrap.dedent in its deletion of leading blank lines and its use of the first non-blank line to determine the indentation. It is also faster in most cases. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{delete\_masked\_points() (in module matplotlib.cbook)@\spxentry{delete\_masked\_points()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.delete_masked_points}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{delete\_masked\_points}}}{\emph{*args}}{} Find all masked and/or non-finite points in a set of arguments, and return the arguments with only the unmasked points remaining. Arguments can be in any of 5 categories: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \item {} 1-D masked arrays \item {} 1-D ndarrays \item {} ndarrays with more than one dimension \item {} other non-string iterables \item {} anything else \end{enumerate} The first argument must be in one of the first four categories; any argument with a length differing from that of the first argument (and hence anything in category 5) then will be passed through unchanged. Masks are obtained from all arguments of the correct length in categories 1, 2, and 4; a point is bad if masked in a masked array or if it is a nan or inf. No attempt is made to extract a mask from categories 2, 3, and 4 if \sphinxcode{\sphinxupquote{np.isfinite()}} does not yield a Boolean array. All input arguments that are not passed unchanged are returned as ndarrays after removing the points or rows corresponding to masks in any of the arguments. A vastly simpler version of this function was originally written as a helper for Axes.scatter(). \end{fulllineitems} \index{file\_requires\_unicode() (in module matplotlib.cbook)@\spxentry{file\_requires\_unicode()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.file_requires_unicode}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{file\_requires\_unicode}}}{\emph{x}}{} Return whether the given writable file-like object requires Unicode to be written to it. \end{fulllineitems} \index{flatten() (in module matplotlib.cbook)@\spxentry{flatten()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.flatten}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{flatten}}}{\emph{seq}, \emph{scalarp=\textless{}function is\_scalar\_or\_string at 0x7ff96f1909d8\textgreater{}}}{} Return a generator of flattened nested containers For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{import} \PYG{n}{flatten} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{l} \PYG{o}{=} \PYG{p}{(}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{John}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Hunter}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{23}\PYG{p}{)}\PYG{p}{,} \PYG{p}{[}\PYG{p}{[}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{42}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{23}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{p}{)}\PYG{p}{]}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{flatten}\PYG{p}{(}\PYG{n}{l}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[\PYGZsq{}John\PYGZsq{}, \PYGZsq{}Hunter\PYGZsq{}, 1, 23, 42, 5, 23]} \end{sphinxVerbatim} By: Composite of Holger Krekel and Luther Blissett From: \sphinxurl{https://code.activestate.com/recipes/121294/} and Recipe 1.12 in cookbook \end{fulllineitems} \index{get\_label() (in module matplotlib.cbook)@\spxentry{get\_label()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.get_label}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{y}, \emph{default\_name}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{get\_realpath\_and\_stat (in module matplotlib.cbook)@\spxentry{get\_realpath\_and\_stat}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.get_realpath_and_stat}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{get\_realpath\_and\_stat}}}{\emph{path}}{}~ \end{fulllineitems} \index{get\_sample\_data() (in module matplotlib.cbook)@\spxentry{get\_sample\_data()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.get_sample_data}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{get\_sample\_data}}}{\emph{fname}, \emph{asfileobj=True}}{} Return a sample data file. \sphinxstyleemphasis{fname} is a path relative to the \sphinxcode{\sphinxupquote{mpl-data/sample\_data}} directory. If \sphinxstyleemphasis{asfileobj} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} return a file object, otherwise just a file path. Set the rc parameter examples.directory to the directory where we should look, if sample\_data files are stored in a location different than default (which is 'mpl-data/sample\_data{}` at the same level of 'matplotlib{}` Python module files). If the filename ends in .gz, the file is implicitly ungzipped. \end{fulllineitems} \index{index\_of() (in module matplotlib.cbook)@\spxentry{index\_of()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.index_of}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{index\_of}}}{\emph{y}}{} A helper function to get the index of an input to plot against if x values are not explicitly given. Tries to get \sphinxcode{\sphinxupquote{y.index}} (works if this is a pd.Series), if that fails, return np.arange(y.shape{[}0{]}). This will be extended in the future to deal with more types of labeled data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar or array-like{]} The proposed y-value \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}ndarray{]} The x and y values to plot. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{is\_hashable() (in module matplotlib.cbook)@\spxentry{is\_hashable()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.is_hashable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{is\_hashable}}}{\emph{obj}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Returns true if \sphinxstyleemphasis{obj} can be hashed \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{is\_math\_text() (in module matplotlib.cbook)@\spxentry{is\_math\_text()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.is_math_text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{is\_math\_text}}}{\emph{s}}{}~ \end{fulllineitems} \index{is\_numlike() (in module matplotlib.cbook)@\spxentry{is\_numlike()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.is_numlike}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{is\_numlike}}}{\emph{obj}}{} {[}\sphinxstyleemphasis{Deprecated}{]} return true if \sphinxstyleemphasis{obj} looks like a number \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{is\_scalar\_or\_string() (in module matplotlib.cbook)@\spxentry{is\_scalar\_or\_string()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.is_scalar_or_string}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{is\_scalar\_or\_string}}}{\emph{val}}{} Return whether the given object is a scalar or string like. \end{fulllineitems} \index{is\_writable\_file\_like() (in module matplotlib.cbook)@\spxentry{is\_writable\_file\_like()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.is_writable_file_like}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{is\_writable\_file\_like}}}{\emph{obj}}{} Return whether \sphinxstyleemphasis{obj} looks like a file object with a \sphinxstyleemphasis{write} method. \end{fulllineitems} \index{iterable() (in module matplotlib.cbook)@\spxentry{iterable()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.iterable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{iterable}}}{\emph{obj}}{} {[}\sphinxstyleemphasis{Deprecated}{]} return true if \sphinxstyleemphasis{obj} is iterable \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{listFiles() (in module matplotlib.cbook)@\spxentry{listFiles()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.listFiles}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{listFiles}}}{\emph{root}, \emph{patterns='*'}, \emph{recurse=1}, \emph{return\_folders=0}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Recursively list files from Parmar and Martelli in the Python Cookbook \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{local\_over\_kwdict() (in module matplotlib.cbook)@\spxentry{local\_over\_kwdict()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.local_over_kwdict}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{local\_over\_kwdict}}}{\emph{local\_var}, \emph{kwargs}, \emph{*keys}}{} Enforces the priority of a local variable over potentially conflicting argument(s) from a kwargs dict. The following possible output values are considered in order of priority: \begin{quote} local\_var \textgreater{} kwargs{[}keys{[}0{]}{]} \textgreater{} ... \textgreater{} kwargs{[}keys{[}-1{]}{]} \end{quote} The first of these whose value is not None will be returned. If all are None then None will be returned. Each key in keys will be removed from the kwargs dict in place. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{local\_var}}] \leavevmode{[}any object{]}\begin{quote} The local variable (highest priority) \end{quote} \begin{description} \item[{kwargs}] \leavevmode{[}dict{]} Dictionary of keyword arguments; modified in place \item[{keys}] \leavevmode{[}str(s){]} Name(s) of keyword arguments to process, in descending order of priority \end{description} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{out}}] \leavevmode{[}any object{]} Either local\_var or one of kwargs{[}key{]} for key in keys \end{description} \item[{Raises}] \leavevmode\begin{description} \item[{IgnoredKeywordWarning}] \leavevmode For each key in keys that is removed from kwargs but not used as the output value \end{description} \end{description}\end{quote} \end{fulllineitems} \index{maxdict (class in matplotlib.cbook)@\spxentry{maxdict}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.maxdict}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{maxdict}}}{\emph{maxsize}}{} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}} A dictionary with a maximum size; this doesn't override all the relevant methods to constrain the size, just setitem, so use with caution \end{fulllineitems} \index{mkdirs() (in module matplotlib.cbook)@\spxentry{mkdirs()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.mkdirs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{mkdirs}}}{\emph{newdir}, \emph{mode=511}}{} {[}\sphinxstyleemphasis{Deprecated}{]} make directory \sphinxstyleemphasis{newdir} recursively, and set \sphinxstyleemphasis{mode}. Equivalent to \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZgt{}} \PYG{n}{mkdir} \PYG{o}{\PYGZhy{}}\PYG{n}{p} \PYG{n}{NEWDIR} \PYG{o}{\PYGZgt{}} \PYG{n}{chmod} \PYG{n}{MODE} \PYG{n}{NEWDIR} \end{sphinxVerbatim} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{normalize\_kwargs() (in module matplotlib.cbook)@\spxentry{normalize\_kwargs()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.normalize_kwargs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{normalize\_kwargs}}}{\emph{kw}, \emph{alias\_mapping=None}, \emph{required=()}, \emph{forbidden=()}, \emph{allowed=None}}{} Helper function to normalize kwarg inputs The order they are resolved are: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} aliasing \item {} required \item {} forbidden \item {} allowed \end{enumerate} This order means that only the canonical names need appear in \sphinxcode{\sphinxupquote{allowed}}, \sphinxcode{\sphinxupquote{forbidden}}, \sphinxcode{\sphinxupquote{required}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alias\_mapping, dict, optional}}] \leavevmode A mapping between a canonical name to a list of aliases, in order of precedence from lowest to highest. If the canonical value is not in the list it is assumed to have the highest priority. \item[{\sphinxstylestrong{required}}] \leavevmode{[}iterable, optional{]} A tuple of fields that must be in kwargs. \item[{\sphinxstylestrong{forbidden}}] \leavevmode{[}iterable, optional{]} A list of keys which may not be in kwargs \item[{\sphinxstylestrong{allowed}}] \leavevmode{[}tuple, optional{]} A tuple of allowed fields. If this not None, then raise if \sphinxcode{\sphinxupquote{kw}} contains any keys not in the union of \sphinxcode{\sphinxupquote{required}} and \sphinxcode{\sphinxupquote{allowed}}. To allow only the required fields pass in \sphinxcode{\sphinxupquote{()}} for \sphinxcode{\sphinxupquote{allowed}} \end{description} \item[{Raises}] \leavevmode\begin{description} \item[{TypeError}] \leavevmode To match what python raises if invalid args/kwargs are passed to a callable. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{open\_file\_cm() (in module matplotlib.cbook)@\spxentry{open\_file\_cm()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.open_file_cm}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{open\_file\_cm}}}{\emph{path\_or\_file}, \emph{mode='r'}, \emph{encoding=None}}{} Pass through file objects and context-manage \sphinxcode{\sphinxupquote{PathLike}}s. \end{fulllineitems} \index{print\_cycles() (in module matplotlib.cbook)@\spxentry{print\_cycles()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.print_cycles}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{print\_cycles}}}{\emph{objects}, \emph{outstream=\textless{}\_io.TextIOWrapper name='\textless{}stdout\textgreater{}' mode='w' encoding='UTF-8'\textgreater{}}, \emph{show\_progress=False}}{}~\begin{description} \item[{\sphinxstyleemphasis{objects}}] \leavevmode A list of objects to find cycles in. It is often useful to pass in gc.garbage to find the cycles that are preventing some objects from being garbage collected. \item[{\sphinxstyleemphasis{outstream}}] \leavevmode The stream for output. \item[{\sphinxstyleemphasis{show\_progress}}] \leavevmode If True, print the number of objects reached as they are found. \end{description} \end{fulllineitems} \index{pts\_to\_midstep() (in module matplotlib.cbook)@\spxentry{pts\_to\_midstep()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.pts_to_midstep}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{pts\_to\_midstep}}}{\emph{x}, \emph{*args}}{} Convert continuous line to mid-steps. Given a set of \sphinxcode{\sphinxupquote{N}} points convert to \sphinxcode{\sphinxupquote{2N}} points which when connected linearly give a step function which changes values at the middle of the intervals. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array{]} The x location of the steps. May be empty. \item[{\sphinxstylestrong{y1, ..., yp}}] \leavevmode{[}array{]} y arrays to be turned into steps; all must be the same length as \sphinxcode{\sphinxupquote{x}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{out}}] \leavevmode{[}array{]} The x and y values converted to steps in the same order as the input; can be unpacked as \sphinxcode{\sphinxupquote{x\_out, y1\_out, ..., yp\_out}}. If the input is length \sphinxcode{\sphinxupquote{N}}, each of these arrays will be length \sphinxcode{\sphinxupquote{2N}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \textgreater{}\textgreater{} x\_s, y1\_s, y2\_s = pts\_to\_midstep(x, y1, y2) \end{fulllineitems} \index{pts\_to\_poststep() (in module matplotlib.cbook)@\spxentry{pts\_to\_poststep()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.pts_to_poststep}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{pts\_to\_poststep}}}{\emph{x}, \emph{*args}}{} Convert continuous line to post-steps. Given a set of \sphinxcode{\sphinxupquote{N}} points convert to \sphinxcode{\sphinxupquote{2N + 1}} points, which when connected linearly give a step function which changes values at the end of the intervals. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array{]} The x location of the steps. May be empty. \item[{\sphinxstylestrong{y1, ..., yp}}] \leavevmode{[}array{]} y arrays to be turned into steps; all must be the same length as \sphinxcode{\sphinxupquote{x}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{out}}] \leavevmode{[}array{]} The x and y values converted to steps in the same order as the input; can be unpacked as \sphinxcode{\sphinxupquote{x\_out, y1\_out, ..., yp\_out}}. If the input is length \sphinxcode{\sphinxupquote{N}}, each of these arrays will be length \sphinxcode{\sphinxupquote{2N + 1}}. For \sphinxcode{\sphinxupquote{N=0}}, the length will be 0. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \textgreater{}\textgreater{} x\_s, y1\_s, y2\_s = pts\_to\_poststep(x, y1, y2) \end{fulllineitems} \index{pts\_to\_prestep() (in module matplotlib.cbook)@\spxentry{pts\_to\_prestep()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.pts_to_prestep}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{pts\_to\_prestep}}}{\emph{x}, \emph{*args}}{} Convert continuous line to pre-steps. Given a set of \sphinxcode{\sphinxupquote{N}} points, convert to \sphinxcode{\sphinxupquote{2N - 1}} points, which when connected linearly give a step function which changes values at the beginning of the intervals. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array{]} The x location of the steps. May be empty. \item[{\sphinxstylestrong{y1, ..., yp}}] \leavevmode{[}array{]} y arrays to be turned into steps; all must be the same length as \sphinxcode{\sphinxupquote{x}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{out}}] \leavevmode{[}array{]} The x and y values converted to steps in the same order as the input; can be unpacked as \sphinxcode{\sphinxupquote{x\_out, y1\_out, ..., yp\_out}}. If the input is length \sphinxcode{\sphinxupquote{N}}, each of these arrays will be length \sphinxcode{\sphinxupquote{2N + 1}}. For \sphinxcode{\sphinxupquote{N=0}}, the length will be 0. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \textgreater{}\textgreater{} x\_s, y1\_s, y2\_s = pts\_to\_prestep(x, y1, y2) \end{fulllineitems} \index{report\_memory() (in module matplotlib.cbook)@\spxentry{report\_memory()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.report_memory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{report\_memory}}}{\emph{i=0}}{} Return the memory consumed by the process. \end{fulllineitems} \index{safe\_first\_element() (in module matplotlib.cbook)@\spxentry{safe\_first\_element()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.safe_first_element}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{safe\_first\_element}}}{\emph{obj}}{}~ \end{fulllineitems} \index{safe\_masked\_invalid() (in module matplotlib.cbook)@\spxentry{safe\_masked\_invalid()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.safe_masked_invalid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{safe\_masked\_invalid}}}{\emph{x}, \emph{copy=False}}{}~ \end{fulllineitems} \index{safezip() (in module matplotlib.cbook)@\spxentry{safezip()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.safezip}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{safezip}}}{\emph{*args}}{} {[}\sphinxstyleemphasis{Deprecated}{]} make sure \sphinxstyleemphasis{args} are equal len before zipping \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{sanitize\_sequence() (in module matplotlib.cbook)@\spxentry{sanitize\_sequence()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.sanitize_sequence}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{sanitize\_sequence}}}{\emph{data}}{} Converts dictview object to list \end{fulllineitems} \index{silent\_list (class in matplotlib.cbook)@\spxentry{silent\_list}\spxextra{class in matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.silent_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{silent\_list}}}{\emph{type}, \emph{seq=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#list}{\sphinxcode{\sphinxupquote{list}}} override repr when returning a list of matplotlib artists to prevent long, meaningless output. This is meant to be used for a homogeneous list of a given type \end{fulllineitems} \index{simple\_linear\_interpolation() (in module matplotlib.cbook)@\spxentry{simple\_linear\_interpolation()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.simple_linear_interpolation}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{simple\_linear\_interpolation}}}{\emph{a}, \emph{steps}}{} Resample an array with \sphinxcode{\sphinxupquote{steps - 1}} points between original point pairs. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{a}}] \leavevmode{[}array, shape (n, ...){]} \item[{\sphinxstylestrong{steps}}] \leavevmode{[}int{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{array, shape \sphinxcode{\sphinxupquote{((n - 1) * steps + 1, ...)}}}] \leavevmode \item[{Along each column of \sphinxstyleemphasis{a}, \sphinxcode{\sphinxupquote{(steps - 1)}} points are introduced between}] \leavevmode \item[{each original values; the values are linearly interpolated.}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{strip\_math() (in module matplotlib.cbook)@\spxentry{strip\_math()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.strip_math}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{strip\_math}}}{\emph{s}}{} Remove latex formatting from mathtext. Only handles fully math and fully non-math strings. \end{fulllineitems} \index{to\_filehandle() (in module matplotlib.cbook)@\spxentry{to\_filehandle()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.to_filehandle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{to\_filehandle}}}{\emph{fname}, \emph{flag='r'}, \emph{return\_opened=False}, \emph{encoding=None}}{} Convert a path to an open file handle or pass-through a file-like object. Consider using {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.open_file_cm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{open\_file\_cm}}}}} instead, as it allows one to properly close newly created file objects more easily. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or PathLike or file-like object{]} If \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}} or \sphinxhref{https://docs.python.org/3/library/os.html\#os.PathLike}{\sphinxcode{\sphinxupquote{os.PathLike}}}, the file is opened using the flags specified by \sphinxstyleemphasis{flag} and \sphinxstyleemphasis{encoding}. If a file-like object, it is passed through. \item[{\sphinxstylestrong{flag}}] \leavevmode{[}str, default 'r'{]} Passed as the \sphinxstyleemphasis{mode} argument to \sphinxhref{https://docs.python.org/3/library/functions.html\#open}{\sphinxcode{\sphinxupquote{open}}} when \sphinxstyleemphasis{fname} is \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}} or \sphinxhref{https://docs.python.org/3/library/os.html\#os.PathLike}{\sphinxcode{\sphinxupquote{os.PathLike}}}; ignored if \sphinxstyleemphasis{fname} is file-like. \item[{\sphinxstylestrong{return\_opened}}] \leavevmode{[}bool, default False{]} If True, return both the file object and a boolean indicating whether this was a new file (that the caller needs to close). If False, return only the new file. \item[{\sphinxstylestrong{encoding}}] \leavevmode{[}str or None, default None{]} Passed as the \sphinxstyleemphasis{mode} argument to \sphinxhref{https://docs.python.org/3/library/functions.html\#open}{\sphinxcode{\sphinxupquote{open}}} when \sphinxstyleemphasis{fname} is \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}} or \sphinxhref{https://docs.python.org/3/library/os.html\#os.PathLike}{\sphinxcode{\sphinxupquote{os.PathLike}}}; ignored if \sphinxstyleemphasis{fname} is file-like. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fh}}] \leavevmode{[}file-like{]} \item[{\sphinxstylestrong{opened}}] \leavevmode{[}bool{]} \sphinxstyleemphasis{opened} is only returned if \sphinxstyleemphasis{return\_opened} is True. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{unicode\_safe() (in module matplotlib.cbook)@\spxentry{unicode\_safe()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.unicode_safe}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{unicode\_safe}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \index{violin\_stats() (in module matplotlib.cbook)@\spxentry{violin\_stats()}\spxextra{in module matplotlib.cbook}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cbook_api:matplotlib.cbook.violin_stats}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cbook.}}\sphinxbfcode{\sphinxupquote{violin\_stats}}}{\emph{X}, \emph{method}, \emph{points=100}}{} Returns a list of dictionaries of data which can be used to draw a series of violin plots. See the \sphinxcode{\sphinxupquote{Returns}} section below to view the required keys of the dictionary. Users can skip this function and pass a user-defined set of dictionaries to the \sphinxcode{\sphinxupquote{axes.vplot}} method instead of using MPL to do the calculations. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode{[}array-like{]} Sample data that will be used to produce the gaussian kernel density estimates. Must have 2 or fewer dimensions. \item[{\sphinxstylestrong{method}}] \leavevmode{[}callable{]} The method used to calculate the kernel density estimate for each column of data. When called via \sphinxcode{\sphinxupquote{method(v, coords)}}, it should return a vector of the values of the KDE evaluated at the values specified in coords. \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar, default = 100{]} Defines the number of points to evaluate each of the gaussian kernel density estimates at. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{A list of dictionaries containing the results for each column of data.}] \leavevmode \item[{The dictionaries contain at least the following:}] \leavevmode\begin{itemize} \item {} coords: A list of scalars containing the coordinates this particular kernel density estimate was evaluated at. \item {} vals: A list of scalars containing the values of the kernel density estimate at each of the coordinates given in \sphinxcode{\sphinxupquote{coords}}. \item {} mean: The mean value for this column of data. \item {} median: The median value for this column of data. \item {} min: The minimum value for this column of data. \item {} max: The maximum value for this column of data. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.cm}}} \label{\detokenize{api/cm_api:module-matplotlib.cm}}\label{\detokenize{api/cm_api:matplotlib-cm}}\label{\detokenize{api/cm_api::doc}}\index{matplotlib.cm (module)@\spxentry{matplotlib.cm}\spxextra{module}} Builtin colormaps, colormap handling utilities, and the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} mixin. \sphinxstrong{See also:} \DUrole{xref,std,std-doc}{/gallery/color/colormap\_reference} for a list of builtin colormaps. {\hyperref[\detokenize{tutorials/colors/colormap-manipulation::doc}]{\sphinxcrossref{\DUrole{doc}{Creating Colormaps in Matplotlib}}}} for examples of how to make colormaps and {\hyperref[\detokenize{tutorials/colors/colormaps::doc}]{\sphinxcrossref{\DUrole{doc}{Choosing Colormaps in Matplotlib}}}} an in-depth discussion of choosing colormaps. {\hyperref[\detokenize{tutorials/colors/colormapnorms::doc}]{\sphinxcrossref{\DUrole{doc}{Colormap Normalization}}}} for more details about data normalization \index{ScalarMappable (class in matplotlib.cm)@\spxentry{ScalarMappable}\spxextra{class in matplotlib.cm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.cm.}}\sphinxbfcode{\sphinxupquote{ScalarMappable}}}{\emph{norm=None}, \emph{cmap=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} This is a mixin class to support scalar data to RGBA mapping. The ScalarMappable makes use of data normalization before returning RGBA colors from the given colormap. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance{]} The normalizing object which scales data, typically into the interval \sphinxcode{\sphinxupquote{{[}0, 1{]}}}. If \sphinxstyleemphasis{None}, \sphinxstyleemphasis{norm} defaults to a \sphinxstyleemphasis{colors.Normalize} object which initializes its scaling based on the first data processed. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance{]} The colormap used to map normalized data values to RGBA colors. \end{description} \end{description}\end{quote} \index{add\_checker() (matplotlib.cm.ScalarMappable method)@\spxentry{add\_checker()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{autoscale() (matplotlib.cm.ScalarMappable method)@\spxentry{autoscale()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.cm.ScalarMappable method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{changed() (matplotlib.cm.ScalarMappable method)@\spxentry{changed()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.cm.ScalarMappable method)@\spxentry{check\_update()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{cmap (matplotlib.cm.ScalarMappable attribute)@\spxentry{cmap}\spxextra{matplotlib.cm.ScalarMappable attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.cmap}}\pysigline{\sphinxbfcode{\sphinxupquote{cmap}}\sphinxbfcode{\sphinxupquote{ = None}}} The Colormap instance of this ScalarMappable. \end{fulllineitems} \index{colorbar (matplotlib.cm.ScalarMappable attribute)@\spxentry{colorbar}\spxextra{matplotlib.cm.ScalarMappable attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.colorbar}}\pysigline{\sphinxbfcode{\sphinxupquote{colorbar}}\sphinxbfcode{\sphinxupquote{ = None}}} The last colorbar associated with this ScalarMappable. May be None. \end{fulllineitems} \index{get\_alpha() (matplotlib.cm.ScalarMappable method)@\spxentry{get\_alpha()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} Always returns 1. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_array() (matplotlib.cm.ScalarMappable method)@\spxentry{get\_array()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_clim() (matplotlib.cm.ScalarMappable method)@\spxentry{get\_clim()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_cmap() (matplotlib.cm.ScalarMappable method)@\spxentry{get\_cmap()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{norm (matplotlib.cm.ScalarMappable attribute)@\spxentry{norm}\spxextra{matplotlib.cm.ScalarMappable attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.norm}}\pysigline{\sphinxbfcode{\sphinxupquote{norm}}\sphinxbfcode{\sphinxupquote{ = None}}} The Normalization instance of this ScalarMappable. \end{fulllineitems} \index{set\_array() (matplotlib.cm.ScalarMappable method)@\spxentry{set\_array()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.cm.ScalarMappable method)@\spxentry{set\_clim()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_cmap() (matplotlib.cm.ScalarMappable method)@\spxentry{set\_cmap()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_norm() (matplotlib.cm.ScalarMappable method)@\spxentry{set\_norm()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{to\_rgba() (matplotlib.cm.ScalarMappable method)@\spxentry{to\_rgba()}\spxextra{matplotlib.cm.ScalarMappable method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \end{fulllineitems} \index{get\_cmap() (in module matplotlib.cm)@\spxentry{get\_cmap()}\spxextra{in module matplotlib.cm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.get_cmap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cm.}}\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{name=None}, \emph{lut=None}}{} Get a colormap instance, defaulting to rc values if \sphinxstyleemphasis{name} is None. Colormaps added with {\hyperref[\detokenize{api/cm_api:matplotlib.cm.register_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_cmap()}}}}} take precedence over built-in colormaps. If \sphinxstyleemphasis{name} is a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance, it will be returned. If \sphinxstyleemphasis{lut} is not None it must be an integer giving the number of entries desired in the lookup table, and \sphinxstyleemphasis{name} must be a standard mpl colormap name. \end{fulllineitems} \index{register\_cmap() (in module matplotlib.cm)@\spxentry{register\_cmap()}\spxextra{in module matplotlib.cm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.register_cmap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cm.}}\sphinxbfcode{\sphinxupquote{register\_cmap}}}{\emph{name=None}, \emph{cmap=None}, \emph{data=None}, \emph{lut=None}}{} Add a colormap to the set recognized by {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cmap()}}}}}. It can be used in two ways: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{register\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{name}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{swirly}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{swirly\PYGZus{}cmap}\PYG{p}{)} \PYG{n}{register\PYGZus{}cmap}\PYG{p}{(}\PYG{n}{name}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{choppy}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{choppydata}\PYG{p}{,} \PYG{n}{lut}\PYG{o}{=}\PYG{l+m+mi}{128}\PYG{p}{)} \end{sphinxVerbatim} In the first case, \sphinxstyleemphasis{cmap} must be a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance. The \sphinxstyleemphasis{name} is optional; if absent, the name will be the \sphinxcode{\sphinxupquote{name}} attribute of the \sphinxstyleemphasis{cmap}. In the second case, the three arguments are passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap}}}}} initializer, and the resulting colormap is registered. \end{fulllineitems} \index{revcmap() (in module matplotlib.cm)@\spxentry{revcmap()}\spxextra{in module matplotlib.cm}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/cm_api:matplotlib.cm.revcmap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.cm.}}\sphinxbfcode{\sphinxupquote{revcmap}}}{\emph{data}}{} Can only handle specification \sphinxstyleemphasis{data} in dictionary format. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.collections}}} \label{\detokenize{api/collections_api:matplotlib-collections}}\label{\detokenize{api/collections_api::doc}} \sphinxincludegraphics[]{inheritance-32202db6c50e805e1c1e8f37756383f8ac497687.pdf} \phantomsection\label{\detokenize{api/collections_api:module-matplotlib.collections}}\index{matplotlib.collections (module)@\spxentry{matplotlib.collections}\spxextra{module}} Classes for the efficient drawing of large collections of objects that share most properties, e.g., a large number of line segments or polygons. The classes are not meant to be as flexible as their single element counterparts (e.g., you may not be able to select all line styles) but they are meant to be fast for common use cases (e.g., a large set of solid line segments). \index{AsteriskPolygonCollection (class in matplotlib.collections)@\spxentry{AsteriskPolygonCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{AsteriskPolygonCollection}}}{\emph{numsides}, \emph{rotation=0}, \emph{sizes=(1}, \emph{)}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.RegularPolyCollection}}}}} Draw a collection of regular asterisks with \sphinxstyleemphasis{numsides} points. \begin{description} \item[{\sphinxstyleemphasis{numsides}}] \leavevmode the number of sides of the polygon \item[{\sphinxstyleemphasis{rotation}}] \leavevmode the rotation of the polygon in radians \item[{\sphinxstyleemphasis{sizes}}] \leavevmode gives the area of the circle circumscribing the regular polygon in points\textasciicircum{}2 Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{description} Example: see \DUrole{xref,std,std-doc}{/gallery/event\_handling/lasso\_demo} for a complete example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{offsets} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{facecolors} \PYG{o}{=} \PYG{p}{[}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{jet}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{k}{for} \PYG{n}{x} \PYG{o+ow}{in} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)}\PYG{p}{]} \PYG{n}{black} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{collection} \PYG{o}{=} \PYG{n}{RegularPolyCollection}\PYG{p}{(} \PYG{n}{numsides}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} a pentagon} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{sizes}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{facecolors}\PYG{o}{=}\PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{o}{=}\PYG{p}{(}\PYG{n}{black}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{linewidths}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{offsets}\PYG{o}{=}\PYG{n}{offsets}\PYG{p}{,} \PYG{n}{transOffset}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} \index{add\_callback() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_numsides() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_numsides()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_numsides}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numsides}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_rotation() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_rotation()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.AsteriskPolygonCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.AsteriskPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.AsteriskPolygonCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.AsteriskPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.AsteriskPolygonCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{BrokenBarHCollection (class in matplotlib.collections)@\spxentry{BrokenBarHCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{BrokenBarHCollection}}}{\emph{xranges}, \emph{yrange}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PolyCollection}}}}} A collection of horizontal bars spanning \sphinxstyleemphasis{yrange} with a sequence of \sphinxstyleemphasis{xranges}. \begin{description} \item[{\sphinxstyleemphasis{xranges}}] \leavevmode sequence of (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xwidth}) \item[{\sphinxstyleemphasis{yrange}}] \leavevmode \sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ywidth} Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{description} \index{add\_callback() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{verts}, \emph{closed=True}}{} This allows one to delay initialization of the vertices. \end{fulllineitems} \index{set\_picker() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_verts() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_verts()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts}}}{\emph{self}, \emph{verts}, \emph{closed=True}}{} This allows one to delay initialization of the vertices. \end{fulllineitems} \index{set\_verts\_and\_codes() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_verts\_and\_codes()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_verts_and_codes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts\_and\_codes}}}{\emph{self}, \emph{verts}, \emph{codes}}{} This allows one to initialize vertices with path codes. \end{fulllineitems} \index{set\_visible() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{span\_where() (matplotlib.collections.BrokenBarHCollection static method)@\spxentry{span\_where()}\spxextra{matplotlib.collections.BrokenBarHCollection static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.span_where}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{span\_where}}}{\emph{x}, \emph{ymin}, \emph{ymax}, \emph{where}, \emph{**kwargs}}{} Create a BrokenBarHCollection to plot horizontal bars from over the regions in \sphinxstyleemphasis{x} where \sphinxstyleemphasis{where} is True. The bars range on the y-axis from \sphinxstyleemphasis{ymin} to \sphinxstyleemphasis{ymax} A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}} is returned. \sphinxstyleemphasis{kwargs} are passed on to the collection. \end{fulllineitems} \index{stale (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.BrokenBarHCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.BrokenBarHCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.BrokenBarHCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.BrokenBarHCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{CircleCollection (class in matplotlib.collections)@\spxentry{CircleCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{CircleCollection}}}{\emph{sizes}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.collections.\_CollectionWithSizes}} A collection of circles, drawn using splines. \sphinxstyleemphasis{sizes} Gives the area of the circle in points\textasciicircum{}2 Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \index{add\_callback() (matplotlib.collections.CircleCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.CircleCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.CircleCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.CircleCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.CircleCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.CircleCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.CircleCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.CircleCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.CircleCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.CircleCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.CircleCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.CircleCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.CircleCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.CircleCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.CircleCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.CircleCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.CircleCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.CircleCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.CircleCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.CircleCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.CircleCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.CircleCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.CircleCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.CircleCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.CircleCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.CircleCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.CircleCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.CircleCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.CircleCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.CircleCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.CircleCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.CircleCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.CircleCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.CircleCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.CircleCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.CircleCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.CircleCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.CircleCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.CircleCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.CircleCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.CircleCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.CircleCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.CircleCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.CircleCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.CircleCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.CircleCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.CircleCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.CircleCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.CircleCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.CircleCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.CircleCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.CircleCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.CircleCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.CircleCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.CircleCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.CircleCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.CircleCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.CircleCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.CircleCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.CircleCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.CircleCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.CircleCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.CircleCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.CircleCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.CircleCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.CircleCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.CircleCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.CircleCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.CircleCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.CircleCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.CircleCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.CircleCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.CircleCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.CircleCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.CircleCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.CircleCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.CircleCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.CircleCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.CircleCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.CircleCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.CircleCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.CircleCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.CircleCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.CircleCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.CircleCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.CircleCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.CircleCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.CircleCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.CircleCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.CircleCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.CircleCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.CircleCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.CircleCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.CircleCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.CircleCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.CircleCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.CircleCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.CircleCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.CircleCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.CircleCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.CircleCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.CircleCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.CircleCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.CircleCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.CircleCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.CircleCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.CircleCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.CircleCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.CircleCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.CircleCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.CircleCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.CircleCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.CircleCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.CircleCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.CircleCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.CircleCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.CircleCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.CircleCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.CircleCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.CircleCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.CircleCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.CircleCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.CircleCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.CircleCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.CircleCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.CircleCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.CircleCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.CircleCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.CircleCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.CircleCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.CircleCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.CircleCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.CircleCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.CircleCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.CircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.CircleCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.CircleCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.CircleCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{Collection (class in matplotlib.collections)@\spxentry{Collection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{Collection}}}{\emph{edgecolors=None}, \emph{facecolors=None}, \emph{linewidths=None}, \emph{linestyles='solid'}, \emph{capstyle=None}, \emph{joinstyle=None}, \emph{antialiaseds=None}, \emph{offsets=None}, \emph{transOffset=None}, \emph{norm=None}, \emph{cmap=None}, \emph{pickradius=5.0}, \emph{hatch=None}, \emph{urls=None}, \emph{offset\_position='screen'}, \emph{zorder=1}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}}, {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} Base class for Collections. Must be subclassed to be usable. All properties in a collection must be sequences or scalars; if scalars, they will be converted to sequences. The property of the ith element of the collection is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{prop}\PYG{p}{[}\PYG{n}{i} \PYG{o}{\PYGZpc{}} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{props}\PYG{p}{)}\PYG{p}{]} \end{sphinxVerbatim} Exceptions are \sphinxstyleemphasis{capstyle} and \sphinxstyleemphasis{joinstyle} properties, these can only be set globally for the whole collection. Keyword arguments and default values: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{capstyle}: None \item {} \sphinxstyleemphasis{joinstyle}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{offset\_position}: 'screen' (default) or 'data' \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{hatch}: None \item {} \sphinxstyleemphasis{zorder}: 1 \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets). If offset\_position is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. The use of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} is optional. If the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} matrix \_A is not None (i.e., a call to set\_array has been made), at draw time a call to scalar mappable will be made to set the face colors. Create a Collection \%(Collection)s \index{add\_callback() (matplotlib.collections.Collection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.Collection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.Collection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.Collection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.Collection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.Collection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.Collection method)@\spxentry{changed()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.Collection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.Collection method)@\spxentry{contains()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.Collection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.Collection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.Collection method)@\spxentry{draw()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.Collection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.Collection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.Collection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.Collection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.Collection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.Collection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.Collection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.Collection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.Collection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.Collection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.Collection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.Collection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.Collection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.Collection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.Collection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.Collection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.Collection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.Collection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.Collection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.Collection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.Collection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.Collection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.Collection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.Collection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.Collection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.Collection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.Collection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.Collection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.Collection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.Collection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.Collection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.Collection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.Collection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.Collection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.Collection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.Collection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.Collection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.Collection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.Collection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.Collection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.Collection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.Collection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.Collection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.Collection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.Collection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.Collection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.Collection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.Collection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.Collection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.Collection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.Collection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.Collection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.Collection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.Collection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.Collection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.Collection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.Collection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.Collection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.Collection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.Collection method)@\spxentry{pick()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.Collection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.Collection method)@\spxentry{properties()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.Collection method)@\spxentry{remove()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.Collection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.Collection method)@\spxentry{set()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.Collection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.Collection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.Collection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.Collection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.Collection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.Collection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.Collection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.Collection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.Collection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.Collection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.Collection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.Collection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.Collection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.Collection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.Collection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.Collection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.Collection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.Collection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.Collection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.Collection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.Collection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.Collection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.Collection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.Collection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.Collection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.Collection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.Collection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.Collection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.Collection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.Collection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.Collection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.Collection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.Collection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.Collection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.Collection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.Collection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.Collection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.Collection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.Collection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.Collection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.Collection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.Collection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.Collection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.Collection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.Collection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.Collection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.Collection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.Collection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.Collection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.Collection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.Collection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.Collection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.Collection method)@\spxentry{update()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.Collection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.Collection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.Collection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.Collection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.Collection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.Collection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{EllipseCollection (class in matplotlib.collections)@\spxentry{EllipseCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{EllipseCollection}}}{\emph{widths}, \emph{heights}, \emph{angles}, \emph{units='points'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}} A collection of ellipses, drawn using splines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{widths}}] \leavevmode{[}array-like{]} The lengths of the first axes (e.g., major axis lengths). \item[{\sphinxstylestrong{heights}}] \leavevmode{[}array-like{]} The lengths of second axes. \item[{\sphinxstylestrong{angles}}] \leavevmode{[}array-like{]} The angles of the first axes, degrees CCW from the x-axis. \item[{\sphinxstylestrong{units}}] \leavevmode{[}\{'points', 'inches', 'dots', 'width', 'height', 'x', 'y', 'xy'\}{]} The units in which majors and minors are given; 'width' and 'height' refer to the dimensions of the axes, while 'x' and 'y' refer to the \sphinxstyleemphasis{offsets} data units. 'xy' differs from all others in that the angle as plotted varies with the aspect ratio, and equals the specified angle only when the aspect ratio is unity. Hence it behaves the same as the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ellipse}}}}} with \sphinxcode{\sphinxupquote{axes.transData}} as its transform. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs inherited from the base {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}}. Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{description} \end{description}\end{quote} \index{add\_callback() (matplotlib.collections.EllipseCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.EllipseCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.EllipseCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.EllipseCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.EllipseCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.EllipseCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.EllipseCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.EllipseCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.EllipseCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.EllipseCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.EllipseCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.EllipseCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.EllipseCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.EllipseCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.EllipseCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.EllipseCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.EllipseCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.EllipseCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.EllipseCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.EllipseCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.EllipseCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.EllipseCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.EllipseCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.EllipseCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.EllipseCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.EllipseCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.EllipseCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.EllipseCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.EllipseCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.EllipseCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.EllipseCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.EllipseCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.EllipseCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.EllipseCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.EllipseCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EllipseCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{EventCollection (class in matplotlib.collections)@\spxentry{EventCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{EventCollection}}}{\emph{positions}, \emph{orientation=None}, \emph{lineoffset=0}, \emph{linelength=1}, \emph{linewidth=None}, \emph{color=None}, \emph{linestyle='solid'}, \emph{antialiased=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} A collection of discrete events. The events are given by a 1-dimensional array, usually the position of something along an axis, such as time or length. They do not have an amplitude and are displayed as vertical or horizontal parallel bars. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{positions}}] \leavevmode{[}1D array-like object{]} Each value is an event. \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{None, 'horizontal', 'vertical'\}, optional{]} The orientation of the \sphinxstylestrong{collection} (the event bars are along the orthogonal direction). Defaults to 'horizontal' if not specified or None. \item[{\sphinxstylestrong{lineoffset}}] \leavevmode{[}scalar, optional, default: 0{]} The offset of the center of the markers from the origin, in the direction orthogonal to \sphinxstyleemphasis{orientation}. \item[{\sphinxstylestrong{linelength}}] \leavevmode{[}scalar, optional, default: 1{]} The total height of the marker (i.e. the marker stretches from \sphinxcode{\sphinxupquote{lineoffset - linelength/2}} to \sphinxcode{\sphinxupquote{lineoffset + linelength/2}}). \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}scalar or None, optional, default: None{]} If it is None, defaults to its rcParams setting, in sequence form. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color, sequence of colors or None, optional, default: None{]} If it is None, defaults to its rcParams setting, in sequence form. \item[{\sphinxstylestrong{linestyle}}] \leavevmode{[}str or tuple, optional, default: 'solid'{]} Valid strings are {[}'solid', 'dashed', 'dashdot', 'dotted', '-', '--', '-.', ':'{]}. Dash tuples should be of the form: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxstyleemphasis{onoffseq} is an even length tuple of on and off ink in points. \item[{\sphinxstylestrong{antialiased}}] \leavevmode{[}\{None, 1, 2\}, optional{]} If it is None, defaults to its rcParams setting, in sequence form. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}optional{]} Other keyword arguments are line collection properties. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} for a list of the valid properties. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{eventcollection_demo}.pdf} \end{figure} \index{add\_callback() (matplotlib.collections.EventCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.EventCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{add\_positions() (matplotlib.collections.EventCollection method)@\spxentry{add\_positions()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.add_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_positions}}}{\emph{self}, \emph{position}}{} add one or more events at the specified positions \end{fulllineitems} \index{aname (matplotlib.collections.EventCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{append\_positions() (matplotlib.collections.EventCollection method)@\spxentry{append\_positions()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.append_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{append\_positions}}}{\emph{self}, \emph{position}}{} add one or more events at the specified positions \end{fulllineitems} \index{autoscale() (matplotlib.collections.EventCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.EventCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.EventCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.EventCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.EventCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.EventCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.EventCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.EventCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.EventCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{extend\_positions() (matplotlib.collections.EventCollection method)@\spxentry{extend\_positions()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.extend_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{extend\_positions}}}{\emph{self}, \emph{position}}{} add one or more events at the specified positions \end{fulllineitems} \index{findobj() (matplotlib.collections.EventCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.EventCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.EventCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.EventCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.EventCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.EventCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.EventCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.EventCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.EventCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.EventCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.EventCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.EventCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.EventCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_color() (matplotlib.collections.EventCollection method)@\spxentry{get\_color()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{} get the color of the lines used to mark each event \end{fulllineitems} \index{get\_colors() (matplotlib.collections.EventCollection method)@\spxentry{get\_colors()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_colors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_colors}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_contains() (matplotlib.collections.EventCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.EventCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.EventCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.EventCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.EventCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.EventCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.EventCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.EventCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.EventCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.EventCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.EventCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.EventCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.EventCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.EventCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.EventCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.EventCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.EventCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linelength() (matplotlib.collections.EventCollection method)@\spxentry{get\_linelength()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linelength}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linelength}}}{\emph{self}}{} get the length of the lines used to mark each event \end{fulllineitems} \index{get\_lineoffset() (matplotlib.collections.EventCollection method)@\spxentry{get\_lineoffset()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_lineoffset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lineoffset}}}{\emph{self}}{} get the offset of the lines used to mark each event \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.EventCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.EventCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.EventCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{} Get the width of the lines used to mark each event. \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.EventCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.EventCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.EventCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.EventCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.EventCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.EventCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_orientation() (matplotlib.collections.EventCollection method)@\spxentry{get\_orientation()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_orientation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_orientation}}}{\emph{self}}{} get the orientation of the event line, may be: {[} 'horizontal' \textbar{} 'vertical' {]} \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.EventCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.EventCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.EventCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.EventCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_positions() (matplotlib.collections.EventCollection method)@\spxentry{get\_positions()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_positions}}}{\emph{self}}{} return an array containing the floating-point values of the positions \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.EventCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_segments() (matplotlib.collections.EventCollection method)@\spxentry{get\_segments()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_segments}}}{\emph{self}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{segments}}] \leavevmode{[}list{]} List of segments in the LineCollection. Each list item contains an array of vertices. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.EventCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.EventCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.EventCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.EventCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.EventCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.EventCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.EventCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.EventCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.EventCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.EventCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.EventCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.EventCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_horizontal() (matplotlib.collections.EventCollection method)@\spxentry{is\_horizontal()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.is_horizontal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_horizontal}}}{\emph{self}}{} True if the eventcollection is horizontal, False if vertical \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.EventCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.EventCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.EventCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.EventCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.EventCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.EventCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.EventCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.EventCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.EventCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.EventCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.EventCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.EventCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.EventCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.EventCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.EventCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.EventCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.EventCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.EventCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.EventCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.EventCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.EventCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.EventCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.EventCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set the color(s) of the LineCollection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or list of colors{]} Matplotlib color argument (all patches have same color), or a sequence or rgba tuples; if it is a sequence the patches will cycle through the sequence. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.EventCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.EventCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.EventCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.EventCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.EventCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.EventCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.EventCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.EventCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.EventCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.EventCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.EventCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.EventCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.EventCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.EventCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linelength() (matplotlib.collections.EventCollection method)@\spxentry{set\_linelength()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linelength}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linelength}}}{\emph{self}, \emph{linelength}}{} set the length of the lines used to mark each event \end{fulllineitems} \index{set\_lineoffset() (matplotlib.collections.EventCollection method)@\spxentry{set\_lineoffset()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_lineoffset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lineoffset}}}{\emph{self}, \emph{lineoffset}}{} set the offset of the lines used to mark each event \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.EventCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.EventCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.EventCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.EventCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.EventCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.EventCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.EventCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.EventCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.EventCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_orientation() (matplotlib.collections.EventCollection method)@\spxentry{set\_orientation()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_orientation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_orientation}}}{\emph{self}, \emph{orientation=None}}{} set the orientation of the event line {[} 'horizontal' \textbar{} 'vertical' \textbar{} None {]} defaults to 'horizontal' if not specified or None \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.EventCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.EventCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.EventCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.EventCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_positions() (matplotlib.collections.EventCollection method)@\spxentry{set\_positions()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_positions}}}{\emph{self}, \emph{positions}}{} set the positions of the events to the specified value \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.EventCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_segments() (matplotlib.collections.EventCollection method)@\spxentry{set\_segments()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_segments}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.EventCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.EventCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.EventCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.EventCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.EventCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_verts() (matplotlib.collections.EventCollection method)@\spxentry{set\_verts()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_visible() (matplotlib.collections.EventCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.EventCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.EventCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.EventCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{switch\_orientation() (matplotlib.collections.EventCollection method)@\spxentry{switch\_orientation()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.switch_orientation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{switch\_orientation}}}{\emph{self}}{} switch the orientation of the event line, either from vertical to horizontal or vice versus \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.EventCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.EventCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.EventCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.EventCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.EventCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.EventCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.EventCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.EventCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{LineCollection (class in matplotlib.collections)@\spxentry{LineCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{LineCollection}}}{\emph{segments}, \emph{linewidths=None}, \emph{colors=None}, \emph{antialiaseds=None}, \emph{linestyles='solid'}, \emph{offsets=None}, \emph{transOffset=None}, \emph{norm=None}, \emph{cmap=None}, \emph{pickradius=5}, \emph{zorder=2}, \emph{facecolors='none'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}} All parameters must be sequences or scalars; if scalars, they will be converted to sequences. The property of the ith line segment is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{prop}\PYG{p}{[}\PYG{n}{i} \PYG{o}{\PYGZpc{}} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{props}\PYG{p}{)}\PYG{p}{]} \end{sphinxVerbatim} i.e., the properties cycle if the \sphinxcode{\sphinxupquote{len}} of props is less than the number of segments. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{segments}}] \leavevmode A sequence of (\sphinxstyleemphasis{line0}, \sphinxstyleemphasis{line1}, \sphinxstyleemphasis{line2}), where: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{linen} \PYG{o}{=} \PYG{p}{(}\PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{p}{(}\PYG{n}{xm}\PYG{p}{,} \PYG{n}{ym}\PYG{p}{)} \end{sphinxVerbatim} or the equivalent numpy array with two columns. Each line can be a different length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}sequence, optional{]} A sequence of RGBA tuples (e.g., arbitrary color strings, etc, not allowed). \item[{\sphinxstylestrong{antialiaseds}}] \leavevmode{[}sequence, optional{]} A sequence of ones or zeros. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}string, tuple, optional{]} Either one of {[} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]}, or a dash tuple. The dash tuple is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize, optional{]} {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}string or Colormap, optional{]} Colormap name or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float, optional{]} The tolerance in points for mouse clicks picking a line. Default is 5 pt. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}int, optional{]} zorder of the LineCollection. Default is 2. \item[{\sphinxstylestrong{facecolors}}] \leavevmode{[}optional{]} The facecolors of the LineCollection. Default is 'none'. Setting to a value other than 'none' will lead to a filled polygon being drawn between points on each line. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{colors}, or \sphinxstyleemphasis{antialiaseds} is None, they default to their rcParams setting, in sequence form. If \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are not None, then \sphinxstyleemphasis{offsets} are transformed by \sphinxstyleemphasis{transOffset} and applied after the segments have been transformed to display coordinates. If \sphinxstyleemphasis{offsets} is not None but \sphinxstyleemphasis{transOffset} is None, then the \sphinxstyleemphasis{offsets} are added to the segments before any transformation. In this case, a single offset can be specified as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{offsets}\PYG{o}{=}\PYG{p}{(}\PYG{n}{xo}\PYG{p}{,}\PYG{n}{yo}\PYG{p}{)} \end{sphinxVerbatim} and this value will be added cumulatively to each successive segment, so as to produce a set of successively offset curves. The use of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} is optional. If the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} array \sphinxcode{\sphinxupquote{\_A}} is not None (i.e., a call to {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_array()}}}}} has been made), at draw time a call to scalar mappable will be made to set the colors. \index{add\_callback() (matplotlib.collections.LineCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.LineCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.LineCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.LineCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.LineCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.LineCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.LineCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.LineCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.LineCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.LineCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.LineCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.LineCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.LineCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.LineCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.LineCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.LineCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.LineCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.LineCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.LineCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.LineCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.LineCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.LineCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.LineCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.LineCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.LineCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_color() (matplotlib.collections.LineCollection method)@\spxentry{get\_color()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_colors() (matplotlib.collections.LineCollection method)@\spxentry{get\_colors()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_colors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_colors}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_contains() (matplotlib.collections.LineCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.LineCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.LineCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.LineCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.LineCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.LineCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.LineCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.LineCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.LineCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.LineCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.LineCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.LineCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.LineCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.LineCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.LineCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.LineCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.LineCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.LineCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.LineCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.LineCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.LineCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.LineCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.LineCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.LineCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.LineCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.LineCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.LineCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.LineCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.LineCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.LineCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.LineCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_segments() (matplotlib.collections.LineCollection method)@\spxentry{get\_segments()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_segments}}}{\emph{self}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{segments}}] \leavevmode{[}list{]} List of segments in the LineCollection. Each list item contains an array of vertices. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.LineCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.LineCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.LineCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.LineCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.LineCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.LineCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.LineCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.LineCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.LineCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.LineCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.LineCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.LineCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.LineCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.LineCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.LineCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.LineCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.LineCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.LineCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.LineCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.LineCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.LineCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.LineCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.LineCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.LineCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.LineCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.LineCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.LineCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.LineCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.LineCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.LineCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.LineCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.LineCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.LineCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.LineCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.LineCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set the color(s) of the LineCollection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or list of colors{]} Matplotlib color argument (all patches have same color), or a sequence or rgba tuples; if it is a sequence the patches will cycle through the sequence. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.LineCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.LineCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.LineCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.LineCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.LineCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.LineCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.LineCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.LineCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.LineCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.LineCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.LineCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.LineCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.LineCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.LineCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.LineCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.LineCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.LineCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.LineCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.LineCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.LineCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.LineCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.LineCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.LineCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.LineCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.LineCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.LineCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.LineCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.LineCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_segments() (matplotlib.collections.LineCollection method)@\spxentry{set\_segments()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_segments}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.LineCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.LineCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.LineCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.LineCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.LineCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_verts() (matplotlib.collections.LineCollection method)@\spxentry{set\_verts()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts}}}{\emph{self}, \emph{segments}}{}~ \end{fulllineitems} \index{set\_visible() (matplotlib.collections.LineCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.LineCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.LineCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.LineCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.LineCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.LineCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.LineCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.LineCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.LineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.LineCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.LineCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.LineCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{PatchCollection (class in matplotlib.collections)@\spxentry{PatchCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{PatchCollection}}}{\emph{patches}, \emph{match\_original=False}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}} A generic collection of patches. This makes it easier to assign a color map to a heterogeneous collection of patches. This also may improve plotting speed, since PatchCollection will draw faster than a large number of patches. \begin{description} \item[{\sphinxstyleemphasis{patches}}] \leavevmode a sequence of Patch objects. This list may include a heterogeneous assortment of different patch types. \item[{\sphinxstyleemphasis{match\_original}}] \leavevmode If True, use the colors and linewidths of the original patches. If False, new colors may be assigned by providing the standard collection arguments, facecolor, edgecolor, linewidths, norm or cmap. \end{description} If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. The use of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} is optional. If the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} matrix \_A is not None (i.e., a call to set\_array has been made), at draw time a call to scalar mappable will be made to set the face colors. \index{add\_callback() (matplotlib.collections.PatchCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.PatchCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.PatchCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.PatchCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.PatchCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.PatchCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.PatchCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.PatchCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.PatchCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.PatchCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.PatchCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.PatchCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.PatchCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.PatchCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.PatchCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.PatchCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.PatchCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.PatchCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.PatchCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.PatchCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.PatchCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.PatchCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.PatchCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.PatchCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.PatchCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.PatchCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.PatchCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.PatchCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.PatchCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.PatchCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.PatchCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.PatchCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.PatchCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.PatchCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.PatchCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.PatchCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.PatchCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.PatchCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.PatchCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.PatchCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.PatchCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.PatchCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.PatchCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.PatchCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.PatchCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.PatchCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.PatchCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.PatchCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.PatchCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.PatchCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.PatchCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.PatchCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.PatchCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.PatchCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.PatchCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.PatchCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.PatchCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.PatchCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.PatchCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.PatchCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.PatchCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.PatchCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.PatchCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.PatchCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.PatchCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.PatchCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.PatchCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.PatchCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.PatchCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.PatchCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.PatchCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.PatchCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.PatchCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.PatchCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.PatchCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.PatchCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.PatchCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.PatchCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.PatchCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.PatchCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.PatchCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.PatchCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.PatchCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.PatchCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.PatchCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.PatchCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.PatchCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.PatchCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.PatchCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.PatchCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.PatchCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.PatchCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.PatchCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.PatchCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.PatchCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.PatchCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.PatchCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.PatchCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.PatchCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.PatchCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.PatchCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.PatchCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.PatchCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.PatchCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.PatchCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.PatchCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.PatchCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.PatchCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.PatchCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.PatchCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.PatchCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.PatchCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.PatchCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.PatchCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.PatchCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.PatchCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{patches}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.PatchCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.PatchCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.PatchCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.PatchCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.PatchCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.PatchCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.PatchCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.PatchCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.PatchCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.PatchCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.PatchCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.PatchCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.PatchCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.PatchCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.PatchCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.PatchCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.PatchCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.PatchCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.PatchCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PatchCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{PathCollection (class in matplotlib.collections)@\spxentry{PathCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{PathCollection}}}{\emph{paths}, \emph{sizes=None}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.collections.\_CollectionWithSizes}} This is the most basic {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} subclass. A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} is e.g. created by a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} plot. \sphinxstyleemphasis{paths} is a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instances. \begin{quote} Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{quote} \index{add\_callback() (matplotlib.collections.PathCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.PathCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.PathCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.PathCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.PathCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.PathCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.PathCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.PathCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.PathCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.PathCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.PathCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.PathCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.PathCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.PathCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.PathCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.PathCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.PathCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.PathCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.PathCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.PathCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.PathCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.PathCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.PathCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.PathCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.PathCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.PathCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.PathCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.PathCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.PathCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.PathCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.PathCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.PathCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.PathCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.PathCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.PathCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.PathCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.PathCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.PathCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.PathCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.PathCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.PathCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.PathCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.PathCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.PathCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.PathCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.PathCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.PathCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.PathCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.PathCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.PathCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.PathCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.PathCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.PathCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.PathCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.PathCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.PathCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.PathCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.PathCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.PathCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.PathCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.PathCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.PathCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.PathCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.PathCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.PathCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.PathCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.PathCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.PathCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.PathCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.PathCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{legend\_elements() (matplotlib.collections.PathCollection method)@\spxentry{legend\_elements()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.legend_elements}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{legend\_elements}}}{\emph{self}, \emph{prop='colors'}, \emph{num='auto'}, \emph{fmt=None}, \emph{func=\textless{}function PathCollection.\textless{}lambda\textgreater{} at 0x7ff9805e3ea0\textgreater{}}, \emph{**kwargs}}{} Creates legend handles and labels for a PathCollection. This is useful for obtaining a legend for a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} plot. E.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{scatter} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{7}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{o}{*}\PYG{n}{scatter}\PYG{o}{.}\PYG{n}{legend\PYGZus{}elements}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Also see the \DUrole{xref,std,std-ref}{automatedlegendcreation} example. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{prop}}] \leavevmode{[}string, optional, default \sphinxstyleemphasis{"colors"}{]} Can be \sphinxstyleemphasis{"colors"} or \sphinxstyleemphasis{"sizes"}. In case of \sphinxstyleemphasis{"colors"}, the legend handles will show the different colors of the collection. In case of "sizes", the legend will show the different sizes. \item[{\sphinxstylestrong{num}}] \leavevmode{[}int, None, "auto" (default), array-like, or {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}},{]} optional Target number of elements to create. If None, use all unique elements of the mappable array. If an integer, target to use \sphinxstyleemphasis{num} elements in the normed range. If \sphinxstyleemphasis{"auto"}, try to determine which option better suits the nature of the data. The number of created elements may slightly deviate from \sphinxstyleemphasis{num} due to a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} being used to find useful locations. If a list or array, use exactly those elements for the legend. Finally, a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} can be provided. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}string, {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}}, or None (default){]} The format or formatter to use for the labels. If a string must be a valid input for a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.StrMethodFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StrMethodFormatter}}}}}. If None (the default), use a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}}. \item[{\sphinxstylestrong{func}}] \leavevmode{[}function, default \sphinxstyleemphasis{lambda x: x}{]} Function to calculate the labels. Often the size (or color) argument to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} will have been pre-processed by the user using a function \sphinxstyleemphasis{s = f(x)} to make the markers visible; e.g. \sphinxstyleemphasis{size = np.log10(x)}. Providing the inverse of this function here allows that pre-processing to be inverted, so that the legend labels have the correct values; e.g. \sphinxstyleemphasis{func = np.exp(x, 10)}. \item[{\sphinxstylestrong{kwargs}}] \leavevmode{[}further parameters{]} Allowed kwargs are \sphinxstyleemphasis{color} and \sphinxstyleemphasis{size}. E.g. it may be useful to set the color of the markers if \sphinxstyleemphasis{prop="sizes"} is used; similarly to set the size of the markers if \sphinxstyleemphasis{prop="colors"} is used. Any further parameters are passed onto the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance. This may be useful to e.g. specify a different \sphinxstyleemphasis{markeredgecolor} or \sphinxstyleemphasis{alpha} for the legend handles. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{tuple (handles, labels)}] \leavevmode with \sphinxstyleemphasis{handles} being a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects and \sphinxstyleemphasis{labels} a matching list of strings. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{mouseover (matplotlib.collections.PathCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.PathCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.PathCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.PathCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.PathCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.PathCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.PathCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.PathCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.PathCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.PathCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.PathCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.PathCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.PathCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.PathCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.PathCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.PathCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.PathCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.PathCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.PathCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.PathCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.PathCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.PathCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.PathCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.PathCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.PathCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.PathCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.PathCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.PathCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.PathCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.PathCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.PathCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.PathCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.PathCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.PathCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.PathCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.PathCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.PathCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.PathCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.PathCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.PathCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.PathCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.PathCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.PathCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.PathCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.PathCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.PathCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.PathCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{paths}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.PathCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.PathCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.PathCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.PathCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.PathCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.PathCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.PathCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.PathCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.PathCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.PathCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.PathCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.PathCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.PathCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.PathCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.PathCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.PathCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.PathCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.PathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.PathCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.PathCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PathCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{PolyCollection (class in matplotlib.collections)@\spxentry{PolyCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{PolyCollection}}}{\emph{verts}, \emph{sizes=None}, \emph{closed=True}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.collections.\_CollectionWithSizes}} \sphinxstyleemphasis{verts} is a sequence of ( \sphinxstyleemphasis{verts0}, \sphinxstyleemphasis{verts1}, ...) where \sphinxstyleemphasis{verts\_i} is a sequence of \sphinxstyleemphasis{xy} tuples of vertices, or an equivalent \sphinxhref{https://docs.scipy.org/doc/numpy/reference/index.html\#module-numpy}{\sphinxcode{\sphinxupquote{numpy}}} array of shape (\sphinxstyleemphasis{nv}, 2). \sphinxstyleemphasis{sizes} is \sphinxstyleemphasis{None} (default) or a sequence of floats that scale the corresponding \sphinxstyleemphasis{verts\_i}. The scaling is applied before the Artist master transform; if the latter is an identity transform, then the overall scaling is such that if \sphinxstyleemphasis{verts\_i} specify a unit square, then \sphinxstyleemphasis{sizes\_i} is the area of that square in points\textasciicircum{}2. If len(\sphinxstyleemphasis{sizes}) \textless{} \sphinxstyleemphasis{nv}, the additional values will be taken cyclically from the array. \sphinxstyleemphasis{closed}, when \sphinxstyleemphasis{True}, will explicitly close the polygon. \begin{quote} Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{quote} \index{add\_callback() (matplotlib.collections.PolyCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.PolyCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.PolyCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.PolyCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.PolyCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.PolyCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.PolyCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.PolyCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.PolyCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.PolyCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.PolyCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.PolyCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.PolyCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.PolyCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.PolyCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.PolyCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.PolyCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.PolyCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.PolyCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.PolyCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.PolyCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.PolyCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.PolyCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.PolyCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.PolyCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.PolyCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.PolyCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.PolyCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.PolyCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.PolyCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.PolyCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.PolyCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.PolyCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.PolyCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.PolyCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.PolyCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.PolyCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.PolyCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.PolyCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.PolyCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.PolyCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.PolyCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.PolyCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.PolyCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.PolyCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.PolyCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.PolyCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.PolyCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.PolyCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.PolyCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.PolyCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.PolyCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.PolyCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.PolyCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.PolyCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.PolyCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.PolyCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.PolyCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.PolyCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.PolyCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.PolyCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.PolyCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.PolyCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.PolyCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.PolyCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.PolyCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.PolyCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.PolyCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.PolyCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.PolyCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.PolyCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.PolyCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.PolyCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.PolyCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.PolyCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.PolyCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.PolyCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.PolyCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.PolyCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.PolyCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.PolyCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.PolyCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.PolyCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.PolyCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.PolyCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.PolyCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.PolyCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.PolyCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.PolyCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.PolyCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.PolyCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.PolyCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.PolyCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.PolyCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.PolyCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.PolyCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.PolyCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.PolyCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.PolyCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.PolyCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.PolyCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.PolyCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.PolyCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.PolyCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.PolyCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.PolyCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.PolyCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.PolyCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.PolyCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.PolyCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.PolyCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.PolyCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.PolyCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.PolyCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.PolyCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.PolyCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.PolyCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}, \emph{verts}, \emph{closed=True}}{} This allows one to delay initialization of the vertices. \end{fulllineitems} \index{set\_picker() (matplotlib.collections.PolyCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.PolyCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.PolyCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.PolyCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.PolyCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.PolyCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.PolyCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.PolyCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.PolyCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_verts() (matplotlib.collections.PolyCollection method)@\spxentry{set\_verts()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts}}}{\emph{self}, \emph{verts}, \emph{closed=True}}{} This allows one to delay initialization of the vertices. \end{fulllineitems} \index{set\_verts\_and\_codes() (matplotlib.collections.PolyCollection method)@\spxentry{set\_verts\_and\_codes()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_verts_and_codes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts\_and\_codes}}}{\emph{self}, \emph{verts}, \emph{codes}}{} This allows one to initialize vertices with path codes. \end{fulllineitems} \index{set\_visible() (matplotlib.collections.PolyCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.PolyCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.PolyCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.PolyCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.PolyCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.PolyCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.PolyCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.PolyCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.PolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.PolyCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.PolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.PolyCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{QuadMesh (class in matplotlib.collections)@\spxentry{QuadMesh}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{QuadMesh}}}{\emph{meshWidth}, \emph{meshHeight}, \emph{coordinates}, \emph{antialiased=True}, \emph{shading='flat'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}} Class for the efficient drawing of a quadrilateral mesh. A quadrilateral mesh consists of a grid of vertices. The dimensions of this array are (\sphinxstyleemphasis{meshWidth} + 1, \sphinxstyleemphasis{meshHeight} + 1). Each vertex in the mesh has a different set of "mesh coordinates" representing its position in the topology of the mesh. For any values (\sphinxstyleemphasis{m}, \sphinxstyleemphasis{n}) such that 0 \textless{}= \sphinxstyleemphasis{m} \textless{}= \sphinxstyleemphasis{meshWidth} and 0 \textless{}= \sphinxstyleemphasis{n} \textless{}= \sphinxstyleemphasis{meshHeight}, the vertices at mesh coordinates (\sphinxstyleemphasis{m}, \sphinxstyleemphasis{n}), (\sphinxstyleemphasis{m}, \sphinxstyleemphasis{n} + 1), (\sphinxstyleemphasis{m} + 1, \sphinxstyleemphasis{n} + 1), and (\sphinxstyleemphasis{m} + 1, \sphinxstyleemphasis{n}) form one of the quadrilaterals in the mesh. There are thus (\sphinxstyleemphasis{meshWidth} * \sphinxstyleemphasis{meshHeight}) quadrilaterals in the mesh. The mesh need not be regular and the polygons need not be convex. A quadrilateral mesh is represented by a (2 x ((\sphinxstyleemphasis{meshWidth} + 1) * (\sphinxstyleemphasis{meshHeight} + 1))) numpy array \sphinxstyleemphasis{coordinates}, where each row is the \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} coordinates of one of the vertices. To define the function that maps from a data point to its corresponding color, use the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cmap()}}}}} method. Each of these arrays is indexed in row-major order by the mesh coordinates of the vertex (or the mesh coordinates of the lower left vertex, in the case of the colors). For example, the first entry in \sphinxstyleemphasis{coordinates} is the coordinates of the vertex at mesh coordinates (0, 0), then the one at (0, 1), then at (0, 2) .. (0, meshWidth), (1, 0), (1, 1), and so on. \sphinxstyleemphasis{shading} may be 'flat', or 'gouraud' \index{add\_callback() (matplotlib.collections.QuadMesh method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.QuadMesh method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.QuadMesh attribute)@\spxentry{aname}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.QuadMesh method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.QuadMesh method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.QuadMesh attribute)@\spxentry{axes}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.QuadMesh method)@\spxentry{changed()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.QuadMesh method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.QuadMesh method)@\spxentry{contains()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_mesh\_to\_paths() (matplotlib.collections.QuadMesh static method)@\spxentry{convert\_mesh\_to\_paths()}\spxextra{matplotlib.collections.QuadMesh static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.convert_mesh_to_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{convert\_mesh\_to\_paths}}}{\emph{meshWidth}, \emph{meshHeight}, \emph{coordinates}}{} Converts a given mesh into a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} objects. This function is primarily of use to implementers of backends that do not directly support quadmeshes. \end{fulllineitems} \index{convert\_mesh\_to\_triangles() (matplotlib.collections.QuadMesh method)@\spxentry{convert\_mesh\_to\_triangles()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.convert_mesh_to_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_mesh\_to\_triangles}}}{\emph{self}, \emph{meshWidth}, \emph{meshHeight}, \emph{coordinates}}{} Converts a given mesh into a sequence of triangles, each point with its own color. This is useful for experiments using \sphinxcode{\sphinxupquote{draw\_gouraud\_triangle}}. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.QuadMesh method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.QuadMesh method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.QuadMesh method)@\spxentry{draw()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.QuadMesh method)@\spxentry{findobj()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.QuadMesh method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.QuadMesh method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.QuadMesh method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.QuadMesh method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.QuadMesh method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.QuadMesh method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.QuadMesh method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.QuadMesh method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.QuadMesh method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.QuadMesh method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.QuadMesh method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.QuadMesh method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.QuadMesh method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.QuadMesh method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.QuadMesh method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.QuadMesh method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.QuadMesh method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.QuadMesh method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.QuadMesh method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.QuadMesh method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.QuadMesh method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.QuadMesh method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.QuadMesh method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.QuadMesh method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.QuadMesh method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.QuadMesh method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.QuadMesh method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.QuadMesh method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.QuadMesh method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.QuadMesh method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.QuadMesh method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.QuadMesh method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.QuadMesh method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.QuadMesh method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.QuadMesh method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.QuadMesh method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.QuadMesh method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.QuadMesh method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.QuadMesh method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.QuadMesh method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.QuadMesh method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.QuadMesh method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.QuadMesh method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.QuadMesh method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.QuadMesh method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.QuadMesh method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.QuadMesh method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.QuadMesh method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.QuadMesh method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.QuadMesh method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.QuadMesh method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.QuadMesh method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.QuadMesh method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.QuadMesh method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.QuadMesh method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.QuadMesh method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.QuadMesh attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.QuadMesh method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.QuadMesh method)@\spxentry{pick()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.QuadMesh method)@\spxentry{pickable()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.QuadMesh method)@\spxentry{properties()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.QuadMesh method)@\spxentry{remove()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.QuadMesh method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.QuadMesh method)@\spxentry{set()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.QuadMesh method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.QuadMesh method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.QuadMesh method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.QuadMesh method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.QuadMesh method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.QuadMesh method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.QuadMesh method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.QuadMesh method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.QuadMesh method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.QuadMesh method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.QuadMesh method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.QuadMesh method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.QuadMesh method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.QuadMesh method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.QuadMesh method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.QuadMesh method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.QuadMesh method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.QuadMesh method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.QuadMesh method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.QuadMesh method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.QuadMesh method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.QuadMesh method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.QuadMesh method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.QuadMesh method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.QuadMesh method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.QuadMesh method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.QuadMesh method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.QuadMesh method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.QuadMesh method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.QuadMesh method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.QuadMesh method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.QuadMesh method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.QuadMesh method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.QuadMesh method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.QuadMesh method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.QuadMesh method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.QuadMesh method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.QuadMesh method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.QuadMesh method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.QuadMesh method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.QuadMesh method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.QuadMesh method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.QuadMesh method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.QuadMesh method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.QuadMesh method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.QuadMesh method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.QuadMesh method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.QuadMesh method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.QuadMesh method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.QuadMesh attribute)@\spxentry{stale}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.QuadMesh attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.QuadMesh method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.QuadMesh method)@\spxentry{update()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.QuadMesh method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.QuadMesh method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.QuadMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.QuadMesh attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.QuadMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.QuadMesh.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{RegularPolyCollection (class in matplotlib.collections)@\spxentry{RegularPolyCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{RegularPolyCollection}}}{\emph{numsides}, \emph{rotation=0}, \emph{sizes=(1}, \emph{)}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.collections.\_CollectionWithSizes}} Draw a collection of regular polygons with \sphinxstyleemphasis{numsides}. \begin{description} \item[{\sphinxstyleemphasis{numsides}}] \leavevmode the number of sides of the polygon \item[{\sphinxstyleemphasis{rotation}}] \leavevmode the rotation of the polygon in radians \item[{\sphinxstyleemphasis{sizes}}] \leavevmode gives the area of the circle circumscribing the regular polygon in points\textasciicircum{}2 Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{description} Example: see \DUrole{xref,std,std-doc}{/gallery/event\_handling/lasso\_demo} for a complete example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{offsets} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{facecolors} \PYG{o}{=} \PYG{p}{[}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{jet}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{k}{for} \PYG{n}{x} \PYG{o+ow}{in} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)}\PYG{p}{]} \PYG{n}{black} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{collection} \PYG{o}{=} \PYG{n}{RegularPolyCollection}\PYG{p}{(} \PYG{n}{numsides}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} a pentagon} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{sizes}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{facecolors}\PYG{o}{=}\PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{o}{=}\PYG{p}{(}\PYG{n}{black}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{linewidths}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{offsets}\PYG{o}{=}\PYG{n}{offsets}\PYG{p}{,} \PYG{n}{transOffset}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} \index{add\_callback() (matplotlib.collections.RegularPolyCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.RegularPolyCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.RegularPolyCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.RegularPolyCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.RegularPolyCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.RegularPolyCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.RegularPolyCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.RegularPolyCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.RegularPolyCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.RegularPolyCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.RegularPolyCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.RegularPolyCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_numsides() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_numsides()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_numsides}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numsides}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_rotation() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_rotation()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.RegularPolyCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.RegularPolyCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.RegularPolyCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.RegularPolyCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.RegularPolyCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.RegularPolyCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.RegularPolyCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.RegularPolyCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.RegularPolyCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.RegularPolyCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.RegularPolyCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.RegularPolyCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.RegularPolyCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.RegularPolyCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.RegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.RegularPolyCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.RegularPolyCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{StarPolygonCollection (class in matplotlib.collections)@\spxentry{StarPolygonCollection}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{StarPolygonCollection}}}{\emph{numsides}, \emph{rotation=0}, \emph{sizes=(1}, \emph{)}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.RegularPolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.RegularPolyCollection}}}}} Draw a collection of regular stars with \sphinxstyleemphasis{numsides} points. \begin{description} \item[{\sphinxstyleemphasis{numsides}}] \leavevmode the number of sides of the polygon \item[{\sphinxstyleemphasis{rotation}}] \leavevmode the rotation of the polygon in radians \item[{\sphinxstyleemphasis{sizes}}] \leavevmode gives the area of the circle circumscribing the regular polygon in points\textasciicircum{}2 Valid Collection keyword arguments: \begin{itemize} \item {} \sphinxstyleemphasis{edgecolors}: None \item {} \sphinxstyleemphasis{facecolors}: None \item {} \sphinxstyleemphasis{linewidths}: None \item {} \sphinxstyleemphasis{antialiaseds}: None \item {} \sphinxstyleemphasis{offsets}: None \item {} \sphinxstyleemphasis{transOffset}: transforms.IdentityTransform() \item {} \sphinxstyleemphasis{norm}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \item {} \sphinxstyleemphasis{cmap}: None (optional for {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}) \end{itemize} \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are used to translate the patch after rendering (default no offsets) If any of \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{antialiaseds} are None, they default to their {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} patch setting, in sequence form. \end{description} Example: see \DUrole{xref,std,std-doc}{/gallery/event\_handling/lasso\_demo} for a complete example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{offsets} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{facecolors} \PYG{o}{=} \PYG{p}{[}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{jet}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{k}{for} \PYG{n}{x} \PYG{o+ow}{in} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)}\PYG{p}{]} \PYG{n}{black} \PYG{o}{=} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{collection} \PYG{o}{=} \PYG{n}{RegularPolyCollection}\PYG{p}{(} \PYG{n}{numsides}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{c+c1}{\PYGZsh{} a pentagon} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{sizes}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{facecolors}\PYG{o}{=}\PYG{n}{facecolors}\PYG{p}{,} \PYG{n}{edgecolors}\PYG{o}{=}\PYG{p}{(}\PYG{n}{black}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{linewidths}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{p}{)}\PYG{p}{,} \PYG{n}{offsets}\PYG{o}{=}\PYG{n}{offsets}\PYG{p}{,} \PYG{n}{transOffset}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{p}{)} \end{sphinxVerbatim} \index{add\_callback() (matplotlib.collections.StarPolygonCollection method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.StarPolygonCollection method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{aname}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.StarPolygonCollection method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.StarPolygonCollection method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{axes}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.StarPolygonCollection method)@\spxentry{changed()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.StarPolygonCollection method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.StarPolygonCollection method)@\spxentry{contains()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.StarPolygonCollection method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.StarPolygonCollection method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.StarPolygonCollection method)@\spxentry{draw()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.StarPolygonCollection method)@\spxentry{findobj()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.StarPolygonCollection method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_numsides() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_numsides()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_numsides}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numsides}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_rotation() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_rotation()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_sizes() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}}{} Returns the sizes of the elements in the collection. The value represents the 'area' of the element. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}array{]} The 'area' of each element. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.StarPolygonCollection method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.StarPolygonCollection method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.StarPolygonCollection method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.StarPolygonCollection method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.StarPolygonCollection method)@\spxentry{pick()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.StarPolygonCollection method)@\spxentry{pickable()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.StarPolygonCollection method)@\spxentry{properties()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.StarPolygonCollection method)@\spxentry{remove()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.StarPolygonCollection method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sizes() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_sizes()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sizes}}}{\emph{self}, \emph{sizes}, \emph{dpi=72.0}}{} Set the sizes of each member of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sizes}}] \leavevmode{[}ndarray or None{]} The size to set for each element of the collection. The value is the 'area' of the element. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dpi of the canvas. Defaults to 72.0. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.StarPolygonCollection method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{stale}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.StarPolygonCollection method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.StarPolygonCollection method)@\spxentry{update()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.StarPolygonCollection method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.StarPolygonCollection method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.StarPolygonCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.StarPolygonCollection attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.StarPolygonCollection attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.StarPolygonCollection.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{TriMesh (class in matplotlib.collections)@\spxentry{TriMesh}\spxextra{class in matplotlib.collections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.collections.}}\sphinxbfcode{\sphinxupquote{TriMesh}}}{\emph{triangulation}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}} Class for the efficient drawing of a triangular mesh using Gouraud shading. A triangular mesh is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object. \index{add\_callback() (matplotlib.collections.TriMesh method)@\spxentry{add\_callback()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Add a callback function that will be called whenever one of the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}'s properties changes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} The callback function. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Any} \end{sphinxVerbatim} where \sphinxstyleemphasis{artist} is the calling {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. Return values may exist but are ignored. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{oid}}] \leavevmode{[}int{]} The observer id associated with the callback. This id can be used for removing the callback with {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}} later. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{add\_checker() (matplotlib.collections.TriMesh method)@\spxentry{add\_checker()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.add_checker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_checker}}}{\emph{self}, \emph{checker}}{} Add an entry to a dictionary of boolean flags that are set to True when the mappable is changed. \end{fulllineitems} \index{aname (matplotlib.collections.TriMesh attribute)@\spxentry{aname}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.aname}}\pysigline{\sphinxbfcode{\sphinxupquote{aname}}}~ \end{fulllineitems} \index{autoscale() (matplotlib.collections.TriMesh method)@\spxentry{autoscale()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array \end{fulllineitems} \index{autoscale\_None() (matplotlib.collections.TriMesh method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}}{} Autoscale the scalar limits on the norm instance using the current array, changing only limits that are None \end{fulllineitems} \index{axes (matplotlib.collections.TriMesh attribute)@\spxentry{axes}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{changed() (matplotlib.collections.TriMesh method)@\spxentry{changed()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{check\_update() (matplotlib.collections.TriMesh method)@\spxentry{check\_update()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.check_update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{check\_update}}}{\emph{self}, \emph{checker}}{} If mappable has changed since the last check, return True; else return False \end{fulllineitems} \index{contains() (matplotlib.collections.TriMesh method)@\spxentry{contains()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the collection. Returns \sphinxcode{\sphinxupquote{bool, dict(ind=itemlist)}}, where every item in itemlist contains the event. \end{fulllineitems} \index{convert\_mesh\_to\_paths() (matplotlib.collections.TriMesh static method)@\spxentry{convert\_mesh\_to\_paths()}\spxextra{matplotlib.collections.TriMesh static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.convert_mesh_to_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{convert\_mesh\_to\_paths}}}{\emph{tri}}{} Converts a given mesh into a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} objects. This function is primarily of use to implementers of backends that do not directly support meshes. \end{fulllineitems} \index{convert\_xunits() (matplotlib.collections.TriMesh method)@\spxentry{convert\_xunits()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.convert_xunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_xunits}}}{\emph{self}, \emph{x}}{} Convert \sphinxstyleemphasis{x} using the unit type of the xaxis. If the artist is not in contained in an Axes or if the xaxis does not have units, \sphinxstyleemphasis{x} itself is returned. \end{fulllineitems} \index{convert\_yunits() (matplotlib.collections.TriMesh method)@\spxentry{convert\_yunits()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.convert_yunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_yunits}}}{\emph{self}, \emph{y}}{} Convert \sphinxstyleemphasis{y} using the unit type of the yaxis. If the artist is not in contained in an Axes or if the yaxis does not have units, \sphinxstyleemphasis{y} itself is returned. \end{fulllineitems} \index{draw() (matplotlib.collections.TriMesh method)@\spxentry{draw()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{findobj() (matplotlib.collections.TriMesh method)@\spxentry{findobj()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.findobj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{self}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{format\_cursor\_data() (matplotlib.collections.TriMesh method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_agg\_filter() (matplotlib.collections.TriMesh method)@\spxentry{get\_agg\_filter()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_agg\_filter}}}{\emph{self}}{} Return filter function to be used for agg filter. \end{fulllineitems} \index{get\_alpha() (matplotlib.collections.TriMesh method)@\spxentry{get\_alpha()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} Return the alpha value used for blending - not supported on all backends \end{fulllineitems} \index{get\_animated() (matplotlib.collections.TriMesh method)@\spxentry{get\_animated()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_animated}}}{\emph{self}}{} Return the animated state. \end{fulllineitems} \index{get\_array() (matplotlib.collections.TriMesh method)@\spxentry{get\_array()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_array}}}{\emph{self}}{} Return the array \end{fulllineitems} \index{get\_capstyle() (matplotlib.collections.TriMesh method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_children() (matplotlib.collections.TriMesh method)@\spxentry{get\_children()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_clim() (matplotlib.collections.TriMesh method)@\spxentry{get\_clim()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clim}}}{\emph{self}}{} return the min, max of the color limits for image scaling \end{fulllineitems} \index{get\_clip\_box() (matplotlib.collections.TriMesh method)@\spxentry{get\_clip\_box()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_box}}}{\emph{self}}{} Return the clipbox. \end{fulllineitems} \index{get\_clip\_on() (matplotlib.collections.TriMesh method)@\spxentry{get\_clip\_on()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_on}}}{\emph{self}}{} Return whether the artist uses clipping. \end{fulllineitems} \index{get\_clip\_path() (matplotlib.collections.TriMesh method)@\spxentry{get\_clip\_path()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_clip\_path}}}{\emph{self}}{} Return the clip path. \end{fulllineitems} \index{get\_cmap() (matplotlib.collections.TriMesh method)@\spxentry{get\_cmap()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cmap}}}{\emph{self}}{} return the colormap \end{fulllineitems} \index{get\_contains() (matplotlib.collections.TriMesh method)@\spxentry{get\_contains()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_contains}}}{\emph{self}}{} Return the custom contains function of the artist if set, or \sphinxstyleemphasis{None}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_contains}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.collections.TriMesh method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the cursor data for a given event. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} Cursor data can be used by Artists to provide additional context information for a given event. The default implementation just returns \sphinxstyleemphasis{None}. Subclasses can override the method and return arbitrary data. However, when doing so, they must ensure that {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}} can convert the data to a string representation. The only current use case is displaying the z-value of an {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} in the status bar of a plot window, while moving the mouse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{event}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.format_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_dashes() (matplotlib.collections.TriMesh method)@\spxentry{get\_dashes()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashes}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_datalim() (matplotlib.collections.TriMesh method)@\spxentry{get\_datalim()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_datalim}}}{\emph{self}, \emph{transData}}{}~ \end{fulllineitems} \index{get\_ec() (matplotlib.collections.TriMesh method)@\spxentry{get\_ec()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.collections.TriMesh method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_edgecolors() (matplotlib.collections.TriMesh method)@\spxentry{get\_edgecolors()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.collections.TriMesh method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolors() (matplotlib.collections.TriMesh method)@\spxentry{get\_facecolors()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolors}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.collections.TriMesh method)@\spxentry{get\_fc()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_figure() (matplotlib.collections.TriMesh method)@\spxentry{get\_figure()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \end{fulllineitems} \index{get\_fill() (matplotlib.collections.TriMesh method)@\spxentry{get\_fill()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_gid() (matplotlib.collections.TriMesh method)@\spxentry{get\_gid()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gid}}}{\emph{self}}{} Return the group id. \end{fulllineitems} \index{get\_hatch() (matplotlib.collections.TriMesh method)@\spxentry{get\_hatch()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern. \end{fulllineitems} \index{get\_in\_layout() (matplotlib.collections.TriMesh method)@\spxentry{get\_in\_layout()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_in\_layout}}}{\emph{self}}{} Return boolean flag, \sphinxcode{\sphinxupquote{True}} if artist is included in layout calculations. E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \end{fulllineitems} \index{get\_joinstyle() (matplotlib.collections.TriMesh method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.collections.TriMesh method)@\spxentry{get\_label()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Return the label used for this artist in the legend. \end{fulllineitems} \index{get\_linestyle() (matplotlib.collections.TriMesh method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linestyles() (matplotlib.collections.TriMesh method)@\spxentry{get\_linestyles()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyles}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.collections.TriMesh method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_linewidths() (matplotlib.collections.TriMesh method)@\spxentry{get\_linewidths()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidths}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.collections.TriMesh method)@\spxentry{get\_ls()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.collections.TriMesh method)@\spxentry{get\_lw()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_offset\_position() (matplotlib.collections.TriMesh method)@\spxentry{get\_offset\_position()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_position}}}{\emph{self}}{} Returns how offsets are applied for the collection. If \sphinxstyleemphasis{offset\_position} is 'screen', the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \end{fulllineitems} \index{get\_offset\_transform() (matplotlib.collections.TriMesh method)@\spxentry{get\_offset\_transform()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_offset_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_offsets() (matplotlib.collections.TriMesh method)@\spxentry{get\_offsets()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offsets}}}{\emph{self}}{} Return the offsets for the collection. \end{fulllineitems} \index{get\_path\_effects() (matplotlib.collections.TriMesh method)@\spxentry{get\_path\_effects()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_effects}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_paths() (matplotlib.collections.TriMesh method)@\spxentry{get\_paths()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_picker() (matplotlib.collections.TriMesh method)@\spxentry{get\_picker()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_picker}}}{\emph{self}}{} Return the picking behavior of the artist. The possible values are described in {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_pickradius() (matplotlib.collections.TriMesh method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rasterized() (matplotlib.collections.TriMesh method)@\spxentry{get\_rasterized()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rasterized}}}{\emph{self}}{} Return whether the artist is to be rasterized. \end{fulllineitems} \index{get\_sketch\_params() (matplotlib.collections.TriMesh method)@\spxentry{get\_sketch\_params()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sketch\_params}}}{\emph{self}}{} Returns the sketch parameters for the artist. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sketch\_params}}] \leavevmode{[}tuple or None{]} A 3-tuple with the following elements: \begin{itemize} \item {} \sphinxstyleemphasis{scale}: The amplitude of the wiggle perpendicular to the source line. \item {} \sphinxstyleemphasis{length}: The length of the wiggle along the line. \item {} \sphinxstyleemphasis{randomness}: The scale factor by which the length is shrunken or expanded. \end{itemize} Returns \sphinxstyleemphasis{None} if no sketch parameters were set. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_snap() (matplotlib.collections.TriMesh method)@\spxentry{get\_snap()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap}}}{\emph{self}}{} Returns the snap setting. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_snap}}}}} for details. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.collections.TriMesh method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (matplotlib.collections.TriMesh method)@\spxentry{get\_transform()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_transformed\_clip\_path\_and\_affine() (matplotlib.collections.TriMesh method)@\spxentry{get\_transformed\_clip\_path\_and\_affine()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_transformed_clip_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_clip\_path\_and\_affine}}}{\emph{self}}{} Return the clip path with the non-affine part of its transformation applied, and the remaining affine part of its transformation. \end{fulllineitems} \index{get\_transforms() (matplotlib.collections.TriMesh method)@\spxentry{get\_transforms()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_transforms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transforms}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_url() (matplotlib.collections.TriMesh method)@\spxentry{get\_url()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_url}}}{\emph{self}}{} Return the url. \end{fulllineitems} \index{get\_urls() (matplotlib.collections.TriMesh method)@\spxentry{get\_urls()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_urls}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_visible() (matplotlib.collections.TriMesh method)@\spxentry{get\_visible()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible}}}{\emph{self}}{} Return the visibility. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.collections.TriMesh method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_zorder() (matplotlib.collections.TriMesh method)@\spxentry{get\_zorder()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zorder}}}{\emph{self}}{} Return the artist's zorder. \end{fulllineitems} \index{have\_units() (matplotlib.collections.TriMesh method)@\spxentry{have\_units()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} axes. \end{fulllineitems} \index{is\_transform\_set() (matplotlib.collections.TriMesh method)@\spxentry{is\_transform\_set()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.is_transform_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_transform\_set}}}{\emph{self}}{} Return whether the Artist has an explicitly set transform. This is \sphinxstyleemphasis{True} after {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_transform}}}}} has been called. \end{fulllineitems} \index{mouseover (matplotlib.collections.TriMesh attribute)@\spxentry{mouseover}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.mouseover}}\pysigline{\sphinxbfcode{\sphinxupquote{mouseover}}}~ \end{fulllineitems} \index{pchanged() (matplotlib.collections.TriMesh method)@\spxentry{pchanged()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Call all of the registered callbacks. This function is triggered internally when a property is changed. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pick() (matplotlib.collections.TriMesh method)@\spxentry{pick()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{} Process a pick event. Each child artist will fire a pick event if \sphinxstyleemphasis{mouseevent} is over the artist and the artist has picker set. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.pickable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickable}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{pickable() (matplotlib.collections.TriMesh method)@\spxentry{pickable()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.pickable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pickable}}}{\emph{self}}{} Return whether the artist is pickable. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.get_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_picker}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.pick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pick}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{properties() (matplotlib.collections.TriMesh method)@\spxentry{properties()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{properties}}}{\emph{self}}{} Return a dictionary of all the properties of the artist. \end{fulllineitems} \index{remove() (matplotlib.collections.TriMesh method)@\spxentry{remove()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove the artist from the figure if possible. The effect will not be visible until the figure is redrawn, e.g., with {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase.draw_idle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase.draw\_idle}}}}}. Call {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} to update the axes limits if desired. Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.relim:matplotlib.axes.Axes.relim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{relim}}}}} will not see collections even if the collection was added to the axes with \sphinxstyleemphasis{autolim} = True. Note: there is no support for removing the artist's legend entry. \end{fulllineitems} \index{remove\_callback() (matplotlib.collections.TriMesh method)@\spxentry{remove\_callback()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its observer id. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set() (matplotlib.collections.TriMesh method)@\spxentry{set()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{**kwargs}}{} A property batch setter. Pass \sphinxstyleemphasis{kwargs} to set properties. \end{fulllineitems} \index{set\_aa() (matplotlib.collections.TriMesh method)@\spxentry{set\_aa()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_agg\_filter() (matplotlib.collections.TriMesh method)@\spxentry{set\_agg\_filter()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_agg_filter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_agg\_filter}}}{\emph{self}, \emph{filter\_func}}{} Set the agg filter. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filter\_func}}] \leavevmode{[}callable{]} A filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.collections.TriMesh method)@\spxentry{set\_alpha()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_animated() (matplotlib.collections.TriMesh method)@\spxentry{set\_animated()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{b}}{} Set the artist's animation state. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.collections.TriMesh method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set the antialiasing state for rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aa}}] \leavevmode{[}bool or sequence of bools{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiaseds() (matplotlib.collections.TriMesh method)@\spxentry{set\_antialiaseds()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_antialiaseds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiaseds}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_array() (matplotlib.collections.TriMesh method)@\spxentry{set\_array()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{A}}{} Set the image array from numpy array \sphinxstyleemphasis{A}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}ndarray{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.collections.TriMesh method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{cs}}{} Set the capstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} The capstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clim() (matplotlib.collections.TriMesh method)@\spxentry{set\_clim()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_clim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clim}}}{\emph{self}, \emph{vmin=None}, \emph{vmax=None}}{} set the norm limits for image scaling; if \sphinxstyleemphasis{vmin} is a length2 sequence, interpret it as \sphinxcode{\sphinxupquote{(vmin, vmax)}} which is used to support setp ACCEPTS: a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.collections.TriMesh method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.collections.TriMesh method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.collections.TriMesh method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_cmap() (matplotlib.collections.TriMesh method)@\spxentry{set\_cmap()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.collections.TriMesh method)@\spxentry{set\_color()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of rgba tuples{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_facecolor}}}}}, {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_contains() (matplotlib.collections.TriMesh method)@\spxentry{set\_contains()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_contains}}}{\emph{self}, \emph{picker}}{} Define a custom contains test for the artist. The provided callable replaces the default {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} method of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}callable{]} A custom picker function to evaluate if an event is within the artist. The function must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{contains}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{:} \PYG{n}{Artist}\PYG{p}{,} \PYG{n}{event}\PYG{p}{:} \PYG{n}{MouseEvent}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n+nb}{bool}\PYG{p}{,} \PYG{n+nb}{dict} \end{sphinxVerbatim} that returns: \begin{itemize} \item {} a bool indicating if the event is within the artist \item {} a dict of additional information. The dict should at least return the same information as the default \sphinxcode{\sphinxupquote{contains()}} implementation of the respective artist, but may provide additional information. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.collections.TriMesh method)@\spxentry{set\_dashes()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_ec() (matplotlib.collections.TriMesh method)@\spxentry{set\_ec()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.collections.TriMesh method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{c}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolors() (matplotlib.collections.TriMesh method)@\spxentry{set\_edgecolors()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_edgecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_facecolor() (matplotlib.collections.TriMesh method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{c}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolors() (matplotlib.collections.TriMesh method)@\spxentry{set\_facecolors()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_facecolors}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolors}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fc() (matplotlib.collections.TriMesh method)@\spxentry{set\_fc()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{c}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.collections.TriMesh method)@\spxentry{set\_figure()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gid() (matplotlib.collections.TriMesh method)@\spxentry{set\_gid()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_gid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gid}}}{\emph{self}, \emph{gid}}{} Set the (group) id for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gid}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.collections.TriMesh method)@\spxentry{set\_hatch()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. Unlike other properties such as linewidth and colors, hatching can only be specified for the collection as a whole, not separately for each member. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_in\_layout() (matplotlib.collections.TriMesh method)@\spxentry{set\_in\_layout()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_in_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_in\_layout}}}{\emph{self}, \emph{in\_layout}}{} Set if artist is to be included in layout calculations, E.g. {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.tight\_layout()}}}}}, and \sphinxcode{\sphinxupquote{fig.savefig(fname, bbox\_inches='tight')}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{in\_layout}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.collections.TriMesh method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{js}}{} Set the joinstyle for the collection (for all its elements). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{js}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} The joinstyle \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label() (matplotlib.collections.TriMesh method)@\spxentry{set\_label()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.collections.TriMesh method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle(s) for the collection. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyles() (matplotlib.collections.TriMesh method)@\spxentry{set\_linestyles()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linestyles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyles}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_linewidth() (matplotlib.collections.TriMesh method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{lw}}{} Set the linewidth(s) for the collection. \sphinxstyleemphasis{lw} can be a scalar or a sequence; if it is a sequence the patches will cycle through the sequence \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lw}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidths() (matplotlib.collections.TriMesh method)@\spxentry{set\_linewidths()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linewidths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidths}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_ls() (matplotlib.collections.TriMesh method)@\spxentry{set\_ls()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.collections.TriMesh method)@\spxentry{set\_lw()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{lw}}{} Alias for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_norm() (matplotlib.collections.TriMesh method)@\spxentry{set\_norm()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \index{set\_offset\_position() (matplotlib.collections.TriMesh method)@\spxentry{set\_offset\_position()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_offset_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_position}}}{\emph{self}, \emph{offset\_position}}{} Set how offsets are applied. If \sphinxstyleemphasis{offset\_position} is 'screen' (default) the offset is applied after the master transform has been applied, that is, the offsets are in screen coordinates. If offset\_position is 'data', the offset is applied before the master transform, i.e., the offsets are in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset\_position}}] \leavevmode{[}\{'screen', 'data'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_offsets() (matplotlib.collections.TriMesh method)@\spxentry{set\_offsets()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offsets}}}{\emph{self}, \emph{offsets}}{} Set the offsets for the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}float or sequence of floats{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_path\_effects() (matplotlib.collections.TriMesh method)@\spxentry{set\_path\_effects()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_path_effects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path\_effects}}}{\emph{self}, \emph{path\_effects}}{} Set the path effects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}{\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_paths() (matplotlib.collections.TriMesh method)@\spxentry{set\_paths()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_paths}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_paths}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_picker() (matplotlib.collections.TriMesh method)@\spxentry{set\_picker()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{picker}}{} Define the picking behavior of the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{picker}}] \leavevmode{[}None or bool or float or callable{]} This can be one of the following: \begin{itemize} \item {} \sphinxstyleemphasis{None}: Picking is disabled for this artist (default). \item {} A boolean: If \sphinxstyleemphasis{True} then picking will be enabled and the artist will fire a pick event if the mouse event is over the artist. \item {} A float: If picker is a number it is interpreted as an epsilon tolerance in points and the artist will fire off an event if it's data is within epsilon of the mouse event. For some artists like lines and patch collections, the artist may provide additional data to the pick event that is generated, e.g., the indices of the data within epsilon of the pick event \item {} A function: If picker is callable, it is a user supplied function which determines whether the artist is hit by the mouse event: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{hit}\PYG{p}{,} \PYG{n}{props} \PYG{o}{=} \PYG{n}{picker}\PYG{p}{(}\PYG{n}{artist}\PYG{p}{,} \PYG{n}{mouseevent}\PYG{p}{)} \end{sphinxVerbatim} to determine the hit test. if the mouse event is over the artist, return \sphinxstyleemphasis{hit=True} and props is a dictionary of properties you want added to the PickEvent attributes. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.collections.TriMesh method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{pr}}{} Set the pick radius used for containment tests. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rasterized() (matplotlib.collections.TriMesh method)@\spxentry{set\_rasterized()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_rasterized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rasterized}}}{\emph{self}, \emph{rasterized}}{} Force rasterized (bitmap) drawing in vector backend output. Defaults to None, which implies the backend's default behavior. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rasterized}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sketch\_params() (matplotlib.collections.TriMesh method)@\spxentry{set\_sketch\_params()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_sketch_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sketch\_params}}}{\emph{self}, \emph{scale=None}, \emph{length=None}, \emph{randomness=None}}{} Sets the sketch parameters. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line, in pixels. If scale is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, or not provided, no sketch filter will be provided. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line, in pixels (default 128.0) \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded (default 16.0) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_snap() (matplotlib.collections.TriMesh method)@\spxentry{set\_snap()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_snap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_snap}}}{\emph{self}, \emph{snap}}{} Set the snapping behavior. Snapping aligns positions with the pixel grid, which results in clearer images. For example, if a black line of 1px width was defined at a position in between two pixels, the resulting image would contain the interpolated value of that line in the pixel grid, which would be a grey value on both adjacent pixel positions. In contrast, snapping will move the line to the nearest integer pixel value, so that the resulting image will really contain a 1px wide black line. Snapping is currently only supported by the Agg and MacOSX backends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool or None{]} Possible values: \begin{itemize} \item {} \sphinxstyleemphasis{True}: Snap vertices to the nearest pixel center. \item {} \sphinxstyleemphasis{False}: Do not modify vertex positions. \item {} \sphinxstyleemphasis{None}: (auto) If the path contains only rectilinear line segments, round to the nearest pixel center. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.collections.TriMesh method)@\spxentry{set\_transform()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_url() (matplotlib.collections.TriMesh method)@\spxentry{set\_url()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_url}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_url}}}{\emph{self}, \emph{url}}{} Set the url for the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{url}}] \leavevmode{[}str{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_urls() (matplotlib.collections.TriMesh method)@\spxentry{set\_urls()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_urls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_urls}}}{\emph{self}, \emph{urls}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{urls}}] \leavevmode{[}List{[}str{]} or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (matplotlib.collections.TriMesh method)@\spxentry{set\_visible()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_zorder() (matplotlib.collections.TriMesh method)@\spxentry{set\_zorder()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.set_zorder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zorder}}}{\emph{self}, \emph{level}}{} Set the zorder for the artist. Artists with lower zorder values are drawn first. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{level}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{stale (matplotlib.collections.TriMesh attribute)@\spxentry{stale}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.stale}}\pysigline{\sphinxbfcode{\sphinxupquote{stale}}} Whether the artist is 'stale' and needs to be re-drawn for the output to match the internal state of the artist. \end{fulllineitems} \index{sticky\_edges (matplotlib.collections.TriMesh attribute)@\spxentry{sticky\_edges}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.sticky_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{sticky\_edges}}} \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} sticky edge lists for autoscaling. When performing autoscaling, if a data limit coincides with a value in the corresponding sticky\_edges list, then no margin will be added--the view limit "sticks" to the edge. A typical use case is histograms, where one usually expects no margin on the bottom edge (0) of the histogram. This attribute cannot be assigned to; however, the \sphinxcode{\sphinxupquote{x}} and \sphinxcode{\sphinxupquote{y}} lists can be modified in place as needed. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{x}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{artist}\PYG{o}{.}\PYG{n}{sticky\PYGZus{}edges}\PYG{o}{.}\PYG{n}{y}\PYG{p}{[}\PYG{p}{:}\PYG{p}{]} \PYG{o}{=} \PYG{p}{(}\PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{to\_rgba() (matplotlib.collections.TriMesh method)@\spxentry{to\_rgba()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{x}, \emph{alpha=None}, \emph{bytes=False}, \emph{norm=True}}{} Return a normalized rgba array corresponding to \sphinxstyleemphasis{x}. In the normal case, \sphinxstyleemphasis{x} is a 1-D or 2-D sequence of scalars, and the corresponding ndarray of rgba values will be returned, based on the norm and colormap set for this ScalarMappable. There is one special case, for handling images that are already rgb or rgba, such as might have been read from an image file. If \sphinxstyleemphasis{x} is an ndarray with 3 dimensions, and the last dimension is either 3 or 4, then it will be treated as an rgb or rgba array, and no mapping will be done. The array can be uint8, or it can be floating point with values in the 0-1 range; otherwise a ValueError will be raised. If it is a masked array, the mask will be ignored. If the last dimension is 3, the \sphinxstyleemphasis{alpha} kwarg (defaulting to 1) will be used to fill in the transparency. If the last dimension is 4, the \sphinxstyleemphasis{alpha} kwarg is ignored; it does not replace the pre-existing alpha. A ValueError will be raised if the third dimension is other than 3 or 4. In either case, if \sphinxstyleemphasis{bytes} is \sphinxstyleemphasis{False} (default), the rgba array will be floats in the 0-1 range; if it is \sphinxstyleemphasis{True}, the returned rgba array will be uint8 in the 0 to 255 range. If norm is False, no normalization of the input data is performed, and it is assumed to be in the range (0-1). \end{fulllineitems} \index{update() (matplotlib.collections.TriMesh method)@\spxentry{update()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{props}}{} Update this artist's properties from the dictionary \sphinxstyleemphasis{props}. \end{fulllineitems} \index{update\_from() (matplotlib.collections.TriMesh method)@\spxentry{update\_from()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} copy properties from other to self \end{fulllineitems} \index{update\_scalarmappable() (matplotlib.collections.TriMesh method)@\spxentry{update\_scalarmappable()}\spxextra{matplotlib.collections.TriMesh method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.update_scalarmappable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_scalarmappable}}}{\emph{self}}{} Update colors from the scalar mappable array, if it is not None. \end{fulllineitems} \index{zorder (matplotlib.collections.TriMesh attribute)@\spxentry{zorder}\spxextra{matplotlib.collections.TriMesh attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/collections_api:matplotlib.collections.TriMesh.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colorbar}}} \label{\detokenize{api/colorbar_api:module-matplotlib.colorbar}}\label{\detokenize{api/colorbar_api:matplotlib-colorbar}}\label{\detokenize{api/colorbar_api::doc}}\index{matplotlib.colorbar (module)@\spxentry{matplotlib.colorbar}\spxextra{module}} Colorbar toolkit with two classes and a function: \begin{quote} \begin{description} \item[{{\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}}] \leavevmode the base class with full colorbar drawing functionality. It can be used as-is to make a colorbar for a given colormap; a mappable object (e.g., image) is not needed. \item[{{\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}}] \leavevmode the derived class for use with images or contour plots. \item[{{\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.make_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes()}}}}}}] \leavevmode a function for resizing an axes and adding a second axes suitable for a colorbar \end{description} \end{quote} The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method uses {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.make_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes()}}}}} and {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}; the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} function is a thin wrapper over {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}}. \index{Colorbar (class in matplotlib.colorbar)@\spxentry{Colorbar}\spxextra{class in matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{Colorbar}}}{\emph{ax}, \emph{mappable}, \emph{**kw}}{} Bases: {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.ColorbarBase}}}}} This class connects a {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}} to a {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} such as a {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} generated via {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}. It is not intended to be instantiated directly; instead, use {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} to make your colorbar. \index{add\_lines() (matplotlib.colorbar.Colorbar method)@\spxentry{add\_lines()}\spxextra{matplotlib.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.add_lines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_lines}}}{\emph{self}, \emph{CS}, \emph{erase=True}}{} Add the lines from a non-filled {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}} to the colorbar. Set \sphinxstyleemphasis{erase} to False if these lines should be added to any pre-existing lines. \end{fulllineitems} \index{on\_mappable\_changed() (matplotlib.colorbar.Colorbar method)@\spxentry{on\_mappable\_changed()}\spxextra{matplotlib.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.on_mappable_changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_mappable\_changed}}}{\emph{self}, \emph{mappable}}{} Updates this colorbar to match the mappable's properties. Typically this is automatically registered as an event handler by {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.colorbar_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar\_factory()}}}}} and should not be called manually. \end{fulllineitems} \index{remove() (matplotlib.colorbar.Colorbar method)@\spxentry{remove()}\spxextra{matplotlib.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove this colorbar from the figure. If the colorbar was created with \sphinxcode{\sphinxupquote{use\_gridspec=True}} then restore the gridspec to its previous value. \end{fulllineitems} \index{update\_bruteforce() (matplotlib.colorbar.Colorbar method)@\spxentry{update\_bruteforce()}\spxextra{matplotlib.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.update_bruteforce}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_bruteforce}}}{\emph{self}, \emph{mappable}}{} Destroy and rebuild the colorbar. This is intended to become obsolete, and will probably be deprecated and then removed. It is not called when the pyplot.colorbar function or the Figure.colorbar method are used to create the colorbar. \end{fulllineitems} \index{update\_normal() (matplotlib.colorbar.Colorbar method)@\spxentry{update\_normal()}\spxextra{matplotlib.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.update_normal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_normal}}}{\emph{self}, \emph{mappable}}{} Update solid patches, lines, etc. Unlike {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar.update_bruteforce}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_bruteforce}}}}}, this does not clear the axes. This is meant to be called when the norm of the image or contour plot to which this colorbar belongs changes. If the norm on the mappable is different than before, this resets the locator and formatter for the axis, so if these have been customized, they will need to be customized again. However, if the norm only changes values of \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} or \sphinxstyleemphasis{cmap} then the old formatter and locator will be preserved. \end{fulllineitems} \end{fulllineitems} \index{ColorbarBase (class in matplotlib.colorbar)@\spxentry{ColorbarBase}\spxextra{class in matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{ColorbarBase}}}{\emph{ax}, \emph{cmap=None}, \emph{norm=None}, \emph{alpha=None}, \emph{values=None}, \emph{boundaries=None}, \emph{orientation='vertical'}, \emph{ticklocation='auto'}, \emph{extend='neither'}, \emph{spacing='uniform'}, \emph{ticks=None}, \emph{format=None}, \emph{drawedges=False}, \emph{filled=True}, \emph{extendfrac=None}, \emph{extendrect=False}, \emph{label=''}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.colorbar.\_ColorbarMappableDummy}} Draw a colorbar in an existing axes. This is a base class for the {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}} class, which is the basis for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} function and the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method, which are the usual ways of creating a colorbar. It is also useful by itself for showing a colormap. If the \sphinxstyleemphasis{cmap} kwarg is given but \sphinxstyleemphasis{boundaries} and \sphinxstyleemphasis{values} are left as None, then the colormap will be displayed on a 0-1 scale. To show the under- and over-value colors, specify the \sphinxstyleemphasis{norm} as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{(}\PYG{n}{clip}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} To show the colors versus index instead of on the 0-1 scale, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{NoNorm}\PYG{o}{.} \end{sphinxVerbatim} Useful public methods are {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label()}}}}} and {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.add_lines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_lines()}}}}}. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}Axes{]} The \sphinxcode{\sphinxupquote{Axes}} instance in which the colorbar is drawn. \item[{\sphinxstylestrong{lines}}] \leavevmode{[}list{]} A list of \sphinxcode{\sphinxupquote{LineCollection}} if lines were drawn, otherwise an empty list. \item[{\sphinxstylestrong{dividers}}] \leavevmode{[}LineCollection{]} A LineCollection if \sphinxstyleemphasis{drawedges} is \sphinxcode{\sphinxupquote{True}}, otherwise \sphinxcode{\sphinxupquote{None}}. \end{description} \end{description}\end{quote} \index{add\_lines() (matplotlib.colorbar.ColorbarBase method)@\spxentry{add\_lines()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.add_lines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_lines}}}{\emph{self}, \emph{levels}, \emph{colors}, \emph{linewidths}, \emph{erase=True}}{} Draw lines on the colorbar. \sphinxstyleemphasis{colors} and \sphinxstyleemphasis{linewidths} must be scalars or sequences the same length as \sphinxstyleemphasis{levels}. Set \sphinxstyleemphasis{erase} to False to add lines without first removing any previously added lines. \end{fulllineitems} \index{ax (matplotlib.colorbar.ColorbarBase attribute)@\spxentry{ax}\spxextra{matplotlib.colorbar.ColorbarBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.ax}}\pysigline{\sphinxbfcode{\sphinxupquote{ax}}\sphinxbfcode{\sphinxupquote{ = None}}} The axes that this colorbar lives in. \end{fulllineitems} \index{config\_axis() (matplotlib.colorbar.ColorbarBase method)@\spxentry{config\_axis()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.config_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{config\_axis}}}{\emph{self}}{}~ \end{fulllineitems} \index{draw\_all() (matplotlib.colorbar.ColorbarBase method)@\spxentry{draw\_all()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.draw_all}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_all}}}{\emph{self}}{} Calculate any free parameters based on the current cmap and norm, and do all the drawing. \end{fulllineitems} \index{get\_ticks() (matplotlib.colorbar.ColorbarBase method)@\spxentry{get\_ticks()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.get_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ticks}}}{\emph{self}, \emph{minor=False}}{} Return the x ticks as a list of locations. \end{fulllineitems} \index{minorticks\_off() (matplotlib.colorbar.ColorbarBase method)@\spxentry{minorticks\_off()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.minorticks_off}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{minorticks\_off}}}{\emph{self}}{} Turns off the minor ticks on the colorbar. \end{fulllineitems} \index{minorticks\_on() (matplotlib.colorbar.ColorbarBase method)@\spxentry{minorticks\_on()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.minorticks_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{minorticks\_on}}}{\emph{self}}{} Turns on the minor ticks on the colorbar without extruding into the "extend regions". \end{fulllineitems} \index{n\_rasterize (matplotlib.colorbar.ColorbarBase attribute)@\spxentry{n\_rasterize}\spxextra{matplotlib.colorbar.ColorbarBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.n_rasterize}}\pysigline{\sphinxbfcode{\sphinxupquote{n\_rasterize}}\sphinxbfcode{\sphinxupquote{ = 50}}} \end{fulllineitems} \index{remove() (matplotlib.colorbar.ColorbarBase method)@\spxentry{remove()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{} Remove this colorbar from the figure \end{fulllineitems} \index{set\_alpha() (matplotlib.colorbar.ColorbarBase method)@\spxentry{set\_alpha()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{}~ \end{fulllineitems} \index{set\_label() (matplotlib.colorbar.ColorbarBase method)@\spxentry{set\_label()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{label}, \emph{**kw}}{} Label the long axis of the colorbar. \end{fulllineitems} \index{set\_ticklabels() (matplotlib.colorbar.ColorbarBase method)@\spxentry{set\_ticklabels()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_ticklabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ticklabels}}}{\emph{self}, \emph{ticklabels}, \emph{update\_ticks=True}}{} Set tick labels. Tick labels are updated immediately unless \sphinxstyleemphasis{update\_ticks} is \sphinxstyleemphasis{False}, in which case one should call {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.update_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ticks}}}}} explicitly. \end{fulllineitems} \index{set\_ticks() (matplotlib.colorbar.ColorbarBase method)@\spxentry{set\_ticks()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ticks}}}{\emph{self}, \emph{ticks}, \emph{update\_ticks=True}}{} Set tick locations. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}\{None, sequence, {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} instance\}{]} If None, a default Locator will be used. \item[{\sphinxstylestrong{update\_ticks}}] \leavevmode{[}\{True, False\}, optional{]} If True, tick locations are updated immediately. If False, use {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.update_ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_ticks()}}}}} to manually update the ticks. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_ticks() (matplotlib.colorbar.ColorbarBase method)@\spxentry{update\_ticks()}\spxextra{matplotlib.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.update_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_ticks}}}{\emph{self}}{} Force the update of the ticks and ticklabels. This must be called whenever the tick locator and/or tick formatter changes. \end{fulllineitems} \end{fulllineitems} \index{ColorbarPatch (class in matplotlib.colorbar)@\spxentry{ColorbarPatch}\spxextra{class in matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{ColorbarPatch}}}{\emph{ax}, \emph{mappable}, \emph{**kw}}{} Bases: {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.Colorbar}}}}} A Colorbar which is created using {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} rather than the default \sphinxcode{\sphinxupquote{pcolor()}}. It uses a list of Patch instances instead of a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}} because the latter does not allow the hatch pattern to vary among the members of the collection. \end{fulllineitems} \index{colorbar\_factory() (in module matplotlib.colorbar)@\spxentry{colorbar\_factory()}\spxextra{in module matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.colorbar_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{colorbar\_factory}}}{\emph{cax}, \emph{mappable}, \emph{**kwargs}}{} Creates a colorbar on the given axes for the given mappable. Typically, for automatic colorbar placement given only a mappable use {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}}. \end{fulllineitems} \index{make\_axes() (in module matplotlib.colorbar)@\spxentry{make\_axes()}\spxextra{in module matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.make_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{make\_axes}}}{\emph{parents}, \emph{location=None}, \emph{orientation=None}, \emph{fraction=0.15}, \emph{shrink=1.0}, \emph{aspect=20}, \emph{**kw}}{} Resize and reposition parent axes, and return a child axes suitable for a colorbar. Keyword arguments may include the following (with defaults): \begin{quote} \begin{description} \item[{location}] \leavevmode{[}{[}None\textbar{}'left'\textbar{}'right'\textbar{}'top'\textbar{}'bottom'{]}{]} The position, relative to \sphinxstylestrong{parents}, where the colorbar axes should be created. If None, the value will either come from the given \sphinxcode{\sphinxupquote{orientation}}, else it will default to 'right'. \item[{orientation}] \leavevmode{[}{[}None\textbar{}'vertical'\textbar{}'horizontal'{]}{]} The orientation of the colorbar. Typically, this keyword shouldn't be used, as it can be derived from the \sphinxcode{\sphinxupquote{location}} keyword. \end{description} \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to multiply the size of the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \sphinxstyleemphasis{anchor} & (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; the anchor point of the colorbar axes \\ \hline \sphinxstyleemphasis{panchor} & (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; the anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Returns (cax, kw), the child axes and the reduced kw dictionary to be passed when creating the colorbar instance. \end{fulllineitems} \index{make\_axes\_gridspec() (in module matplotlib.colorbar)@\spxentry{make\_axes\_gridspec()}\spxextra{in module matplotlib.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/colorbar_api:matplotlib.colorbar.make_axes_gridspec}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colorbar.}}\sphinxbfcode{\sphinxupquote{make\_axes\_gridspec}}}{\emph{parent}, \emph{*}, \emph{fraction=0.15}, \emph{shrink=1.0}, \emph{aspect=20}, \emph{**kw}}{} Resize and reposition a parent axes, and return a child axes suitable for a colorbar. This function is similar to make\_axes. Prmary differences are \begin{itemize} \item {} \sphinxstyleemphasis{make\_axes\_gridspec} only handles the \sphinxstyleemphasis{orientation} keyword and cannot handle the "location" keyword. \item {} \sphinxstyleemphasis{make\_axes\_gridspec} should only be used with a subplot parent. \item {} \begin{description} \item[{\sphinxstyleemphasis{make\_axes} creates an instance of Axes. \sphinxstyleemphasis{make\_axes\_gridspec}}] \leavevmode creates an instance of Subplot. \end{description} \item {} \begin{description} \item[{\sphinxstyleemphasis{make\_axes} updates the position of the}] \leavevmode parent. \sphinxstyleemphasis{make\_axes\_gridspec} replaces the grid\_spec attribute of the parent with a new one. \end{description} \end{itemize} While this function is meant to be compatible with \sphinxstyleemphasis{make\_axes}, there could be some minor differences. Keyword arguments may include the following (with defaults): \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{orientation}}] \leavevmode 'vertical' or 'horizontal' \end{description} \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to multiply the size of the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \sphinxstyleemphasis{anchor} & (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; the anchor point of the colorbar axes \\ \hline \sphinxstyleemphasis{panchor} & (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; the anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} All but the first of these are stripped from the input kw set. Returns (cax, kw), the child axes and the reduced kw dictionary to be passed when creating the colorbar instance. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors}}} \label{\detokenize{api/colors_api:matplotlib-colors}}\label{\detokenize{api/colors_api::doc}} For a visual representation of the Matplotlib colormaps, see: \begin{itemize} \item {} The \DUrole{xref,std,std-ref}{color\_examples} examples for examples of controlling color with Matplotlib. \item {} The {\hyperref[\detokenize{tutorials/index:tutorials-colors}]{\sphinxcrossref{\DUrole{std,std-ref}{Colors}}}} tutorial for an in-depth guide on controlling color. \end{itemize} \phantomsection\label{\detokenize{api/colors_api:module-matplotlib.colors}}\index{matplotlib.colors (module)@\spxentry{matplotlib.colors}\spxextra{module}} A module for converting numbers or color arguments to \sphinxstyleemphasis{RGB} or \sphinxstyleemphasis{RGBA}. \sphinxstyleemphasis{RGB} and \sphinxstyleemphasis{RGBA} are sequences of, respectively, 3 or 4 floats in the range 0-1. This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. Mapping data onto colors using a colormap typically involves two steps: a data array is first mapped onto the range 0-1 using a subclass of {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, then this number is mapped to a color using a subclass of {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}. Two are provided here: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap}}}}}, which uses piecewise-linear interpolation to define colormaps, and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}}, which makes a colormap from a list of colors. \sphinxstrong{See also:} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation::doc}]{\sphinxcrossref{\DUrole{doc}{Creating Colormaps in Matplotlib}}}} for examples of how to make colormaps and {\hyperref[\detokenize{tutorials/colors/colormaps::doc}]{\sphinxcrossref{\DUrole{doc}{Choosing Colormaps in Matplotlib}}}} for a list of built-in colormaps. {\hyperref[\detokenize{tutorials/colors/colormapnorms::doc}]{\sphinxcrossref{\DUrole{doc}{Colormap Normalization}}}} for more details about data normalization More colormaps are available at \sphinxhref{https://jiffyclub.github.io/palettable/}{palettable}. The module also provides functions for checking whether an object can be interpreted as a color ({\hyperref[\detokenize{api/_as_gen/matplotlib.colors.is_color_like:matplotlib.colors.is_color_like}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_color\_like()}}}}}), for converting such an object to an RGBA tuple ({\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba:matplotlib.colors.to_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_rgba()}}}}}) or to an HTML-like hex string in the \sphinxcode{\sphinxupquote{\#rrggbb}} format ({\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_hex:matplotlib.colors.to_hex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_hex()}}}}}), and a sequence of colors to an \sphinxcode{\sphinxupquote{(n, 4)}} RGBA array ({\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array:matplotlib.colors.to_rgba_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_rgba\_array()}}}}}). Caching is used for efficiency. Matplotlib recognizes the following formats to specify a color: \begin{itemize} \item {} an RGB or RGBA tuple of float values in \sphinxcode{\sphinxupquote{{[}0, 1{]}}} (e.g., \sphinxcode{\sphinxupquote{(0.1, 0.2, 0.5)}} or \sphinxcode{\sphinxupquote{(0.1, 0.2, 0.5, 0.3)}}); \item {} a hex RGB or RGBA string (e.g., \sphinxcode{\sphinxupquote{'\#0f0f0f'}} or \sphinxcode{\sphinxupquote{'\#0f0f0f80'}}; case-insensitive); \item {} a string representation of a float value in \sphinxcode{\sphinxupquote{{[}0, 1{]}}} inclusive for gray level (e.g., \sphinxcode{\sphinxupquote{'0.5'}}); \item {} one of \sphinxcode{\sphinxupquote{\{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'\}}}; \item {} a X11/CSS4 color name (case-insensitive); \item {} a name from the \sphinxhref{https://xkcd.com/color/rgb/}{xkcd color survey}, prefixed with \sphinxcode{\sphinxupquote{'xkcd:'}} (e.g., \sphinxcode{\sphinxupquote{'xkcd:sky blue'}}; case insensitive); \item {} one of the Tableau Colors from the 'T10' categorical palette (the default color cycle): \sphinxcode{\sphinxupquote{\{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'\}}} (case-insensitive); \item {} a "CN" color spec, i.e. \sphinxcode{\sphinxupquote{'C'}} followed by a number, which is an index into the default property cycle (\sphinxcode{\sphinxupquote{matplotlib.rcParams{[}'axes.prop\_cycle'{]}}}); the indexing is intended to occur at rendering time, and defaults to black if the cycle does not include color. \end{itemize} \subsection{Classes} \label{\detokenize{api/colors_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib.colors.BoundaryNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoundaryNorm}}}}}(boundaries, ncolors{[}, clip{]}) & Generate a colormap index based on discrete intervals. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}(name{[}, N{]}) & Baseclass for all scalar to RGBA mappings. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:matplotlib.colors.DivergingNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DivergingNorm}}}}}(vcenter{[}, vmin, vmax{]}) & Normalize data with a set center. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}({[}azdeg, altdeg, hsv\_min\_val, ...{]}) & Create a light source coming from the specified azimuth and elevation. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap}}}}}(name, segmentdata{[}, ...{]}) & Colormap objects based on lookup tables using linear segments. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap}}}}}(colors{[}, name, N{]}) & Colormap object generated from a list of colors. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogNorm}}}}}({[}vmin, vmax, clip{]}) & Normalize a given value to the 0-1 range on a log scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.NoNorm:matplotlib.colors.NoNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NoNorm}}}}}({[}vmin, vmax, clip{]}) & Dummy replacement for {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, for the case where we want to use indices directly in a {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}({[}vmin, vmax, clip{]}) & A class which, when called, can normalize data into the \sphinxcode{\sphinxupquote{{[}0.0, 1.0{]}}} interval. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PowerNorm}}}}}(gamma{[}, vmin, vmax, clip{]}) & Linearly map a given value to the 0-1 range and then apply a power-law normalization over that range. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib.colors.SymLogNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SymLogNorm}}}}}(linthresh{[}, linscale, vmin, ...{]}) & The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.colors.BoundaryNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib-colors-boundarynorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm::doc}}\index{BoundaryNorm (class in matplotlib.colors)@\spxentry{BoundaryNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib.colors.BoundaryNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{BoundaryNorm}}}{\emph{boundaries}, \emph{ncolors}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} Generate a colormap index based on discrete intervals. Unlike {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogNorm}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib.colors.BoundaryNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoundaryNorm}}}}} maps values to integers instead of to the interval 0-1. Mapping to the 0-1 interval could have been done via piece-wise linear interpolation, but using integers seems simpler, and reduces the number of conversions back and forth between integer and floating point. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{boundaries}}] \leavevmode{[}array-like{]} Monotonically increasing sequence of boundaries \item[{\sphinxstylestrong{ncolors}}] \leavevmode{[}int{]} Number of colors in the colormap to be used \item[{\sphinxstylestrong{clip}}] \leavevmode{[}bool, optional{]} If clip is \sphinxcode{\sphinxupquote{True}}, out of range values are mapped to 0 if they are below \sphinxcode{\sphinxupquote{boundaries{[}0{]}}} or mapped to ncolors - 1 if they are above \sphinxcode{\sphinxupquote{boundaries{[}-1{]}}}. If clip is \sphinxcode{\sphinxupquote{False}}, out of range values are mapped to -1 if they are below \sphinxcode{\sphinxupquote{boundaries{[}0{]}}} or mapped to ncolors if they are above \sphinxcode{\sphinxupquote{boundaries{[}-1{]}}}. These are then converted to valid indices by \sphinxcode{\sphinxupquote{Colormap.\_\_call\_\_()}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstyleemphasis{boundaries} defines the edges of bins, and data falling within a bin is mapped to the color with the same index. If the number of bins doesn't equal \sphinxstyleemphasis{ncolors}, the color is chosen by linear interpolation of the bin number onto color numbers. \index{inverse() (matplotlib.colors.BoundaryNorm method)@\spxentry{inverse()}\spxextra{matplotlib.colors.BoundaryNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib.colors.BoundaryNorm.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~\begin{quote}\begin{description} \item[{Raises}] \leavevmode\begin{description} \item[{ValueError}] \leavevmode BoundaryNorm is not invertible, so calling this method will always raise an error \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.BoundaryNorm}}} \label{\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:examples-using-matplotlib-colors-boundarynorm}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_multicolored\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_leftventricle\_bulleye.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_bounds.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colorbar_only:sphx-glr-tutorials-colors-colorbar-only-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customized Colorbars Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsubsection{matplotlib.colors.Colormap} \label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib-colors-colormap}}\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap::doc}}\index{Colormap (class in matplotlib.colors)@\spxentry{Colormap}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{Colormap}}}{\emph{name}, \emph{N=256}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Baseclass for all scalar to RGBA mappings. Typically Colormap instances are used to convert data values (floats) from the interval \sphinxcode{\sphinxupquote{{[}0, 1{]}}} to the RGBA color that the respective Colormap represents. For scaling of data into the \sphinxcode{\sphinxupquote{{[}0, 1{]}}} interval see {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}}. It is worth noting that {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} subclasses make heavy use of this \sphinxcode{\sphinxupquote{data-\textgreater{}normalize-\textgreater{}map-to-color}} processing chain. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str{]} The name of the colormap. \item[{\sphinxstylestrong{N}}] \leavevmode{[}int{]} The number of rgb quantization levels. \end{description} \end{description}\end{quote} \index{colorbar\_extend (matplotlib.colors.Colormap attribute)@\spxentry{colorbar\_extend}\spxextra{matplotlib.colors.Colormap attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.colorbar_extend}}\pysigline{\sphinxbfcode{\sphinxupquote{colorbar\_extend}}\sphinxbfcode{\sphinxupquote{ = None}}} When this colormap exists on a scalar mappable and colorbar\_extend is not False, colorbar creation will pick up \sphinxcode{\sphinxupquote{colorbar\_extend}} as the default value for the \sphinxcode{\sphinxupquote{extend}} keyword in the {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colorbar.Colorbar}}}}} constructor. \end{fulllineitems} \index{is\_gray() (matplotlib.colors.Colormap method)@\spxentry{is\_gray()}\spxextra{matplotlib.colors.Colormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.is_gray}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_gray}}}{\emph{self}}{}~ \end{fulllineitems} \index{reversed() (matplotlib.colors.Colormap method)@\spxentry{reversed()}\spxextra{matplotlib.colors.Colormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.reversed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reversed}}}{\emph{self}, \emph{name=None}}{} Make a reversed instance of the Colormap. \begin{sphinxadmonition}{note}{Note:} Function not implemented for base class. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str, optional{]} The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "\_r". \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.reversed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap.reversed}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap.reversed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ListedColormap.reversed}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_bad() (matplotlib.colors.Colormap method)@\spxentry{set\_bad()}\spxextra{matplotlib.colors.Colormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_bad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bad}}}{\emph{self}, \emph{color='k'}, \emph{alpha=None}}{} Set color to be used for masked values. \end{fulllineitems} \index{set\_over() (matplotlib.colors.Colormap method)@\spxentry{set\_over()}\spxextra{matplotlib.colors.Colormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_over}}}{\emph{self}, \emph{color='k'}, \emph{alpha=None}}{} Set color to be used for high out-of-range values. Requires norm.clip = False \end{fulllineitems} \index{set\_under() (matplotlib.colors.Colormap method)@\spxentry{set\_under()}\spxextra{matplotlib.colors.Colormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_under}}}{\emph{self}, \emph{color='k'}, \emph{alpha=None}}{} Set color to be used for low out-of-range values. Requires norm.clip = False \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.Colormap}}} \label{\detokenize{api/_as_gen/matplotlib.colors.Colormap:examples-using-matplotlib-colors-colormap}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \subsubsection{matplotlib.colors.DivergingNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:matplotlib-colors-divergingnorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm::doc}}\index{DivergingNorm (class in matplotlib.colors)@\spxentry{DivergingNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:matplotlib.colors.DivergingNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{DivergingNorm}}}{\emph{vcenter}, \emph{vmin=None}, \emph{vmax=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} Normalize data with a set center. Useful when mapping data with an unequal rates of change around a conceptual center, e.g., data that range from -2 to 4, with 0 as the midpoint. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vcenter}}] \leavevmode{[}float{]} The data value that defines \sphinxcode{\sphinxupquote{0.5}} in the normalization. \item[{\sphinxstylestrong{vmin}}] \leavevmode{[}float, optional{]} The data value that defines \sphinxcode{\sphinxupquote{0.0}} in the normalization. Defaults to the min value of the dataset. \item[{\sphinxstylestrong{vmax}}] \leavevmode{[}float, optional{]} The data value that defines \sphinxcode{\sphinxupquote{1.0}} in the normalization. Defaults to the the max value of the dataset. \end{description} \end{description}\end{quote} \subsubsection*{Examples} This maps data value -4000 to 0., 0 to 0.5, and +10000 to 1.0; data between is linearly interpolated: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{colors} \PYG{k}{as} \PYG{n+nn}{mcolors} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{offset} \PYG{o}{=} \PYG{n}{mcolors}\PYG{o}{.}\PYG{n}{DivergingNorm}\PYG{p}{(}\PYG{n}{vmin}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{4000.}\PYG{p}{,} \PYG{g+go}{ vcenter=0., vmax=10000)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{data} \PYG{o}{=} \PYG{p}{[}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{4000.}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{2000.}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{2500.}\PYG{p}{,} \PYG{l+m+mf}{5000.}\PYG{p}{,} \PYG{l+m+mf}{7500.}\PYG{p}{,} \PYG{l+m+mf}{10000.}\PYG{p}{]} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{offset}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \PYG{g+go}{array([0., 0.25, 0.5, 0.625, 0.75, 0.875, 1.0])} \end{sphinxVerbatim} \index{autoscale\_None() (matplotlib.colors.DivergingNorm method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.colors.DivergingNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:matplotlib.colors.DivergingNorm.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}, \emph{A}}{} Get vmin and vmax, and then clip at vcenter \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.DivergingNorm}}} \label{\detokenize{api/_as_gen/matplotlib.colors.DivergingNorm:examples-using-matplotlib-colors-divergingnorm}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_diverging.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsubsection{matplotlib.colors.LightSource} \label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib-colors-lightsource}}\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource::doc}}\index{LightSource (class in matplotlib.colors)@\spxentry{LightSource}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{LightSource}}}{\emph{azdeg=315}, \emph{altdeg=45}, \emph{hsv\_min\_val=0}, \emph{hsv\_max\_val=1}, \emph{hsv\_min\_sat=1}, \emph{hsv\_max\_sat=0}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Create a light source coming from the specified azimuth and elevation. Angles are in degrees, with the azimuth measured clockwise from north and elevation up from the zero plane of the surface. The {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade()}}}}} is used to produce "shaded" rgb values for a data array. {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade\_rgb()}}}}} can be used to combine an rgb image with The {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade\_rgb()}}}}} The {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.hillshade}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hillshade()}}}}} produces an illumination map of a surface. Specify the azimuth (measured clockwise from south) and altitude (measured up from the plane of the surface) of the light source in degrees. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{azdeg}}] \leavevmode{[}number, optional{]} The azimuth (0-360, degrees clockwise from North) of the light source. Defaults to 315 degrees (from the northwest). \item[{\sphinxstylestrong{altdeg}}] \leavevmode{[}number, optional{]} The altitude (0-90, degrees up from horizontal) of the light source. Defaults to 45 degrees from horizontal. \end{description} \end{description}\end{quote} \subsubsection*{Notes} For backwards compatibility, the parameters \sphinxstyleemphasis{hsv\_min\_val}, \sphinxstyleemphasis{hsv\_max\_val}, \sphinxstyleemphasis{hsv\_min\_sat}, and \sphinxstyleemphasis{hsv\_max\_sat} may be supplied at initialization as well. However, these parameters will only be used if "blend\_mode='hsv'" is passed into {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade\_rgb()}}}}}. See the documentation for {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.blend_hsv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{blend\_hsv()}}}}} for more details. \index{blend\_hsv() (matplotlib.colors.LightSource method)@\spxentry{blend\_hsv()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.blend_hsv}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{blend\_hsv}}}{\emph{self}, \emph{rgb}, \emph{intensity}, \emph{hsv\_max\_sat=None}, \emph{hsv\_max\_val=None}, \emph{hsv\_min\_val=None}, \emph{hsv\_min\_sat=None}}{} Take the input data array, convert to HSV values in the given colormap, then adjust those color values to give the impression of a shaded relief map with a specified light source. RGBA values are returned, which can then be used to plot the shaded image with imshow. The color of the resulting image will be darkened by moving the (s,v) values (in hsv colorspace) toward (hsv\_min\_sat, hsv\_min\_val) in the shaded regions, or lightened by sliding (s,v) toward (hsv\_max\_sat hsv\_max\_val) in regions that are illuminated. The default extremes are chose so that completely shaded points are nearly black (s = 1, v = 0) and completely illuminated points are nearly white (s = 0, v = 1). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array of floats ranging from 0 to 1 (color image). \item[{\sphinxstylestrong{intensity}}] \leavevmode{[}ndarray{]} An MxNx1 array of floats ranging from 0 to 1 (grayscale image). \item[{\sphinxstylestrong{hsv\_max\_sat}}] \leavevmode{[}number, optional{]} The maximum saturation value that the \sphinxstyleemphasis{intensity} map can shift the output image to. Defaults to 1. \item[{\sphinxstylestrong{hsv\_min\_sat}}] \leavevmode{[}number, optional{]} The minimum saturation value that the \sphinxstyleemphasis{intensity} map can shift the output image to. Defaults to 0. \item[{\sphinxstylestrong{hsv\_max\_val}}] \leavevmode{[}number, optional{]} The maximum value ("v" in "hsv") that the \sphinxstyleemphasis{intensity} map can shift the output image to. Defaults to 1. \item[{\sphinxstylestrong{hsv\_min\_val}}] \leavevmode{[}number, optional{]} The minimum value ("v" in "hsv") that the \sphinxstyleemphasis{intensity} map can shift the output image to. Defaults to 0. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array representing the combined images. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{blend\_overlay() (matplotlib.colors.LightSource method)@\spxentry{blend\_overlay()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.blend_overlay}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{blend\_overlay}}}{\emph{self}, \emph{rgb}, \emph{intensity}}{} Combines an rgb image with an intensity map using "overlay" blending. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array of floats ranging from 0 to 1 (color image). \item[{\sphinxstylestrong{intensity}}] \leavevmode{[}ndarray{]} An MxNx1 array of floats ranging from 0 to 1 (grayscale image). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array representing the combined images. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{blend\_soft\_light() (matplotlib.colors.LightSource method)@\spxentry{blend\_soft\_light()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.blend_soft_light}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{blend\_soft\_light}}}{\emph{self}, \emph{rgb}, \emph{intensity}}{} Combines an rgb image with an intensity map using "soft light" blending. Uses the "pegtop" formula. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array of floats ranging from 0 to 1 (color image). \item[{\sphinxstylestrong{intensity}}] \leavevmode{[}ndarray{]} An MxNx1 array of floats ranging from 0 to 1 (grayscale image). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}ndarray{]} An MxNx3 RGB array representing the combined images. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{direction (matplotlib.colors.LightSource attribute)@\spxentry{direction}\spxextra{matplotlib.colors.LightSource attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.direction}}\pysigline{\sphinxbfcode{\sphinxupquote{direction}}} The unit vector direction towards the light source. \end{fulllineitems} \index{hillshade() (matplotlib.colors.LightSource method)@\spxentry{hillshade()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.hillshade}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hillshade}}}{\emph{self}, \emph{elevation}, \emph{vert\_exag=1}, \emph{dx=1}, \emph{dy=1}, \emph{fraction=1.0}}{} Calculates the illumination intensity for a surface using the defined azimuth and elevation for the light source. This computes the normal vectors for the surface, and then passes them on to {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_normals}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{shade\_normals}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{elevation}}] \leavevmode{[}array-like{]} A 2d array (or equivalent) of the height values used to generate an illumination map \item[{\sphinxstylestrong{vert\_exag}}] \leavevmode{[}number, optional{]} The amount to exaggerate the elevation values by when calculating illumination. This can be used either to correct for differences in units between the x-y coordinate system and the elevation coordinate system (e.g. decimal degrees vs meters) or to exaggerate or de-emphasize topographic effects. \item[{\sphinxstylestrong{dx}}] \leavevmode{[}number, optional{]} The x-spacing (columns) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{dy}}] \leavevmode{[}number, optional{]} The y-spacing (rows) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{fraction}}] \leavevmode{[}number, optional{]} Increases or decreases the contrast of the hillshade. Values greater than one will cause intermediate values to move closer to full illumination or shadow (and clipping any values that move beyond 0 or 1). Note that this is not visually or mathematically the same as vertical exaggeration. \item[{\sphinxstylestrong{Returns}}] \leavevmode \item[{\sphinxstylestrong{-------}}] \leavevmode \item[{\sphinxstylestrong{intensity}}] \leavevmode{[}ndarray{]} A 2d array of illumination values between 0-1, where 0 is completely in shadow and 1 is completely illuminated. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{shade() (matplotlib.colors.LightSource method)@\spxentry{shade()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shade}}}{\emph{self}, \emph{data}, \emph{cmap}, \emph{norm=None}, \emph{blend\_mode='overlay'}, \emph{vmin=None}, \emph{vmax=None}, \emph{vert\_exag=1}, \emph{dx=1}, \emph{dy=1}, \emph{fraction=1}, \emph{**kwargs}}{} Combine colormapped data values with an illumination intensity map (a.k.a. "hillshade") of the values. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{data}}] \leavevmode{[}array-like{]} A 2d array (or equivalent) of the height values used to generate a shaded map. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance{]} The colormap used to color the \sphinxstyleemphasis{data} array. Note that this must be a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance. For example, rather than passing in \sphinxcode{\sphinxupquote{cmap='gist\_earth'}}, use \sphinxcode{\sphinxupquote{cmap=plt.get\_cmap('gist\_earth')}} instead. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance, optional{]} The normalization used to scale values before colormapping. If None, the input will be linearly scaled between its min and max. \item[{\sphinxstylestrong{blend\_mode}}] \leavevmode{[}\{'hsv', 'overlay', 'soft'\} or callable, optional{]} The type of blending used to combine the colormapped data values with the illumination intensity. Default is "overlay". Note that for most topographic surfaces, "overlay" or "soft" appear more visually realistic. If a user-defined function is supplied, it is expected to combine an MxNx3 RGB array of floats (ranging 0 to 1) with an MxNx1 hillshade array (also 0 to 1). (Call signature \sphinxcode{\sphinxupquote{func(rgb, illum, **kwargs)}}) Additional kwargs supplied to this function will be passed on to the \sphinxstyleemphasis{blend\_mode} function. \item[{\sphinxstylestrong{vmin}}] \leavevmode{[}scalar or None, optional{]} The minimum value used in colormapping \sphinxstyleemphasis{data}. If \sphinxstyleemphasis{None} the minimum value in \sphinxstyleemphasis{data} is used. If \sphinxstyleemphasis{norm} is specified, then this argument will be ignored. \item[{\sphinxstylestrong{vmax}}] \leavevmode{[}scalar or None, optional{]} The maximum value used in colormapping \sphinxstyleemphasis{data}. If \sphinxstyleemphasis{None} the maximum value in \sphinxstyleemphasis{data} is used. If \sphinxstyleemphasis{norm} is specified, then this argument will be ignored. \item[{\sphinxstylestrong{vert\_exag}}] \leavevmode{[}number, optional{]} The amount to exaggerate the elevation values by when calculating illumination. This can be used either to correct for differences in units between the x-y coordinate system and the elevation coordinate system (e.g. decimal degrees vs meters) or to exaggerate or de-emphasize topography. \item[{\sphinxstylestrong{dx}}] \leavevmode{[}number, optional{]} The x-spacing (columns) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{dy}}] \leavevmode{[}number, optional{]} The y-spacing (rows) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{fraction}}] \leavevmode{[}number, optional{]} Increases or decreases the contrast of the hillshade. Values greater than one will cause intermediate values to move closer to full illumination or shadow (and clipping any values that move beyond 0 or 1). Note that this is not visually or mathematically the same as vertical exaggeration. \item[{\sphinxstylestrong{Additional kwargs are passed on to the *blend\_mode* function.}}] \leavevmode \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgba}}] \leavevmode{[}ndarray{]} An MxNx4 array of floats ranging between 0-1. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{shade\_normals() (matplotlib.colors.LightSource method)@\spxentry{shade\_normals()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_normals}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shade\_normals}}}{\emph{self}, \emph{normals}, \emph{fraction=1.0}}{} Calculates the illumination intensity for the normal vectors of a surface using the defined azimuth and elevation for the light source. Imagine an artificial sun placed at infinity in some azimuth and elevation position illuminating our surface. The parts of the surface that slope toward the sun should brighten while those sides facing away should become darker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fraction}}] \leavevmode{[}number, optional{]} Increases or decreases the contrast of the hillshade. Values greater than one will cause intermediate values to move closer to full illumination or shadow (and clipping any values that move beyond 0 or 1). Note that this is not visually or mathematically the same as vertical exaggeration. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{intensity}}] \leavevmode{[}ndarray{]} A 2d array of illumination values between 0-1, where 0 is completely in shadow and 1 is completely illuminated. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{shade\_rgb() (matplotlib.colors.LightSource method)@\spxentry{shade\_rgb()}\spxextra{matplotlib.colors.LightSource method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource.shade_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shade\_rgb}}}{\emph{self}, \emph{rgb}, \emph{elevation}, \emph{fraction=1.0}, \emph{blend\_mode='hsv'}, \emph{vert\_exag=1}, \emph{dx=1}, \emph{dy=1}, \emph{**kwargs}}{} Use this light source to adjust the colors of the \sphinxstyleemphasis{rgb} input array to give the impression of a shaded relief map with the given \sphinxcode{\sphinxupquote{elevation}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}array-like{]} An (M, N, 3) RGB array, assumed to be in the range of 0 to 1. \item[{\sphinxstylestrong{elevation}}] \leavevmode{[}array-like{]} An (M, N) array of the height values used to generate a shaded map. \item[{\sphinxstylestrong{fraction}}] \leavevmode{[}number{]} Increases or decreases the contrast of the hillshade. Values greater than one will cause intermediate values to move closer to full illumination or shadow (and clipping any values that move beyond 0 or 1). Note that this is not visually or mathematically the same as vertical exaggeration. \item[{\sphinxstylestrong{blend\_mode}}] \leavevmode{[}\{'hsv', 'overlay', 'soft'\} or callable, optional{]} The type of blending used to combine the colormapped data values with the illumination intensity. For backwards compatibility, this defaults to "hsv". Note that for most topographic surfaces, "overlay" or "soft" appear more visually realistic. If a user-defined function is supplied, it is expected to combine an MxNx3 RGB array of floats (ranging 0 to 1) with an MxNx1 hillshade array (also 0 to 1). (Call signature \sphinxcode{\sphinxupquote{func(rgb, illum, **kwargs)}}) Additional kwargs supplied to this function will be passed on to the \sphinxstyleemphasis{blend\_mode} function. \item[{\sphinxstylestrong{vert\_exag}}] \leavevmode{[}number, optional{]} The amount to exaggerate the elevation values by when calculating illumination. This can be used either to correct for differences in units between the x-y coordinate system and the elevation coordinate system (e.g. decimal degrees vs meters) or to exaggerate or de-emphasize topography. \item[{\sphinxstylestrong{dx}}] \leavevmode{[}number, optional{]} The x-spacing (columns) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{dy}}] \leavevmode{[}number, optional{]} The y-spacing (rows) of the input \sphinxstyleemphasis{elevation} grid. \item[{\sphinxstylestrong{Additional kwargs are passed on to the *blend\_mode* function.}}] \leavevmode \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{shaded\_rgb}}] \leavevmode{[}ndarray{]} An (m, n, 3) array of floats ranging between 0-1. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.LightSource}}} \label{\detokenize{api/_as_gen/matplotlib.colors.LightSource:examples-using-matplotlib-colors-lightsource}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_shading\_example.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_mandelbrot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_3D.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_agg\_filter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_custom\_shaded\_3d\_surface.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_advanced\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_topographic\_hillshading.py} \end{itemize} \subsubsection{matplotlib.colors.LinearSegmentedColormap} \label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib-colors-linearsegmentedcolormap}}\label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap::doc}}\index{LinearSegmentedColormap (class in matplotlib.colors)@\spxentry{LinearSegmentedColormap}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{LinearSegmentedColormap}}}{\emph{name}, \emph{segmentdata}, \emph{N=256}, \emph{gamma=1.0}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} Colormap objects based on lookup tables using linear segments. The lookup table is generated using linear interpolation for each primary color, with the 0-1 domain divided into any number of segments. Create color map from linear mapping segments segmentdata argument is a dictionary with a red, green and blue entries. Each entry should be a list of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y0}, \sphinxstyleemphasis{y1} tuples, forming rows in a table. Entries for alpha are optional. Example: suppose you want red to increase from 0 to 1 over the bottom half, green to do the same over the middle half, and blue over the top half. Then you would use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cdict} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.75}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{p}{[}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{0.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{]}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} Each row in the table for a given color is a sequence of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y0}, \sphinxstyleemphasis{y1} tuples. In each sequence, \sphinxstyleemphasis{x} must increase monotonically from 0 to 1. For any input value \sphinxstyleemphasis{z} falling between \sphinxstyleemphasis{x{[}i{]}} and \sphinxstyleemphasis{x{[}i+1{]}}, the output value of a given color will be linearly interpolated between \sphinxstyleemphasis{y1{[}i{]}} and \sphinxstyleemphasis{y0{[}i+1{]}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{row} \PYG{n}{i}\PYG{p}{:} \PYG{n}{x} \PYG{n}{y0} \PYG{n}{y1} \PYG{o}{/} \PYG{o}{/} \PYG{n}{row} \PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{:} \PYG{n}{x} \PYG{n}{y0} \PYG{n}{y1} \end{sphinxVerbatim} Hence y0 in the first row and y1 in the last row are never used. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.from_list}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearSegmentedColormap.from\_list}}}}}}] \leavevmode Static method; factory function for generating a smoothly-varying LinearSegmentedColormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.makeMappingArray:matplotlib.colors.makeMappingArray}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{makeMappingArray}}}}}}] \leavevmode For information about making a mapping array. \end{description} \index{from\_list() (matplotlib.colors.LinearSegmentedColormap static method)@\spxentry{from\_list()}\spxextra{matplotlib.colors.LinearSegmentedColormap static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.from_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{from\_list}}}{\emph{name}, \emph{colors}, \emph{N=256}, \emph{gamma=1.0}}{} Make a linear segmented colormap with \sphinxstyleemphasis{name} from a sequence of \sphinxstyleemphasis{colors} which evenly transitions from colors{[}0{]} at val=0 to colors{[}-1{]} at val=1. \sphinxstyleemphasis{N} is the number of rgb quantization levels. Alternatively, a list of (value, color) tuples can be given to divide the range unevenly. \end{fulllineitems} \index{reversed() (matplotlib.colors.LinearSegmentedColormap method)@\spxentry{reversed()}\spxextra{matplotlib.colors.LinearSegmentedColormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.reversed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reversed}}}{\emph{self}, \emph{name=None}}{} Make a reversed instance of the Colormap. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str, optional{]} The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "\_r". \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{LinearSegmentedColormap}] \leavevmode The reversed colormap. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_gamma() (matplotlib.colors.LinearSegmentedColormap method)@\spxentry{set\_gamma()}\spxextra{matplotlib.colors.LinearSegmentedColormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:matplotlib.colors.LinearSegmentedColormap.set_gamma}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_gamma}}}{\emph{self}, \emph{gamma}}{} Set a new gamma value and regenerate color map. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.LinearSegmentedColormap}}} \label{\detokenize{api/_as_gen/matplotlib.colors.LinearSegmentedColormap:examples-using-matplotlib-colors-linearsegmentedcolormap}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating Colormaps in Matplotlib}}}} \end{itemize} \subsubsection{matplotlib.colors.ListedColormap} \label{\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib-colors-listedcolormap}}\label{\detokenize{api/_as_gen/matplotlib.colors.ListedColormap::doc}}\index{ListedColormap (class in matplotlib.colors)@\spxentry{ListedColormap}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{ListedColormap}}}{\emph{colors}, \emph{name='from\_list'}, \emph{N=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} Colormap object generated from a list of colors. This may be most useful when indexing directly into a colormap, but it can also be used to generate special colormaps for ordinary mapping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{colors}}] \leavevmode{[}list, array{]} List of Matplotlib color specifications, or an equivalent Nx3 or Nx4 floating point array (\sphinxstyleemphasis{N} rgb or rgba values). \item[{\sphinxstylestrong{name}}] \leavevmode{[}str, optional{]} String to identify the colormap. \item[{\sphinxstylestrong{N}}] \leavevmode{[}int, optional{]} Number of entries in the map. The default is \sphinxstyleemphasis{None}, in which case there is one colormap entry for each element in the list of colors. If: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{\PYGZlt{}} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{colors}\PYG{p}{)} \end{sphinxVerbatim} the list will be truncated at \sphinxstyleemphasis{N}. If: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{N} \PYG{o}{\PYGZgt{}} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{colors}\PYG{p}{)} \end{sphinxVerbatim} the list will be extended by repetition. \end{description} \end{description}\end{quote} \index{reversed() (matplotlib.colors.ListedColormap method)@\spxentry{reversed()}\spxextra{matplotlib.colors.ListedColormap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:matplotlib.colors.ListedColormap.reversed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reversed}}}{\emph{self}, \emph{name=None}}{} Make a reversed instance of the Colormap. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{name}}] \leavevmode{[}str, optional{]} The name for the reversed colormap. If it's None the name will be the name of the parent colormap + "\_r". \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{ListedColormap}] \leavevmode A reversed instance of the colormap. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.ListedColormap}}} \label{\detokenize{api/_as_gen/matplotlib.colors.ListedColormap:examples-using-matplotlib-colors-listedcolormap}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_multicolored\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_leftventricle\_bulleye.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colorbar_only:sphx-glr-tutorials-colors-colorbar-only-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customized Colorbars Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating Colormaps in Matplotlib}}}} \end{itemize} \subsubsection{matplotlib.colors.LogNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib-colors-lognorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm::doc}}\index{LogNorm (class in matplotlib.colors)@\spxentry{LogNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{LogNorm}}}{\emph{vmin=None}, \emph{vmax=None}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} Normalize a given value to the 0-1 range on a log scale. If \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is not given, they are initialized from the minimum and maximum value respectively of the first input processed. That is, \sphinxstyleemphasis{\_\_call\_\_(A)} calls \sphinxstyleemphasis{autoscale\_None(A)}. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True} and the given value falls outside the range, the returned value will be 0 or 1, whichever is closer. Returns 0 if: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{vmin}\PYG{o}{==}\PYG{n}{vmax} \end{sphinxVerbatim} Works with scalars or arrays, including masked arrays. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True}, masked values are set to 1; otherwise they remain masked. Clipping silently defeats the purpose of setting the over, under, and masked colors in the colormap, so it is likely to lead to surprises; therefore the default is \sphinxstyleemphasis{clip} = \sphinxstyleemphasis{False}. \index{autoscale() (matplotlib.colors.LogNorm method)@\spxentry{autoscale()}\spxextra{matplotlib.colors.LogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}, \emph{A}}{} Set \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} to min, max of \sphinxstyleemphasis{A}. \end{fulllineitems} \index{autoscale\_None() (matplotlib.colors.LogNorm method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.colors.LogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}, \emph{A}}{} Autoscale only None-valued vmin or vmax. \end{fulllineitems} \index{inverse() (matplotlib.colors.LogNorm method)@\spxentry{inverse()}\spxextra{matplotlib.colors.LogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.LogNorm}}} \label{\detokenize{api/_as_gen/matplotlib.colors.LogNorm:examples-using-matplotlib-colors-lognorm}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_lognorm.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsubsection{matplotlib.colors.NoNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.NoNorm:matplotlib-colors-nonorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.NoNorm::doc}}\index{NoNorm (class in matplotlib.colors)@\spxentry{NoNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.NoNorm:matplotlib.colors.NoNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{NoNorm}}}{\emph{vmin=None}, \emph{vmax=None}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} Dummy replacement for {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, for the case where we want to use indices directly in a {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}}. If \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is not given, they are initialized from the minimum and maximum value respectively of the first input processed. That is, \sphinxstyleemphasis{\_\_call\_\_(A)} calls \sphinxstyleemphasis{autoscale\_None(A)}. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True} and the given value falls outside the range, the returned value will be 0 or 1, whichever is closer. Returns 0 if: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{vmin}\PYG{o}{==}\PYG{n}{vmax} \end{sphinxVerbatim} Works with scalars or arrays, including masked arrays. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True}, masked values are set to 1; otherwise they remain masked. Clipping silently defeats the purpose of setting the over, under, and masked colors in the colormap, so it is likely to lead to surprises; therefore the default is \sphinxstyleemphasis{clip} = \sphinxstyleemphasis{False}. \index{inverse() (matplotlib.colors.NoNorm method)@\spxentry{inverse()}\spxextra{matplotlib.colors.NoNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.NoNorm:matplotlib.colors.NoNorm.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~ \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.colors.Normalize} \label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib-colors-normalize}}\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize::doc}}\index{Normalize (class in matplotlib.colors)@\spxentry{Normalize}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{Normalize}}}{\emph{vmin=None}, \emph{vmax=None}, \emph{clip=False}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class which, when called, can normalize data into the \sphinxcode{\sphinxupquote{{[}0.0, 1.0{]}}} interval. If \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is not given, they are initialized from the minimum and maximum value respectively of the first input processed. That is, \sphinxstyleemphasis{\_\_call\_\_(A)} calls \sphinxstyleemphasis{autoscale\_None(A)}. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True} and the given value falls outside the range, the returned value will be 0 or 1, whichever is closer. Returns 0 if: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{vmin}\PYG{o}{==}\PYG{n}{vmax} \end{sphinxVerbatim} Works with scalars or arrays, including masked arrays. If \sphinxstyleemphasis{clip} is \sphinxstyleemphasis{True}, masked values are set to 1; otherwise they remain masked. Clipping silently defeats the purpose of setting the over, under, and masked colors in the colormap, so it is likely to lead to surprises; therefore the default is \sphinxstyleemphasis{clip} = \sphinxstyleemphasis{False}. \index{autoscale() (matplotlib.colors.Normalize method)@\spxentry{autoscale()}\spxextra{matplotlib.colors.Normalize method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}, \emph{A}}{} Set \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} to min, max of \sphinxstyleemphasis{A}. \end{fulllineitems} \index{autoscale\_None() (matplotlib.colors.Normalize method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.colors.Normalize method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}, \emph{A}}{} Autoscale only None-valued vmin or vmax. \end{fulllineitems} \index{inverse() (matplotlib.colors.Normalize method)@\spxentry{inverse()}\spxextra{matplotlib.colors.Normalize method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~ \end{fulllineitems} \index{process\_value() (matplotlib.colors.Normalize static method)@\spxentry{process\_value()}\spxextra{matplotlib.colors.Normalize static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize.process_value}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{process\_value}}}{\emph{value}}{} Homogenize the input \sphinxstyleemphasis{value} for easy and efficient normalization. \sphinxstyleemphasis{value} can be a scalar or sequence. Returns \sphinxstyleemphasis{result}, \sphinxstyleemphasis{is\_scalar}, where \sphinxstyleemphasis{result} is a masked array matching \sphinxstyleemphasis{value}. Float dtypes are preserved; integer types with two bytes or smaller are converted to np.float32, and larger types are converted to np.float64. Preserving float32 when possible, and using in-place operations, can greatly improve speed for large arrays. Experimental; we may want to add an option to force the use of float32. \end{fulllineitems} \index{scaled() (matplotlib.colors.Normalize method)@\spxentry{scaled()}\spxextra{matplotlib.colors.Normalize method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize.scaled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scaled}}}{\emph{self}}{} Return whether vmin and vmax are set. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.Normalize}}} \label{\detokenize{api/_as_gen/matplotlib.colors.Normalize:examples-using-matplotlib-colors-normalize}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_advanced\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_leftventricle\_bulleye.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_custom.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colorbar_only:sphx-glr-tutorials-colors-colorbar-only-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customized Colorbars Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsubsection{matplotlib.colors.PowerNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib-colors-powernorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.PowerNorm::doc}}\index{PowerNorm (class in matplotlib.colors)@\spxentry{PowerNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{PowerNorm}}}{\emph{gamma}, \emph{vmin=None}, \emph{vmax=None}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} Linearly map a given value to the 0-1 range and then apply a power-law normalization over that range. \index{inverse() (matplotlib.colors.PowerNorm method)@\spxentry{inverse()}\spxextra{matplotlib.colors.PowerNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.PowerNorm}}} \label{\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:examples-using-matplotlib-colors-powernorm}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_mandelbrot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_power\_norm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_power.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsubsection{matplotlib.colors.SymLogNorm} \label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib-colors-symlognorm}}\label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm::doc}}\index{SymLogNorm (class in matplotlib.colors)@\spxentry{SymLogNorm}\spxextra{class in matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib.colors.SymLogNorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{SymLogNorm}}}{\emph{linthresh}, \emph{linscale=1.0}, \emph{vmin=None}, \emph{vmax=None}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter \sphinxstyleemphasis{linthresh} allows the user to specify the size of this range (-\sphinxstyleemphasis{linthresh}, \sphinxstyleemphasis{linthresh}). \sphinxstyleemphasis{linthresh}: The range within which the plot is linear (to avoid having the plot go to infinity around zero). \sphinxstyleemphasis{linscale}: This allows the linear range (-\sphinxstyleemphasis{linthresh} to \sphinxstyleemphasis{linthresh}) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when \sphinxstyleemphasis{linscale} == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range. Defaults to 1. \index{autoscale() (matplotlib.colors.SymLogNorm method)@\spxentry{autoscale()}\spxextra{matplotlib.colors.SymLogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib.colors.SymLogNorm.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}, \emph{A}}{} Set \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} to min, max of \sphinxstyleemphasis{A}. \end{fulllineitems} \index{autoscale\_None() (matplotlib.colors.SymLogNorm method)@\spxentry{autoscale\_None()}\spxextra{matplotlib.colors.SymLogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib.colors.SymLogNorm.autoscale_None}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_None}}}{\emph{self}, \emph{A}}{} Autoscale only None-valued vmin or vmax. \end{fulllineitems} \index{inverse() (matplotlib.colors.SymLogNorm method)@\spxentry{inverse()}\spxextra{matplotlib.colors.SymLogNorm method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:matplotlib.colors.SymLogNorm.inverse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse}}}{\emph{self}, \emph{value}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.SymLogNorm}}} \label{\detokenize{api/_as_gen/matplotlib.colors.SymLogNorm:examples-using-matplotlib-colors-symlognorm}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_symlognorm.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \subsection{Functions} \label{\detokenize{api/colors_api:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.from_levels_and_colors:matplotlib.colors.from_levels_and_colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{from\_levels\_and\_colors}}}}}(levels, colors{[}, extend{]}) & A helper routine to generate a cmap and a norm instance which behave similar to contourf's levels and colors arguments. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.hsv_to_rgb:matplotlib.colors.hsv_to_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hsv\_to\_rgb}}}}}(hsv) & Convert hsv values to rgb. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.rgb_to_hsv:matplotlib.colors.rgb_to_hsv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgb\_to\_hsv}}}}}(arr) & Convert float rgb values (in the range {[}0, 1{]}), in a numpy array to hsv values. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_hex:matplotlib.colors.to_hex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_hex}}}}}(c{[}, keep\_alpha{]}) & Convert \sphinxstyleemphasis{c} to a hex color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgb:matplotlib.colors.to_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_rgb}}}}}(c) & Convert \sphinxstyleemphasis{c} to an RGB color, silently dropping the alpha channel. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba:matplotlib.colors.to_rgba}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_rgba}}}}}(c{[}, alpha{]}) & Convert \sphinxstyleemphasis{c} to an RGBA color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array:matplotlib.colors.to_rgba_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{to\_rgba\_array}}}}}(c{[}, alpha{]}) & Convert \sphinxstyleemphasis{c} to a (n, 4) array of RGBA colors. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.is_color_like:matplotlib.colors.is_color_like}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_color\_like}}}}}(c) & Return whether \sphinxstyleemphasis{c} can be interpreted as an RGB(A) color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.makeMappingArray:matplotlib.colors.makeMappingArray}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{makeMappingArray}}}}}(N, data{[}, gamma{]}) & Create an \sphinxstyleemphasis{N} -element 1-d lookup table \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.get_named_colors_mapping:matplotlib.colors.get_named_colors_mapping}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_named\_colors\_mapping}}}}}() & Return the global mapping of names to named colors. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.colors.from\_levels\_and\_colors} \label{\detokenize{api/_as_gen/matplotlib.colors.from_levels_and_colors:matplotlib-colors-from-levels-and-colors}}\label{\detokenize{api/_as_gen/matplotlib.colors.from_levels_and_colors::doc}}\index{from\_levels\_and\_colors() (in module matplotlib.colors)@\spxentry{from\_levels\_and\_colors()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.from_levels_and_colors:matplotlib.colors.from_levels_and_colors}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{from\_levels\_and\_colors}}}{\emph{levels}, \emph{colors}, \emph{extend='neither'}}{} A helper routine to generate a cmap and a norm instance which behave similar to contourf's levels and colors arguments. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{levels}}] \leavevmode{[}sequence of numbers{]} The quantization levels used to construct the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.BoundaryNorm:matplotlib.colors.BoundaryNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoundaryNorm}}}}}. Value \sphinxcode{\sphinxupquote{v}} is quantized to level \sphinxcode{\sphinxupquote{i}} if \sphinxcode{\sphinxupquote{lev{[}i{]} \textless{}= v \textless{} lev{[}i+1{]}}}. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}sequence of colors{]} The fill color to use for each level. If \sphinxcode{\sphinxupquote{extend}} is "neither" there must be \sphinxcode{\sphinxupquote{n\_level - 1}} colors. For an \sphinxcode{\sphinxupquote{extend}} of "min" or "max" add one extra color, and for an \sphinxcode{\sphinxupquote{extend}} of "both" add two colors. \item[{\sphinxstylestrong{extend}}] \leavevmode{[}\{'neither', 'min', 'max', 'both'\}, optional{]} The behaviour when a value falls out of range of the given levels. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf()}}}}} for details. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{(cmap, norm)}}] \leavevmode{[}tuple containing a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} and a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.colors.hsv\_to\_rgb} \label{\detokenize{api/_as_gen/matplotlib.colors.hsv_to_rgb:matplotlib-colors-hsv-to-rgb}}\label{\detokenize{api/_as_gen/matplotlib.colors.hsv_to_rgb::doc}}\index{hsv\_to\_rgb() (in module matplotlib.colors)@\spxentry{hsv\_to\_rgb()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.hsv_to_rgb:matplotlib.colors.hsv_to_rgb}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{hsv\_to\_rgb}}}{\emph{hsv}}{} Convert hsv values to rgb. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hsv}}] \leavevmode{[}(..., 3) array-like{]} All values assumed to be in range {[}0, 1{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}(..., 3) ndarray{]} Colors converted to RGB values in range {[}0, 1{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{matplotlib.colors.rgb\_to\_hsv} \label{\detokenize{api/_as_gen/matplotlib.colors.rgb_to_hsv:matplotlib-colors-rgb-to-hsv}}\label{\detokenize{api/_as_gen/matplotlib.colors.rgb_to_hsv::doc}}\index{rgb\_to\_hsv() (in module matplotlib.colors)@\spxentry{rgb\_to\_hsv()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.rgb_to_hsv:matplotlib.colors.rgb_to_hsv}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{rgb\_to\_hsv}}}{\emph{arr}}{} Convert float rgb values (in the range {[}0, 1{]}), in a numpy array to hsv values. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arr}}] \leavevmode{[}(..., 3) array-like{]} All values must be in the range {[}0, 1{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hsv}}] \leavevmode{[}(..., 3) ndarray{]} Colors converted to hsv values in range {[}0, 1{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.rgb\_to\_hsv}}} \label{\detokenize{api/_as_gen/matplotlib.colors.rgb_to_hsv:examples-using-matplotlib-colors-rgb-to-hsv}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \subsubsection{matplotlib.colors.to\_hex} \label{\detokenize{api/_as_gen/matplotlib.colors.to_hex:matplotlib-colors-to-hex}}\label{\detokenize{api/_as_gen/matplotlib.colors.to_hex::doc}}\index{to\_hex() (in module matplotlib.colors)@\spxentry{to\_hex()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.to_hex:matplotlib.colors.to_hex}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{to\_hex}}}{\emph{c}, \emph{keep\_alpha=False}}{} Convert \sphinxstyleemphasis{c} to a hex color. Uses the \sphinxcode{\sphinxupquote{\#rrggbb}} format if \sphinxstyleemphasis{keep\_alpha} is False (the default), \sphinxcode{\sphinxupquote{\#rrggbbaa}} otherwise. \end{fulllineitems} \subsubsection{matplotlib.colors.to\_rgb} \label{\detokenize{api/_as_gen/matplotlib.colors.to_rgb:matplotlib-colors-to-rgb}}\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgb::doc}}\index{to\_rgb() (in module matplotlib.colors)@\spxentry{to\_rgb()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgb:matplotlib.colors.to_rgb}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{to\_rgb}}}{\emph{c}}{} Convert \sphinxstyleemphasis{c} to an RGB color, silently dropping the alpha channel. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.to\_rgb}}} \label{\detokenize{api/_as_gen/matplotlib.colors.to_rgb:examples-using-matplotlib-colors-to-rgb}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \subsubsection{matplotlib.colors.to\_rgba} \label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba:matplotlib-colors-to-rgba}}\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba::doc}}\index{to\_rgba() (in module matplotlib.colors)@\spxentry{to\_rgba()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba:matplotlib.colors.to_rgba}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{c}, \emph{alpha=None}}{} Convert \sphinxstyleemphasis{c} to an RGBA color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}Matplotlib color{]} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional{]} If \sphinxstyleemphasis{alpha} is not \sphinxcode{\sphinxupquote{None}}, it forces the alpha value, except if \sphinxstyleemphasis{c} is \sphinxcode{\sphinxupquote{"none"}} (case-insensitive), which always maps to \sphinxcode{\sphinxupquote{(0, 0, 0, 0)}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{tuple}] \leavevmode Tuple of \sphinxcode{\sphinxupquote{(r, g, b, a)}} scalars. \end{description} \end{description}\end{quote} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.colors.to\_rgba}}} \label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba:examples-using-matplotlib-colors-to-rgba}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_lasso\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_ribbon\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_menu.py} \end{itemize} \subsubsection{matplotlib.colors.to\_rgba\_array} \label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array:matplotlib-colors-to-rgba-array}}\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array::doc}}\index{to\_rgba\_array() (in module matplotlib.colors)@\spxentry{to\_rgba\_array()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.to_rgba_array:matplotlib.colors.to_rgba_array}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{to\_rgba\_array}}}{\emph{c}, \emph{alpha=None}}{} Convert \sphinxstyleemphasis{c} to a (n, 4) array of RGBA colors. If \sphinxstyleemphasis{alpha} is not \sphinxcode{\sphinxupquote{None}}, it forces the alpha value. If \sphinxstyleemphasis{c} is \sphinxcode{\sphinxupquote{"none"}} (case-insensitive) or an empty list, an empty array is returned. \end{fulllineitems} \subsubsection{matplotlib.colors.is\_color\_like} \label{\detokenize{api/_as_gen/matplotlib.colors.is_color_like:matplotlib-colors-is-color-like}}\label{\detokenize{api/_as_gen/matplotlib.colors.is_color_like::doc}}\index{is\_color\_like() (in module matplotlib.colors)@\spxentry{is\_color\_like()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.is_color_like:matplotlib.colors.is_color_like}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{is\_color\_like}}}{\emph{c}}{} Return whether \sphinxstyleemphasis{c} can be interpreted as an RGB(A) color. \end{fulllineitems} \subsubsection{matplotlib.colors.makeMappingArray} \label{\detokenize{api/_as_gen/matplotlib.colors.makeMappingArray:matplotlib-colors-makemappingarray}}\label{\detokenize{api/_as_gen/matplotlib.colors.makeMappingArray::doc}}\index{makeMappingArray() (in module matplotlib.colors)@\spxentry{makeMappingArray()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.makeMappingArray:matplotlib.colors.makeMappingArray}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{makeMappingArray}}}{\emph{N}, \emph{data}, \emph{gamma=1.0}}{} Create an \sphinxstyleemphasis{N} -element 1-d lookup table \sphinxstyleemphasis{data} represented by a list of x,y0,y1 mapping correspondences. Each element in this list represents how a value between 0 and 1 (inclusive) represented by x is mapped to a corresponding value between 0 and 1 (inclusive). The two values of y are to allow for discontinuous mapping functions (say as might be found in a sawtooth) where y0 represents the value of y for values of x \textless{}= to that given, and y1 is the value to be used for x \textgreater{} than that given). The list must start with x=0, end with x=1, and all values of x must be in increasing order. Values between the given mapping points are determined by simple linear interpolation. Alternatively, data can be a function mapping values between 0 - 1 to 0 - 1. The function returns an array "result" where \sphinxcode{\sphinxupquote{result{[}x*(N-1){]}}} gives the closest value for values of x between 0 and 1. \end{fulllineitems} \subsubsection{matplotlib.colors.get\_named\_colors\_mapping} \label{\detokenize{api/_as_gen/matplotlib.colors.get_named_colors_mapping:matplotlib-colors-get-named-colors-mapping}}\label{\detokenize{api/_as_gen/matplotlib.colors.get_named_colors_mapping::doc}}\index{get\_named\_colors\_mapping() (in module matplotlib.colors)@\spxentry{get\_named\_colors\_mapping()}\spxextra{in module matplotlib.colors}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.colors.get_named_colors_mapping:matplotlib.colors.get_named_colors_mapping}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.colors.}}\sphinxbfcode{\sphinxupquote{get\_named\_colors\_mapping}}}{}{} Return the global mapping of names to named colors. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.container}}} \label{\detokenize{api/container_api:module-matplotlib.container}}\label{\detokenize{api/container_api:matplotlib-container}}\label{\detokenize{api/container_api::doc}}\index{matplotlib.container (module)@\spxentry{matplotlib.container}\spxextra{module}}\index{BarContainer (class in matplotlib.container)@\spxentry{BarContainer}\spxextra{class in matplotlib.container}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.BarContainer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.container.}}\sphinxbfcode{\sphinxupquote{BarContainer}}}{\emph{patches}, \emph{errorbar=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/container_api:matplotlib.container.Container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.container.Container}}}}} Container for the artists of bar plots (e.g. created by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.bar}}}}}). The container can be treated as a tuple of the \sphinxstyleemphasis{patches} themselves. Additionally, you can access these and further parameters by the attributes. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patches}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}}{]} The artists of the bars. \item[{\sphinxstylestrong{errorbar}}] \leavevmode{[}None or {\hyperref[\detokenize{api/container_api:matplotlib.container.ErrorbarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ErrorbarContainer}}}}}{]} A container for the error bar artists if error bars are present. \sphinxstyleemphasis{None} otherwise. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{Container (class in matplotlib.container)@\spxentry{Container}\spxextra{class in matplotlib.container}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.container.}}\sphinxbfcode{\sphinxupquote{Container}}}{\emph{kl}, \emph{label=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#tuple}{\sphinxcode{\sphinxupquote{tuple}}} Base class for containers. Containers are classes that collect semantically related Artists such as the bars of a bar plot. \index{add\_callback() (matplotlib.container.Container method)@\spxentry{add\_callback()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.add_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_callback}}}{\emph{self}, \emph{func}}{} Adds a callback function that will be called whenever one of the \sphinxcode{\sphinxupquote{Artist}}'s properties changes. Returns an \sphinxstyleemphasis{id} that is useful for removing the callback with {\hyperref[\detokenize{api/container_api:matplotlib.container.Container.remove_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{remove\_callback()}}}}} later. \end{fulllineitems} \index{get\_children() (matplotlib.container.Container method)@\spxentry{get\_children()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_label() (matplotlib.container.Container method)@\spxentry{get\_label()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.get_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label}}}{\emph{self}}{} Get the label used for this artist in the legend. \end{fulllineitems} \index{pchanged() (matplotlib.container.Container method)@\spxentry{pchanged()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.pchanged}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pchanged}}}{\emph{self}}{} Fire an event when property changed, calling all of the registered callbacks. \end{fulllineitems} \index{remove() (matplotlib.container.Container method)@\spxentry{remove()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}}{}~ \end{fulllineitems} \index{remove\_callback() (matplotlib.container.Container method)@\spxentry{remove\_callback()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.remove_callback}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove\_callback}}}{\emph{self}, \emph{oid}}{} Remove a callback based on its \sphinxstyleemphasis{id}. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/container_api:matplotlib.container.Container.add_callback}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_callback()}}}}}}] \leavevmode For adding callbacks \end{description} \end{fulllineitems} \index{set\_label() (matplotlib.container.Container method)@\spxentry{set\_label()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set the label to \sphinxstyleemphasis{s} for auto legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} Any object other than None gets converted to its \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_remove\_method() (matplotlib.container.Container method)@\spxentry{set\_remove\_method()}\spxextra{matplotlib.container.Container method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.Container.set_remove_method}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_remove\_method}}}{\emph{self}, \emph{f}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \end{fulllineitems} \index{ErrorbarContainer (class in matplotlib.container)@\spxentry{ErrorbarContainer}\spxextra{class in matplotlib.container}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.ErrorbarContainer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.container.}}\sphinxbfcode{\sphinxupquote{ErrorbarContainer}}}{\emph{lines}, \emph{has\_xerr=False}, \emph{has\_yerr=False}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/container_api:matplotlib.container.Container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.container.Container}}}}} Container for the artists of error bars (e.g. created by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.errorbar}}}}}). The container can be treated as the \sphinxstyleemphasis{lines} tuple itself. Additionally, you can access these and further parameters by the attributes. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines}}] \leavevmode{[}tuple{]} Tuple of \sphinxcode{\sphinxupquote{(data\_line, caplines, barlinecols)}}. \begin{itemize} \item {} data\_line : {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance of x, y plot markers and/or line. \item {} caplines : tuple of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances of the error bar caps. \item {} barlinecols : list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} with the horizontal and vertical error ranges. \end{itemize} \item[{\sphinxstylestrong{has\_xerr, has\_yerr}}] \leavevmode{[}bool{]} \sphinxcode{\sphinxupquote{True}} if the errorbar has x/y errors. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{StemContainer (class in matplotlib.container)@\spxentry{StemContainer}\spxextra{class in matplotlib.container}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/container_api:matplotlib.container.StemContainer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.container.}}\sphinxbfcode{\sphinxupquote{StemContainer}}}{\emph{markerline\_stemlines\_baseline}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/container_api:matplotlib.container.Container}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.container.Container}}}}} Container for the artists created in a {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.stem()}}}}} plot. The container can be treated like a namedtuple \sphinxcode{\sphinxupquote{(markerline, stemlines, baseline)}}. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{markerline}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The artist of the markers at the stem heads. \item[{\sphinxstylestrong{stemlines}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The artists of the vertical lines for all stems. \item[{\sphinxstylestrong{baseline}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The artist of the horizontal baseline. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{markerline\_stemlines\_baseline}}] \leavevmode{[}tuple{]} Tuple of \sphinxcode{\sphinxupquote{(markerline, stemlines, baseline)}}. \sphinxcode{\sphinxupquote{markerline}} contains the \sphinxcode{\sphinxupquote{LineCollection}} of the markers, \sphinxcode{\sphinxupquote{stemlines}} is a \sphinxcode{\sphinxupquote{LineCollection}} of the main lines, \sphinxcode{\sphinxupquote{baseline}} is the \sphinxcode{\sphinxupquote{Line2D}} of the baseline. \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.contour}}} \label{\detokenize{api/contour_api:module-matplotlib.contour}}\label{\detokenize{api/contour_api:matplotlib-contour}}\label{\detokenize{api/contour_api::doc}}\index{matplotlib.contour (module)@\spxentry{matplotlib.contour}\spxextra{module}} These are classes to support contour plotting and labelling for the Axes class. \index{ClabelText (class in matplotlib.contour)@\spxentry{ClabelText}\spxextra{class in matplotlib.contour}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ClabelText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.contour.}}\sphinxbfcode{\sphinxupquote{ClabelText}}}{\emph{x=0}, \emph{y=0}, \emph{text=''}, \emph{color=None}, \emph{verticalalignment='baseline'}, \emph{horizontalalignment='left'}, \emph{multialignment=None}, \emph{fontproperties=None}, \emph{rotation=None}, \emph{linespacing=None}, \emph{rotation\_mode=None}, \emph{usetex=None}, \emph{wrap=False}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} Unlike the ordinary text, the get\_rotation returns an updated angle in the pixel coordinate assuming that the input rotation is an angle in data coordinate (or whatever transform set). Create a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance at \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} with string \sphinxstyleemphasis{text}. Valid kwargs are \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backgroundcolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox}}}}} & dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontfamily}}}}} or family & \{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontproperties}}}}} or font\_properties & {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} or size & \{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstretch}}}}} or stretch & \{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstyle}}}}} or style & \{'normal', 'italic', 'oblique'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontvariant}}}}} or variant & \{'normal', 'small-caps'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontweight}}}}} or weight & \{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontalalignment}}}}} or ha & \{'center', 'right', 'left'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linespacing}}}}} & float (multiple of font size) \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{multialignment}}}}} or ma & \{'left', 'right', 'center'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation}}}}} & \{angle in degrees, 'vertical', 'horizontal'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation\_mode}}}}} & \{None, 'default', 'anchor'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_usetex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{usetex}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalalignment}}}}} or va & \{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_wrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wrap}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x}}}}} & float \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_rotation() (matplotlib.contour.ClabelText method)@\spxentry{get\_rotation()}\spxextra{matplotlib.contour.ClabelText method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ClabelText.get_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{self}}{} Return the text angle as float in degrees. \end{fulllineitems} \end{fulllineitems} \index{ContourLabeler (class in matplotlib.contour)@\spxentry{ContourLabeler}\spxextra{class in matplotlib.contour}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.contour.}}\sphinxbfcode{\sphinxupquote{ContourLabeler}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Mixin to provide labelling capability to {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}. \index{add\_label() (matplotlib.contour.ContourLabeler method)@\spxentry{add\_label()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.add_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_label}}}{\emph{self}, \emph{x}, \emph{y}, \emph{rotation}, \emph{lev}, \emph{cvalue}}{} Add contour label using {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} class. \end{fulllineitems} \index{add\_label\_clabeltext() (matplotlib.contour.ContourLabeler method)@\spxentry{add\_label\_clabeltext()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.add_label_clabeltext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_label\_clabeltext}}}{\emph{self}, \emph{x}, \emph{y}, \emph{rotation}, \emph{lev}, \emph{cvalue}}{} Add contour label using {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ClabelText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ClabelText}}}}} class. \end{fulllineitems} \index{add\_label\_near() (matplotlib.contour.ContourLabeler method)@\spxentry{add\_label\_near()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.add_label_near}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_label\_near}}}{\emph{self}, \emph{x}, \emph{y}, \emph{inline=True}, \emph{inline\_spacing=5}, \emph{transform=None}}{} Add a label near the point (x, y). If transform is None (default), (x, y) is in data coordinates; if transform is False, (x, y) is in display coordinates; otherwise, the specified transform will be used to translate (x, y) into display coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The approximate location of the label. \item[{\sphinxstylestrong{inline}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxstyleemphasis{True} remove the segment of the contour beneath the label. \item[{\sphinxstylestrong{inline\_spacing}}] \leavevmode{[}int, optional, default: 5{]} Space in pixels to leave on each side of label when placing inline. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{calc\_label\_rot\_and\_inline() (matplotlib.contour.ContourLabeler method)@\spxentry{calc\_label\_rot\_and\_inline()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.calc_label_rot_and_inline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{calc\_label\_rot\_and\_inline}}}{\emph{self}, \emph{slc}, \emph{ind}, \emph{lw}, \emph{lc=None}, \emph{spacing=5}}{} This function calculates the appropriate label rotation given the linecontour coordinates in screen units, the index of the label location and the label width. It will also break contour and calculate inlining if \sphinxstyleemphasis{lc} is not empty (lc defaults to the empty list if None). \sphinxstyleemphasis{spacing} is the space around the label in pixels to leave empty. Do both of these tasks at once to avoid calculating path lengths multiple times, which is relatively costly. The method used here involves calculating the path length along the contour in pixel coordinates and then looking approximately label width / 2 away from central point to determine rotation and then to break contour if desired. \end{fulllineitems} \index{cl (matplotlib.contour.ContourLabeler attribute)@\spxentry{cl}\spxextra{matplotlib.contour.ContourLabeler attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.cl}}\pysigline{\sphinxbfcode{\sphinxupquote{cl}}}~ \end{fulllineitems} \index{cl\_cvalues (matplotlib.contour.ContourLabeler attribute)@\spxentry{cl\_cvalues}\spxextra{matplotlib.contour.ContourLabeler attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.cl_cvalues}}\pysigline{\sphinxbfcode{\sphinxupquote{cl\_cvalues}}}~ \end{fulllineitems} \index{cl\_xy (matplotlib.contour.ContourLabeler attribute)@\spxentry{cl\_xy}\spxextra{matplotlib.contour.ContourLabeler attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.cl_xy}}\pysigline{\sphinxbfcode{\sphinxupquote{cl\_xy}}}~ \end{fulllineitems} \index{clabel() (matplotlib.contour.ContourLabeler method)@\spxentry{clabel()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.clabel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clabel}}}{\emph{self}, \emph{*args}, \emph{fontsize=None}, \emph{inline=True}, \emph{inline\_spacing=5}, \emph{fmt='\%1.3f'}, \emph{colors=None}, \emph{use\_clabeltext=False}, \emph{manual=False}, \emph{rightside\_up=True}}{} Label a contour plot. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{clabel}\PYG{p}{(}\PYG{n}{cs}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{,}\PYG{p}{]} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Adds labels to line contours in \sphinxstyleemphasis{cs}, where \sphinxstyleemphasis{cs} is a {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}} object returned by \sphinxcode{\sphinxupquote{contour()}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}{]} The ContourSet to label. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}array-like, optional{]} A list of level values, that should be labeled. The list must be a subset of \sphinxcode{\sphinxupquote{cs.levels}}. If not given, all levels are labeled. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}string or float, optional{]} Size in points or relative size e.g., 'smaller', 'x-large'. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_size}}}}} for accepted string values. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color-spec, optional{]} The label colors: \begin{itemize} \item {} If \sphinxstyleemphasis{None}, the color of each label matches the color of the corresponding contour. \item {} If one string color, e.g., \sphinxstyleemphasis{colors} = 'r' or \sphinxstyleemphasis{colors} = 'red', all labels will be plotted in this color. \item {} If a tuple of matplotlib color args (string, float, rgb, etc), different labels will be plotted in different colors in the order specified. \end{itemize} \item[{\sphinxstylestrong{inline}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}} the underlying contour is removed where the label is placed. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{inline\_spacing}}] \leavevmode{[}float, optional{]} Space in pixels to leave on each side of label when placing inline. Defaults to 5. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}string or dict, optional{]} A format string for the label. Default is '\%1.3f' Alternatively, this can be a dictionary matching contour levels with arbitrary strings to use for each contour level (i.e., fmt{[}level{]}=string), or it can be any callable, such as a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} instance, that returns a string when called with a numeric contour level. \item[{\sphinxstylestrong{manual}}] \leavevmode{[}bool or iterable, optional{]} If \sphinxcode{\sphinxupquote{True}}, contour labels will be placed manually using mouse clicks. Click the first button near a contour to add a label, click the second button (or potentially both mouse buttons at once) to finish adding labels. The third button can be used to remove the last label added, but only if labels are not inline. Alternatively, the keyboard can be used to select label locations (enter to end label placement, delete or backspace act like the third mouse button, and any other key will select a label location). \sphinxstyleemphasis{manual} can also be an iterable object of x,y tuples. Contour labels will be created as if mouse is clicked at each x,y positions. \item[{\sphinxstylestrong{rightside\_up}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, label rotations will always be plus or minus 90 degrees from level. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{use\_clabeltext}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ClabelText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ClabelText}}}}} class (instead of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}) is used to create labels. {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ClabelText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ClabelText}}}}} recalculates rotation angles of texts during the drawing time, therefore this can be used if aspect of the axes changes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{labels}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_label\_coords() (matplotlib.contour.ContourLabeler method)@\spxentry{get\_label\_coords()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.get_label_coords}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label\_coords}}}{\emph{self}, \emph{distances}, \emph{XX}, \emph{YY}, \emph{ysize}, \emph{lw}}{} Return x, y, and the index of a label location. Labels are plotted at a location with the smallest deviation of the contour from a straight line unless there is another label nearby, in which case the next best place on the contour is picked up. If all such candidates are rejected, the beginning of the contour is chosen. \end{fulllineitems} \index{get\_label\_width() (matplotlib.contour.ContourLabeler method)@\spxentry{get\_label\_width()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.get_label_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_label\_width}}}{\emph{self}, \emph{lev}, \emph{fmt}, \emph{fsize}}{} Return the width of the label in points. \end{fulllineitems} \index{get\_text() (matplotlib.contour.ContourLabeler method)@\spxentry{get\_text()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.get_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text}}}{\emph{self}, \emph{lev}, \emph{fmt}}{} Get the text of the label. \end{fulllineitems} \index{labels() (matplotlib.contour.ContourLabeler method)@\spxentry{labels()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.labels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{labels}}}{\emph{self}, \emph{inline}, \emph{inline\_spacing}}{}~ \end{fulllineitems} \index{locate\_label() (matplotlib.contour.ContourLabeler method)@\spxentry{locate\_label()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.locate_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locate\_label}}}{\emph{self}, \emph{linecontour}, \emph{labelwidth}}{} Find good place to draw a label (relatively flat part of the contour). \end{fulllineitems} \index{pop\_label() (matplotlib.contour.ContourLabeler method)@\spxentry{pop\_label()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.pop_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop\_label}}}{\emph{self}, \emph{index=-1}}{} Defaults to removing last label, but any index can be supplied \end{fulllineitems} \index{print\_label() (matplotlib.contour.ContourLabeler method)@\spxentry{print\_label()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.print_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{print\_label}}}{\emph{self}, \emph{linecontour}, \emph{labelwidth}}{} Return \sphinxstyleemphasis{False} if contours are too short for a label. \end{fulllineitems} \index{set\_label\_props() (matplotlib.contour.ContourLabeler method)@\spxentry{set\_label\_props()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.set_label_props}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label\_props}}}{\emph{self}, \emph{label}, \emph{text}, \emph{color}}{} Set the label properties - color, fontsize, text. \end{fulllineitems} \index{too\_close() (matplotlib.contour.ContourLabeler method)@\spxentry{too\_close()}\spxextra{matplotlib.contour.ContourLabeler method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourLabeler.too_close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{too\_close}}}{\emph{self}, \emph{x}, \emph{y}, \emph{lw}}{} Return \sphinxstyleemphasis{True} if a label is already near this location. \end{fulllineitems} \end{fulllineitems} \index{ContourSet (class in matplotlib.contour)@\spxentry{ContourSet}\spxextra{class in matplotlib.contour}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.contour.}}\sphinxbfcode{\sphinxupquote{ContourSet}}}{\emph{ax}, \emph{*args}, \emph{levels=None}, \emph{filled=False}, \emph{linewidths=None}, \emph{linestyles=None}, \emph{alpha=None}, \emph{origin=None}, \emph{extent=None}, \emph{cmap=None}, \emph{colors=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{extend='neither'}, \emph{antialiased=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourLabeler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.contour.ContourLabeler}}}}} Store a set of contour lines or filled regions. User-callable method: {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.clabel:matplotlib.axes.Axes.clabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clabel}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} \item[{\sphinxstylestrong{levels}}] \leavevmode{[}{[}level0, level1, ..., leveln{]}{]} A list of floating point numbers indicating the contour levels. \item[{\sphinxstylestrong{allsegs}}] \leavevmode{[}{[}level0segs, level1segs, ...{]}{]} List of all the polygon segments for all the \sphinxstyleemphasis{levels}. For contour lines \sphinxcode{\sphinxupquote{len(allsegs) == len(levels)}}, and for filled contour regions \sphinxcode{\sphinxupquote{len(allsegs) = len(levels)-1}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0segs} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0}\PYG{p}{,} \PYG{n}{polygon1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0} \PYG{o}{=} \PYG{n}{array\PYGZus{}like} \PYG{p}{[}\PYG{p}{[}\PYG{n}{x0}\PYG{p}{,}\PYG{n}{y0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x1}\PYG{p}{,}\PYG{n}{y1}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} \item[{\sphinxstylestrong{allkinds}}] \leavevmode{[}\sphinxcode{\sphinxupquote{None}} or {[}level0kinds, level1kinds, ...{]}{]} Optional list of all the polygon vertex kinds (code types), as described and used in Path. This is used to allow multiply- connected paths such as holes within filled polygons. If not \sphinxcode{\sphinxupquote{None}}, \sphinxcode{\sphinxupquote{len(allkinds) == len(allsegs)}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0kinds}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{vertexcode0}\PYG{p}{,} \PYG{n}{vertexcode1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} If \sphinxstyleemphasis{allkinds} is not \sphinxcode{\sphinxupquote{None}}, usually all polygons for a particular contour level are grouped together so that \sphinxcode{\sphinxupquote{level0segs = {[}polygon0{]}}} and \sphinxcode{\sphinxupquote{level0kinds = {[}polygon0kinds{]}}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments are as described in the docstring of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode The axes object in which the contours are drawn. \item[{\sphinxstylestrong{collections}}] \leavevmode A silent\_list of LineCollections or PolyCollections. \item[{\sphinxstylestrong{levels}}] \leavevmode Contour levels. \item[{\sphinxstylestrong{layers}}] \leavevmode Same as levels for line contours; half-way between levels for filled contours. See \sphinxcode{\sphinxupquote{\_process\_colors()}}. \end{description} \end{description}\end{quote} Draw contour lines or filled regions, depending on whether keyword arg \sphinxstyleemphasis{filled} is \sphinxcode{\sphinxupquote{False}} (default) or \sphinxcode{\sphinxupquote{True}}. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ContourSet}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{levels}\PYG{p}{,} \PYG{n}{allsegs}\PYG{p}{,} \PYG{p}{[}\PYG{n}{allkinds}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object to draw on. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}{[}level0, level1, ..., leveln{]}{]} A list of floating point numbers indicating the contour levels. \item[{\sphinxstylestrong{allsegs}}] \leavevmode{[}{[}level0segs, level1segs, ...{]}{]} List of all the polygon segments for all the \sphinxstyleemphasis{levels}. For contour lines \sphinxcode{\sphinxupquote{len(allsegs) == len(levels)}}, and for filled contour regions \sphinxcode{\sphinxupquote{len(allsegs) = len(levels)-1}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0segs} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0}\PYG{p}{,} \PYG{n}{polygon1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0} \PYG{o}{=} \PYG{n}{array\PYGZus{}like} \PYG{p}{[}\PYG{p}{[}\PYG{n}{x0}\PYG{p}{,}\PYG{n}{y0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x1}\PYG{p}{,}\PYG{n}{y1}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} \item[{\sphinxstylestrong{allkinds}}] \leavevmode{[}{[}level0kinds, level1kinds, ...{]}, optional{]} Optional list of all the polygon vertex kinds (code types), as described and used in Path. This is used to allow multiply- connected paths such as holes within filled polygons. If not \sphinxcode{\sphinxupquote{None}}, \sphinxcode{\sphinxupquote{len(allkinds) == len(allsegs)}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0kinds}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{vertexcode0}\PYG{p}{,} \PYG{n}{vertexcode1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} If \sphinxstyleemphasis{allkinds} is not \sphinxcode{\sphinxupquote{None}}, usually all polygons for a particular contour level are grouped together so that \sphinxcode{\sphinxupquote{level0segs = {[}polygon0{]}}} and \sphinxcode{\sphinxupquote{level0kinds = {[}polygon0kinds{]}}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments are as described in the docstring of \sphinxcode{\sphinxupquote{contour}}. \end{description} \end{description}\end{quote} \index{changed() (matplotlib.contour.ContourSet method)@\spxentry{changed()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{changed}}}{\emph{self}}{} Call this whenever the mappable is changed to notify all the callbackSM listeners to the 'changed' signal \end{fulllineitems} \index{find\_nearest\_contour() (matplotlib.contour.ContourSet method)@\spxentry{find\_nearest\_contour()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.find_nearest_contour}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{find\_nearest\_contour}}}{\emph{self}, \emph{x}, \emph{y}, \emph{indices=None}, \emph{pixel=True}}{} Finds contour that is closest to a point. Defaults to measuring distance in pixels (screen space - useful for manual contour labeling), but this can be controlled via a keyword argument. Returns a tuple containing the contour, segment, index of segment, x \& y of segment point and distance to minimum point. Optional keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{indices}:}] \leavevmode Indexes of contour levels to consider when looking for nearest point. Defaults to using all levels. \item[{\sphinxstyleemphasis{pixel}:}] \leavevmode If \sphinxstyleemphasis{True}, measure distance in pixel space, if not, measure distance in axes space. Defaults to \sphinxstyleemphasis{True}. \end{description} \end{quote} \end{fulllineitems} \index{get\_alpha() (matplotlib.contour.ContourSet method)@\spxentry{get\_alpha()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.get_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alpha}}}{\emph{self}}{} returns alpha to be applied to all ContourSet artists \end{fulllineitems} \index{get\_transform() (matplotlib.contour.ContourSet method)@\spxentry{get\_transform()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this ContourSet. \end{fulllineitems} \index{legend\_elements() (matplotlib.contour.ContourSet method)@\spxentry{legend\_elements()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.legend_elements}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{legend\_elements}}}{\emph{self}, \emph{variable\_name='x'}, \emph{str\_format=\textless{}class 'str'\textgreater{}}}{} Return a list of artists and labels suitable for passing through to \sphinxcode{\sphinxupquote{plt.legend()}} which represent this ContourSet. The labels have the form "0 \textless{} x \textless{}= 1" stating the data ranges which the artists represent. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{variable\_name}}] \leavevmode{[}str{]} The string used inside the inequality used on the labels. \item[{\sphinxstylestrong{str\_format}}] \leavevmode{[}function: float -\textgreater{} str{]} Function used to format the numbers in the labels. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}List{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]}{]} A list of the artists. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}List{[}str{]}{]} A list of the labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_alpha() (matplotlib.contour.ContourSet method)@\spxentry{set\_alpha()}\spxextra{matplotlib.contour.ContourSet method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.ContourSet.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha blending value for all ContourSet artists. \sphinxstyleemphasis{alpha} must be between 0 (transparent) and 1 (opaque). \end{fulllineitems} \end{fulllineitems} \index{QuadContourSet (class in matplotlib.contour)@\spxentry{QuadContourSet}\spxextra{class in matplotlib.contour}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.contour.}}\sphinxbfcode{\sphinxupquote{QuadContourSet}}}{\emph{ax}, \emph{*args}, \emph{levels=None}, \emph{filled=False}, \emph{linewidths=None}, \emph{linestyles=None}, \emph{alpha=None}, \emph{origin=None}, \emph{extent=None}, \emph{cmap=None}, \emph{colors=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{extend='neither'}, \emph{antialiased=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.contour.ContourSet}}}}} Create and store a set of contour lines or filled regions. User-callable method: \sphinxcode{\sphinxupquote{clabel}} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode The axes object in which the contours are drawn. \item[{\sphinxstylestrong{collections}}] \leavevmode A silent\_list of LineCollections or PolyCollections. \item[{\sphinxstylestrong{levels}}] \leavevmode Contour levels. \item[{\sphinxstylestrong{layers}}] \leavevmode Same as levels for line contours; half-way between levels for filled contours. See \sphinxcode{\sphinxupquote{\_process\_colors()}} method. \end{description} \end{description}\end{quote} Draw contour lines or filled regions, depending on whether keyword arg \sphinxstyleemphasis{filled} is \sphinxcode{\sphinxupquote{False}} (default) or \sphinxcode{\sphinxupquote{True}}. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ContourSet}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{levels}\PYG{p}{,} \PYG{n}{allsegs}\PYG{p}{,} \PYG{p}{[}\PYG{n}{allkinds}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object to draw on. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}{[}level0, level1, ..., leveln{]}{]} A list of floating point numbers indicating the contour levels. \item[{\sphinxstylestrong{allsegs}}] \leavevmode{[}{[}level0segs, level1segs, ...{]}{]} List of all the polygon segments for all the \sphinxstyleemphasis{levels}. For contour lines \sphinxcode{\sphinxupquote{len(allsegs) == len(levels)}}, and for filled contour regions \sphinxcode{\sphinxupquote{len(allsegs) = len(levels)-1}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0segs} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0}\PYG{p}{,} \PYG{n}{polygon1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0} \PYG{o}{=} \PYG{n}{array\PYGZus{}like} \PYG{p}{[}\PYG{p}{[}\PYG{n}{x0}\PYG{p}{,}\PYG{n}{y0}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x1}\PYG{p}{,}\PYG{n}{y1}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} \item[{\sphinxstylestrong{allkinds}}] \leavevmode{[}{[}level0kinds, level1kinds, ...{]}, optional{]} Optional list of all the polygon vertex kinds (code types), as described and used in Path. This is used to allow multiply- connected paths such as holes within filled polygons. If not \sphinxcode{\sphinxupquote{None}}, \sphinxcode{\sphinxupquote{len(allkinds) == len(allsegs)}}. The lists should look like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{level0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{polygon0kinds}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \PYG{n}{polygon0kinds} \PYG{o}{=} \PYG{p}{[}\PYG{n}{vertexcode0}\PYG{p}{,} \PYG{n}{vertexcode1}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} If \sphinxstyleemphasis{allkinds} is not \sphinxcode{\sphinxupquote{None}}, usually all polygons for a particular contour level are grouped together so that \sphinxcode{\sphinxupquote{level0segs = {[}polygon0{]}}} and \sphinxcode{\sphinxupquote{level0kinds = {[}polygon0kinds{]}}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments are as described in the docstring of \sphinxcode{\sphinxupquote{contour}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.dates}}} \label{\detokenize{api/dates_api:matplotlib-dates}}\label{\detokenize{api/dates_api::doc}} \sphinxincludegraphics[]{inheritance-489e5a07d60480bcb1a1a65a182c978cd3b808e6.pdf} \phantomsection\label{\detokenize{api/dates_api:module-matplotlib.dates}}\index{matplotlib.dates (module)@\spxentry{matplotlib.dates}\spxextra{module}} Matplotlib provides sophisticated date plotting capabilities, standing on the shoulders of python \sphinxhref{https://docs.python.org/3/library/datetime.html\#module-datetime}{\sphinxcode{\sphinxupquote{datetime}}} and the add-on module \sphinxcode{\sphinxupquote{dateutil}}. \subsection{Matplotlib date format} \label{\detokenize{api/dates_api:matplotlib-date-format}}\label{\detokenize{api/dates_api:date-format}} Matplotlib represents dates using floating point numbers specifying the number of days since 0001-01-01 UTC, plus 1. For example, 0001-01-01, 06:00 is 1.25, not 0.25. Values \textless{} 1, i.e. dates before 0001-01-01 UTC are not supported. There are a number of helper functions to convert between \sphinxhref{https://docs.python.org/3/library/datetime.html\#module-datetime}{\sphinxcode{\sphinxupquote{datetime}}} objects and Matplotlib dates: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/dates_api:matplotlib.dates.datestr2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{datestr2num}}}}} & Convert a date string to a datenum using \sphinxcode{\sphinxupquote{dateutil.parser.parse()}}. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{date2num}}}}} & Convert datetime objects to Matplotlib dates. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{num2date}}}}} & Convert Matplotlib dates to \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime}}} objects. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2timedelta}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{num2timedelta}}}}} & Convert number of days to a \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{timedelta}}} object. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.epoch2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{epoch2num}}}}} & Convert an epoch or sequence of epochs to the new date format, that is days since 0001. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2epoch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{num2epoch}}}}} & Convert days since 0001 to epoch. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.mx2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mx2num}}}}} & Convert mx \sphinxcode{\sphinxupquote{datetime}} instance (or sequence of mx instances) to the new date format. \\ \hline {\hyperref[\detokenize{api/dates_api:matplotlib.dates.drange}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drange}}}}} & Return a sequence of equally spaced Matplotlib dates. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \begin{sphinxadmonition}{note}{Note:} Like Python's datetime, mpl uses the Gregorian calendar for all conversions between dates and floating point numbers. This practice is not universal, and calendar differences can cause confusing differences between what Python and mpl give as the number of days since 0001-01-01 and what other software and databases yield. For example, the US Naval Observatory uses a calendar that switches from Julian to Gregorian in October, 1582. Hence, using their calculator, the number of days between 0001-01-01 and 2006-04-01 is 732403, whereas using the Gregorian calendar via the datetime module we find: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{In} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{:} \PYG{n}{date}\PYG{p}{(}\PYG{l+m+mi}{2006}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{.}\PYG{n}{toordinal}\PYG{p}{(}\PYG{p}{)} \PYG{o}{\PYGZhy{}} \PYG{n}{date}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{o}{.}\PYG{n}{toordinal}\PYG{p}{(}\PYG{p}{)} \PYG{n}{Out}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{:} \PYG{l+m+mi}{732401} \end{sphinxVerbatim} \end{sphinxadmonition} All the Matplotlib date converters, tickers and formatters are timezone aware. If no explicit timezone is provided, the rcParam \sphinxcode{\sphinxupquote{timezone}} is assumed. If you want to use a custom time zone, pass a \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.tzinfo}{\sphinxcode{\sphinxupquote{datetime.tzinfo}}} instance with the tz keyword argument to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{num2date()}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date()}}}}}, and any custom date tickers or locators you create. A wide range of specific and general purpose date tick locators and formatters are provided in this module. See {\hyperref[\detokenize{api/ticker_api:module-matplotlib.ticker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker}}}}} for general information on tick locators and formatters. These are described below. The \sphinxhref{https://dateutil.readthedocs.io}{dateutil} module provides additional code to handle date ticking, making it easy to place ticks on any kinds of dates. See examples below. \subsection{Date tickers} \label{\detokenize{api/dates_api:date-tickers}} Most of the date tickers can locate single or multiple values. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} import constants for the days of the week} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{import} \PYG{n}{MO}\PYG{p}{,} \PYG{n}{TU}\PYG{p}{,} \PYG{n}{WE}\PYG{p}{,} \PYG{n}{TH}\PYG{p}{,} \PYG{n}{FR}\PYG{p}{,} \PYG{n}{SA}\PYG{p}{,} \PYG{n}{SU} \PYG{c+c1}{\PYGZsh{} tick on mondays every week} \PYG{n}{loc} \PYG{o}{=} \PYG{n}{WeekdayLocator}\PYG{p}{(}\PYG{n}{byweekday}\PYG{o}{=}\PYG{n}{MO}\PYG{p}{,} \PYG{n}{tz}\PYG{o}{=}\PYG{n}{tz}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} tick on mondays and saturdays} \PYG{n}{loc} \PYG{o}{=} \PYG{n}{WeekdayLocator}\PYG{p}{(}\PYG{n}{byweekday}\PYG{o}{=}\PYG{p}{(}\PYG{n}{MO}\PYG{p}{,} \PYG{n}{SA}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} In addition, most of the constructors take an interval argument: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} tick on mondays every second week} \PYG{n}{loc} \PYG{o}{=} \PYG{n}{WeekdayLocator}\PYG{p}{(}\PYG{n}{byweekday}\PYG{o}{=}\PYG{n}{MO}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} The rrule locator allows completely general date ticking: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} tick every 5th easter} \PYG{n}{rule} \PYG{o}{=} \PYG{n}{rrulewrapper}\PYG{p}{(}\PYG{n}{YEARLY}\PYG{p}{,} \PYG{n}{byeaster}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{n}{loc} \PYG{o}{=} \PYG{n}{RRuleLocator}\PYG{p}{(}\PYG{n}{rule}\PYG{p}{)} \end{sphinxVerbatim} Here are all the date tickers: \begin{itemize} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MicrosecondLocator}}}}}: locate microseconds \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.SecondLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SecondLocator}}}}}: locate seconds \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.MinuteLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MinuteLocator}}}}}: locate minutes \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.HourLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HourLocator}}}}}: locate hours \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DayLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DayLocator}}}}}: locate specified days of the month \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.WeekdayLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{WeekdayLocator}}}}}: Locate days of the week, e.g., MO, TU \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.MonthLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MonthLocator}}}}}: locate months, e.g., 7 for july \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.YearLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YearLocator}}}}}: locate years that are multiples of base \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RRuleLocator}}}}}: locate using a \sphinxcode{\sphinxupquote{matplotlib.dates.rrulewrapper}}. \sphinxcode{\sphinxupquote{rrulewrapper}} is a simple wrapper around \sphinxhref{https://dateutil.readthedocs.io}{dateutil}'s \sphinxhref{https://dateutil.readthedocs.io/en/stable/rrule.html\#module-dateutil.rrule}{\sphinxcode{\sphinxupquote{dateutil.rrule}}} which allow almost arbitrary date tick specifications. See \DUrole{xref,std,std-doc}{rrule example}. \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}}: On autoscale, this class picks the best {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateLocator}}}}} (e.g., {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RRuleLocator}}}}}) to set the view limits and the tick locations. If called with \sphinxcode{\sphinxupquote{interval\_multiples=True}} it will make ticks line up with sensible multiples of the tick intervals. E.g. if the interval is 4 hours, it will pick hours 0, 4, 8, etc as ticks. This behaviour is not guaranteed by default. \end{itemize} \subsection{Date formatters} \label{\detokenize{api/dates_api:date-formatters}} Here all all the date formatters: \begin{itemize} \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateFormatter}}}}}: attempts to figure out the best format to use. This is most useful when used with the {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}}. \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConciseDateFormatter}}}}}: also attempts to figure out the best format to use, and to make the format as compact as possible while still having complete date information. This is most useful when used with the {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}}. \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateFormatter}}}}}: use \sphinxcode{\sphinxupquote{strftime()}} format strings \item {} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.IndexDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IndexDateFormatter}}}}}: date plots with implicit \sphinxstyleemphasis{x} indexing. \end{itemize} \index{datestr2num() (in module matplotlib.dates)@\spxentry{datestr2num()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.datestr2num}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{datestr2num}}}{\emph{d}, \emph{default=None}}{} Convert a date string to a datenum using \sphinxcode{\sphinxupquote{dateutil.parser.parse()}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}string or sequence of strings{]} The dates to convert. \item[{\sphinxstylestrong{default}}] \leavevmode{[}datetime instance, optional{]} The default date to use when fields are missing in \sphinxstyleemphasis{d}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{date2num() (in module matplotlib.dates)@\spxentry{date2num()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.date2num}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{date2num}}}{\emph{d}}{} Convert datetime objects to Matplotlib dates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime.datetime}}} or \sphinxcode{\sphinxupquote{numpy.datetime64}} or sequences of these{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{float or sequence of floats}] \leavevmode Number of days (fraction part represents hours, minutes, seconds, ms) since 0001-01-01 00:00:00 UTC, plus one. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The addition of one here is a historical artifact. Also, note that the Gregorian calendar is assumed; this is not universal practice. For details see the module docstring. \end{fulllineitems} \index{num2date() (in module matplotlib.dates)@\spxentry{num2date()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.num2date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{num2date}}}{\emph{x}, \emph{tz=None}}{} Convert Matplotlib dates to \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime}}} objects. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}float or sequence of floats{]} Number of days (fraction part represents hours, minutes, seconds) since 0001-01-01 00:00:00 UTC, plus one. \item[{\sphinxstylestrong{tz}}] \leavevmode{[}string, optional{]} Timezone of \sphinxstyleemphasis{x} (defaults to rcparams \sphinxcode{\sphinxupquote{timezone}}). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime}}} or sequence of \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime}}}}] \leavevmode Dates are returned in timezone \sphinxstyleemphasis{tz}. If \sphinxstyleemphasis{x} is a sequence, a sequence of \sphinxcode{\sphinxupquote{datetime}} objects will be returned. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The addition of one here is a historical artifact. Also, note that the Gregorian calendar is assumed; this is not universal practice. For details, see the module docstring. \end{fulllineitems} \index{num2timedelta() (in module matplotlib.dates)@\spxentry{num2timedelta()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.num2timedelta}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{num2timedelta}}}{\emph{x}}{} Convert number of days to a \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{timedelta}}} object. If \sphinxstyleemphasis{x} is a sequence, a sequence of \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{timedelta}}} objects will be returned. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}float, sequence of floats{]} Number of days. The fraction part represents hours, minutes, seconds. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{datetime.timedelta}}} or list{[}\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{datetime.timedelta}}}{]}}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{drange() (in module matplotlib.dates)@\spxentry{drange()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.drange}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{drange}}}{\emph{dstart}, \emph{dend}, \emph{delta}}{} Return a sequence of equally spaced Matplotlib dates. The dates start at \sphinxstyleemphasis{dstart} and reach up to, but not including \sphinxstyleemphasis{dend}. They are spaced by \sphinxstyleemphasis{delta}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dstart, dend}}] \leavevmode{[}\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime}{\sphinxcode{\sphinxupquote{datetime}}}{]} The date limits. \item[{\sphinxstylestrong{delta}}] \leavevmode{[}\sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.timedelta}{\sphinxcode{\sphinxupquote{datetime.timedelta}}}{]} Spacing of the dates. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{drange}}] \leavevmode{[}\sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html\#numpy.array}{\sphinxcode{\sphinxupquote{numpy.array}}}{]} A list floats representing Matplotlib dates. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{epoch2num() (in module matplotlib.dates)@\spxentry{epoch2num()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.epoch2num}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{epoch2num}}}{\emph{e}}{} Convert an epoch or sequence of epochs to the new date format, that is days since 0001. \end{fulllineitems} \index{num2epoch() (in module matplotlib.dates)@\spxentry{num2epoch()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.num2epoch}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{num2epoch}}}{\emph{d}}{} Convert days since 0001 to epoch. \sphinxstyleemphasis{d} can be a number or sequence. \end{fulllineitems} \index{mx2num() (in module matplotlib.dates)@\spxentry{mx2num()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.mx2num}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{mx2num}}}{\emph{mxdates}}{} Convert mx \sphinxcode{\sphinxupquote{datetime}} instance (or sequence of mx instances) to the new date format. \end{fulllineitems} \index{DateFormatter (class in matplotlib.dates)@\spxentry{DateFormatter}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{DateFormatter}}}{\emph{fmt}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Tick location is seconds since the epoch. Use a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strftime()}}}}} format string. Python only supports \sphinxhref{https://docs.python.org/3/library/datetime.html\#module-datetime}{\sphinxcode{\sphinxupquote{datetime}}} {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strftime()}}}}} formatting for years greater than 1900. Thanks to Andrew Dalke, Dalke Scientific Software who contributed the {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strftime()}}}}} code below to include dates earlier than this year. \begin{description} \item[{\sphinxstyleemphasis{fmt} is a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strftime()}}}}} format string; \sphinxstyleemphasis{tz} is the}] \leavevmode \sphinxcode{\sphinxupquote{tzinfo}} instance. \end{description} \index{illegal\_s (matplotlib.dates.DateFormatter attribute)@\spxentry{illegal\_s}\spxextra{matplotlib.dates.DateFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateFormatter.illegal_s}}\pysigline{\sphinxbfcode{\sphinxupquote{illegal\_s}}\sphinxbfcode{\sphinxupquote{ = re.compile('((\textasciicircum{}\textbar{}{[}\textasciicircum{}\%{]})(\%\%)*\%s)')}}} \end{fulllineitems} \index{set\_tzinfo() (matplotlib.dates.DateFormatter method)@\spxentry{set\_tzinfo()}\spxextra{matplotlib.dates.DateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateFormatter.set_tzinfo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_tzinfo}}}{\emph{self}, \emph{tz}}{}~ \end{fulllineitems} \index{strftime() (matplotlib.dates.DateFormatter method)@\spxentry{strftime()}\spxextra{matplotlib.dates.DateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{strftime}}}{\emph{self}, \emph{dt}, \emph{fmt=None}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Refer to documentation for \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime.strftime}{\sphinxcode{\sphinxupquote{datetime.datetime.strftime()}}} \sphinxstyleemphasis{fmt} is a \sphinxhref{https://docs.python.org/3/library/datetime.html\#datetime.datetime.strftime}{\sphinxcode{\sphinxupquote{datetime.datetime.strftime()}}} format string. Warning: For years before 1900, depending upon the current locale it is possible that the year displayed with \%x might be incorrect. For years before 100, \%y and \%Y will yield zero-padded strings. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{strftime\_pre\_1900() (matplotlib.dates.DateFormatter method)@\spxentry{strftime\_pre\_1900()}\spxextra{matplotlib.dates.DateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime_pre_1900}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{strftime\_pre\_1900}}}{\emph{self}, \emph{dt}, \emph{fmt=None}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Call time.strftime for years before 1900 by rolling forward a multiple of 28 years. \sphinxstyleemphasis{fmt} is a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter.strftime}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{strftime()}}}}} format string. Dalke: I hope I did this math right. Every 28 years the calendar repeats, except through century leap years excepting the 400 year leap years. But only if you're using the Gregorian calendar. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \end{fulllineitems} \index{ConciseDateFormatter (class in matplotlib.dates)@\spxentry{ConciseDateFormatter}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{ConciseDateFormatter}}}{\emph{locator}, \emph{tz=None}, \emph{formats=None}, \emph{offset\_formats=None}, \emph{zero\_formats=None}, \emph{show\_offset=True}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} This class attempts to figure out the best format to use for the date, and to make it as compact as possible, but still be complete. This is most useful when used with the {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{locator} \PYG{o}{=} \PYG{n}{AutoDateLocator}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{formatter} \PYG{o}{=} \PYG{n}{ConciseDateFormatter}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{locator}}] \leavevmode{[}{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticker.Locator}}}}}{]} Locator that this axis is using. \item[{\sphinxstylestrong{tz}}] \leavevmode{[}string, optional{]} Passed to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dates.date2num}}}}}. \item[{\sphinxstylestrong{formats}}] \leavevmode{[}list of 6 strings, optional{]} Format strings for 6 levels of tick labelling: mostly years, months, days, hours, minutes, and seconds. Strings use the same format codes as \sphinxcode{\sphinxupquote{strftime}}. Default is \sphinxcode{\sphinxupquote{{[}'\%Y', '\%b', '\%d', '\%H:\%M', '\%H:\%M', '\%S.\%f'{]}}} \item[{\sphinxstylestrong{zero\_formats}}] \leavevmode{[}list of 6 strings, optional{]} Format strings for tick labels that are "zeros" for a given tick level. For instance, if most ticks are months, ticks around 1 Jan 2005 will be labeled "Dec", "2005", "Feb". The default is \sphinxcode{\sphinxupquote{{[}'{'}, '\%Y', '\%b', '\%b-\%d', '\%H:\%M', '\%H:\%M'{]}}} \item[{\sphinxstylestrong{offset\_formats}}] \leavevmode{[}list of 6 strings, optional{]} Format strings for the 6 levels that is applied to the "offset" string found on the right side of an x-axis, or top of a y-axis. Combined with the tick labels this should completely specify the date. The default is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y\PYGZhy{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y\PYGZhy{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b\PYGZhy{}}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y\PYGZhy{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b\PYGZhy{}}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{Y\PYGZhy{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{b\PYGZhy{}}\PYG{l+s+si}{\PYGZpc{}d}\PYG{l+s+s1}{ }\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \end{sphinxVerbatim} \item[{\sphinxstylestrong{show\_offset}}] \leavevmode{[}bool{]} Whether to show the offset or not. Default is \sphinxcode{\sphinxupquote{True}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} See \DUrole{xref,std,std-doc}{/gallery/ticks\_and\_spines/date\_concise\_formatter} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{dates_api-1}.pdf} \end{figure} Autoformat the date labels. The default format is used to form an initial string, and then redundant elements are removed. \index{format\_data\_short() (matplotlib.dates.ConciseDateFormatter method)@\spxentry{format\_data\_short()}\spxextra{matplotlib.dates.ConciseDateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter.format_data_short}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data\_short}}}{\emph{self}, \emph{value}}{} Return a short string version of the tick value. Defaults to the position-independent long value. \end{fulllineitems} \index{format\_ticks() (matplotlib.dates.ConciseDateFormatter method)@\spxentry{format\_ticks()}\spxextra{matplotlib.dates.ConciseDateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter.format_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_ticks}}}{\emph{self}, \emph{values}}{} Return the tick labels for all the ticks at once. \end{fulllineitems} \index{get\_offset() (matplotlib.dates.ConciseDateFormatter method)@\spxentry{get\_offset()}\spxextra{matplotlib.dates.ConciseDateFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.ConciseDateFormatter.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{IndexDateFormatter (class in matplotlib.dates)@\spxentry{IndexDateFormatter}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.IndexDateFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{IndexDateFormatter}}}{\emph{t}, \emph{fmt}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Use with {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.IndexLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IndexLocator}}}}} to cycle format strings by index. \sphinxstyleemphasis{t} is a sequence of dates (floating point days). \sphinxstyleemphasis{fmt} is a \sphinxcode{\sphinxupquote{strftime()}} format string. \end{fulllineitems} \index{AutoDateFormatter (class in matplotlib.dates)@\spxentry{AutoDateFormatter}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{AutoDateFormatter}}}{\emph{locator}, \emph{tz=None}, \emph{defaultfmt='\%Y-\%m-\%d'}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} This class attempts to figure out the best format to use. This is most useful when used with the {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}}. The AutoDateFormatter has a scale dictionary that maps the scale of the tick (the distance in days between one major tick) and a format string. The default looks like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{scaled} \PYG{o}{=} \PYG{p}{\PYGZob{}} \PYG{n}{DAYS\PYGZus{}PER\PYGZus{}YEAR}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.year}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{DAYS\PYGZus{}PER\PYGZus{}MONTH}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.month}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.day}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mf}{1.} \PYG{o}{/} \PYG{n}{HOURS\PYGZus{}PER\PYGZus{}DAY}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.hour}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mf}{1.} \PYG{o}{/} \PYG{p}{(}\PYG{n}{MINUTES\PYGZus{}PER\PYGZus{}DAY}\PYG{p}{)}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.minute}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mf}{1.} \PYG{o}{/} \PYG{p}{(}\PYG{n}{SEC\PYGZus{}PER\PYGZus{}DAY}\PYG{p}{)}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.second}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+m+mf}{1.} \PYG{o}{/} \PYG{p}{(}\PYG{n}{MUSECONDS\PYGZus{}PER\PYGZus{}DAY}\PYG{p}{)}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date.autoformat.microsecond}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The algorithm picks the key in the dictionary that is \textgreater{}= the current scale and uses that format string. You can customize this dictionary by doing: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{locator} \PYG{o}{=} \PYG{n}{AutoDateLocator}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{formatter} \PYG{o}{=} \PYG{n}{AutoDateFormatter}\PYG{p}{(}\PYG{n}{locator}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{formatter}\PYG{o}{.}\PYG{n}{scaled}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{o}{/}\PYG{p}{(}\PYG{l+m+mf}{24.}\PYG{o}{*}\PYG{l+m+mf}{60.}\PYG{p}{)}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} only show min and sec} \end{sphinxVerbatim} A custom {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FuncFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncFormatter}}}}} can also be used. The following example shows how to use a custom format function to strip trailing zeros from decimal seconds and adds the date to the first ticklabel: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{def} \PYG{n+nf}{my\PYGZus{}format\PYGZus{}function}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{pos}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n}{x} \PYG{o}{=} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{dates}\PYG{o}{.}\PYG{n}{num2date}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{... } \PYG{k}{if} \PYG{n}{pos} \PYG{o}{==} \PYG{l+m+mi}{0}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n}{fmt} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{D }\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S.}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{g+gp}{... } \PYG{k}{else}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n}{fmt} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{H:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{M:}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{S.}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{\PYGZsq{}} \PYG{g+gp}{... } \PYG{n}{label} \PYG{o}{=} \PYG{n}{x}\PYG{o}{.}\PYG{n}{strftime}\PYG{p}{(}\PYG{n}{fmt}\PYG{p}{)} \PYG{g+gp}{... } \PYG{n}{label} \PYG{o}{=} \PYG{n}{label}\PYG{o}{.}\PYG{n}{rstrip}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{0}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{g+gp}{... } \PYG{n}{label} \PYG{o}{=} \PYG{n}{label}\PYG{o}{.}\PYG{n}{rstrip}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{.}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{g+gp}{... } \PYG{k}{return} \PYG{n}{label} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{import} \PYG{n}{FuncFormatter} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{formatter}\PYG{o}{.}\PYG{n}{scaled}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{o}{/}\PYG{p}{(}\PYG{l+m+mf}{24.}\PYG{o}{*}\PYG{l+m+mf}{60.}\PYG{p}{)}\PYG{p}{]} \PYG{o}{=} \PYG{n}{FuncFormatter}\PYG{p}{(}\PYG{n}{my\PYGZus{}format\PYGZus{}function}\PYG{p}{)} \end{sphinxVerbatim} Autoformat the date labels. The default format is the one to use if none of the values in \sphinxcode{\sphinxupquote{self.scaled}} are greater than the unit returned by \sphinxcode{\sphinxupquote{locator.\_get\_unit()}}. \end{fulllineitems} \index{DateLocator (class in matplotlib.dates)@\spxentry{DateLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{DateLocator}}}{\emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Determines the tick locations when plotting dates. This class is subclassed by other Locators and is not meant to be used on its own. \sphinxstyleemphasis{tz} is a \sphinxcode{\sphinxupquote{tzinfo}} instance. \index{datalim\_to\_dt() (matplotlib.dates.DateLocator method)@\spxentry{datalim\_to\_dt()}\spxextra{matplotlib.dates.DateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator.datalim_to_dt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{datalim\_to\_dt}}}{\emph{self}}{} Convert axis data interval to datetime objects. \end{fulllineitems} \index{hms0d (matplotlib.dates.DateLocator attribute)@\spxentry{hms0d}\spxextra{matplotlib.dates.DateLocator attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator.hms0d}}\pysigline{\sphinxbfcode{\sphinxupquote{hms0d}}\sphinxbfcode{\sphinxupquote{ = \{'byhour': 0, 'byminute': 0, 'bysecond': 0\}}}} \end{fulllineitems} \index{nonsingular() (matplotlib.dates.DateLocator method)@\spxentry{nonsingular()}\spxextra{matplotlib.dates.DateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator.nonsingular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Given the proposed upper and lower extent, adjust the range if it is too close to being singular (i.e. a range of \textasciitilde{}0). \end{fulllineitems} \index{set\_tzinfo() (matplotlib.dates.DateLocator method)@\spxentry{set\_tzinfo()}\spxextra{matplotlib.dates.DateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator.set_tzinfo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_tzinfo}}}{\emph{self}, \emph{tz}}{} Set time zone info. \end{fulllineitems} \index{viewlim\_to\_dt() (matplotlib.dates.DateLocator method)@\spxentry{viewlim\_to\_dt()}\spxextra{matplotlib.dates.DateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DateLocator.viewlim_to_dt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{viewlim\_to\_dt}}}{\emph{self}}{} Converts the view interval to datetime objects. \end{fulllineitems} \end{fulllineitems} \index{RRuleLocator (class in matplotlib.dates)@\spxentry{RRuleLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{RRuleLocator}}}{\emph{o}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.DateLocator}}}}} \index{autoscale() (matplotlib.dates.RRuleLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.dates.RRuleLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.RRuleLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Set the view limits to include the data range. \end{fulllineitems} \index{get\_unit\_generic() (matplotlib.dates.RRuleLocator static method)@\spxentry{get\_unit\_generic()}\spxextra{matplotlib.dates.RRuleLocator static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.RRuleLocator.get_unit_generic}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_unit\_generic}}}{\emph{freq}}{}~ \end{fulllineitems} \index{tick\_values() (matplotlib.dates.RRuleLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.dates.RRuleLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.RRuleLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{AutoDateLocator (class in matplotlib.dates)@\spxentry{AutoDateLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{AutoDateLocator}}}{\emph{tz=None}, \emph{minticks=5}, \emph{maxticks=None}, \emph{interval\_multiples=True}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.DateLocator}}}}} On autoscale, this class picks the best {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateLocator}}}}} to set the view limits and the tick locations. \sphinxstyleemphasis{minticks} is the minimum number of ticks desired, which is used to select the type of ticking (yearly, monthly, etc.). \sphinxstyleemphasis{maxticks} is the maximum number of ticks desired, which controls any interval between ticks (ticking every other, every 3, etc.). For really fine-grained control, this can be a dictionary mapping individual rrule frequency constants (YEARLY, MONTHLY, etc.) to their own maximum number of ticks. This can be used to keep the number of ticks appropriate to the format chosen in {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateFormatter}}}}}. Any frequency not specified in this dictionary is given a default value. \sphinxstyleemphasis{tz} is a \sphinxcode{\sphinxupquote{tzinfo}} instance. \sphinxstyleemphasis{interval\_multiples} is a boolean that indicates whether ticks should be chosen to be multiple of the interval. This will lock ticks to 'nicer' locations. For example, this will force the ticks to be at hours 0,6,12,18 when hourly ticking is done at 6 hour intervals. The AutoDateLocator has an interval dictionary that maps the frequency of the tick (a constant from dateutil.rrule) and a multiple allowed for that ticking. The default looks like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{intervald} \PYG{o}{=} \PYG{p}{\PYGZob{}} \PYG{n}{YEARLY} \PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{40}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{,} \PYG{l+m+mi}{200}\PYG{p}{,} \PYG{l+m+mi}{400}\PYG{p}{,} \PYG{l+m+mi}{500}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{,} \PYG{l+m+mi}{2000}\PYG{p}{,} \PYG{l+m+mi}{4000}\PYG{p}{,} \PYG{l+m+mi}{5000}\PYG{p}{,} \PYG{l+m+mi}{10000}\PYG{p}{]}\PYG{p}{,} \PYG{n}{MONTHLY} \PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{,} \PYG{n}{DAILY} \PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+m+mi}{14}\PYG{p}{]}\PYG{p}{,} \PYG{n}{HOURLY} \PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{]}\PYG{p}{,} \PYG{n}{MINUTELY}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{]}\PYG{p}{,} \PYG{n}{SECONDLY}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{15}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{]}\PYG{p}{,} \PYG{n}{MICROSECONDLY}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{,} \PYG{l+m+mi}{200}\PYG{p}{,} \PYG{l+m+mi}{500}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{,} \PYG{l+m+mi}{2000}\PYG{p}{,} \PYG{l+m+mi}{5000}\PYG{p}{,} \PYG{l+m+mi}{10000}\PYG{p}{,} \PYG{l+m+mi}{20000}\PYG{p}{,} \PYG{l+m+mi}{50000}\PYG{p}{,} \PYG{l+m+mi}{100000}\PYG{p}{,} \PYG{l+m+mi}{200000}\PYG{p}{,} \PYG{l+m+mi}{500000}\PYG{p}{,} \PYG{l+m+mi}{1000000}\PYG{p}{]}\PYG{p}{,} \PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The interval is used to specify multiples that are appropriate for the frequency of ticking. For instance, every 7 days is sensible for daily ticks, but for minutes/seconds, 15 or 30 make sense. You can customize this dictionary by doing: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{locator} \PYG{o}{=} \PYG{n}{AutoDateLocator}\PYG{p}{(}\PYG{p}{)} \PYG{n}{locator}\PYG{o}{.}\PYG{n}{intervald}\PYG{p}{[}\PYG{n}{HOURLY}\PYG{p}{]} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{3}\PYG{p}{]} \PYG{c+c1}{\PYGZsh{} only show every 3 hours} \end{sphinxVerbatim} \index{autoscale() (matplotlib.dates.AutoDateLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Try to choose the view limits intelligently. \end{fulllineitems} \index{get\_locator() (matplotlib.dates.AutoDateLocator method)@\spxentry{get\_locator()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.get_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_locator}}}{\emph{self}, \emph{dmin}, \emph{dmax}}{} Pick the best locator based on a distance. \end{fulllineitems} \index{nonsingular() (matplotlib.dates.AutoDateLocator method)@\spxentry{nonsingular()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.nonsingular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Given the proposed upper and lower extent, adjust the range if it is too close to being singular (i.e. a range of \textasciitilde{}0). \end{fulllineitems} \index{refresh() (matplotlib.dates.AutoDateLocator method)@\spxentry{refresh()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} Refresh internal information based on current limits. \end{fulllineitems} \index{set\_axis() (matplotlib.dates.AutoDateLocator method)@\spxentry{set\_axis()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{tick\_values() (matplotlib.dates.AutoDateLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.dates.AutoDateLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{YearLocator (class in matplotlib.dates)@\spxentry{YearLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.YearLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{YearLocator}}}{\emph{base=1}, \emph{month=1}, \emph{day=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.DateLocator}}}}} Make ticks on a given day of each year that is a multiple of base. Examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Tick every year on Jan 1st} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{YearLocator}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Tick every 5 years on July 4th} \PYG{n}{locator} \PYG{o}{=} \PYG{n}{YearLocator}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{month}\PYG{o}{=}\PYG{l+m+mi}{7}\PYG{p}{,} \PYG{n}{day}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} Mark years that are multiple of base on a given month and day (default jan 1). \index{autoscale() (matplotlib.dates.YearLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.dates.YearLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.YearLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} Set the view limits to include the data range. \end{fulllineitems} \index{tick\_values() (matplotlib.dates.YearLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.dates.YearLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.YearLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{MonthLocator (class in matplotlib.dates)@\spxentry{MonthLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MonthLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{MonthLocator}}}{\emph{bymonth=None}, \emph{bymonthday=1}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each month, e.g., 1, 3, 12. Mark every month in \sphinxstyleemphasis{bymonth}; \sphinxstyleemphasis{bymonth} can be an int or sequence. Default is \sphinxcode{\sphinxupquote{range(1,13)}}, i.e. every month. \sphinxstyleemphasis{interval} is the interval between each iteration. For example, if \sphinxcode{\sphinxupquote{interval=2}}, mark every second occurrence. \end{fulllineitems} \index{WeekdayLocator (class in matplotlib.dates)@\spxentry{WeekdayLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.WeekdayLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{WeekdayLocator}}}{\emph{byweekday=1}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each weekday. Mark every weekday in \sphinxstyleemphasis{byweekday}; \sphinxstyleemphasis{byweekday} can be a number or sequence. Elements of \sphinxstyleemphasis{byweekday} must be one of MO, TU, WE, TH, FR, SA, SU, the constants from \sphinxhref{https://dateutil.readthedocs.io/en/stable/rrule.html\#module-dateutil.rrule}{\sphinxcode{\sphinxupquote{dateutil.rrule}}}, which have been imported into the {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}} namespace. \sphinxstyleemphasis{interval} specifies the number of weeks to skip. For example, \sphinxcode{\sphinxupquote{interval=2}} plots every second week. \end{fulllineitems} \index{DayLocator (class in matplotlib.dates)@\spxentry{DayLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.DayLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{DayLocator}}}{\emph{bymonthday=None}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each day of the month. For example, 1, 15, 30. Mark every day in \sphinxstyleemphasis{bymonthday}; \sphinxstyleemphasis{bymonthday} can be an int or sequence. Default is to tick every day of the month: \sphinxcode{\sphinxupquote{bymonthday=range(1,32)}} \end{fulllineitems} \index{HourLocator (class in matplotlib.dates)@\spxentry{HourLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.HourLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{HourLocator}}}{\emph{byhour=None}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each hour. Mark every hour in \sphinxstyleemphasis{byhour}; \sphinxstyleemphasis{byhour} can be an int or sequence. Default is to tick every hour: \sphinxcode{\sphinxupquote{byhour=range(24)}} \sphinxstyleemphasis{interval} is the interval between each iteration. For example, if \sphinxcode{\sphinxupquote{interval=2}}, mark every second occurrence. \end{fulllineitems} \index{MinuteLocator (class in matplotlib.dates)@\spxentry{MinuteLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MinuteLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{MinuteLocator}}}{\emph{byminute=None}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each minute. Mark every minute in \sphinxstyleemphasis{byminute}; \sphinxstyleemphasis{byminute} can be an int or sequence. Default is to tick every minute: \sphinxcode{\sphinxupquote{byminute=range(60)}} \sphinxstyleemphasis{interval} is the interval between each iteration. For example, if \sphinxcode{\sphinxupquote{interval=2}}, mark every second occurrence. \end{fulllineitems} \index{SecondLocator (class in matplotlib.dates)@\spxentry{SecondLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.SecondLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{SecondLocator}}}{\emph{bysecond=None}, \emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.RRuleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.RRuleLocator}}}}} Make ticks on occurrences of each second. Mark every second in \sphinxstyleemphasis{bysecond}; \sphinxstyleemphasis{bysecond} can be an int or sequence. Default is to tick every second: \sphinxcode{\sphinxupquote{bysecond = range(60)}} \sphinxstyleemphasis{interval} is the interval between each iteration. For example, if \sphinxcode{\sphinxupquote{interval=2}}, mark every second occurrence. \end{fulllineitems} \index{MicrosecondLocator (class in matplotlib.dates)@\spxentry{MicrosecondLocator}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{MicrosecondLocator}}}{\emph{interval=1}, \emph{tz=None}}{} Bases: {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.DateLocator}}}}} Make ticks on regular intervals of one or more microsecond(s). \begin{sphinxadmonition}{note}{Note:} Due to the floating point representation of time in days since 0001-01-01 UTC (plus 1), plotting data with microsecond time resolution does not work well with current dates. If you want microsecond resolution time plots, it is strongly recommended to use floating point seconds, not datetime-like time representation. If you really must use datetime.datetime() or similar and still need microsecond precision, your only chance is to use very early years; using year 0001 is recommended. \end{sphinxadmonition} \sphinxstyleemphasis{interval} is the interval between each iteration. For example, if \sphinxcode{\sphinxupquote{interval=2}}, mark every second microsecond. \index{set\_axis() (matplotlib.dates.MicrosecondLocator method)@\spxentry{set\_axis()}\spxextra{matplotlib.dates.MicrosecondLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{set\_data\_interval() (matplotlib.dates.MicrosecondLocator method)@\spxentry{set\_data\_interval()}\spxextra{matplotlib.dates.MicrosecondLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator.set_data_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \index{set\_view\_interval() (matplotlib.dates.MicrosecondLocator method)@\spxentry{set\_view\_interval()}\spxextra{matplotlib.dates.MicrosecondLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator.set_view_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \index{tick\_values() (matplotlib.dates.MicrosecondLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.dates.MicrosecondLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.MicrosecondLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{rrule (class in matplotlib.dates)@\spxentry{rrule}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.rrule}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{rrule}}}{\emph{freq}, \emph{dtstart=None}, \emph{interval=1}, \emph{wkst=None}, \emph{count=None}, \emph{until=None}, \emph{bysetpos=None}, \emph{bymonth=None}, \emph{bymonthday=None}, \emph{byyearday=None}, \emph{byeaster=None}, \emph{byweekno=None}, \emph{byweekday=None}, \emph{byhour=None}, \emph{byminute=None}, \emph{bysecond=None}, \emph{cache=False}}{} Bases: \sphinxcode{\sphinxupquote{dateutil.rrule.rrulebase}} That's the base of the rrule operation. It accepts all the keywords defined in the RFC as its constructor parameters (except byday, which was renamed to byweekday) and more. The constructor prototype is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rrule}\PYG{p}{(}\PYG{n}{freq}\PYG{p}{)} \end{sphinxVerbatim} Where freq must be one of YEARLY, MONTHLY, WEEKLY, DAILY, HOURLY, MINUTELY, or SECONDLY. \begin{sphinxadmonition}{note}{Note:} Per RFC section 3.3.10, recurrence instances falling on invalid dates and times are ignored rather than coerced: \begin{quote} Recurrence rules may generate recurrence instances with an invalid date (e.g., February 30) or nonexistent local time (e.g., 1:30 AM on a day where the local time is moved forward by an hour at 1:00 AM). Such recurrence instances MUST be ignored and MUST NOT be counted as part of the recurrence set. \end{quote} This can lead to possibly surprising behavior when, for example, the start date occurs at the end of the month: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{dateutil}\PYG{n+nn}{.}\PYG{n+nn}{rrule} \PYG{k}{import} \PYG{n}{rrule}\PYG{p}{,} \PYG{n}{MONTHLY} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{datetime} \PYG{k}{import} \PYG{n}{datetime} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{start\PYGZus{}date} \PYG{o}{=} \PYG{n}{datetime}\PYG{p}{(}\PYG{l+m+mi}{2014}\PYG{p}{,} \PYG{l+m+mi}{12}\PYG{p}{,} \PYG{l+m+mi}{31}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{rrule}\PYG{p}{(}\PYG{n}{freq}\PYG{o}{=}\PYG{n}{MONTHLY}\PYG{p}{,} \PYG{n}{count}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{dtstart}\PYG{o}{=}\PYG{n}{start\PYGZus{}date}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{... }\PYG{c+c1}{\PYGZsh{} doctest: +NORMALIZE\PYGZus{}WHITESPACE} \PYG{g+go}{[datetime.datetime(2014, 12, 31, 0, 0),} \PYG{g+go}{ datetime.datetime(2015, 1, 31, 0, 0),} \PYG{g+go}{ datetime.datetime(2015, 3, 31, 0, 0),} \PYG{g+go}{ datetime.datetime(2015, 5, 31, 0, 0)]} \end{sphinxVerbatim} \end{sphinxadmonition} Additionally, it supports the following keyword arguments: \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{itemize} \item {} \sphinxstyleliteralstrong{\sphinxupquote{dtstart}} -- The recurrence start. Besides being the base for the recurrence, missing parameters in the final recurrence instances will also be extracted from this date. If not given, datetime.now() will be used instead. \item {} \sphinxstyleliteralstrong{\sphinxupquote{interval}} -- The interval between each freq iteration. For example, when using YEARLY, an interval of 2 means once every two years, but with HOURLY, it means once every two hours. The default interval is 1. \item {} \sphinxstyleliteralstrong{\sphinxupquote{wkst}} -- The week start day. Must be one of the MO, TU, WE constants, or an integer, specifying the first day of the week. This will affect recurrences based on weekly periods. The default week start is got from calendar.firstweekday(), and may be modified by calendar.setfirstweekday(). \item {} \sphinxstyleliteralstrong{\sphinxupquote{count}} -- If given, this determines how many occurrences will be generated. \begin{sphinxadmonition}{note}{Note:} As of version 2.5.0, the use of the keyword \sphinxcode{\sphinxupquote{until}} in conjunction with \sphinxcode{\sphinxupquote{count}} is deprecated, to make sure \sphinxcode{\sphinxupquote{dateutil}} is fully compliant with \sphinxhref{https://tools.ietf.org/html/rfc5545\#section-3.3.10}{RFC-5545 Sec. 3.3.10}. Therefore, \sphinxcode{\sphinxupquote{until}} and \sphinxcode{\sphinxupquote{count}} \sphinxstylestrong{must not} occur in the same call to \sphinxcode{\sphinxupquote{rrule}}. \end{sphinxadmonition} \item {} \sphinxstyleliteralstrong{\sphinxupquote{until}} -- If given, this must be a datetime instance specifying the upper-bound limit of the recurrence. The last recurrence in the rule is the greatest datetime that is less than or equal to the value specified in the \sphinxcode{\sphinxupquote{until}} parameter. \begin{sphinxadmonition}{note}{Note:} As of version 2.5.0, the use of the keyword \sphinxcode{\sphinxupquote{until}} in conjunction with \sphinxcode{\sphinxupquote{count}} is deprecated, to make sure \sphinxcode{\sphinxupquote{dateutil}} is fully compliant with \sphinxhref{https://tools.ietf.org/html/rfc5545\#section-3.3.10}{RFC-5545 Sec. 3.3.10}. Therefore, \sphinxcode{\sphinxupquote{until}} and \sphinxcode{\sphinxupquote{count}} \sphinxstylestrong{must not} occur in the same call to \sphinxcode{\sphinxupquote{rrule}}. \end{sphinxadmonition} \item {} \sphinxstyleliteralstrong{\sphinxupquote{bysetpos}} -- If given, it must be either an integer, or a sequence of integers, positive or negative. Each given integer will specify an occurrence number, corresponding to the nth occurrence of the rule inside the frequency period. For example, a bysetpos of -1 if combined with a MONTHLY frequency, and a byweekday of (MO, TU, WE, TH, FR), will result in the last work day of every month. \item {} \sphinxstyleliteralstrong{\sphinxupquote{bymonth}} -- If given, it must be either an integer, or a sequence of integers, meaning the months to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{bymonthday}} -- If given, it must be either an integer, or a sequence of integers, meaning the month days to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byyearday}} -- If given, it must be either an integer, or a sequence of integers, meaning the year days to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byeaster}} -- If given, it must be either an integer, or a sequence of integers, positive or negative. Each integer will define an offset from the Easter Sunday. Passing the offset 0 to byeaster will yield the Easter Sunday itself. This is an extension to the RFC specification. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byweekno}} -- If given, it must be either an integer, or a sequence of integers, meaning the week numbers to apply the recurrence to. Week numbers have the meaning described in ISO8601, that is, the first week of the year is that containing at least four days of the new year. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byweekday}} -- If given, it must be either an integer (0 == MO), a sequence of integers, one of the weekday constants (MO, TU, etc), or a sequence of these constants. When given, these variables will define the weekdays where the recurrence will be applied. It's also possible to use an argument n for the weekday instances, which will mean the nth occurrence of this weekday in the period. For example, with MONTHLY, or with YEARLY and BYMONTH, using FR(+1) in byweekday will specify the first friday of the month where the recurrence happens. Notice that in the RFC documentation, this is specified as BYDAY, but was renamed to avoid the ambiguity of that keyword. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byhour}} -- If given, it must be either an integer, or a sequence of integers, meaning the hours to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{byminute}} -- If given, it must be either an integer, or a sequence of integers, meaning the minutes to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{bysecond}} -- If given, it must be either an integer, or a sequence of integers, meaning the seconds to apply the recurrence to. \item {} \sphinxstyleliteralstrong{\sphinxupquote{cache}} -- If given, it must be a boolean value specifying to enable or disable caching of results. If you will use the same rrule instance multiple times, enabling caching will improve the performance considerably. \end{itemize} \end{description}\end{quote} \index{replace() (matplotlib.dates.rrule method)@\spxentry{replace()}\spxextra{matplotlib.dates.rrule method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.rrule.replace}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{replace}}}{\emph{self}, \emph{**kwargs}}{} Return new rrule with same attributes except for those attributes given new values by whichever keyword arguments are specified. \end{fulllineitems} \end{fulllineitems} \index{relativedelta (class in matplotlib.dates)@\spxentry{relativedelta}\spxextra{class in matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.relativedelta}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{relativedelta}}}{\emph{dt1=None}, \emph{dt2=None}, \emph{years=0}, \emph{months=0}, \emph{days=0}, \emph{leapdays=0}, \emph{weeks=0}, \emph{hours=0}, \emph{minutes=0}, \emph{seconds=0}, \emph{microseconds=0}, \emph{year=None}, \emph{month=None}, \emph{day=None}, \emph{weekday=None}, \emph{yearday=None}, \emph{nlyearday=None}, \emph{hour=None}, \emph{minute=None}, \emph{second=None}, \emph{microsecond=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The relativedelta type is designed to be applied to an existing datetime and can replace specific components of that datetime, or represents an interval of time. It is based on the specification of the excellent work done by M.-A. Lemburg in his \sphinxhref{https://www.egenix.com/products/python/mxBase/mxDateTime/}{mx.DateTime} extension. However, notice that this type does \sphinxstyleemphasis{NOT} implement the same algorithm as his work. Do \sphinxstyleemphasis{NOT} expect it to behave like mx.DateTime's counterpart. There are two different ways to build a relativedelta instance. The first one is passing it two date/datetime classes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{relativedelta}\PYG{p}{(}\PYG{n}{datetime1}\PYG{p}{,} \PYG{n}{datetime2}\PYG{p}{)} \end{sphinxVerbatim} The second one is passing it any number of the following keyword arguments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{relativedelta}\PYG{p}{(}\PYG{n}{arg1}\PYG{o}{=}\PYG{n}{x}\PYG{p}{,}\PYG{n}{arg2}\PYG{o}{=}\PYG{n}{y}\PYG{p}{,}\PYG{n}{arg3}\PYG{o}{=}\PYG{n}{z}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{year}\PYG{p}{,} \PYG{n}{month}\PYG{p}{,} \PYG{n}{day}\PYG{p}{,} \PYG{n}{hour}\PYG{p}{,} \PYG{n}{minute}\PYG{p}{,} \PYG{n}{second}\PYG{p}{,} \PYG{n}{microsecond}\PYG{p}{:} \PYG{n}{Absolute} \PYG{n}{information} \PYG{p}{(}\PYG{n}{argument} \PYG{o+ow}{is} \PYG{n}{singular}\PYG{p}{)}\PYG{p}{;} \PYG{n}{adding} \PYG{o+ow}{or} \PYG{n}{subtracting} \PYG{n}{a} \PYG{n}{relativedelta} \PYG{k}{with} \PYG{n}{absolute} \PYG{n}{information} \PYG{n}{does} \PYG{o+ow}{not} \PYG{n}{perform} \PYG{n}{an} \PYG{n}{arithmetic} \PYG{n}{operation}\PYG{p}{,} \PYG{n}{but} \PYG{n}{rather} \PYG{n}{REPLACES} \PYG{n}{the} \PYG{n}{corresponding} \PYG{n}{value} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{original} \PYG{n}{datetime} \PYG{k}{with} \PYG{n}{the} \PYG{n}{value}\PYG{p}{(}\PYG{n}{s}\PYG{p}{)} \PYG{o+ow}{in} \PYG{n}{relativedelta}\PYG{o}{.} \PYG{n}{years}\PYG{p}{,} \PYG{n}{months}\PYG{p}{,} \PYG{n}{weeks}\PYG{p}{,} \PYG{n}{days}\PYG{p}{,} \PYG{n}{hours}\PYG{p}{,} \PYG{n}{minutes}\PYG{p}{,} \PYG{n}{seconds}\PYG{p}{,} \PYG{n}{microseconds}\PYG{p}{:} \PYG{n}{Relative} \PYG{n}{information}\PYG{p}{,} \PYG{n}{may} \PYG{n}{be} \PYG{n}{negative} \PYG{p}{(}\PYG{n}{argument} \PYG{o+ow}{is} \PYG{n}{plural}\PYG{p}{)}\PYG{p}{;} \PYG{n}{adding} \PYG{o+ow}{or} \PYG{n}{subtracting} \PYG{n}{a} \PYG{n}{relativedelta} \PYG{k}{with} \PYG{n}{relative} \PYG{n}{information} \PYG{n}{performs} \PYG{n}{the} \PYG{n}{corresponding} \PYG{n}{aritmetic} \PYG{n}{operation} \PYG{n}{on} \PYG{n}{the} \PYG{n}{original} \PYG{n}{datetime} \PYG{n}{value} \PYG{k}{with} \PYG{n}{the} \PYG{n}{information} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{relativedelta}\PYG{o}{.} \PYG{n}{weekday}\PYG{p}{:} \PYG{n}{One} \PYG{n}{of} \PYG{n}{the} \PYG{n}{weekday} \PYG{n}{instances} \PYG{p}{(}\PYG{n}{MO}\PYG{p}{,} \PYG{n}{TU}\PYG{p}{,} \PYG{n}{etc}\PYG{p}{)} \PYG{n}{available} \PYG{o+ow}{in} \PYG{n}{the} \PYG{n}{relativedelta} \PYG{n}{module}\PYG{o}{.} \PYG{n}{These} \PYG{n}{instances} \PYG{n}{may} \PYG{n}{receive} \PYG{n}{a} \PYG{n}{parameter} \PYG{n}{N}\PYG{p}{,} \PYG{n}{specifying} \PYG{n}{the} \PYG{n}{Nth} \PYG{n}{weekday}\PYG{p}{,} \PYG{n}{which} \PYG{n}{could} \PYG{n}{be} \PYG{n}{positive} \PYG{o+ow}{or} \PYG{n}{negative} \PYG{p}{(}\PYG{n}{like} \PYG{n}{MO}\PYG{p}{(}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{o+ow}{or} \PYG{n}{MO}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)}\PYG{o}{.} \PYG{n}{Not} \PYG{n}{specifying} \PYG{n}{it} \PYG{o+ow}{is} \PYG{n}{the} \PYG{n}{same} \PYG{k}{as} \PYG{n}{specifying} \PYG{o}{+}\PYG{l+m+mf}{1.} \PYG{n}{You} \PYG{n}{can} \PYG{n}{also} \PYG{n}{use} \PYG{n}{an} \PYG{n}{integer}\PYG{p}{,} \PYG{n}{where} \PYG{l+m+mi}{0}\PYG{o}{=}\PYG{n}{MO}\PYG{o}{.} \PYG{n}{This} \PYG{n}{argument} \PYG{o+ow}{is} \PYG{n}{always} \PYG{n}{relative} \PYG{n}{e}\PYG{o}{.}\PYG{n}{g}\PYG{o}{.} \PYG{k}{if} \PYG{n}{the} \PYG{n}{calculated} \PYG{n}{date} \PYG{o+ow}{is} \PYG{n}{already} \PYG{n}{Monday}\PYG{p}{,} \PYG{n}{using} \PYG{n}{MO}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{o+ow}{or} \PYG{n}{MO}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{won}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{t change the day. To effectively make it absolute, use} \PYG{n}{it} \PYG{o+ow}{in} \PYG{n}{combination} \PYG{k}{with} \PYG{n}{the} \PYG{n}{day} \PYG{n}{argument} \PYG{p}{(}\PYG{n}{e}\PYG{o}{.}\PYG{n}{g}\PYG{o}{.} \PYG{n}{day}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{MO}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{k}{for} \PYG{n}{first} \PYG{n}{Monday} \PYG{n}{of} \PYG{n}{the} \PYG{n}{month}\PYG{p}{)}\PYG{o}{.} \PYG{n}{leapdays}\PYG{p}{:} \PYG{n}{Will} \PYG{n}{add} \PYG{n}{given} \PYG{n}{days} \PYG{n}{to} \PYG{n}{the} \PYG{n}{date} \PYG{n}{found}\PYG{p}{,} \PYG{k}{if} \PYG{n}{year} \PYG{o+ow}{is} \PYG{n}{a} \PYG{n}{leap} \PYG{n}{year}\PYG{p}{,} \PYG{o+ow}{and} \PYG{n}{the} \PYG{n}{date} \PYG{n}{found} \PYG{o+ow}{is} \PYG{n}{post} \PYG{l+m+mi}{28} \PYG{n}{of} \PYG{n}{february}\PYG{o}{.} \PYG{n}{yearday}\PYG{p}{,} \PYG{n}{nlyearday}\PYG{p}{:} \PYG{n}{Set} \PYG{n}{the} \PYG{n}{yearday} \PYG{o+ow}{or} \PYG{n}{the} \PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{leap} \PYG{n}{year} \PYG{n}{day} \PYG{p}{(}\PYG{n}{jump} \PYG{n}{leap} \PYG{n}{days}\PYG{p}{)}\PYG{o}{.} \PYG{n}{These} \PYG{n}{are} \PYG{n}{converted} \PYG{n}{to} \PYG{n}{day}\PYG{o}{/}\PYG{n}{month}\PYG{o}{/}\PYG{n}{leapdays} \PYG{n}{information}\PYG{o}{.} \end{sphinxVerbatim} There are relative and absolute forms of the keyword arguments. The plural is relative, and the singular is absolute. For each argument in the order below, the absolute form is applied first (by setting each attribute to that value) and then the relative form (by adding the value to the attribute). The order of attributes considered when this relativedelta is added to a datetime is: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Year \item {} Month \item {} Day \item {} Hours \item {} Minutes \item {} Seconds \item {} Microseconds \end{enumerate} Finally, weekday is applied, using the rule described above. For example \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{datetime} \PYG{k}{import} \PYG{n}{datetime} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{dateutil}\PYG{n+nn}{.}\PYG{n+nn}{relativedelta} \PYG{k}{import} \PYG{n}{relativedelta}\PYG{p}{,} \PYG{n}{MO} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{dt} \PYG{o}{=} \PYG{n}{datetime}\PYG{p}{(}\PYG{l+m+mi}{2018}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+m+mi}{13}\PYG{p}{,} \PYG{l+m+mi}{37}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{delta} \PYG{o}{=} \PYG{n}{relativedelta}\PYG{p}{(}\PYG{n}{hours}\PYG{o}{=}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{n}{day}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{weekday}\PYG{o}{=}\PYG{n}{MO}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{dt} \PYG{o}{+} \PYG{n}{delta} \PYG{g+go}{datetime.datetime(2018, 4, 2, 14, 37)} \end{sphinxVerbatim} First, the day is set to 1 (the first of the month), then 25 hours are added, to get to the 2nd day and 14th hour, finally the weekday is applied, but since the 2nd is already a Monday there is no effect. \index{normalized() (matplotlib.dates.relativedelta method)@\spxentry{normalized()}\spxextra{matplotlib.dates.relativedelta method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.relativedelta.normalized}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{normalized}}}{\emph{self}}{} Return a version of this object represented entirely using integer values for the relative attributes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{relativedelta}\PYG{p}{(}\PYG{n}{days}\PYG{o}{=}\PYG{l+m+mf}{1.5}\PYG{p}{,} \PYG{n}{hours}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{o}{.}\PYG{n}{normalized}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{relativedelta(days=+1, hours=+14)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Returns}] \leavevmode Returns a \sphinxhref{https://dateutil.readthedocs.io/en/stable/relativedelta.html\#dateutil.relativedelta.relativedelta}{\sphinxcode{\sphinxupquote{dateutil.relativedelta.relativedelta}}} object. \end{description}\end{quote} \end{fulllineitems} \index{weeks (matplotlib.dates.relativedelta attribute)@\spxentry{weeks}\spxextra{matplotlib.dates.relativedelta attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.relativedelta.weeks}}\pysigline{\sphinxbfcode{\sphinxupquote{weeks}}}~ \end{fulllineitems} \end{fulllineitems} \index{seconds() (in module matplotlib.dates)@\spxentry{seconds()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.seconds}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{seconds}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return seconds as days. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{minutes() (in module matplotlib.dates)@\spxentry{minutes()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.minutes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{minutes}}}{\emph{m}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return minutes as days. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{hours() (in module matplotlib.dates)@\spxentry{hours()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.hours}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{hours}}}{\emph{h}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return hours as days. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{weeks() (in module matplotlib.dates)@\spxentry{weeks()}\spxextra{in module matplotlib.dates}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dates_api:matplotlib.dates.weeks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dates.}}\sphinxbfcode{\sphinxupquote{weeks}}}{\emph{w}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return weeks as days. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.dviread}}} \label{\detokenize{api/dviread:module-matplotlib.dviread}}\label{\detokenize{api/dviread:matplotlib-dviread}}\label{\detokenize{api/dviread::doc}}\index{matplotlib.dviread (module)@\spxentry{matplotlib.dviread}\spxextra{module}} A module for reading dvi files output by TeX. Several limitations make this not (currently) useful as a general-purpose dvi preprocessor, but it is currently used by the pdf backend for processing usetex text. Interface: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{Dvi}\PYG{p}{(}\PYG{n}{filename}\PYG{p}{,} \PYG{l+m+mi}{72}\PYG{p}{)} \PYG{k}{as} \PYG{n}{dvi}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} iterate over pages:} \PYG{k}{for} \PYG{n}{page} \PYG{o+ow}{in} \PYG{n}{dvi}\PYG{p}{:} \PYG{n}{w}\PYG{p}{,} \PYG{n}{h}\PYG{p}{,} \PYG{n}{d} \PYG{o}{=} \PYG{n}{page}\PYG{o}{.}\PYG{n}{width}\PYG{p}{,} \PYG{n}{page}\PYG{o}{.}\PYG{n}{height}\PYG{p}{,} \PYG{n}{page}\PYG{o}{.}\PYG{n}{descent} \PYG{k}{for} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{font}\PYG{p}{,} \PYG{n}{glyph}\PYG{p}{,} \PYG{n}{width} \PYG{o+ow}{in} \PYG{n}{page}\PYG{o}{.}\PYG{n}{text}\PYG{p}{:} \PYG{n}{fontname} \PYG{o}{=} \PYG{n}{font}\PYG{o}{.}\PYG{n}{texname} \PYG{n}{pointsize} \PYG{o}{=} \PYG{n}{font}\PYG{o}{.}\PYG{n}{size} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{k}{for} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{width} \PYG{o+ow}{in} \PYG{n}{page}\PYG{o}{.}\PYG{n}{boxes}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \end{sphinxVerbatim} \index{Dvi (class in matplotlib.dviread)@\spxentry{Dvi}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Dvi}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{Dvi}}}{\emph{filename}, \emph{dpi}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A reader for a dvi ("device-independent") file, as produced by TeX. The current implementation can only iterate through pages in order, and does not even attempt to verify the postamble. This class can be used as a context manager to close the underlying file upon exit. Pages can be read via iteration. Here is an overly simple way to extract text without trying to detect whitespace: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{dviread}\PYG{o}{.}\PYG{n}{Dvi}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{input.dvi}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{72}\PYG{p}{)} \PYG{k}{as} \PYG{n}{dvi}\PYG{p}{:} \PYG{g+gp}{... } \PYG{k}{for} \PYG{n}{page} \PYG{o+ow}{in} \PYG{n}{dvi}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{o}{.}\PYG{n}{join}\PYG{p}{(}\PYG{n+nb}{chr}\PYG{p}{(}\PYG{n}{t}\PYG{o}{.}\PYG{n}{glyph}\PYG{p}{)} \PYG{k}{for} \PYG{n}{t} \PYG{o+ow}{in} \PYG{n}{page}\PYG{o}{.}\PYG{n}{text}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Read the data from the file named \sphinxstyleemphasis{filename} and convert TeX's internal units to units of \sphinxstyleemphasis{dpi} per inch. \sphinxstyleemphasis{dpi} only sets the units and does not limit the resolution. Use None to return TeX's internal units. \index{close() (matplotlib.dviread.Dvi method)@\spxentry{close()}\spxextra{matplotlib.dviread.Dvi method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Dvi.close}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{close}}}{\emph{self}}{} Close the underlying file if it is open. \end{fulllineitems} \end{fulllineitems} \index{DviFont (class in matplotlib.dviread)@\spxentry{DviFont}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.DviFont}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{DviFont}}}{\emph{scale}, \emph{tfm}, \emph{texname}, \emph{vf}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Encapsulation of a font that a DVI file can refer to. This class holds a font's texname and size, supports comparison, and knows the widths of glyphs in the same units as the AFM file. There are also internal attributes (for use by dviread.py) that are \sphinxstyleemphasis{not} used for comparison. The size is in Adobe points (converted from TeX points). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float{]} Factor by which the font is scaled from its natural size. \item[{\sphinxstylestrong{tfm}}] \leavevmode{[}Tfm{]} TeX font metrics for this font \item[{\sphinxstylestrong{texname}}] \leavevmode{[}bytes{]} Name of the font as used internally by TeX and friends, as an ASCII bytestring. This is usually very different from any external font names, and \sphinxcode{\sphinxupquote{dviread.PsfontsMap}} can be used to find the external name of the font. \item[{\sphinxstylestrong{vf}}] \leavevmode{[}Vf{]} A TeX "virtual font" file, or None if this font is not virtual. \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{texname}}] \leavevmode{[}bytes{]} \item[{\sphinxstylestrong{size}}] \leavevmode{[}float{]} Size of the font in Adobe points, converted from the slightly smaller TeX points. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}list{]} Widths of glyphs in glyph-space units, typically 1/1000ths of the point size. \end{description} \end{description}\end{quote} \index{size (matplotlib.dviread.DviFont attribute)@\spxentry{size}\spxextra{matplotlib.dviread.DviFont attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.DviFont.size}}\pysigline{\sphinxbfcode{\sphinxupquote{size}}}~ \end{fulllineitems} \index{texname (matplotlib.dviread.DviFont attribute)@\spxentry{texname}\spxextra{matplotlib.dviread.DviFont attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.DviFont.texname}}\pysigline{\sphinxbfcode{\sphinxupquote{texname}}}~ \end{fulllineitems} \index{widths (matplotlib.dviread.DviFont attribute)@\spxentry{widths}\spxextra{matplotlib.dviread.DviFont attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.DviFont.widths}}\pysigline{\sphinxbfcode{\sphinxupquote{widths}}}~ \end{fulllineitems} \end{fulllineitems} \index{Encoding (class in matplotlib.dviread)@\spxentry{Encoding}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Encoding}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{Encoding}}}{\emph{filename}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Parses a *.enc file referenced from a psfonts.map style file. The format this class understands is a very limited subset of PostScript. Usage (subject to change): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{name} \PYG{o+ow}{in} \PYG{n}{Encoding}\PYG{p}{(}\PYG{n}{filename}\PYG{p}{)}\PYG{p}{:} \PYG{n}{whatever}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}string or bytestring{]} \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{encoding}}] \leavevmode{[}list{]} List of character names \end{description} \end{description}\end{quote} \index{encoding (matplotlib.dviread.Encoding attribute)@\spxentry{encoding}\spxextra{matplotlib.dviread.Encoding attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Encoding.encoding}}\pysigline{\sphinxbfcode{\sphinxupquote{encoding}}}~ \end{fulllineitems} \end{fulllineitems} \index{PsFont (in module matplotlib.dviread)@\spxentry{PsFont}\spxextra{in module matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.PsFont}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{PsFont}}} alias of \sphinxcode{\sphinxupquote{matplotlib.dviread.Font}} \end{fulllineitems} \index{PsfontsMap (class in matplotlib.dviread)@\spxentry{PsfontsMap}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.PsfontsMap}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{PsfontsMap}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A psfonts.map formatted file, mapping TeX fonts to PS fonts. Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{map} \PYG{o}{=} \PYG{n}{PsfontsMap}\PYG{p}{(}\PYG{n}{find\PYGZus{}tex\PYGZus{}file}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pdftex.map}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry} \PYG{o}{=} \PYG{n+nb}{map}\PYG{p}{[}\PYG{l+s+sa}{b}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ptmbo8r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry}\PYG{o}{.}\PYG{n}{texname} \PYG{g+go}{b\PYGZsq{}ptmbo8r\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry}\PYG{o}{.}\PYG{n}{psname} \PYG{g+go}{b\PYGZsq{}Times\PYGZhy{}Bold\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry}\PYG{o}{.}\PYG{n}{encoding} \PYG{g+go}{\PYGZsq{}/usr/local/texlive/2008/texmf\PYGZhy{}dist/fonts/enc/dvips/base/8r.enc\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry}\PYG{o}{.}\PYG{n}{effects} \PYG{g+go}{\PYGZob{}\PYGZsq{}slant\PYGZsq{}: 0.16700000000000001\PYGZcb{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{entry}\PYG{o}{.}\PYG{n}{filename} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}string or bytestring{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} For historical reasons, TeX knows many Type-1 fonts by different names than the outside world. (For one thing, the names have to fit in eight characters.) Also, TeX's native fonts are not Type-1 but Metafont, which is nontrivial to convert to PostScript except as a bitmap. While high-quality conversions to Type-1 format exist and are shipped with modern TeX distributions, we need to know which Type-1 fonts are the counterparts of which native fonts. For these reasons a mapping is needed from internal font names to font file names. A texmf tree typically includes mapping files called e.g. \sphinxcode{\sphinxupquote{psfonts.map}}, \sphinxcode{\sphinxupquote{pdftex.map}}, or \sphinxcode{\sphinxupquote{dvipdfm.map}}. The file \sphinxcode{\sphinxupquote{psfonts.map}} is used by \sphinxstyleliteralstrong{\sphinxupquote{dvips}}, \sphinxcode{\sphinxupquote{pdftex.map}} by \sphinxstyleliteralstrong{\sphinxupquote{pdfTeX}}, and \sphinxcode{\sphinxupquote{dvipdfm.map}} by \sphinxstyleliteralstrong{\sphinxupquote{dvipdfm}}. \sphinxcode{\sphinxupquote{psfonts.map}} might avoid embedding the 35 PostScript fonts (i.e., have no filename for them, as in the Times-Bold example above), while the pdf-related files perhaps only avoid the "Base 14" pdf fonts. But the user may have configured these files differently. \end{fulllineitems} \index{Tfm (class in matplotlib.dviread)@\spxentry{Tfm}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{Tfm}}}{\emph{filename}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A TeX Font Metric file. This implementation covers only the bare minimum needed by the Dvi class. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}string or bytestring{]} \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{checksum}}] \leavevmode{[}int{]} Used for verifying against the dvi file. \item[{\sphinxstylestrong{design\_size}}] \leavevmode{[}int{]} Design size of the font (unknown units) \item[{\sphinxstylestrong{width, height, depth}}] \leavevmode{[}dict{]} Dimensions of each character, need to be scaled by the factor specified in the dvi file. These are dicts because indexing may not start from 0. \end{description} \end{description}\end{quote} \index{checksum (matplotlib.dviread.Tfm attribute)@\spxentry{checksum}\spxextra{matplotlib.dviread.Tfm attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm.checksum}}\pysigline{\sphinxbfcode{\sphinxupquote{checksum}}}~ \end{fulllineitems} \index{depth (matplotlib.dviread.Tfm attribute)@\spxentry{depth}\spxextra{matplotlib.dviread.Tfm attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}}~ \end{fulllineitems} \index{design\_size (matplotlib.dviread.Tfm attribute)@\spxentry{design\_size}\spxextra{matplotlib.dviread.Tfm attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm.design_size}}\pysigline{\sphinxbfcode{\sphinxupquote{design\_size}}}~ \end{fulllineitems} \index{height (matplotlib.dviread.Tfm attribute)@\spxentry{height}\spxextra{matplotlib.dviread.Tfm attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm.height}}\pysigline{\sphinxbfcode{\sphinxupquote{height}}}~ \end{fulllineitems} \index{width (matplotlib.dviread.Tfm attribute)@\spxentry{width}\spxextra{matplotlib.dviread.Tfm attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Tfm.width}}\pysigline{\sphinxbfcode{\sphinxupquote{width}}}~ \end{fulllineitems} \end{fulllineitems} \index{Vf (class in matplotlib.dviread)@\spxentry{Vf}\spxextra{class in matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.Vf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{Vf}}}{\emph{filename}}{} Bases: {\hyperref[\detokenize{api/dviread:matplotlib.dviread.Dvi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dviread.Dvi}}}}} A virtual font (*.vf file) containing subroutines for dvi files. Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{vf} \PYG{o}{=} \PYG{n}{Vf}\PYG{p}{(}\PYG{n}{filename}\PYG{p}{)} \PYG{n}{glyph} \PYG{o}{=} \PYG{n}{vf}\PYG{p}{[}\PYG{n}{code}\PYG{p}{]} \PYG{n}{glyph}\PYG{o}{.}\PYG{n}{text}\PYG{p}{,} \PYG{n}{glyph}\PYG{o}{.}\PYG{n}{boxes}\PYG{p}{,} \PYG{n}{glyph}\PYG{o}{.}\PYG{n}{width} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}string or bytestring{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} The virtual font format is a derivative of dvi: \sphinxurl{http://mirrors.ctan.org/info/knuth/virtual-fonts} This class reuses some of the machinery of {\hyperref[\detokenize{api/dviread:matplotlib.dviread.Dvi}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Dvi}}}}} but replaces the \sphinxcode{\sphinxupquote{\_read}} loop and dispatch mechanism. \end{fulllineitems} \index{find\_tex\_file (in module matplotlib.dviread)@\spxentry{find\_tex\_file}\spxextra{in module matplotlib.dviread}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/dviread:matplotlib.dviread.find_tex_file}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.dviread.}}\sphinxbfcode{\sphinxupquote{find\_tex\_file}}}{\emph{filename}, \emph{format=None}}{} Find a file in the texmf tree. Calls \sphinxstyleliteralstrong{\sphinxupquote{kpsewhich}} which is an interface to the kpathsea library \sphinxcite{api/dviread:ra043a4f19cd5-1}. Most existing TeX distributions on Unix-like systems use kpathsea. It is also available as part of MikTeX, a popular distribution on Windows. \sphinxstyleemphasis{If the file is not found, an empty string is returned}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode{[}string or bytestring{]} \item[{\sphinxstylestrong{format}}] \leavevmode{[}string or bytestring{]} Used as the value of the \sphinxcode{\sphinxupquote{-{-}format}} option to \sphinxstyleliteralstrong{\sphinxupquote{kpsewhich}}. Could be e.g. 'tfm' or 'vf' to limit the search to that type of files. \end{description} \end{description}\end{quote} \subsubsection*{References} \sphinxcite{api/dviread:ra043a4f19cd5-1} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.figure}}} \label{\detokenize{api/figure_api:module-matplotlib.figure}}\label{\detokenize{api/figure_api:matplotlib-figure}}\label{\detokenize{api/figure_api::doc}}\index{matplotlib.figure (module)@\spxentry{matplotlib.figure}\spxextra{module}} The figure module provides the top-level {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}, which contains all the plot elements. The following classes are defined \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotParams}}}}}}] \leavevmode control the default spacing of the subplots \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}}] \leavevmode Top level container for all plot elements. \end{description} \subsection{Classes} \label{\detokenize{api/figure_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesStack}}}}} & Specialization of the {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.Stack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Stack}}}}} to handle all tracking of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} in a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} & The top level container for all the plot elements. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotParams}}}}} & A class to hold the parameters for a subplot. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.figure.AxesStack} \label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib-figure-axesstack}}\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack::doc}}\index{AxesStack (class in matplotlib.figure)@\spxentry{AxesStack}\spxextra{class in matplotlib.figure}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.figure.}}\sphinxbfcode{\sphinxupquote{AxesStack}}} Bases: {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.Stack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cbook.Stack}}}}} Specialization of the {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.Stack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Stack}}}}} to handle all tracking of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} in a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}. This stack stores \sphinxcode{\sphinxupquote{key, (ind, axes)}} pairs, where: \begin{itemize} \item {} \sphinxstylestrong{key} should be a hash of the args and kwargs used in generating the Axes. \item {} \sphinxstylestrong{ind} is a serial number for tracking the order in which axes were added. \end{itemize} The AxesStack is a callable, where \sphinxcode{\sphinxupquote{ax\_stack()}} returns the current axes. Alternatively the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.current_key_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{current\_key\_axes()}}}}} will return the current key and associated axes. \index{add() (matplotlib.figure.AxesStack method)@\spxentry{add()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.add}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add}}}{\emph{self}, \emph{key}, \emph{a}}{} Add Axes \sphinxstyleemphasis{a}, with key \sphinxstyleemphasis{key}, to the stack, and return the stack. If \sphinxstyleemphasis{key} is unhashable, replace it by a unique, arbitrary object. If \sphinxstyleemphasis{a} is already on the stack, don't add it again, but return \sphinxstyleemphasis{None}. \end{fulllineitems} \index{as\_list() (matplotlib.figure.AxesStack method)@\spxentry{as\_list()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.as_list}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{as\_list}}}{\emph{self}}{} Return a list of the Axes instances that have been added to the figure. \end{fulllineitems} \index{bubble() (matplotlib.figure.AxesStack method)@\spxentry{bubble()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.bubble}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{bubble}}}{\emph{self}, \emph{a}}{} Move the given axes, which must already exist in the stack, to the top. \end{fulllineitems} \index{current\_key\_axes() (matplotlib.figure.AxesStack method)@\spxentry{current\_key\_axes()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.current_key_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{current\_key\_axes}}}{\emph{self}}{} Return a tuple of \sphinxcode{\sphinxupquote{(key, axes)}} for the active axes. If no axes exists on the stack, then returns \sphinxcode{\sphinxupquote{(None, None)}}. \end{fulllineitems} \index{get() (matplotlib.figure.AxesStack method)@\spxentry{get()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get}}}{\emph{self}, \emph{key}}{} Return the Axes instance that was added with \sphinxstyleemphasis{key}. If it is not present, return \sphinxstyleemphasis{None}. \end{fulllineitems} \index{remove() (matplotlib.figure.AxesStack method)@\spxentry{remove()}\spxextra{matplotlib.figure.AxesStack method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.AxesStack:matplotlib.figure.AxesStack.remove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{remove}}}{\emph{self}, \emph{a}}{} Remove the axes from the stack. \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.figure.Figure} \label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib-figure-figure}}\label{\detokenize{api/_as_gen/matplotlib.figure.Figure::doc}}\index{Figure (class in matplotlib.figure)@\spxentry{Figure}\spxextra{class in matplotlib.figure}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.figure.}}\sphinxbfcode{\sphinxupquote{Figure}}}{\emph{figsize=None}, \emph{dpi=None}, \emph{facecolor=None}, \emph{edgecolor=None}, \emph{linewidth=0.0}, \emph{frameon=None}, \emph{subplotpars=None}, \emph{tight\_layout=None}, \emph{constrained\_layout=None}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} The top level container for all the plot elements. The Figure instance supports callbacks through a \sphinxstyleemphasis{callbacks} attribute which is a {\hyperref[\detokenize{api/cbook_api:matplotlib.cbook.CallbackRegistry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CallbackRegistry}}}}} instance. The events you can connect to are 'dpi\_changed', and the callback will be called with \sphinxcode{\sphinxupquote{func(fig)}} where fig is the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patch}}] \leavevmode The {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} instance representing the figure background patch. \item[{\sphinxstylestrong{suppressComposite}}] \leavevmode For multiple figure images, the figure will make composite images depending on the renderer option\_image\_nocomposite function. If \sphinxstyleemphasis{suppressComposite} is a boolean, this will override the renderer. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figsize}}] \leavevmode{[}2-tuple of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.figsize"{]}}}}{]} Figure dimension \sphinxcode{\sphinxupquote{(width, height)}} in inches. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.dpi"{]}}}}{]} Dots per inch. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.facecolor"{]}}}}{]} The figure patch facecolor. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.edgecolor"{]}}}}{]} The figure patch edge color. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}float{]} The linewidth of the frame (i.e. the edge linewidth of the figure patch). \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.frameon"{]}}}}{]} If \sphinxcode{\sphinxupquote{False}}, suppress drawing the figure background patch. \item[{\sphinxstylestrong{subplotpars}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotParams}}}}}{]} Subplot parameters. If not given, the default subplot parameters \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.subplot.*"{]}}}} are used. \item[{\sphinxstylestrong{tight\_layout}}] \leavevmode{[}bool or dict, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.autolayout"{]}}}}{]} If \sphinxcode{\sphinxupquote{False}} use \sphinxstyleemphasis{subplotpars}. If \sphinxcode{\sphinxupquote{True}} adjust subplot parameters using {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} with default padding. When providing a dict containing the keys \sphinxcode{\sphinxupquote{pad}}, \sphinxcode{\sphinxupquote{w\_pad}}, \sphinxcode{\sphinxupquote{h\_pad}}, and \sphinxcode{\sphinxupquote{rect}}, the default {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} paddings will be overridden. \item[{\sphinxstylestrong{constrained\_layout}}] \leavevmode{[}bool{]} If \sphinxcode{\sphinxupquote{True}} use constrained layout to adjust positioning of plot elements. Like \sphinxcode{\sphinxupquote{tight\_layout}}, but designed to be more flexible. See {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}} for examples. (Note: does not work with \sphinxcode{\sphinxupquote{subplot()}} or \sphinxcode{\sphinxupquote{subplot2grid()}}.) Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.constrained\_layout.use"{]}}}}. \end{description} \end{description}\end{quote} \index{add\_artist() (matplotlib.figure.Figure method)@\spxentry{add\_artist()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{artist}, \emph{clip=False}}{} Add any {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} to the figure. Usually artists are added to axes objects using {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_artist:matplotlib.axes.Axes.add_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.add\_artist()}}}}}, but use this method in the rare cases that adding directly to the figure is necessary. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artist}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} The artist to add to the figure. If the added artist has no transform previously set, its transform will be set to \sphinxcode{\sphinxupquote{figure.transFigure}}. \item[{\sphinxstylestrong{clip}}] \leavevmode{[}bool, optional, default \sphinxcode{\sphinxupquote{False}}{]} An optional parameter \sphinxcode{\sphinxupquote{clip}} determines whether the added artist should be clipped by the figure patch. Default is \sphinxstyleemphasis{False}, i.e. no clipping. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artist}}] \leavevmode{[}The added {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{add\_axes() (matplotlib.figure.Figure method)@\spxentry{add\_axes()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_axes}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Add an axes to the figure. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{polar}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rect}}] \leavevmode{[}sequence of float{]} The dimensions {[}left, bottom, width, height{]} of the new axes. All quantities are in fractions of figure width and height. \item[{\sphinxstylestrong{projection}}] \leavevmode{[}\{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str\}, optional{]} The projection type of the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \sphinxstyleemphasis{str} is the name of a custom projection, see {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections}}}}}. The default None results in a 'rectilinear' projection. \item[{\sphinxstylestrong{polar}}] \leavevmode{[}boolean, optional{]} If True, equivalent to projection='polar'. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} Share the x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} with sharex and/or sharey. The axis will have the same limits, ticks, and scale as the axis of the shared axes. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} A label for the returned axes. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} (or a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}){]} The returned axes class depends on the projection used. It is {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} if rectilinear projection are used and {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes}}}}} if polar projection are used. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode This method also takes the keyword arguments for the returned axes class. The keyword arguments for the rectilinear axes class {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} can be found in the following table but there might also be other keyword arguments if another projection is used, see the actual axes class. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} If the figure already has an axes with key (\sphinxstyleemphasis{args}, \sphinxstyleemphasis{kwargs}) then it will simply make that axes current and return it. This behavior is deprecated. Meanwhile, if you do not want this behavior (i.e., you want to force the creation of a new axes), you must use a unique set of args and kwargs. The axes \sphinxstyleemphasis{label} attribute has been exposed for this purpose: if you want two axes that are otherwise identical to be added to the figure, make sure you give them unique labels. In rare circumstances, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes}}}}} may be called with a single argument, a axes instance already created in the present figure but not in the figure's list of axes. \subsubsection*{Examples} Some simple examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rect} \PYG{o}{=} \PYG{n}{l}\PYG{p}{,} \PYG{n}{b}\PYG{p}{,} \PYG{n}{w}\PYG{p}{,} \PYG{n}{h} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,}\PYG{n}{label}\PYG{o}{=}\PYG{n}{label1}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,}\PYG{n}{label}\PYG{o}{=}\PYG{n}{label2}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{polar}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{delaxes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{add\_axobserver() (matplotlib.figure.Figure method)@\spxentry{add\_axobserver()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axobserver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_axobserver}}}{\emph{self}, \emph{func}}{} Whenever the axes state change, \sphinxcode{\sphinxupquote{func(self)}} will be called. \end{fulllineitems} \index{add\_gridspec() (matplotlib.figure.Figure method)@\spxentry{add\_gridspec()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_gridspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_gridspec}}}{\emph{self}, \emph{nrows}, \emph{ncols}, \emph{**kwargs}}{} Return a {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} that has this figure as a parent. This allows complex layout of axes in the figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows}}] \leavevmode{[}int{]} Number of rows in grid. \item[{\sphinxstylestrong{ncols}}] \leavevmode{[}int{]} Number or columns in grid. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gridspec}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments are passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} Adding a subplot that spans two rows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} spans two rows:} \PYG{n}{ax3} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs}\PYG{p}{[}\PYG{p}{:}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{add\_subplot() (matplotlib.figure.Figure method)@\spxentry{add\_subplot()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_subplot}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Add an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to the figure as part of a subplot arrangement. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{nrows}\PYG{p}{,} \PYG{n}{ncols}\PYG{p}{,} \PYG{n}{index}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{pos}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*args}}] \leavevmode Either a 3-digit integer or three separate integers describing the position of the subplot. If the three integers are \sphinxstyleemphasis{nrows}, \sphinxstyleemphasis{ncols}, and \sphinxstyleemphasis{index} in order, the subplot will take the \sphinxstyleemphasis{index} position on a grid with \sphinxstyleemphasis{nrows} rows and \sphinxstyleemphasis{ncols} columns. \sphinxstyleemphasis{index} starts at 1 in the upper left corner and increases to the right. \sphinxstyleemphasis{pos} is a three digit integer, where the first digit is the number of rows, the second the number of columns, and the third the index of the subplot. i.e. fig.add\_subplot(235) is the same as fig.add\_subplot(2, 3, 5). Note that all integers must be less than 10 for this form to work. If no positional arguments are passed, defaults to (1, 1, 1). In rare circumstances, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot}}}}} may be called with a single argument, a subplot axes instance already created in the present figure but not in the figure's list of axes. \item[{\sphinxstylestrong{projection}}] \leavevmode{[}\{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str\}, optional{]} The projection type of the subplot ({\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}). \sphinxstyleemphasis{str} is the name of a custom projection, see {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections}}}}}. The default None results in a 'rectilinear' projection. \item[{\sphinxstylestrong{polar}}] \leavevmode{[}boolean, optional{]} If True, equivalent to projection='polar'. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} Share the x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} with sharex and/or sharey. The axis will have the same limits, ticks, and scale as the axis of the shared axes. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} A label for the returned axes. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.SubplotBase}}}}}, or another subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The axes of the subplot. The returned axes base class depends on the projection used. It is {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} if rectilinear projection are used and {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes}}}}} if polar projection are used. The returned axes is then a subplot subclass of the base class. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode This method also takes the keyword arguments for the returned axes base class. The keyword arguments for the rectilinear base class {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} can be found in the following table but there might also be other keyword arguments if another projection is used. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} If the figure already has a subplot with key (\sphinxstyleemphasis{args}, \sphinxstyleemphasis{kwargs}) then it will simply make that subplot current and return it. This behavior is deprecated. Meanwhile, if you do not want this behavior (i.e., you want to force the creation of a new subplot), you must use a unique set of args and kwargs. The axes \sphinxstyleemphasis{label} attribute has been exposed for this purpose: if you want two subplots that are otherwise identical to be added to the figure, make sure you give them unique labels. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{221}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} equivalent but more general} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a subplot with no frame} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{222}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a polar subplot} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a red subplot that share the x\PYGZhy{}axis with ax1} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{l+m+mi}{224}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}delete x2 from the figure} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{delaxes}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}add x2 to the figure again} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{align\_labels() (matplotlib.figure.Figure method)@\spxentry{align\_labels()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_labels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{align\_labels}}}{\emph{self}, \emph{axs=None}}{} Align the xlabels and ylabels of subplots with the same subplots row or column (respectively) if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axs}}] \leavevmode{[}list of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} Optional list (or ndarray) of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to align the labels. Default is to align all axes on the figure. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_xlabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_xlabels}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_ylabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_ylabels}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{align\_xlabels() (matplotlib.figure.Figure method)@\spxentry{align\_xlabels()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_xlabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{align\_xlabels}}}{\emph{self}, \emph{axs=None}}{} Align the ylabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. If a label is on the bottom, it is aligned with labels on axes that also have their label on the bottom and that have the same bottom-most subplot row. If the label is on the top, it is aligned with labels on axes with the same top-most row. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axs}}] \leavevmode{[}list of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} Optional list of (or ndarray) {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to align the xlabels. Default is to align all axes on the figure. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_ylabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_ylabels}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_labels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_labels}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} This assumes that \sphinxcode{\sphinxupquote{axs}} are from the same {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}, so that their {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}} positions correspond to figure positions. \subsubsection*{Examples} Example with rotated xtick labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{k}{for} \PYG{n}{tick} \PYG{o+ow}{in} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{tick}\PYG{o}{.}\PYG{n}{set\PYGZus{}rotation}\PYG{p}{(}\PYG{l+m+mi}{55}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{XLabel 0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{XLabel 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{align\PYGZus{}xlabels}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{align\_ylabels() (matplotlib.figure.Figure method)@\spxentry{align\_ylabels()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_ylabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{align\_ylabels}}}{\emph{self}, \emph{axs=None}}{} Align the ylabels of subplots in the same subplot column if label alignment is being done automatically (i.e. the label position is not manually set). Alignment persists for draw events after this is called. If a label is on the left, it is aligned with labels on axes that also have their label on the left and that have the same left-most subplot column. If the label is on the right, it is aligned with labels on axes with the same right-most column. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axs}}] \leavevmode{[}list of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} Optional list (or ndarray) of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to align the ylabels. Default is to align all axes on the figure. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_xlabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_xlabels}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.align_labels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.align\_labels}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} This assumes that \sphinxcode{\sphinxupquote{axs}} are from the same {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}, so that their {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}} positions correspond to figure positions. \subsubsection*{Examples} Example with large yticks labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1000}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YLabel 0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{axs}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{set\PYGZus{}ylabel}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{YLabel 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{align\PYGZus{}ylabels}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{autofmt\_xdate() (matplotlib.figure.Figure method)@\spxentry{autofmt\_xdate()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.autofmt_xdate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autofmt\_xdate}}}{\emph{self}, \emph{bottom=0.2}, \emph{rotation=30}, \emph{ha='right'}, \emph{which=None}}{} Date ticklabels often overlap, so it is useful to rotate them and right align them. Also, a common use case is a number of subplots with shared xaxes where the x-axis is date data. The ticklabels are often long, and it helps to rotate them on the bottom subplot and turn them off on other subplots, as well as turn off xlabels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}scalar{]} The bottom of the subplots for {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots\_adjust()}}}}}. \item[{\sphinxstylestrong{rotation}}] \leavevmode{[}angle in degrees{]} The rotation of the xtick labels. \item[{\sphinxstylestrong{ha}}] \leavevmode{[}string{]} The horizontal alignment of the xticklabels. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{None, 'major', 'minor', 'both'\}{]} Selects which ticklabels to rotate. Default is None which works the same as major. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{axes (matplotlib.figure.Figure attribute)@\spxentry{axes}\spxextra{matplotlib.figure.Figure attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} List of axes in the Figure. You can access the axes in the Figure through this list. Do not modify the list itself. Instead, use {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes}}}}}, \sphinxcode{\sphinxupquote{subplot}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.delaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delaxes}}}}} to add or remove an axes. \end{fulllineitems} \index{clear() (matplotlib.figure.Figure method)@\spxentry{clear()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}, \emph{keep\_observers=False}}{} Clear the figure -- synonym for {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.clf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clf()}}}}}. \end{fulllineitems} \index{clf() (matplotlib.figure.Figure method)@\spxentry{clf()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.clf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clf}}}{\emph{self}, \emph{keep\_observers=False}}{} Clear the figure. Set \sphinxstyleemphasis{keep\_observers} to True if, for example, a gui widget is tracking the axes in the figure. \end{fulllineitems} \index{colorbar() (matplotlib.figure.Figure method)@\spxentry{colorbar()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{colorbar}}}{\emph{self}, \emph{mappable}, \emph{cax=None}, \emph{ax=None}, \emph{use\_gridspec=True}, \emph{**kw}}{} Create a colorbar for a ScalarMappable instance, \sphinxstyleemphasis{mappable}. Documentation for the pyplot thin wrapper: Add a colorbar to a plot. Function signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} interface; all but the first are also method signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{colorbar}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{cax}\PYG{o}{=}\PYG{n}{cax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mappable}}] \leavevmode The {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} (i.e., \sphinxcode{\sphinxupquote{Image}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}, etc.) described by this colorbar. This argument is mandatory for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.colorbar}}}}} method but optional for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.colorbar}}}}} function, which sets the default to the current image. Note that one can create a \sphinxcode{\sphinxupquote{ScalarMappable}} "on-the-fly" to generate colorbars not attached to a previously drawn artist, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{ScalarMappable}\PYG{p}{(}\PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{cax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object, optional{]} Axes into which the colorbar will be drawn. \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, list of Axes, optional{]} Parent axes from which space for a new colorbar axes will be stolen. If a list of axes is given they will all be resized to make room for the colorbar axes. \item[{\sphinxstylestrong{use\_gridspec}}] \leavevmode{[}bool, optional{]} If \sphinxstyleemphasis{cax} is \sphinxcode{\sphinxupquote{None}}, a new \sphinxstyleemphasis{cax} is created as an instance of Axes. If \sphinxstyleemphasis{ax} is an instance of Subplot and \sphinxstyleemphasis{use\_gridspec} is \sphinxcode{\sphinxupquote{True}}, \sphinxstyleemphasis{cax} is created as an instance of Subplot using the {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}} module. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{colorbar}}] \leavevmode{[}{\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}{]} See also its base class, {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}. Use {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label}}}}} to label the colorbar. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Additional keyword arguments are of two kinds: \begin{quote} axes properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to multiply the size of the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \sphinxstyleemphasis{anchor} & (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; the anchor point of the colorbar axes \\ \hline \sphinxstyleemphasis{panchor} & (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; the anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} colorbar properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{extend} & {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} If not 'neither', make pointed end(s) for out-of- range values. These are set for a given colormap using the colormap set\_under and set\_over methods. \\ \hline \sphinxstyleemphasis{extendfrac} & {[} \sphinxstyleemphasis{None} \textbar{} 'auto' \textbar{} length \textbar{} lengths {]} If set to \sphinxstyleemphasis{None}, both the minimum and maximum triangular colorbar extensions with have a length of 5\% of the interior colorbar length (this is the default setting). If set to 'auto', makes the triangular colorbar extensions the same lengths as the interior boxes (when \sphinxstyleemphasis{spacing} is set to 'uniform') or the same lengths as the respective adjacent interior boxes (when \sphinxstyleemphasis{spacing} is set to 'proportional'). If a scalar, indicates the length of both the minimum and maximum triangular colorbar extensions as a fraction of the interior colorbar length. A two-element sequence of fractions may also be given, indicating the lengths of the minimum and maximum colorbar extensions respectively as a fraction of the interior colorbar length. \\ \hline \sphinxstyleemphasis{extendrect} & bool If \sphinxstyleemphasis{False} the minimum and maximum colorbar extensions will be triangular (the default). If \sphinxstyleemphasis{True} the extensions will be rectangular. \\ \hline \sphinxstyleemphasis{spacing} & {[} 'uniform' \textbar{} 'proportional' {]} Uniform spacing gives each discrete color the same space; proportional makes the space proportional to the data interval. \\ \hline \sphinxstyleemphasis{ticks} & {[} None \textbar{} list of ticks \textbar{} Locator object {]} If None, ticks are determined automatically from the input. \\ \hline \sphinxstyleemphasis{format} & {[} None \textbar{} format string \textbar{} Formatter object {]} If None, the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} is used. If a format string is given, e.g., '\%.3f', that is used. An alternative {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} object may be given instead. \\ \hline \sphinxstyleemphasis{drawedges} & bool Whether to draw lines at color boundaries. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The following will probably be useful only in the context of indexed colors (that is, when the mappable has norm=NoNorm()), or other unusual circumstances. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{boundaries} & None or a sequence \\ \hline \sphinxstyleemphasis{values} & None or a sequence which must be of length 1 less than the sequence of \sphinxstyleemphasis{boundaries}. For each region delimited by adjacent entries in \sphinxstyleemphasis{boundaries}, the color mapped to the corresponding value in values will be used. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \end{quote} If \sphinxstyleemphasis{mappable} is a \sphinxcode{\sphinxupquote{ContourSet}}, its \sphinxstyleemphasis{extend} kwarg is included automatically. The \sphinxstyleemphasis{shrink} kwarg provides a simple way to scale the colorbar with respect to the axes. Note that if \sphinxstyleemphasis{cax} is specified, it determines the size of the colorbar and \sphinxstyleemphasis{shrink} and \sphinxstyleemphasis{aspect} kwargs are ignored. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In this case, do not use any of the axes properties kwargs. It is known that some vector graphics viewers (svg and pdf) renders white gaps between segments of the colorbar. This is due to bugs in the viewers, not Matplotlib. As a workaround, the colorbar can be rendered with overlapping segments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cbar} \PYG{o}{=} \PYG{n}{colorbar}\PYG{p}{(}\PYG{p}{)} \PYG{n}{cbar}\PYG{o}{.}\PYG{n}{solids}\PYG{o}{.}\PYG{n}{set\PYGZus{}edgecolor}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{face}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} However this has negative consequences in other circumstances, e.g. with semi-transparent images (alpha \textless{} 1) and colorbar extensions; therefore, this workaround is not used by default (see issue \#1188). \end{fulllineitems} \index{contains() (matplotlib.figure.Figure method)@\spxentry{contains()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred on the figure. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{bool, \{\}}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{delaxes() (matplotlib.figure.Figure method)@\spxentry{delaxes()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.delaxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{delaxes}}}{\emph{self}, \emph{ax}}{} Remove the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} \sphinxstyleemphasis{ax} from the figure and update the current axes. \end{fulllineitems} \index{dpi (matplotlib.figure.Figure attribute)@\spxentry{dpi}\spxextra{matplotlib.figure.Figure attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.dpi}}\pysigline{\sphinxbfcode{\sphinxupquote{dpi}}} The resolution in dots per inch. \end{fulllineitems} \index{draw() (matplotlib.figure.Figure method)@\spxentry{draw()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Render the figure using {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} instance \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{draw\_artist() (matplotlib.figure.Figure method)@\spxentry{draw\_artist()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.draw_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_artist}}}{\emph{self}, \emph{a}}{} Draw {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} instance \sphinxstyleemphasis{a} only. This is available only after the figure is drawn. \end{fulllineitems} \index{execute\_constrained\_layout() (matplotlib.figure.Figure method)@\spxentry{execute\_constrained\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.execute_constrained_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{execute\_constrained\_layout}}}{\emph{self}, \emph{renderer=None}}{} Use \sphinxcode{\sphinxupquote{layoutbox}} to determine pos positions within axes. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_constrained_layout_pads}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_constrained\_layout\_pads}}}}}. \end{fulllineitems} \index{figimage() (matplotlib.figure.Figure method)@\spxentry{figimage()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.figimage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{figimage}}}{\emph{self}, \emph{X}, \emph{xo=0}, \emph{yo=0}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{origin=None}, \emph{resize=False}, \emph{**kwargs}}{} Add a non-resampled image to the figure. The image is attached to the lower or upper left corner depending on \sphinxstyleemphasis{origin}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode The image data. This is an array of one of the following shapes: \begin{itemize} \item {} MxN: luminance (grayscale) values \item {} MxNx3: RGB values \item {} MxNx4: RGBA values \end{itemize} \item[{\sphinxstylestrong{xo, yo}}] \leavevmode{[}int{]} The \sphinxstyleemphasis{x}/\sphinxstyleemphasis{y} image offset in pixels. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}None or float{]} The alpha blending value. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}}{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance to map the luminance to the interval {[}0, 1{]}. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}}{]} The colormap to use. Default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar{]} If \sphinxstyleemphasis{norm} is not given, these values set the data limits for the colormap. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}{]} Indicates where the {[}0, 0{]} index of the array is in the upper left or lower left corner of the axes. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \item[{\sphinxstylestrong{resize}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, resize the figure to match the given image size. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/image_api:matplotlib.image.FigureImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.FigureImage}}}}}}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} kwargs passed on to {\hyperref[\detokenize{api/image_api:matplotlib.image.FigureImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureImage}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} figimage complements the axes image ({\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}) which will be resampled to fit the current axes. If you want a resampled image to fill the entire figure, you can define an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} with extent {[}0,0,1,1{]}. Examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{f} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{nx} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{f}\PYG{o}{.}\PYG{n}{get\PYGZus{}figwidth}\PYG{p}{(}\PYG{p}{)} \PYG{o}{*} \PYG{n}{f}\PYG{o}{.}\PYG{n}{dpi}\PYG{p}{)} \PYG{n}{ny} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{f}\PYG{o}{.}\PYG{n}{get\PYGZus{}figheight}\PYG{p}{(}\PYG{p}{)} \PYG{o}{*} \PYG{n}{f}\PYG{o}{.}\PYG{n}{dpi}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{random}\PYG{p}{(}\PYG{p}{(}\PYG{n}{ny}\PYG{p}{,} \PYG{n}{nx}\PYG{p}{)}\PYG{p}{)} \PYG{n}{f}\PYG{o}{.}\PYG{n}{figimage}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{frameon (matplotlib.figure.Figure attribute)@\spxentry{frameon}\spxextra{matplotlib.figure.Figure attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.frameon}}\pysigline{\sphinxbfcode{\sphinxupquote{frameon}}} Return the figure's background patch visibility, i.e. whether the figure background will be drawn. Equivalent to \sphinxcode{\sphinxupquote{Figure.patch.get\_visible()}}. \end{fulllineitems} \index{gca() (matplotlib.figure.Figure method)@\spxentry{gca()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.gca}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{gca}}}{\emph{self}, \emph{**kwargs}}{} Get the current axes, creating one if necessary. The following kwargs are supported for ensuring the returned axes adheres to the given projection etc., and for axes creation if the active axes does not exist: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \index{get\_axes() (matplotlib.figure.Figure method)@\spxentry{get\_axes()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axes}}}{\emph{self}}{} Return a list of axes in the Figure. You can access and modify the axes in the Figure through this list. Do not modify the list itself. Instead, use {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes}}}}}, \sphinxcode{\sphinxupquote{subplot}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.delaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delaxes}}}}} to add or remove an axes. Note: This is equivalent to the property {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes}}}}}. \end{fulllineitems} \index{get\_children() (matplotlib.figure.Figure method)@\spxentry{get\_children()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Get a list of artists contained in the figure. \end{fulllineitems} \index{get\_constrained\_layout() (matplotlib.figure.Figure method)@\spxentry{get\_constrained\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_constrained_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_constrained\_layout}}}{\emph{self}}{} Return a boolean: True means constrained layout is being used. See {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}. \end{fulllineitems} \index{get\_constrained\_layout\_pads() (matplotlib.figure.Figure method)@\spxentry{get\_constrained\_layout\_pads()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_constrained_layout_pads}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_constrained\_layout\_pads}}}{\emph{self}, \emph{relative=False}}{} Get padding for \sphinxcode{\sphinxupquote{constrained\_layout}}. Returns a list of \sphinxcode{\sphinxupquote{w\_pad, h\_pad}} in inches and \sphinxcode{\sphinxupquote{wspace}} and \sphinxcode{\sphinxupquote{hspace}} as fractions of the subplot. See {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{relative}}] \leavevmode{[}boolean{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, then convert from inches to figure relative. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_default\_bbox\_extra\_artists() (matplotlib.figure.Figure method)@\spxentry{get\_default\_bbox\_extra\_artists()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_default_bbox_extra_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_bbox\_extra\_artists}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_dpi() (matplotlib.figure.Figure method)@\spxentry{get\_dpi()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_dpi}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dpi}}}{\emph{self}}{} Return the resolution in dots per inch as a float. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.figure.Figure method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{} Get the edge color of the Figure rectangle. \end{fulllineitems} \index{get\_facecolor() (matplotlib.figure.Figure method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{} Get the face color of the Figure rectangle. \end{fulllineitems} \index{get\_figheight() (matplotlib.figure.Figure method)@\spxentry{get\_figheight()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_figheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figheight}}}{\emph{self}}{} Return the figure height as a float. \end{fulllineitems} \index{get\_figwidth() (matplotlib.figure.Figure method)@\spxentry{get\_figwidth()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_figwidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figwidth}}}{\emph{self}}{} Return the figure width as a float. \end{fulllineitems} \index{get\_frameon() (matplotlib.figure.Figure method)@\spxentry{get\_frameon()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_frameon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_frameon}}}{\emph{self}}{} Return the figure's background patch visibility, i.e. whether the figure background will be drawn. Equivalent to \sphinxcode{\sphinxupquote{Figure.patch.get\_visible()}}. \end{fulllineitems} \index{get\_size\_inches() (matplotlib.figure.Figure method)@\spxentry{get\_size\_inches()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_size_inches}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size\_inches}}}{\emph{self}}{} Returns the current size of the figure in inches. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{size}}] \leavevmode{[}ndarray{]} The size (width, height) of the figure in inches. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{matplotlib.Figure.set\_size\_inches}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_tight\_layout() (matplotlib.figure.Figure method)@\spxentry{get\_tight\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_tight_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tight\_layout}}}{\emph{self}}{} Return whether {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} is called when drawing. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.figure.Figure method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}, \emph{bbox\_extra\_artists=None}}{} Return a (tight) bounding box of the figure in inches. Artists that have \sphinxcode{\sphinxupquote{artist.set\_in\_layout(False)}} are not included in the bbox. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \item[{\sphinxstylestrong{bbox\_extra\_artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} or \sphinxcode{\sphinxupquote{None}}{]} List of artists to include in the tight bounding box. If \sphinxcode{\sphinxupquote{None}} (default), then all artist children of each axes are included in the tight bounding box. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}{]} containing the bounding box (in figure inches). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_window\_extent() (matplotlib.figure.Figure method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Return the figure bounding box in display space. Arguments are ignored. \end{fulllineitems} \index{ginput() (matplotlib.figure.Figure method)@\spxentry{ginput()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.ginput}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ginput}}}{\emph{self}, \emph{n=1}, \emph{timeout=30}, \emph{show\_clicks=True}, \emph{mouse\_add=1}, \emph{mouse\_pop=3}, \emph{mouse\_stop=2}}{} Blocking call to interact with a figure. Wait until the user clicks \sphinxstyleemphasis{n} times on the figure, and return the coordinates of each click in a list. There are three possible interactions: \begin{itemize} \item {} Add a point. \item {} Remove the most recently added point. \item {} Stop the interaction and return the points added so far. \end{itemize} The actions are assigned to mouse buttons via the arguments \sphinxstyleemphasis{mouse\_add}, \sphinxstyleemphasis{mouse\_pop} and \sphinxstyleemphasis{mouse\_stop}. Mouse buttons are defined by the numbers: \begin{itemize} \item {} 1: left mouse button \item {} 2: middle mouse button \item {} 3: right mouse button \item {} None: no mouse button \end{itemize} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{n}}] \leavevmode{[}int, optional, default: 1{]} Number of mouse clicks to accumulate. If negative, accumulate clicks until the input is terminated manually. \item[{\sphinxstylestrong{timeout}}] \leavevmode{[}scalar, optional, default: 30{]} Number of seconds to wait before timing out. If zero or negative will never timeout. \item[{\sphinxstylestrong{show\_clicks}}] \leavevmode{[}bool, optional, default: False{]} If True, show a red cross at the location of each click. \item[{\sphinxstylestrong{mouse\_add}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 1 (left click){]} Mouse button used to add points. \item[{\sphinxstylestrong{mouse\_pop}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 3 (right click){]} Mouse button used to remove the most recently added point. \item[{\sphinxstylestrong{mouse\_stop}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 2 (middle click){]} Mouse button used to stop input. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}list of tuples{]} A list of the clicked (x, y) coordinates. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The keyboard can also be used to select points in case your mouse does not have one or more of the buttons. The delete and backspace keys act like right clicking (i.e., remove last point), the enter key terminates input and any other key (not already used by the window manager) selects a point. \end{fulllineitems} \index{init\_layoutbox() (matplotlib.figure.Figure method)@\spxentry{init\_layoutbox()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.init_layoutbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{init\_layoutbox}}}{\emph{self}}{} Initialize the layoutbox for use in constrained\_layout. \end{fulllineitems} \index{legend() (matplotlib.figure.Figure method)@\spxentry{legend()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{legend}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Place a legend on the figure. To make a legend from existing artists on every axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} To make a legend for a list of lines and labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(} \PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} These can also be specified by keyword: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(} \PYG{n}{handles}\PYG{o}{=}\PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{handles}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of Artists (lines, patches) to be added to the legend. Use this together with \sphinxstyleemphasis{labels}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. The length of handles and labels should be the same in this case. If they are not, they are truncated to the smaller length. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence of strings, optional{]} A list of labels to show next to the artists. Use this together with \sphinxstyleemphasis{handles}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} instance}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str or pair of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.loc"{]}}}} ('best' for axes, 'upper right' for figures){]} The location of the legend. The strings \sphinxcode{\sphinxupquote{'upper left', 'upper right', 'lower left', 'lower right'}} place the legend at the corresponding corner of the axes/figure. The strings \sphinxcode{\sphinxupquote{'upper center', 'lower center', 'center left', 'center right'}} place the legend at the center of the corresponding edge of the axes/figure. The string \sphinxcode{\sphinxupquote{'center'}} places the legend at the center of the axes/figure. The string \sphinxcode{\sphinxupquote{'best'}} places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case \sphinxstyleemphasis{bbox\_to\_anchor} will be ignored). For back-compatibility, \sphinxcode{\sphinxupquote{'center right'}} (but no other location) can also be spelled \sphinxcode{\sphinxupquote{'right'}}, and each "string" locations can also be given as a numeric value: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Location String &\sphinxstyletheadfamily Location Code \\ \hline 'best' & 0 \\ \hline 'upper right' & 1 \\ \hline 'upper left' & 2 \\ \hline 'lower left' & 3 \\ \hline 'lower right' & 4 \\ \hline 'right' & 5 \\ \hline 'center left' & 6 \\ \hline 'center right' & 7 \\ \hline 'lower center' & 8 \\ \hline 'upper center' & 9 \\ \hline 'center' & 10 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}, 2-tuple, or 4-tuple of floats{]} Box that is used to position the legend in conjunction with \sphinxstyleemphasis{loc}. Defaults to \sphinxcode{\sphinxupquote{axes.bbox}} (if called as a method to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}) or \sphinxcode{\sphinxupquote{figure.bbox}} (if {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}). This argument allows arbitrary placement of the legend. Bbox coordinates are interpreted in the coordinate system given by \sphinxcode{\sphinxupquote{bbox\_transform}}, with the default transform Axes or Figure coordinates, depending on which \sphinxcode{\sphinxupquote{legend}} is called. If a 4-tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} is given, then it specifies the bbox \sphinxcode{\sphinxupquote{(x, y, width, height)}} that the legend is placed in. To put the legend in the best location in the bottom right quadrant of the axes (or figure): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{best}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} A 2-tuple \sphinxcode{\sphinxupquote{(x, y)}} places the corner of the legend specified by \sphinxstyleemphasis{loc} at x, y. For example, to put the legend's upper right-hand corner in the center of the axes (or figure) the following keywords can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{ncol}}] \leavevmode{[}integer{]} The number of columns that the legend has. Default is 1. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}None or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} or dict{]} The font properties of the legend. If None (default), the current {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} will be used. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int or float or \{'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only used if \sphinxcode{\sphinxupquote{prop}} is not specified. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} (line). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.numpoints"{]}}}}. \item[{\sphinxstylestrong{scatterpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} (scatter plot). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.scatterpoints"{]}}}}. \item[{\sphinxstylestrong{scatteryoffsets}}] \leavevmode{[}iterable of floats{]} The vertical offset (relative to the font size) for the markers created for a scatter plot legend entry. 0.0 is at the base the legend text, and 1.0 is at the top. To draw all markers at the same height, set to \sphinxcode{\sphinxupquote{{[}0.5{]}}}. Default is \sphinxcode{\sphinxupquote{{[}0.375, 0.5, 0.3125{]}}}. \item[{\sphinxstylestrong{markerscale}}] \leavevmode{[}None or int or float{]} The relative size of legend markers compared with the originally drawn ones. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.markerscale"{]}}}}. \item[{\sphinxstylestrong{markerfirst}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, legend marker is placed to the left of the legend label. If \sphinxstyleemphasis{False}, legend marker is placed to the right of the legend label. Default is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}None or bool{]} Control whether the legend should be drawn on a patch (frame). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.frameon"{]}}}}. \item[{\sphinxstylestrong{fancybox}}] \leavevmode{[}None or bool{]} Control whether round edges should be enabled around the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} which makes up the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fancybox"{]}}}}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}None or bool{]} Control whether to draw a shadow behind the legend. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.shadow"{]}}}}. \item[{\sphinxstylestrong{framealpha}}] \leavevmode{[}None or float{]} Control the alpha transparency of the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.framealpha"{]}}}}. If shadow is activated and \sphinxstyleemphasis{framealpha} is \sphinxcode{\sphinxupquote{None}}, the default value is ignored. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.facecolor"{]}}}}. If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background patch edge color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.edgecolor"{]}}}} If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.edgecolor"{]}}}}. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"expand", None\}{]} If \sphinxcode{\sphinxupquote{mode}} is set to \sphinxcode{\sphinxupquote{"expand"}} the legend will be horizontally expanded to fill the axes area (or \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} if defines the legend's size). \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transform for the bounding box (\sphinxcode{\sphinxupquote{bbox\_to\_anchor}}). For a value of \sphinxcode{\sphinxupquote{None}} (default) the Axes' \sphinxcode{\sphinxupquote{transAxes}} transform will be used. \item[{\sphinxstylestrong{title}}] \leavevmode{[}str or None{]} The legend's title. Default is no title (\sphinxcode{\sphinxupquote{None}}). \item[{\sphinxstylestrong{title\_fontsize: str or None}}] \leavevmode The fontsize of the legend's title. Default is the default fontsize. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float or None{]} The fractional whitespace inside the legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderpad"{]}}}}. \item[{\sphinxstylestrong{labelspacing}}] \leavevmode{[}float or None{]} The vertical space between the legend entries. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.labelspacing"{]}}}}. \item[{\sphinxstylestrong{handlelength}}] \leavevmode{[}float or None{]} The length of the legend handles. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handlelength"{]}}}}. \item[{\sphinxstylestrong{handletextpad}}] \leavevmode{[}float or None{]} The pad between the legend handle and text. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handletextpad"{]}}}}. \item[{\sphinxstylestrong{borderaxespad}}] \leavevmode{[}float or None{]} The pad between the axes and legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderaxespad"{]}}}}. \item[{\sphinxstylestrong{columnspacing}}] \leavevmode{[}float or None{]} The spacing between columns. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.columnspacing"{]}}}}. \item[{\sphinxstylestrong{handler\_map}}] \leavevmode{[}dict or None{]} The custom dictionary mapping instances or types to a legend handler. This \sphinxcode{\sphinxupquote{handler\_map}} updates the default handler map found at {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend.get\_legend\_handler\_map()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Not all kinds of artist are supported by the legend command. See {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for details. \end{fulllineitems} \index{savefig() (matplotlib.figure.Figure method)@\spxentry{savefig()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.savefig}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{savefig}}}{\emph{self}, \emph{fname}, \emph{*}, \emph{transparent=None}, \emph{**kwargs}}{} Save the current figure. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fname}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{portrait}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{papertype}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{transparent}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}inches}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{pad\PYGZus{}inches}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{metadata}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \end{sphinxVerbatim} The output formats available depend on the backend being used. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or PathLike or file-like object{]} A path, or a Python file-like object, or possibly some backend-dependent object such as {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.PdfPages}}}}}. If \sphinxstyleemphasis{format} is not set, then the output format is inferred from the extension of \sphinxstyleemphasis{fname}, if any, and from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.format"{]}}}} otherwise. If \sphinxstyleemphasis{format} is set, it determines the output format. Hence, if \sphinxstyleemphasis{fname} is not a path or has no extension, remember to specify \sphinxstyleemphasis{format} to ensure that the correct backend is used. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} scalar \textgreater{} 0 \textbar{} 'figure' {]}{]} The resolution in dots per inch. If \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.dpi"{]}}}}. If 'figure', uses the figure's dpi value. \item[{\sphinxstylestrong{quality}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} 1 \textless{}= scalar \textless{}= 100 {]}{]} The image quality, on a scale from 1 (worst) to 95 (best). Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. If \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.jpeg\_quality"{]}}}} (95 by default). Values above 95 should be avoided; 100 completely disables the JPEG quantization stage. \item[{\sphinxstylestrong{optimize}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, indicates that the JPEG encoder should make an extra pass over the image in order to select optimal encoder settings. Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. Is \sphinxstyleemphasis{False} by default. \item[{\sphinxstylestrong{progressive}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, indicates that this image should be stored as a progressive JPEG file. Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. Is \sphinxstyleemphasis{False} by default. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}color spec or None, optional{]} The facecolor of the figure; if \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}color spec or None, optional{]} The edgecolor of the figure; if \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.edgecolor"{]}}}} \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'landscape', 'portrait'\}{]} Currently only supported by the postscript backend. \item[{\sphinxstylestrong{papertype}}] \leavevmode{[}str{]} One of 'letter', 'legal', 'executive', 'ledger', 'a0' through 'a10', 'b0' through 'b10'. Only supported for postscript output. \item[{\sphinxstylestrong{format}}] \leavevmode{[}str{]} The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this is unset is documented under \sphinxstyleemphasis{fname}. \item[{\sphinxstylestrong{transparent}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, the axes patches will all be transparent; the figure patch will also be transparent unless facecolor and/or edgecolor are specified via kwargs. This is useful, for example, for displaying a plot on top of a colored background on a web page. The transparency of these patches will be restored to their original values upon exit of this function. \item[{\sphinxstylestrong{bbox\_inches}}] \leavevmode{[}str or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} Bbox in inches. Only the given portion of the figure is saved. If 'tight', try to figure out the tight bbox of the figure. If None, use savefig.bbox \item[{\sphinxstylestrong{pad\_inches}}] \leavevmode{[}scalar, optional{]} Amount of padding around the figure when bbox\_inches is 'tight'. If None, use savefig.pad\_inches \item[{\sphinxstylestrong{bbox\_extra\_artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of extra artists that will be considered when the tight bbox is calculated. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}dict, optional{]} Key/value pairs to store in the image metadata. The supported keys and defaults depend on the image format and backend: \begin{itemize} \item {} 'png' with Agg backend: See the parameter \sphinxcode{\sphinxupquote{metadata}} of {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_png}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{print\_png}}}}}. \item {} 'pdf' with pdf backend: See the parameter \sphinxcode{\sphinxupquote{metadata}} of {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages}}}}}. \item {} 'eps' and 'ps' with PS backend: Only 'Creator' is supported. \end{itemize} \item[{\sphinxstylestrong{pil\_kwargs}}] \leavevmode{[}dict, optional{]} Additional keyword arguments that are passed to \sphinxcode{\sphinxupquote{PIL.Image.save}} when saving the figure. Only applicable for formats that are saved using Pillow, i.e. JPEG, TIFF, and (if the keyword is set to a non-None value) PNG. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{sca() (matplotlib.figure.Figure method)@\spxentry{sca()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.sca}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{sca}}}{\emph{self}, \emph{a}}{} Set the current axes to be a and return a. \end{fulllineitems} \index{set\_canvas() (matplotlib.figure.Figure method)@\spxentry{set\_canvas()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_canvas}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_canvas}}}{\emph{self}, \emph{canvas}}{} Set the canvas that contains the figure \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{canvas}}] \leavevmode{[}FigureCanvas{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_constrained\_layout() (matplotlib.figure.Figure method)@\spxentry{set\_constrained\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_constrained_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_constrained\_layout}}}{\emph{self}, \emph{constrained}}{} Set whether \sphinxcode{\sphinxupquote{constrained\_layout}} is used upon drawing. If None, the rcParams{[}'figure.constrained\_layout.use'{]} value will be used. When providing a dict containing the keys \sphinxcode{\sphinxupquote{w\_pad}}, \sphinxcode{\sphinxupquote{h\_pad}} the default \sphinxcode{\sphinxupquote{constrained\_layout}} paddings will be overridden. These pads are in inches and default to 3.0/72.0. \sphinxcode{\sphinxupquote{w\_pad}} is the width padding and \sphinxcode{\sphinxupquote{h\_pad}} is the height padding. See {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{constrained}}] \leavevmode{[}bool or dict or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_constrained\_layout\_pads() (matplotlib.figure.Figure method)@\spxentry{set\_constrained\_layout\_pads()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_constrained_layout_pads}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_constrained\_layout\_pads}}}{\emph{self}, \emph{**kwargs}}{} Set padding for \sphinxcode{\sphinxupquote{constrained\_layout}}. Note the kwargs can be passed as a dictionary \sphinxcode{\sphinxupquote{fig.set\_constrained\_layout(**paddict)}}. See {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Constrained Layout Guide}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{w\_pad}}] \leavevmode{[}scalar{]} Width padding in inches. This is the pad around axes and is meant to make sure there is enough room for fonts to look good. Defaults to 3 pts = 0.04167 inches \item[{\sphinxstylestrong{h\_pad}}] \leavevmode{[}scalar{]} Height padding in inches. Defaults to 3 pts. \item[{\sphinxstylestrong{wspace}}] \leavevmode{[}scalar{]} Width padding between subplots, expressed as a fraction of the subplot width. The total padding ends up being w\_pad + wspace. \item[{\sphinxstylestrong{hspace}}] \leavevmode{[}scalar{]} Height padding between subplots, expressed as a fraction of the subplot width. The total padding ends up being h\_pad + hspace. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dpi() (matplotlib.figure.Figure method)@\spxentry{set\_dpi()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_dpi}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dpi}}}{\emph{self}, \emph{val}}{} Set the resolution of the figure in dots-per-inch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolor() (matplotlib.figure.Figure method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{color}}{} Set the edge color of the Figure rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolor() (matplotlib.figure.Figure method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{color}}{} Set the face color of the Figure rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_figheight() (matplotlib.figure.Figure method)@\spxentry{set\_figheight()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_figheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figheight}}}{\emph{self}, \emph{val}, \emph{forward=True}}{} Set the height of the figure in inches. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \item[{\sphinxstylestrong{forward}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_figwidth() (matplotlib.figure.Figure method)@\spxentry{set\_figwidth()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_figwidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figwidth}}}{\emph{self}, \emph{val}, \emph{forward=True}}{} Set the width of the figure in inches. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \item[{\sphinxstylestrong{forward}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_frameon() (matplotlib.figure.Figure method)@\spxentry{set\_frameon()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_frameon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_frameon}}}{\emph{self}, \emph{b}}{} Set the figure's background patch visibility, i.e. whether the figure background will be drawn. Equivalent to \sphinxcode{\sphinxupquote{Figure.patch.set\_visible()}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_size\_inches() (matplotlib.figure.Figure method)@\spxentry{set\_size\_inches()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_size_inches}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_size\_inches}}}{\emph{self}, \emph{w}, \emph{h=None}, \emph{forward=True}}{} Set the figure size in inches. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}size\PYGZus{}inches}\PYG{p}{(}\PYG{n}{w}\PYG{p}{,} \PYG{n}{h}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} OR} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{set\PYGZus{}size\PYGZus{}inches}\PYG{p}{(}\PYG{p}{(}\PYG{n}{w}\PYG{p}{,} \PYG{n}{h}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} optional kwarg \sphinxstyleemphasis{forward=True} will cause the canvas size to be automatically updated; e.g., you can resize the figure window from the shell ACCEPTS: a (w, h) tuple with w, h in inches \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{matplotlib.Figure.get\_size\_inches}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_tight\_layout() (matplotlib.figure.Figure method)@\spxentry{set\_tight\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_tight_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_tight\_layout}}}{\emph{self}, \emph{tight}}{} Set whether and how {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} is called when drawing. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or dict with keys "pad", "w\_pad", "h\_pad", "rect" or None{]} If a bool, sets whether to call {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} upon drawing. If \sphinxcode{\sphinxupquote{None}}, use the \sphinxcode{\sphinxupquote{figure.autolayout}} rcparam instead. If a dict, pass it as kwargs to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}}, overriding the default paddings. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{show() (matplotlib.figure.Figure method)@\spxentry{show()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.show}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{show}}}{\emph{self}, \emph{warn=True}}{} If using a GUI backend with pyplot, display the figure window. If the figure was not created using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}, it will lack a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureManagerBase}}}}}, and will raise an AttributeError. \begin{sphinxadmonition}{warning}{Warning:} This does not manage an GUI event loop. Consequently, the figure may only be shown briefly or not shown at all if you or your environment are not managing an event loop. Proper use cases for {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.show}}}}} include running this from a GUI application or an IPython shell. If you're running a pure python shell or executing a non-GUI python script, you should use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.show}}}}} instead, which takes care of managing the event loop for you. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{warn}}] \leavevmode{[}bool{]} If \sphinxcode{\sphinxupquote{True}} and we are not running headless (i.e. on Linux with an unset DISPLAY), issue warning when called on a non-GUI backend. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{subplots() (matplotlib.figure.Figure method)@\spxentry{subplots()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subplots}}}{\emph{self}, \emph{nrows=1}, \emph{ncols=1}, \emph{sharex=False}, \emph{sharey=False}, \emph{squeeze=True}, \emph{subplot\_kw=None}, \emph{gridspec\_kw=None}}{} Add a set of subplots to this figure. This utility wrapper makes it convenient to create common layouts of subplots in a single call. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows, ncols}}] \leavevmode{[}int, optional, default: 1{]} Number of rows/columns of the subplot grid. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}bool or \{'none', 'all', 'row', 'col'\}, default: False{]} Controls sharing of properties among x (\sphinxcode{\sphinxupquote{sharex}}) or y (\sphinxcode{\sphinxupquote{sharey}}) axes: \begin{itemize} \item {} True or 'all': x- or y-axis will be shared among all subplots. \item {} False or 'none': each subplot x- or y-axis will be independent. \item {} 'row': each subplot row will share an x- or y-axis. \item {} 'col': each subplot column will share an x- or y-axis. \end{itemize} When subplots have a shared x-axis along a column, only the x tick labels of the bottom subplot are created. Similarly, when subplots have a shared y-axis along a row, only the y tick labels of the first column subplot are created. To later turn other subplots' ticklabels on, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params}}}}}. \item[{\sphinxstylestrong{squeeze}}] \leavevmode{[}bool, optional, default: True{]}\begin{itemize} \item {} If True, extra dimensions are squeezed out from the returned array of Axes: \begin{itemize} \item {} if only one subplot is constructed (nrows=ncols=1), the resulting single Axes object is returned as a scalar. \item {} for Nx1 or 1xM subplots, the returned object is a 1D numpy object array of Axes objects. \item {} for NxM, subplots with N\textgreater{}1 and M\textgreater{}1 are returned as a 2D array. \end{itemize} \item {} If False, no squeezing at all is done: the returned Axes object is always a 2D array containing Axes instances, even if it ends up being 1x1. \end{itemize} \item[{\sphinxstylestrong{subplot\_kw}}] \leavevmode{[}dict, optional{]} Dict with keywords passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot()}}}}} call used to create each subplot. \item[{\sphinxstylestrong{gridspec\_kw}}] \leavevmode{[}dict, optional{]} Dict with keywords passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} constructor used to create the grid the subplots are placed on. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object or array of Axes objects.{]} \sphinxstyleemphasis{ax} can be either a single {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object or an array of Axes objects if more than one subplot was created. The dimensions of the resulting array can be controlled with the squeeze keyword, see above. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} First create some toy data:} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{400}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Create a figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates a subplot} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Simple plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates two subplots and unpacks the output array immediately} \PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sharing Y axis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates four polar axes, and accesses them through the} \PYG{c+c1}{\PYGZsh{} returned array} \PYG{n}{axes} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{subplot\PYGZus{}kw}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{polar}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share a X axis with each column of subplots} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{col}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share a Y axis with each row of subplots} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{row}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share both X and Y axes with all subplots} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Note that this is the same as} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{subplots\_adjust() (matplotlib.figure.Figure method)@\spxentry{subplots\_adjust()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots_adjust}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subplots\_adjust}}}{\emph{self}, \emph{left=None}, \emph{bottom=None}, \emph{right=None}, \emph{top=None}, \emph{wspace=None}, \emph{hspace=None}}{} Update the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotParams}}}}} with \sphinxstyleemphasis{kwargs} (defaulting to rc when \sphinxstyleemphasis{None}) and update the subplot locations. \end{fulllineitems} \index{suptitle() (matplotlib.figure.Figure method)@\spxentry{suptitle()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.suptitle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{suptitle}}}{\emph{self}, \emph{t}, \emph{**kwargs}}{} Add a centered title to the figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}str{]} The title text. \item[{\sphinxstylestrong{x}}] \leavevmode{[}float, default 0.5{]} The x location of the text in figure coordinates. \item[{\sphinxstylestrong{y}}] \leavevmode{[}float, default 0.98{]} The y location of the text in figure coordinates. \item[{\sphinxstylestrong{horizontalalignment, ha}}] \leavevmode{[}\{'center', 'left', right'\}, default: 'center'{]} The horizontal alignment of the text relative to (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \item[{\sphinxstylestrong{verticalalignment, va}}] \leavevmode{[}\{'top', 'center', 'bottom', 'baseline'\}, default: 'top'{]} The vertical alignment of the text relative to (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \item[{\sphinxstylestrong{fontsize, size}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titlesize"{]}}}}{]} The font size of the text. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_size}}}}} for possible values. \item[{\sphinxstylestrong{fontweight, weight}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titleweight"{]}}}}{]} The font weight of the text. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_weight}}}}} for possible values. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{text}] \leavevmode The {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance of the title. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontproperties}}] \leavevmode{[}None or dict, optional{]} A dict of font properties. If \sphinxstyleemphasis{fontproperties} is given the default values for font size and weight are taken from the \sphinxcode{\sphinxupquote{FontProperties}} defaults. \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titlesize"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titleweight"{]}}}} are ignored in this case. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} properties. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is the figure title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{text() (matplotlib.figure.Figure method)@\spxentry{text()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{text}}}{\emph{self}, \emph{x}, \emph{y}, \emph{s}, \emph{fontdict=None}, \emph{withdash=\textless{}deprecated parameter\textgreater{}}, \emph{**kwargs}}{} Add text to figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The position to place the text. By default, this is in figure coordinates, floats in {[}0, 1{]}. The coordinate system can be changed using the \sphinxstyleemphasis{transform} keyword. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dictionary, optional, default: None{]} A dictionary to override the default text properties. If fontdict is None, the defaults are determined by your rc parameters. A property in \sphinxstyleemphasis{kwargs} override the same property in fontdict. \item[{\sphinxstylestrong{withdash}}] \leavevmode{[}boolean, optional, default: False{]} Creates a {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} instance instead of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} Other miscellaneous text parameters. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backgroundcolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox}}}}} & dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontfamily}}}}} or family & \{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontproperties}}}}} or font\_properties & {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} or size & \{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstretch}}}}} or stretch & \{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstyle}}}}} or style & \{'normal', 'italic', 'oblique'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontvariant}}}}} or variant & \{'normal', 'small-caps'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontweight}}}}} or weight & \{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontalalignment}}}}} or ha & \{'center', 'right', 'left'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linespacing}}}}} & float (multiple of font size) \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{multialignment}}}}} or ma & \{'left', 'right', 'center'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation}}}}} & \{angle in degrees, 'vertical', 'horizontal'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation\_mode}}}}} & \{None, 'default', 'anchor'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_usetex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{usetex}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalalignment}}}}} or va & \{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_wrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wrap}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x}}}}} & float \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.text}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.text}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{tight\_layout() (matplotlib.figure.Figure method)@\spxentry{tight\_layout()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.tight_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tight\_layout}}}{\emph{self}, \emph{renderer=None}, \emph{pad=1.08}, \emph{h\_pad=None}, \emph{w\_pad=None}, \emph{rect=None}}{} Automatically adjust subplot parameters to give specified padding. To exclude an artist on the axes from the bounding box calculation that determines the subplot parameters (i.e. legend, or annotation), then set \sphinxcode{\sphinxupquote{a.set\_in\_layout(False)}} for that artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}subclass of {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}}, optional{]} Defaults to the renderer for the figure. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} Padding between the figure edge and the edges of subplots, as a fraction of the font size. \item[{\sphinxstylestrong{h\_pad, w\_pad}}] \leavevmode{[}float, optional{]} Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to \sphinxstyleemphasis{pad}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}tuple (left, bottom, right, top), optional{]} A rectangle (left, bottom, right, top) in the normalized figure coordinate that the whole subplots area (including labels) will fit into. Default is (0, 0, 1, 1). \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.set_tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.set\_tight\_layout}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.tight\_layout}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{waitforbuttonpress() (matplotlib.figure.Figure method)@\spxentry{waitforbuttonpress()}\spxextra{matplotlib.figure.Figure method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.waitforbuttonpress}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{waitforbuttonpress}}}{\emph{self}, \emph{timeout=-1}}{} Blocking call to interact with the figure. This will return True is a key was pressed, False if a mouse button was pressed and None if \sphinxstyleemphasis{timeout} was reached without either being pressed. If \sphinxstyleemphasis{timeout} is negative, does not timeout. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.figure.Figure}}} \label{\detokenize{api/_as_gen/matplotlib.figure.Figure:examples-using-matplotlib-figure-figure}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_figimage\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_custom\_figure\_class.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_canvasagg.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_gtk3\_panzoom\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_gtk3\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_qt\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_tk\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_wx2\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_wx3\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_wx4\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_in\_wx5\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_embedding\_webagg\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_fourier\_demo\_wx\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_gtk\_spreadsheet\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_mathtext\_wx\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_mpl\_with\_glade3\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_wxcursor\_demo\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Artist tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/toolkits/mplot3d:sphx-glr-tutorials-toolkits-mplot3d-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The mplot3d Toolkit}}}} \end{itemize} \subsubsection{matplotlib.figure.SubplotParams} \label{\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib-figure-subplotparams}}\label{\detokenize{api/_as_gen/matplotlib.figure.SubplotParams::doc}}\index{SubplotParams (class in matplotlib.figure)@\spxentry{SubplotParams}\spxextra{class in matplotlib.figure}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.figure.}}\sphinxbfcode{\sphinxupquote{SubplotParams}}}{\emph{left=None}, \emph{bottom=None}, \emph{right=None}, \emph{top=None}, \emph{wspace=None}, \emph{hspace=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class to hold the parameters for a subplot. All dimensions are fractions of the figure width or height. Defaults are given by \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.subplot.{[}name{]}"{]}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left}}] \leavevmode{[}float{]} The left side of the subplots of the figure. \item[{\sphinxstylestrong{right}}] \leavevmode{[}float{]} The right side of the subplots of the figure. \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}float{]} The bottom of the subplots of the figure. \item[{\sphinxstylestrong{top}}] \leavevmode{[}float{]} The top of the subplots of the figure. \item[{\sphinxstylestrong{wspace}}] \leavevmode{[}float{]} The amount of width reserved for space between subplots, expressed as a fraction of the average axis width. \item[{\sphinxstylestrong{hspace}}] \leavevmode{[}float{]} The amount of height reserved for space between subplots, expressed as a fraction of the average axis height. \end{description} \end{description}\end{quote} \index{update() (matplotlib.figure.SubplotParams method)@\spxentry{update()}\spxextra{matplotlib.figure.SubplotParams method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{left=None}, \emph{bottom=None}, \emph{right=None}, \emph{top=None}, \emph{wspace=None}, \emph{hspace=None}}{} Update the dimensions of the passed parameters. \sphinxstyleemphasis{None} means unchanged. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.figure.SubplotParams}}} \label{\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:examples-using-matplotlib-figure-subplotparams}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_auto\_subplots\_adjust.py} \end{itemize} \subsection{Functions} \label{\detokenize{api/figure_api:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.figaspect:matplotlib.figure.figaspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figaspect}}}}} & Calculate the width and height for a figure with a specified aspect ratio. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.figure.figaspect} \label{\detokenize{api/_as_gen/matplotlib.figure.figaspect:matplotlib-figure-figaspect}}\label{\detokenize{api/_as_gen/matplotlib.figure.figaspect::doc}}\index{figaspect() (in module matplotlib.figure)@\spxentry{figaspect()}\spxextra{in module matplotlib.figure}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.figure.figaspect:matplotlib.figure.figaspect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.figure.}}\sphinxbfcode{\sphinxupquote{figaspect}}}{\emph{arg}}{} Calculate the width and height for a figure with a specified aspect ratio. While the height is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.figsize"{]}}}}, the width is adjusted to match the desired aspect ratio. Additionally, it is ensured that the width is in the range {[}4., 16.{]} and the height is in the range {[}2., 16.{]}. If necessary, the default height is adjusted to ensure this. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arg}}] \leavevmode{[}scalar or 2d array{]} If a scalar, this defines the aspect ratio (i.e. the ratio height / width). In case of an array the aspect ratio is number of rows / number of columns, so that the array could be fitted in the figure undistorted. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{width, height}] \leavevmode The figure size in inches. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If you want to create an axes within the figure, that still preserves the aspect ratio, be sure to create it with equal width and height. See examples below. Thanks to Fernando Perez for this function. \subsubsection*{Examples} Make a figure twice as tall as it is wide: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{w}\PYG{p}{,} \PYG{n}{h} \PYG{o}{=} \PYG{n}{figaspect}\PYG{p}{(}\PYG{l+m+mf}{2.}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{n}{w}\PYG{p}{,} \PYG{n}{h}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{A}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Make a figure with the proper aspect for an array: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{A} \PYG{o}{=} \PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{w}\PYG{p}{,} \PYG{n}{h} \PYG{o}{=} \PYG{n}{figaspect}\PYG{p}{(}\PYG{n}{A}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{Figure}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{n}{w}\PYG{p}{,} \PYG{n}{h}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{,} \PYG{l+m+mf}{0.8}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{A}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.font\_manager}}} \label{\detokenize{api/font_manager_api:module-matplotlib.font_manager}}\label{\detokenize{api/font_manager_api:matplotlib-font-manager}}\label{\detokenize{api/font_manager_api::doc}}\index{matplotlib.font\_manager (module)@\spxentry{matplotlib.font\_manager}\spxextra{module}} A module for finding, managing, and using fonts across platforms. This module provides a single {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontManager}}}}} instance that can be shared across backends and platforms. The \sphinxcode{\sphinxupquote{findfont()}} function returns the best TrueType (TTF) font file in the local or system font path that matches the specified {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} instance. The {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontManager}}}}} also handles Adobe Font Metrics (AFM) font files for use by the PostScript backend. The design is based on the \sphinxhref{http://www.w3.org/TR/1998/REC-CSS2-19980512/}{W3C Cascading Style Sheet, Level 1 (CSS1) font specification}. Future versions may implement the Level 2 or 2.1 specifications. \index{FontEntry (class in matplotlib.font\_manager)@\spxentry{FontEntry}\spxextra{class in matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontEntry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{FontEntry}}}{\emph{fname=''}, \emph{name=''}, \emph{style='normal'}, \emph{variant='normal'}, \emph{weight='normal'}, \emph{stretch='normal'}, \emph{size='medium'}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class for storing Font properties. It is used when populating the font lookup dictionary. \end{fulllineitems} \index{FontManager (class in matplotlib.font\_manager)@\spxentry{FontManager}\spxextra{class in matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{FontManager}}}{\emph{size=None}, \emph{weight='normal'}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} On import, the {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontManager}}}}} singleton instance creates a list of TrueType fonts based on the font properties: name, style, variant, weight, stretch, and size. The {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.findfont}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{findfont()}}}}} method does a nearest neighbor search to find the font that most closely matches the specification. If no good enough match is found, a default font is returned. \index{afmfiles (matplotlib.font\_manager.FontManager attribute)@\spxentry{afmfiles}\spxextra{matplotlib.font\_manager.FontManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.afmfiles}}\pysigline{\sphinxbfcode{\sphinxupquote{afmfiles}}}~ \end{fulllineitems} \index{defaultFont (matplotlib.font\_manager.FontManager attribute)@\spxentry{defaultFont}\spxextra{matplotlib.font\_manager.FontManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.defaultFont}}\pysigline{\sphinxbfcode{\sphinxupquote{defaultFont}}}~ \end{fulllineitems} \index{findfont() (matplotlib.font\_manager.FontManager method)@\spxentry{findfont()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.findfont}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{findfont}}}{\emph{self}, \emph{prop}, \emph{fontext='ttf'}, \emph{directory=None}, \emph{fallback\_to\_default=True}, \emph{rebuild\_if\_missing=True}}{} Find a font that most closely matches the given font properties. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{prop}}] \leavevmode{[}str or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}}{]} The font properties to search for. This can be either a {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} object or a string defining a \sphinxhref{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{fontconfig patterns}. \item[{\sphinxstylestrong{fontext}}] \leavevmode{[}\{'ttf', 'afm'\}, optional, default: 'ttf'{]} The extension of the font file: \begin{itemize} \item {} 'ttf': TrueType and OpenType fonts (.ttf, .ttc, .otf) \item {} 'afm': Adobe Font Metrics (.afm) \end{itemize} \item[{\sphinxstylestrong{directory}}] \leavevmode{[}str, optional{]} If given, only search this directory and its subdirectories. \item[{\sphinxstylestrong{fallback\_to\_default}}] \leavevmode{[}bool{]} If True, will fallback to the default font family (usually "DejaVu Sans" or "Helvetica") if the first lookup hard-fails. \item[{\sphinxstylestrong{rebuild\_if\_missing}}] \leavevmode{[}bool{]} Whether to rebuild the font cache and search again if no match is found. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontfile}}] \leavevmode{[}str{]} The filename of the best matching font. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This performs a nearest neighbor search. Each font is given a similarity score to the target font properties. The first font with the highest score is returned. If no matches below a certain threshold are found, the default font (usually DejaVu Sans) is returned. The result is cached, so subsequent lookups don't have to perform the O(n) nearest neighbor search. See the \sphinxhref{http://www.w3.org/TR/1998/REC-CSS2-19980512/}{W3C Cascading Style Sheet, Level 1} documentation for a description of the font finding algorithm. \end{fulllineitems} \index{get\_default\_size() (matplotlib.font\_manager.FontManager static method)@\spxentry{get\_default\_size()}\spxextra{matplotlib.font\_manager.FontManager static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.get_default_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_default\_size}}}{}{} Return the default font size. \end{fulllineitems} \index{get\_default\_weight() (matplotlib.font\_manager.FontManager method)@\spxentry{get\_default\_weight()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.get_default_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_default\_weight}}}{\emph{self}}{} Return the default font weight. \end{fulllineitems} \index{score\_family() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_family()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_family}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_family}}}{\emph{self}, \emph{families}, \emph{family2}}{} Returns a match score between the list of font families in \sphinxstyleemphasis{families} and the font family name \sphinxstyleemphasis{family2}. An exact match at the head of the list returns 0.0. A match further down the list will return between 0 and 1. No match will return 1.0. \end{fulllineitems} \index{score\_size() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_size()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_size}}}{\emph{self}, \emph{size1}, \emph{size2}}{} Returns a match score between \sphinxstyleemphasis{size1} and \sphinxstyleemphasis{size2}. If \sphinxstyleemphasis{size2} (the size specified in the font file) is 'scalable', this function always returns 0.0, since any font size can be generated. Otherwise, the result is the absolute distance between \sphinxstyleemphasis{size1} and \sphinxstyleemphasis{size2}, normalized so that the usual range of font sizes (6pt - 72pt) will lie between 0.0 and 1.0. \end{fulllineitems} \index{score\_stretch() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_stretch()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_stretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_stretch}}}{\emph{self}, \emph{stretch1}, \emph{stretch2}}{} Returns a match score between \sphinxstyleemphasis{stretch1} and \sphinxstyleemphasis{stretch2}. The result is the absolute value of the difference between the CSS numeric values of \sphinxstyleemphasis{stretch1} and \sphinxstyleemphasis{stretch2}, normalized between 0.0 and 1.0. \end{fulllineitems} \index{score\_style() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_style()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_style}}}{\emph{self}, \emph{style1}, \emph{style2}}{} Returns a match score between \sphinxstyleemphasis{style1} and \sphinxstyleemphasis{style2}. An exact match returns 0.0. A match between 'italic' and 'oblique' returns 0.1. No match returns 1.0. \end{fulllineitems} \index{score\_variant() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_variant()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_variant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_variant}}}{\emph{self}, \emph{variant1}, \emph{variant2}}{} Returns a match score between \sphinxstyleemphasis{variant1} and \sphinxstyleemphasis{variant2}. An exact match returns 0.0, otherwise 1.0. \end{fulllineitems} \index{score\_weight() (matplotlib.font\_manager.FontManager method)@\spxentry{score\_weight()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.score_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{score\_weight}}}{\emph{self}, \emph{weight1}, \emph{weight2}}{} Returns a match score between \sphinxstyleemphasis{weight1} and \sphinxstyleemphasis{weight2}. The result is 0.0 if both weight1 and weight 2 are given as strings and have the same value. Otherwise, the result is the absolute value of the difference between the CSS numeric values of \sphinxstyleemphasis{weight1} and \sphinxstyleemphasis{weight2}, normalized between 0.05 and 1.0. \end{fulllineitems} \index{set\_default\_weight() (matplotlib.font\_manager.FontManager method)@\spxentry{set\_default\_weight()}\spxextra{matplotlib.font\_manager.FontManager method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.set_default_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_weight}}}{\emph{self}, \emph{weight}}{} Set the default font weight. The initial value is 'normal'. \end{fulllineitems} \index{ttffiles (matplotlib.font\_manager.FontManager attribute)@\spxentry{ttffiles}\spxextra{matplotlib.font\_manager.FontManager attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontManager.ttffiles}}\pysigline{\sphinxbfcode{\sphinxupquote{ttffiles}}}~ \end{fulllineitems} \end{fulllineitems} \index{FontProperties (class in matplotlib.font\_manager)@\spxentry{FontProperties}\spxextra{class in matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{FontProperties}}}{\emph{family=None}, \emph{style=None}, \emph{variant=None}, \emph{weight=None}, \emph{stretch=None}, \emph{size=None}, \emph{fname=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class for storing and manipulating font properties. The font properties are those described in the \sphinxhref{http://www.w3.org/TR/1998/REC-CSS2-19980512/}{W3C Cascading Style Sheet, Level 1} font specification. The six properties are: \begin{itemize} \item {} family: A list of font names in decreasing order of priority. The items may include a generic font family name, either 'serif', 'sans-serif', 'cursive', 'fantasy', or 'monospace'. In that case, the actual font to be used will be looked up from the associated rcParam. \item {} style: Either 'normal', 'italic' or 'oblique'. \item {} variant: Either 'normal' or 'small-caps'. \item {} stretch: A numeric value in the range 0-1000 or one of 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded' or 'ultra-expanded' \item {} weight: A numeric value in the range 0-1000 or one of 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black' \item {} size: Either an relative value of 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' or an absolute font size, e.g., 12 \end{itemize} The default font property for TrueType fonts (as specified in the default rcParams) is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sans}\PYG{o}{\PYGZhy{}}\PYG{n}{serif}\PYG{p}{,} \PYG{n}{normal}\PYG{p}{,} \PYG{n}{normal}\PYG{p}{,} \PYG{n}{normal}\PYG{p}{,} \PYG{n}{normal}\PYG{p}{,} \PYG{n}{scalable}\PYG{o}{.} \end{sphinxVerbatim} Alternatively, a font may be specified using an absolute path to a .ttf file, by using the \sphinxstyleemphasis{fname} kwarg. The preferred usage of font sizes is to use the relative values, e.g., 'large', instead of absolute font sizes, e.g., 12. This approach allows all text sizes to be made larger or smaller based on the font manager's default font size. This class will also accept a \sphinxhref{https://www.freedesktop.org/wiki/Software/fontconfig/}{fontconfig} \sphinxhref{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{pattern}, if it is the only argument provided. This support does not require fontconfig to be installed. We are merely borrowing its pattern syntax for use here. Note that Matplotlib's internal font manager and fontconfig use a different algorithm to lookup fonts, so the results of the same pattern may be different in Matplotlib than in other applications that use fontconfig. \index{copy() (matplotlib.font\_manager.FontProperties method)@\spxentry{copy()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy}}}{\emph{self}}{} Return a copy of self. \end{fulllineitems} \index{get\_family() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_family()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_family}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_family}}}{\emph{self}}{} Return a list of font names that comprise the font family. \end{fulllineitems} \index{get\_file() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_file()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_file}}}{\emph{self}}{} Return the filename of the associated font. \end{fulllineitems} \index{get\_fontconfig\_pattern() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_fontconfig\_pattern()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_fontconfig_pattern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontconfig\_pattern}}}{\emph{self}}{} Get a \sphinxhref{https://www.freedesktop.org/wiki/Software/fontconfig/}{fontconfig} \sphinxhref{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{pattern} suitable for looking up the font as specified with fontconfig's \sphinxcode{\sphinxupquote{fc-match}} utility. This support does not require fontconfig to be installed or support for it to be enabled. We are merely borrowing its pattern syntax for use here. \end{fulllineitems} \index{get\_name() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_name()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_name}}}{\emph{self}}{} Return the name of the font that best matches the font properties. \end{fulllineitems} \index{get\_size() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_size()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}}{} Return the font size. \end{fulllineitems} \index{get\_size\_in\_points() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_size\_in\_points()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_size_in_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size\_in\_points}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_slant() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_slant()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_slant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_slant}}}{\emph{self}}{} Return the font style. Values are: 'normal', 'italic' or 'oblique'. \end{fulllineitems} \index{get\_stretch() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_stretch()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_stretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_stretch}}}{\emph{self}}{} Return the font stretch or width. Options are: 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'. \end{fulllineitems} \index{get\_style() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_style()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_style}}}{\emph{self}}{} Return the font style. Values are: 'normal', 'italic' or 'oblique'. \end{fulllineitems} \index{get\_variant() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_variant()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_variant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_variant}}}{\emph{self}}{} Return the font variant. Values are: 'normal' or 'small-caps'. \end{fulllineitems} \index{get\_weight() (matplotlib.font\_manager.FontProperties method)@\spxentry{get\_weight()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_weight}}}{\emph{self}}{} Set the font weight. Options are: A numeric value in the range 0-1000 or one of 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black' \end{fulllineitems} \index{set\_family() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_family()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_family}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_family}}}{\emph{self}, \emph{family}}{} Change the font family. May be either an alias (generic name is CSS parlance), such as: 'serif', 'sans-serif', 'cursive', 'fantasy', or 'monospace', a real font name or a list of real font names. Real font names are not supported when \sphinxcode{\sphinxupquote{text.usetex}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}. \end{fulllineitems} \index{set\_file() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_file()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_file}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_file}}}{\emph{self}, \emph{file}}{} Set the filename of the fontfile to use. In this case, all other properties will be ignored. \end{fulllineitems} \index{set\_fontconfig\_pattern() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_fontconfig\_pattern()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_fontconfig_pattern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontconfig\_pattern}}}{\emph{self}, \emph{pattern}}{} Set the properties by parsing a \sphinxhref{https://www.freedesktop.org/wiki/Software/fontconfig/}{fontconfig} \sphinxstyleemphasis{pattern}. This support does not require fontconfig to be installed or support for it to be enabled. We are merely borrowing its pattern syntax for use here. \end{fulllineitems} \index{set\_name() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_name()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_name}}}{\emph{self}, \emph{family}}{} Change the font family. May be either an alias (generic name is CSS parlance), such as: 'serif', 'sans-serif', 'cursive', 'fantasy', or 'monospace', a real font name or a list of real font names. Real font names are not supported when \sphinxcode{\sphinxupquote{text.usetex}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}. \end{fulllineitems} \index{set\_size() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_size()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_size}}}{\emph{self}, \emph{size}}{} Set the font size. Either an relative value of 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large' or an absolute font size, e.g., 12. \end{fulllineitems} \index{set\_slant() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_slant()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_slant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_slant}}}{\emph{self}, \emph{style}}{} Set the font style. Values are: 'normal', 'italic' or 'oblique'. \end{fulllineitems} \index{set\_stretch() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_stretch()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_stretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_stretch}}}{\emph{self}, \emph{stretch}}{} Set the font stretch or width. Options are: 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded' or 'ultra-expanded', or a numeric value in the range 0-1000. \end{fulllineitems} \index{set\_style() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_style()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_style}}}{\emph{self}, \emph{style}}{} Set the font style. Values are: 'normal', 'italic' or 'oblique'. \end{fulllineitems} \index{set\_variant() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_variant()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_variant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_variant}}}{\emph{self}, \emph{variant}}{} Set the font variant. Values are: 'normal' or 'small-caps'. \end{fulllineitems} \index{set\_weight() (matplotlib.font\_manager.FontProperties method)@\spxentry{set\_weight()}\spxextra{matplotlib.font\_manager.FontProperties method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_weight}}}{\emph{self}, \emph{weight}}{} Set the font weight. May be either a numeric value in the range 0-1000 or one of 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black' \end{fulllineitems} \end{fulllineitems} \index{JSONEncoder (class in matplotlib.font\_manager)@\spxentry{JSONEncoder}\spxextra{class in matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.JSONEncoder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{JSONEncoder}}}{\emph{*}, \emph{skipkeys=False}, \emph{ensure\_ascii=True}, \emph{check\_circular=True}, \emph{allow\_nan=True}, \emph{sort\_keys=False}, \emph{indent=None}, \emph{separators=None}, \emph{default=None}}{} Bases: \sphinxcode{\sphinxupquote{json.encoder.JSONEncoder}} Constructor for JSONEncoder, with sensible defaults. If skipkeys is false, then it is a TypeError to attempt encoding of keys that are not str, int, float or None. If skipkeys is True, such items are simply skipped. If ensure\_ascii is true, the output is guaranteed to be str objects with all incoming non-ASCII characters escaped. If ensure\_ascii is false, the output can contain non-ASCII characters. If check\_circular is true, then lists, dicts, and custom encoded objects will be checked for circular references during encoding to prevent an infinite recursion (which would cause an OverflowError). Otherwise, no such check takes place. If allow\_nan is true, then NaN, Infinity, and -Infinity will be encoded as such. This behavior is not JSON specification compliant, but is consistent with most JavaScript based encoders and decoders. Otherwise, it will be a ValueError to encode such floats. If sort\_keys is true, then the output of dictionaries will be sorted by key; this is useful for regression tests to ensure that JSON serializations can be compared on a day-to-day basis. If indent is a non-negative integer, then JSON array elements and object members will be pretty-printed with that indent level. An indent level of 0 will only insert newlines. None is the most compact representation. If specified, separators should be an (item\_separator, key\_separator) tuple. The default is (', ', ': ') if \sphinxstyleemphasis{indent} is \sphinxcode{\sphinxupquote{None}} and (',', ': ') otherwise. To get the most compact JSON representation, you should specify (',', ':') to eliminate whitespace. If specified, default is a function that gets called for objects that can't otherwise be serialized. It should return a JSON encodable version of the object or raise a \sphinxcode{\sphinxupquote{TypeError}}. \index{default() (matplotlib.font\_manager.JSONEncoder method)@\spxentry{default()}\spxextra{matplotlib.font\_manager.JSONEncoder method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.JSONEncoder.default}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{default}}}{\emph{self}, \emph{o}}{} Implement this method in a subclass such that it returns a serializable object for \sphinxcode{\sphinxupquote{o}}, or calls the base implementation (to raise a \sphinxcode{\sphinxupquote{TypeError}}). For example, to support arbitrary iterators, you could implement default like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{default}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{o}\PYG{p}{)}\PYG{p}{:} \PYG{k}{try}\PYG{p}{:} \PYG{n}{iterable} \PYG{o}{=} \PYG{n+nb}{iter}\PYG{p}{(}\PYG{n}{o}\PYG{p}{)} \PYG{k}{except} \PYG{n+ne}{TypeError}\PYG{p}{:} \PYG{k}{pass} \PYG{k}{else}\PYG{p}{:} \PYG{k}{return} \PYG{n+nb}{list}\PYG{p}{(}\PYG{n}{iterable}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Let the base class default method raise the TypeError} \PYG{k}{return} \PYG{n}{JSONEncoder}\PYG{o}{.}\PYG{n}{default}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{o}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \end{fulllineitems} \index{OSXInstalledFonts() (in module matplotlib.font\_manager)@\spxentry{OSXInstalledFonts()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.OSXInstalledFonts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{OSXInstalledFonts}}}{\emph{directories=None}, \emph{fontext='ttf'}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Get list of font files on OS X. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{TempCache (class in matplotlib.font\_manager)@\spxentry{TempCache}\spxextra{class in matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.TempCache}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{TempCache}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} A class to store temporary caches that are (a) not saved to disk and (b) invalidated whenever certain font-related rcParams---namely the family lookup lists---are changed or the font cache is reloaded. This avoids the expensive linear search through all fonts every time a font is looked up. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \index{get() (matplotlib.font\_manager.TempCache method)@\spxentry{get()}\spxextra{matplotlib.font\_manager.TempCache method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.TempCache.get}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get}}}{\emph{self}, \emph{prop}}{}~ \end{fulllineitems} \index{invalidating\_rcparams (matplotlib.font\_manager.TempCache attribute)@\spxentry{invalidating\_rcparams}\spxextra{matplotlib.font\_manager.TempCache attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.TempCache.invalidating_rcparams}}\pysigline{\sphinxbfcode{\sphinxupquote{invalidating\_rcparams}}\sphinxbfcode{\sphinxupquote{ = ('font.serif', 'font.sans-serif', 'font.cursive', 'font.fantasy', 'font.monospace')}}} \end{fulllineitems} \index{make\_rcparams\_key() (matplotlib.font\_manager.TempCache method)@\spxentry{make\_rcparams\_key()}\spxextra{matplotlib.font\_manager.TempCache method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.TempCache.make_rcparams_key}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_rcparams\_key}}}{\emph{self}}{}~ \end{fulllineitems} \index{set() (matplotlib.font\_manager.TempCache method)@\spxentry{set()}\spxextra{matplotlib.font\_manager.TempCache method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.TempCache.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{prop}, \emph{value}}{}~ \end{fulllineitems} \end{fulllineitems} \index{afmFontProperty() (in module matplotlib.font\_manager)@\spxentry{afmFontProperty()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.afmFontProperty}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{afmFontProperty}}}{\emph{fontpath}, \emph{font}}{} Extract information from an AFM font file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{font}}] \leavevmode{[}{\hyperref[\detokenize{api/afm_api:matplotlib.afm.AFM}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AFM}}}}}{]} The AFM font file from which information will be extracted. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontEntry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontEntry}}}}}}] \leavevmode The extracted font properties. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{createFontList() (in module matplotlib.font\_manager)@\spxentry{createFontList()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.createFontList}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{createFontList}}}{\emph{fontfiles}, \emph{fontext='ttf'}}{} A function to create a font lookup list. The default is to create a list of TrueType fonts. An AFM font list can optionally be created. \end{fulllineitems} \index{findSystemFonts() (in module matplotlib.font\_manager)@\spxentry{findSystemFonts()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.findSystemFonts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{findSystemFonts}}}{\emph{fontpaths=None}, \emph{fontext='ttf'}}{} Search for fonts in the specified font paths. If no paths are given, will use a standard set of system paths, as well as the list of fonts tracked by fontconfig if fontconfig is installed and available. A list of TrueType fonts are returned by default with AFM fonts as an option. \end{fulllineitems} \index{get\_font() (in module matplotlib.font\_manager)@\spxentry{get\_font()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.get_font}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{get\_font}}}{\emph{filename}, \emph{hinting\_factor=None}}{}~ \end{fulllineitems} \index{get\_fontconfig\_fonts() (in module matplotlib.font\_manager)@\spxentry{get\_fontconfig\_fonts()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.get_fontconfig_fonts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{get\_fontconfig\_fonts}}}{\emph{fontext='ttf'}}{} List the font filenames known to \sphinxcode{\sphinxupquote{fc-list}} having the given extension. \end{fulllineitems} \index{get\_fontext\_synonyms() (in module matplotlib.font\_manager)@\spxentry{get\_fontext\_synonyms()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.get_fontext_synonyms}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{get\_fontext\_synonyms}}}{\emph{fontext}}{} Return a list of file extensions extensions that are synonyms for the given file extension \sphinxstyleemphasis{fileext}. \end{fulllineitems} \index{is\_opentype\_cff\_font (in module matplotlib.font\_manager)@\spxentry{is\_opentype\_cff\_font}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.is_opentype_cff_font}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{is\_opentype\_cff\_font}}}{\emph{filename}}{} Return whether the given font is a Postscript Compact Font Format Font embedded in an OpenType wrapper. Used by the PostScript and PDF backends that can not subset these fonts. \end{fulllineitems} \index{json\_dump() (in module matplotlib.font\_manager)@\spxentry{json\_dump()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.json_dump}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{json\_dump}}}{\emph{data}, \emph{filename}}{} Dumps a data structure as JSON in the named file. Handles FontManager and its fields. File paths that are children of the Matplotlib data path (typically, fonts shipped with Matplotlib) are stored relative to that data path (to remain valid across virtualenvs). \end{fulllineitems} \index{json\_load() (in module matplotlib.font\_manager)@\spxentry{json\_load()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.json_load}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{json\_load}}}{\emph{filename}}{} Loads a data structure as JSON from the named file. Handles FontManager and its fields. Relative file paths are interpreted as being relative to the Matplotlib data path, and transformed into absolute paths. \end{fulllineitems} \index{list\_fonts() (in module matplotlib.font\_manager)@\spxentry{list\_fonts()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.list_fonts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{list\_fonts}}}{\emph{directory}, \emph{extensions}}{} Return a list of all fonts matching any of the extensions, found recursively under the directory. \end{fulllineitems} \index{ttfFontProperty() (in module matplotlib.font\_manager)@\spxentry{ttfFontProperty()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.ttfFontProperty}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{ttfFontProperty}}}{\emph{font}}{} Extract information from a TrueType font file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{font}}] \leavevmode{[}\sphinxcode{\sphinxupquote{FT2Font}}{]} The TrueType font file from which information will be extracted. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontEntry}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontEntry}}}}}}] \leavevmode The extracted font properties. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{win32FontDirectory() (in module matplotlib.font\_manager)@\spxentry{win32FontDirectory()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.win32FontDirectory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{win32FontDirectory}}}{}{} Return the user-specified font directory for Win32. This is looked up from the registry key: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZbs{}\PYGZbs{}\PYG{n}{HKEY\PYGZus{}CURRENT\PYGZus{}USER}\PYGZbs{}\PYG{n}{Software}\PYGZbs{}\PYG{n}{Microsoft}\PYGZbs{}\PYG{n}{Windows}\PYGZbs{}\PYG{n}{CurrentVersion}\PYGZbs{}\PYG{n}{Explorer}\PYGZbs{}\PYG{n}{Shell} \PYG{n}{Folders}\PYGZbs{}\PYG{n}{Fonts} \end{sphinxVerbatim} If the key is not found, \sphinxcode{\sphinxupquote{\%WINDIR\%\textbackslash{}Fonts}} will be returned. \end{fulllineitems} \index{win32InstalledFonts() (in module matplotlib.font\_manager)@\spxentry{win32InstalledFonts()}\spxextra{in module matplotlib.font\_manager}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/font_manager_api:matplotlib.font_manager.win32InstalledFonts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.}}\sphinxbfcode{\sphinxupquote{win32InstalledFonts}}}{\emph{directory=None}, \emph{fontext='ttf'}}{} Search for fonts in the specified font directory, or use the system directories if none given. Additionally, it is searched for user fonts installed. A list of TrueType font filenames are returned by default, or AFM fonts if \sphinxstyleemphasis{fontext} == 'afm'. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.fontconfig\_pattern}}} \label{\detokenize{api/fontconfig_pattern_api:module-matplotlib.fontconfig_pattern}}\label{\detokenize{api/fontconfig_pattern_api:matplotlib-fontconfig-pattern}}\label{\detokenize{api/fontconfig_pattern_api::doc}}\index{matplotlib.fontconfig\_pattern (module)@\spxentry{matplotlib.fontconfig\_pattern}\spxextra{module}} A module for parsing and generating \sphinxhref{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{fontconfig patterns}. \index{FontconfigPatternParser (class in matplotlib.fontconfig\_pattern)@\spxentry{FontconfigPatternParser}\spxextra{class in matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.FontconfigPatternParser}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{FontconfigPatternParser}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A simple pyparsing-based parser for \sphinxhref{https://www.freedesktop.org/software/fontconfig/fontconfig-user.html}{fontconfig patterns}. \index{parse() (matplotlib.fontconfig\_pattern.FontconfigPatternParser method)@\spxentry{parse()}\spxextra{matplotlib.fontconfig\_pattern.FontconfigPatternParser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.FontconfigPatternParser.parse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{parse}}}{\emph{self}, \emph{pattern}}{} Parse the given fontconfig \sphinxstyleemphasis{pattern} and return a dictionary of key/value pairs useful for initializing a \sphinxcode{\sphinxupquote{font\_manager.FontProperties}} object. \end{fulllineitems} \end{fulllineitems} \index{family\_escape() (in module matplotlib.fontconfig\_pattern)@\spxentry{family\_escape()}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.family_escape}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{family\_escape}}}{\emph{repl}, \emph{string}, \emph{count=0}}{} Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. \end{fulllineitems} \index{family\_unescape() (in module matplotlib.fontconfig\_pattern)@\spxentry{family\_unescape()}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.family_unescape}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{family\_unescape}}}{\emph{repl}, \emph{string}, \emph{count=0}}{} Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. \end{fulllineitems} \index{generate\_fontconfig\_pattern() (in module matplotlib.fontconfig\_pattern)@\spxentry{generate\_fontconfig\_pattern()}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.generate_fontconfig_pattern}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{generate\_fontconfig\_pattern}}}{\emph{d}}{} Given a dictionary of key/value pairs, generates a fontconfig pattern string. \end{fulllineitems} \index{parse\_fontconfig\_pattern (in module matplotlib.fontconfig\_pattern)@\spxentry{parse\_fontconfig\_pattern}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.parse_fontconfig_pattern}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{parse\_fontconfig\_pattern}}}{\emph{pattern}}{} Parse the given fontconfig \sphinxstyleemphasis{pattern} and return a dictionary of key/value pairs useful for initializing a \sphinxcode{\sphinxupquote{font\_manager.FontProperties}} object. \end{fulllineitems} \index{value\_escape() (in module matplotlib.fontconfig\_pattern)@\spxentry{value\_escape()}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.value_escape}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{value\_escape}}}{\emph{repl}, \emph{string}, \emph{count=0}}{} Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. \end{fulllineitems} \index{value\_unescape() (in module matplotlib.fontconfig\_pattern)@\spxentry{value\_unescape()}\spxextra{in module matplotlib.fontconfig\_pattern}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/fontconfig_pattern_api:matplotlib.fontconfig_pattern.value_unescape}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.fontconfig\_pattern.}}\sphinxbfcode{\sphinxupquote{value\_unescape}}}{\emph{repl}, \emph{string}, \emph{count=0}}{} Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.gridspec}}} \label{\detokenize{api/gridspec_api:module-matplotlib.gridspec}}\label{\detokenize{api/gridspec_api:matplotlib-gridspec}}\label{\detokenize{api/gridspec_api::doc}}\index{matplotlib.gridspec (module)@\spxentry{matplotlib.gridspec}\spxextra{module}} {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}} is a module which specifies the location of the subplot in the figure. \begin{quote} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}}] \leavevmode specifies the geometry of the grid that a subplot will be placed. The number of rows and number of columns of the grid need to be set. Optionally, the subplot layout parameters (e.g., left, right, etc.) can be tuned. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}}}] \leavevmode specifies the location of the subplot in the given {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}. \end{description} \end{quote} \subsection{Classes} \label{\detokenize{api/gridspec_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}(nrows, ncols{[}, figure, left, ...{]}) & A class that specifies the geometry of the grid that a subplot will be placed. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}}(gridspec, num1{[}, num2{]}) & Specifies the location of the subplot in the given {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecBase}}}}}(nrows, ncols{[}, height\_ratios, ...{]}) & A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec}}}}}(nrows, ncols, ...{[}, ...{]}) & GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.gridspec.GridSpec} \label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib-gridspec-gridspec}}\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec::doc}}\index{GridSpec (class in matplotlib.gridspec)@\spxentry{GridSpec}\spxextra{class in matplotlib.gridspec}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.gridspec.}}\sphinxbfcode{\sphinxupquote{GridSpec}}}{\emph{nrows}, \emph{ncols}, \emph{figure=None}, \emph{left=None}, \emph{bottom=None}, \emph{right=None}, \emph{top=None}, \emph{wspace=None}, \emph{hspace=None}, \emph{width\_ratios=None}, \emph{height\_ratios=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.gridspec.GridSpecBase}}}}} A class that specifies the geometry of the grid that a subplot will be placed. The location of grid is determined by similar way as the SubplotParams. The number of rows and number of columns of the grid need to be set. Optionally, the subplot layout parameters (e.g., left, right, etc.) can be tuned. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows}}] \leavevmode{[}int{]} Number of rows in grid. \item[{\sphinxstylestrong{ncols}}] \leavevmode{[}int{]} Number or columns in grid. \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}, optional{]} \item[{\sphinxstylestrong{left, right, top, bottom}}] \leavevmode{[}float, optional{]} Extent of the subplots as a fraction of figure width or height. Left cannot be larger than right, and bottom cannot be larger than top. \item[{\sphinxstylestrong{wspace}}] \leavevmode{[}float, optional{]} The amount of width reserved for space between subplots, expressed as a fraction of the average axis width. \item[{\sphinxstylestrong{hspace}}] \leavevmode{[}float, optional{]} The amount of height reserved for space between subplots, expressed as a fraction of the average axis height. \item[{\sphinxstylestrong{width\_ratios}}] \leavevmode{[}length \sphinxstyleemphasis{ncols} iterable, optional{]} Width ratios of the columns. \item[{\sphinxstylestrong{height\_ratios}}] \leavevmode{[}length \sphinxstyleemphasis{nrows} iterable, optional{]} Height ratios of the rows. \end{description} \end{description}\end{quote} \subsubsection*{Notes} See {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.SubplotParams:matplotlib.figure.SubplotParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotParams}}}}} for descriptions of the layout parameters. \index{get\_subplot\_params() (matplotlib.gridspec.GridSpec method)@\spxentry{get\_subplot\_params()}\spxextra{matplotlib.gridspec.GridSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.get_subplot_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplot\_params}}}{\emph{self}, \emph{figure=None}}{} Return a dictionary of subplot layout parameters. The default parameters are from rcParams unless a figure attribute is set. \end{fulllineitems} \index{locally\_modified\_subplot\_params() (matplotlib.gridspec.GridSpec method)@\spxentry{locally\_modified\_subplot\_params()}\spxextra{matplotlib.gridspec.GridSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.locally_modified_subplot_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locally\_modified\_subplot\_params}}}{\emph{self}}{}~ \end{fulllineitems} \index{tight\_layout() (matplotlib.gridspec.GridSpec method)@\spxentry{tight\_layout()}\spxextra{matplotlib.gridspec.GridSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.tight_layout}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tight\_layout}}}{\emph{self}, \emph{figure}, \emph{renderer=None}, \emph{pad=1.08}, \emph{h\_pad=None}, \emph{w\_pad=None}, \emph{rect=None}}{} Adjust subplot parameters to give specified padding. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Padding between the figure edge and the edges of subplots, as a fraction of the font-size. \item[{\sphinxstylestrong{h\_pad, w\_pad}}] \leavevmode{[}float, optional{]} Padding (height/width) between edges of adjacent subplots. Defaults to \sphinxcode{\sphinxupquote{pad\_inches}}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}tuple of 4 floats, optional{]} (left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Default is (0, 0, 1, 1). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update() (matplotlib.gridspec.GridSpec method)@\spxentry{update()}\spxextra{matplotlib.gridspec.GridSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{**kwargs}}{} Update the current values. Values set to None use the rcParams value. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.gridspec.GridSpec}}} \label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:examples-using-matplotlib-gridspec-gridspec}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_align\_labels\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_constrained\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_multicolumn.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_nested.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec06.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/imshow_extent:sphx-glr-tutorials-intermediate-imshow-extent-py}]{\sphinxcrossref{\DUrole{std,std-ref}{origin and extent in imshow}}}} \end{itemize} \subsubsection{matplotlib.gridspec.SubplotSpec} \label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib-gridspec-subplotspec}}\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec::doc}}\index{SubplotSpec (class in matplotlib.gridspec)@\spxentry{SubplotSpec}\spxextra{class in matplotlib.gridspec}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.gridspec.}}\sphinxbfcode{\sphinxupquote{SubplotSpec}}}{\emph{gridspec}, \emph{num1}, \emph{num2=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Specifies the location of the subplot in the given {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}. The subplot will occupy the num1-th cell of the given gridspec. If num2 is provided, the subplot will span between num1-th cell and num2-th cell. The index starts from 0. \index{get\_geometry() (matplotlib.gridspec.SubplotSpec method)@\spxentry{get\_geometry()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.get_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_geometry}}}{\emph{self}}{} Get the subplot geometry (\sphinxcode{\sphinxupquote{n\_rows, n\_cols, start, stop}}). start and stop are the index of the start and stop of the subplot. \end{fulllineitems} \index{get\_gridspec() (matplotlib.gridspec.SubplotSpec method)@\spxentry{get\_gridspec()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.get_gridspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridspec}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_position() (matplotlib.gridspec.SubplotSpec method)@\spxentry{get\_position()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}, \emph{figure}, \emph{return\_all=False}}{} Update the subplot position from \sphinxcode{\sphinxupquote{figure.subplotpars}}. \end{fulllineitems} \index{get\_rows\_columns() (matplotlib.gridspec.SubplotSpec method)@\spxentry{get\_rows\_columns()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.get_rows_columns}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rows\_columns}}}{\emph{self}}{} Get the subplot row and column numbers: (\sphinxcode{\sphinxupquote{n\_rows, n\_cols, row\_start, row\_stop, col\_start, col\_stop}}) \end{fulllineitems} \index{get\_topmost\_subplotspec() (matplotlib.gridspec.SubplotSpec method)@\spxentry{get\_topmost\_subplotspec()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.get_topmost_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_topmost\_subplotspec}}}{\emph{self}}{} get the topmost SubplotSpec instance associated with the subplot \end{fulllineitems} \index{subgridspec() (matplotlib.gridspec.SubplotSpec method)@\spxentry{subgridspec()}\spxextra{matplotlib.gridspec.SubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec.subgridspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subgridspec}}}{\emph{self}, \emph{nrows}, \emph{ncols}, \emph{**kwargs}}{} Return a {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpecFromSubplotSpec}}}}} that has this subplotspec as a parent. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows}}] \leavevmode{[}int{]} Number of rows in grid. \item[{\sphinxstylestrong{ncols}}] \leavevmode{[}int{]} Number or columns in grid. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gridspec}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other parameters are passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}}. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} Adding three subplots in the space occupied by a single subplot: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{gs0} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}gridspec}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax2} \PYG{o}{=} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{gssub} \PYG{o}{=} \PYG{n}{gs0}\PYG{p}{[}\PYG{l+m+mi}{2}\PYG{p}{]}\PYG{o}{.}\PYG{n}{subgridspec}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{add\PYGZus{}subplot}\PYG{p}{(}\PYG{n}{gssub}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{i}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.gridspec.GridSpecBase} \label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib-gridspec-gridspecbase}}\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase::doc}}\index{GridSpecBase (class in matplotlib.gridspec)@\spxentry{GridSpecBase}\spxextra{class in matplotlib.gridspec}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.gridspec.}}\sphinxbfcode{\sphinxupquote{GridSpecBase}}}{\emph{nrows}, \emph{ncols}, \emph{height\_ratios=None}, \emph{width\_ratios=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A base class of GridSpec that specifies the geometry of the grid that a subplot will be placed. The number of rows and number of columns of the grid need to be set. Optionally, the ratio of heights and widths of rows and columns can be specified. \index{get\_geometry() (matplotlib.gridspec.GridSpecBase method)@\spxentry{get\_geometry()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.get_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_geometry}}}{\emph{self}}{} get the geometry of the grid, e.g., 2,3 \end{fulllineitems} \index{get\_grid\_positions() (matplotlib.gridspec.GridSpecBase method)@\spxentry{get\_grid\_positions()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.get_grid_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_grid\_positions}}}{\emph{self}, \emph{fig}, \emph{raw=False}}{} return lists of bottom and top position of rows, left and right positions of columns. If raw=True, then these are all in units relative to the container with no margins. (used for constrained\_layout). \end{fulllineitems} \index{get\_height\_ratios() (matplotlib.gridspec.GridSpecBase method)@\spxentry{get\_height\_ratios()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.get_height_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_height\_ratios}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_subplot\_params() (matplotlib.gridspec.GridSpecBase method)@\spxentry{get\_subplot\_params()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.get_subplot_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplot\_params}}}{\emph{self}, \emph{figure=None}, \emph{fig=None}}{}~ \end{fulllineitems} \index{get\_width\_ratios() (matplotlib.gridspec.GridSpecBase method)@\spxentry{get\_width\_ratios()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.get_width_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width\_ratios}}}{\emph{self}}{}~ \end{fulllineitems} \index{new\_subplotspec() (matplotlib.gridspec.GridSpecBase method)@\spxentry{new\_subplotspec()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.new_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_subplotspec}}}{\emph{self}, \emph{loc}, \emph{rowspan=1}, \emph{colspan=1}}{} create and return a SubplotSpec instance. \end{fulllineitems} \index{set\_height\_ratios() (matplotlib.gridspec.GridSpecBase method)@\spxentry{set\_height\_ratios()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.set_height_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_height\_ratios}}}{\emph{self}, \emph{height\_ratios}}{}~ \end{fulllineitems} \index{set\_width\_ratios() (matplotlib.gridspec.GridSpecBase method)@\spxentry{set\_width\_ratios()}\spxextra{matplotlib.gridspec.GridSpecBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase.set_width_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width\_ratios}}}{\emph{self}, \emph{width\_ratios}}{}~ \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.gridspec.GridSpecFromSubplotSpec} \label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib-gridspec-gridspecfromsubplotspec}}\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec::doc}}\index{GridSpecFromSubplotSpec (class in matplotlib.gridspec)@\spxentry{GridSpecFromSubplotSpec}\spxextra{class in matplotlib.gridspec}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.gridspec.}}\sphinxbfcode{\sphinxupquote{GridSpecFromSubplotSpec}}}{\emph{nrows}, \emph{ncols}, \emph{subplot\_spec}, \emph{wspace=None}, \emph{hspace=None}, \emph{height\_ratios=None}, \emph{width\_ratios=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecBase:matplotlib.gridspec.GridSpecBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.gridspec.GridSpecBase}}}}} GridSpec whose subplot layout parameters are inherited from the location specified by a given SubplotSpec. The number of rows and number of columns of the grid need to be set. An instance of SubplotSpec is also needed to be set from which the layout parameters will be inherited. The wspace and hspace of the layout can be optionally specified or the default values (from the figure or rcParams) will be used. \index{get\_subplot\_params() (matplotlib.gridspec.GridSpecFromSubplotSpec method)@\spxentry{get\_subplot\_params()}\spxextra{matplotlib.gridspec.GridSpecFromSubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec.get_subplot_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplot\_params}}}{\emph{self}, \emph{figure=None}}{} Return a dictionary of subplot layout parameters. \end{fulllineitems} \index{get\_topmost\_subplotspec() (matplotlib.gridspec.GridSpecFromSubplotSpec method)@\spxentry{get\_topmost\_subplotspec()}\spxextra{matplotlib.gridspec.GridSpecFromSubplotSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:matplotlib.gridspec.GridSpecFromSubplotSpec.get_topmost_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_topmost\_subplotspec}}}{\emph{self}}{} Get the topmost SubplotSpec instance associated with the subplot. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.gridspec.GridSpecFromSubplotSpec}}} \label{\detokenize{api/_as_gen/matplotlib.gridspec.GridSpecFromSubplotSpec:examples-using-matplotlib-gridspec-gridspecfromsubplotspec}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_constrained\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_nested.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec06.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} \end{itemize} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.image}}} \label{\detokenize{api/image_api:module-matplotlib.image}}\label{\detokenize{api/image_api:matplotlib-image}}\label{\detokenize{api/image_api::doc}}\index{matplotlib.image (module)@\spxentry{matplotlib.image}\spxextra{module}} The image module supports basic image loading, rescaling and display operations. \index{AxesImage (class in matplotlib.image)@\spxentry{AxesImage}\spxextra{class in matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{AxesImage}}}{\emph{ax}, \emph{cmap=None}, \emph{norm=None}, \emph{interpolation=None}, \emph{origin=None}, \emph{extent=None}, \emph{filternorm=1}, \emph{filterrad=4.0}, \emph{resample=False}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.image.\_ImageBase}} interpolation and cmap default to their rc settings cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 extent is data axes (left, right, bottom, top) for making image plots registered with data plots. Default is to label the pixel centers with the zero-based row and column indices. Additional kwargs are matplotlib.artist properties \index{format\_cursor\_data() (matplotlib.image.AxesImage method)@\spxentry{format\_cursor\_data()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.format_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_cursor\_data}}}{\emph{self}, \emph{data}}{} Return a string representation of \sphinxstyleemphasis{data}. \begin{sphinxadmonition}{note}{Note:} This method is intended to be overridden by artist subclasses. As an end-user of Matplotlib you will most likely not call this method yourself. \end{sphinxadmonition} The default implementation converts ints and floats and arrays of ints and floats into a comma-separated string enclosed in square brackets. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_cursor\_data() (matplotlib.image.AxesImage method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the image value at the event position or \sphinxstyleemphasis{None} if the event is outside the image. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib.artist.Artist.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_extent() (matplotlib.image.AxesImage method)@\spxentry{get\_extent()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}}{} Get the image extent: left, right, bottom, top \end{fulllineitems} \index{get\_window\_extent() (matplotlib.image.AxesImage method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{make\_image() (matplotlib.image.AxesImage method)@\spxentry{make\_image()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.make_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_image}}}{\emph{self}, \emph{renderer}, \emph{magnification=1.0}, \emph{unsampled=False}}{} Normalize, rescale, and colormap this image's data for rendering using \sphinxstyleemphasis{renderer}, with the given \sphinxstyleemphasis{magnification}. If \sphinxstyleemphasis{unsampled} is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}(M, N, 4) uint8 array{]} The RGBA image, resampled unless \sphinxstyleemphasis{unsampled} is True. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The upper left corner where the image should be drawn, in pixel space. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}Affine2D{]} The affine transformation from image to pixel space. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_extent() (matplotlib.image.AxesImage method)@\spxentry{set\_extent()}\spxextra{matplotlib.image.AxesImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.AxesImage.set_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_extent}}}{\emph{self}, \emph{extent}}{} extent is data axes (left, right, bottom, top) for making image plots This updates ax.dataLim, and, if autoscaling, sets viewLim to tightly fit the image, regardless of dataLim. Autoscaling state is not changed, so following this with ax.autoscale\_view will redo the autoscaling in accord with dataLim. \end{fulllineitems} \end{fulllineitems} \index{BboxImage (class in matplotlib.image)@\spxentry{BboxImage}\spxextra{class in matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{BboxImage}}}{\emph{bbox}, \emph{cmap=None}, \emph{norm=None}, \emph{interpolation=None}, \emph{origin=None}, \emph{filternorm=1}, \emph{filterrad=4.0}, \emph{resample=False}, \emph{interp\_at\_native=\textless{}deprecated parameter\textgreater{}}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.image.\_ImageBase}} The Image class whose size is determined by the given bbox. cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 kwargs are an optional list of Artist keyword args \index{contains() (matplotlib.image.BboxImage method)@\spxentry{contains()}\spxextra{matplotlib.image.BboxImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred within the image. \end{fulllineitems} \index{get\_transform() (matplotlib.image.BboxImage method)@\spxentry{get\_transform()}\spxextra{matplotlib.image.BboxImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.image.BboxImage method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.image.BboxImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{interp\_at\_native (matplotlib.image.BboxImage attribute)@\spxentry{interp\_at\_native}\spxextra{matplotlib.image.BboxImage attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage.interp_at_native}}\pysigline{\sphinxbfcode{\sphinxupquote{interp\_at\_native}}}~ \end{fulllineitems} \index{make\_image() (matplotlib.image.BboxImage method)@\spxentry{make\_image()}\spxextra{matplotlib.image.BboxImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.BboxImage.make_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_image}}}{\emph{self}, \emph{renderer}, \emph{magnification=1.0}, \emph{unsampled=False}}{} Normalize, rescale, and colormap this image's data for rendering using \sphinxstyleemphasis{renderer}, with the given \sphinxstyleemphasis{magnification}. If \sphinxstyleemphasis{unsampled} is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}(M, N, 4) uint8 array{]} The RGBA image, resampled unless \sphinxstyleemphasis{unsampled} is True. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The upper left corner where the image should be drawn, in pixel space. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}Affine2D{]} The affine transformation from image to pixel space. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{FigureImage (class in matplotlib.image)@\spxentry{FigureImage}\spxextra{class in matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.FigureImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{FigureImage}}}{\emph{fig}, \emph{cmap=None}, \emph{norm=None}, \emph{offsetx=0}, \emph{offsety=0}, \emph{origin=None}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.image.\_ImageBase}} cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 kwargs are an optional list of Artist keyword args \index{get\_extent() (matplotlib.image.FigureImage method)@\spxentry{get\_extent()}\spxextra{matplotlib.image.FigureImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.FigureImage.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}}{} Get the image extent: left, right, bottom, top \end{fulllineitems} \index{make\_image() (matplotlib.image.FigureImage method)@\spxentry{make\_image()}\spxextra{matplotlib.image.FigureImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.FigureImage.make_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_image}}}{\emph{self}, \emph{renderer}, \emph{magnification=1.0}, \emph{unsampled=False}}{} Normalize, rescale, and colormap this image's data for rendering using \sphinxstyleemphasis{renderer}, with the given \sphinxstyleemphasis{magnification}. If \sphinxstyleemphasis{unsampled} is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}(M, N, 4) uint8 array{]} The RGBA image, resampled unless \sphinxstyleemphasis{unsampled} is True. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The upper left corner where the image should be drawn, in pixel space. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}Affine2D{]} The affine transformation from image to pixel space. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_data() (matplotlib.image.FigureImage method)@\spxentry{set\_data()}\spxextra{matplotlib.image.FigureImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.FigureImage.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{A}}{} Set the image array. \end{fulllineitems} \index{zorder (matplotlib.image.FigureImage attribute)@\spxentry{zorder}\spxextra{matplotlib.image.FigureImage attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.FigureImage.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \end{fulllineitems} \index{NonUniformImage (class in matplotlib.image)@\spxentry{NonUniformImage}\spxextra{class in matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{NonUniformImage}}}{\emph{ax}, \emph{*}, \emph{interpolation='nearest'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.AxesImage}}}}} kwargs are identical to those for AxesImage, except that 'nearest' and 'bilinear' are the only supported 'interpolation' options. \index{get\_extent() (matplotlib.image.NonUniformImage method)@\spxentry{get\_extent()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}}{} Get the image extent: left, right, bottom, top \end{fulllineitems} \index{make\_image() (matplotlib.image.NonUniformImage method)@\spxentry{make\_image()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.make_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_image}}}{\emph{self}, \emph{renderer}, \emph{magnification=1.0}, \emph{unsampled=False}}{} Normalize, rescale, and colormap this image's data for rendering using \sphinxstyleemphasis{renderer}, with the given \sphinxstyleemphasis{magnification}. If \sphinxstyleemphasis{unsampled} is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}(M, N, 4) uint8 array{]} The RGBA image, resampled unless \sphinxstyleemphasis{unsampled} is True. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The upper left corner where the image should be drawn, in pixel space. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}Affine2D{]} The affine transformation from image to pixel space. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_array() (matplotlib.image.NonUniformImage method)@\spxentry{set\_array()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{*args}}{} Retained for backwards compatibility - use set\_data instead. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}array-like{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_cmap() (matplotlib.image.NonUniformImage method)@\spxentry{set\_cmap()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_cmap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{self}, \emph{cmap}}{} set the colormap for luminance data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}colormap or registered colormap name{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_data() (matplotlib.image.NonUniformImage method)@\spxentry{set\_data()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{x}, \emph{y}, \emph{A}}{} Set the grid for the pixel centers, and the pixel values. \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are monotonic 1-D ndarrays of lengths N and M,}] \leavevmode respectively, specifying pixel centers \item[{\sphinxstyleemphasis{A} is an (M,N) ndarray or masked array of values to be}] \leavevmode colormapped, or a (M,N,3) RGB array, or a (M,N,4) RGBA array. \end{description} \end{quote} \end{fulllineitems} \index{set\_filternorm() (matplotlib.image.NonUniformImage method)@\spxentry{set\_filternorm()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_filternorm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_filternorm}}}{\emph{self}, \emph{s}}{} Set whether the resize filter normalizes the weights. See help for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filternorm}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_filterrad() (matplotlib.image.NonUniformImage method)@\spxentry{set\_filterrad()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_filterrad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_filterrad}}}{\emph{self}, \emph{s}}{} Set the resize filter radius only applicable to some interpolation schemes -- see help for imshow \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filterrad}}] \leavevmode{[}positive float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_interpolation() (matplotlib.image.NonUniformImage method)@\spxentry{set\_interpolation()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_interpolation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_interpolation}}}{\emph{self}, \emph{s}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str, None{]} Either 'nearest', 'bilinear', or \sphinxcode{\sphinxupquote{None}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_norm() (matplotlib.image.NonUniformImage method)@\spxentry{set\_norm()}\spxextra{matplotlib.image.NonUniformImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.NonUniformImage.set_norm}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_norm}}}{\emph{self}, \emph{norm}}{} Set the normalization instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If there are any colorbars using the mappable for this norm, setting the norm of the mappable will reset the norm, locator, and formatters on the colorbar to default. \end{fulllineitems} \end{fulllineitems} \index{PcolorImage (class in matplotlib.image)@\spxentry{PcolorImage}\spxextra{class in matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.PcolorImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{PcolorImage}}}{\emph{ax}, \emph{x=None}, \emph{y=None}, \emph{A=None}, \emph{cmap=None}, \emph{norm=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.AxesImage}}}}} Make a pcolor-style plot with an irregular rectangular grid. This uses a variation of the original irregular image code, and it is used by pcolorfast for the corresponding grid type. cmap defaults to its rc setting cmap is a colors.Colormap instance norm is a colors.Normalize instance to map luminance to 0-1 Additional kwargs are matplotlib.artist properties \index{get\_cursor\_data() (matplotlib.image.PcolorImage method)@\spxentry{get\_cursor\_data()}\spxextra{matplotlib.image.PcolorImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.PcolorImage.get_cursor_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cursor\_data}}}{\emph{self}, \emph{event}}{} Return the image value at the event position or \sphinxstyleemphasis{None} if the event is outside the image. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_cursor_data:matplotlib.artist.Artist.get_cursor_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.get\_cursor\_data}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{make\_image() (matplotlib.image.PcolorImage method)@\spxentry{make\_image()}\spxextra{matplotlib.image.PcolorImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.PcolorImage.make_image}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{make\_image}}}{\emph{self}, \emph{renderer}, \emph{magnification=1.0}, \emph{unsampled=False}}{} Normalize, rescale, and colormap this image's data for rendering using \sphinxstyleemphasis{renderer}, with the given \sphinxstyleemphasis{magnification}. If \sphinxstyleemphasis{unsampled} is True, the image will not be scaled, but an appropriate affine transformation will be returned instead. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}(M, N, 4) uint8 array{]} The RGBA image, resampled unless \sphinxstyleemphasis{unsampled} is True. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The upper left corner where the image should be drawn, in pixel space. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}Affine2D{]} The affine transformation from image to pixel space. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_array() (matplotlib.image.PcolorImage method)@\spxentry{set\_array()}\spxextra{matplotlib.image.PcolorImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.PcolorImage.set_array}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_array}}}{\emph{self}, \emph{*args}}{} Retained for backwards compatibility - use set\_data instead. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}array-like{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_data() (matplotlib.image.PcolorImage method)@\spxentry{set\_data()}\spxextra{matplotlib.image.PcolorImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.PcolorImage.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{x}, \emph{y}, \emph{A}}{} Set the grid for the rectangle boundaries, and the data values. \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are monotonic 1-D ndarrays of lengths N+1 and M+1,}] \leavevmode respectively, specifying rectangle boundaries. If None, they will be created as uniform arrays from 0 through N and 0 through M, respectively. \item[{\sphinxstyleemphasis{A} is an (M,N) ndarray or masked array of values to be}] \leavevmode colormapped, or a (M,N,3) RGB array, or a (M,N,4) RGBA array. \end{description} \end{quote} \end{fulllineitems} \end{fulllineitems} \index{composite\_images() (in module matplotlib.image)@\spxentry{composite\_images()}\spxextra{in module matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.composite_images}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{composite\_images}}}{\emph{images}, \emph{renderer}, \emph{magnification=1.0}}{} Composite a number of RGBA images into one. The images are composited in the order in which they appear in the \sphinxcode{\sphinxupquote{images}} list. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{images}}] \leavevmode{[}list of Images{]} Each must have a \sphinxcode{\sphinxupquote{make\_image}} method. For each image, \sphinxcode{\sphinxupquote{can\_composite}} should return \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, though this is not enforced by this function. Each image must have a purely affine transformation with no shear. \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}RendererBase instance{]} \item[{\sphinxstylestrong{magnification}}] \leavevmode{[}float{]} The additional magnification to apply for the renderer in use. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tuple}}] \leavevmode{[}image, offset\_x, offset\_y{]} Returns the tuple: \begin{itemize} \item {} image: A numpy array of the same type as the input images. \item {} offset\_x, offset\_y: The offset of the image (left, bottom) in the output figure. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{imread() (in module matplotlib.image)@\spxentry{imread()}\spxextra{in module matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.imread}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{imread}}}{\emph{fname}, \emph{format=None}}{} Read an image from a file into an array. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or file-like{]} The image file to read. This can be a filename, a URL or a Python file-like object opened in read-binary mode. \item[{\sphinxstylestrong{format}}] \leavevmode{[}str, optional{]} The image file format assumed for reading the data. If not given, the format is deduced from the filename. If nothing can be deduced, PNG is tried. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{imagedata}}] \leavevmode{[}\sphinxcode{\sphinxupquote{numpy.array}}{]} The image data. The returned array has shape \begin{itemize} \item {} (M, N) for grayscale images. \item {} (M, N, 3) for RGB images. \item {} (M, N, 4) for RGBA images. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Matplotlib can only read PNGs natively. Further image formats are supported via the optional dependency on Pillow. Note, URL strings are not compatible with Pillow. Check the \sphinxhref{http://pillow.readthedocs.io/en/latest/}{Pillow documentation} for more information. \end{fulllineitems} \index{imsave() (in module matplotlib.image)@\spxentry{imsave()}\spxextra{in module matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.imsave}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{imsave}}}{\emph{fname}, \emph{arr}, \emph{vmin=None}, \emph{vmax=None}, \emph{cmap=None}, \emph{format=None}, \emph{origin=None}, \emph{dpi=100}}{} Save an array as an image file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or PathLike file-like{]} A path or a Python file-like object to store the image in. If \sphinxstyleemphasis{format} is not set, then the output format is inferred from the extension of \sphinxstyleemphasis{fname}, if any, and from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.format"{]}}}} otherwise. If \sphinxstyleemphasis{format} is set, it determines the output format. \item[{\sphinxstylestrong{arr}}] \leavevmode{[}array-like{]} The image data. The shape can be one of MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA). \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} set the color scaling for the image by fixing the values that map to the colormap color limits. If either \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is None, that limit is determined from the \sphinxstyleemphasis{arr} min/max value. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps scalar data to colors. It is ignored for RGB(A) data. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}} ('viridis'). \item[{\sphinxstylestrong{format}}] \leavevmode{[}str, optional{]} The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this is unset is documented under \sphinxstyleemphasis{fname}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Indicates whether the \sphinxcode{\sphinxupquote{(0, 0)}} index of the array is in the upper left or lower left corner of the axes. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} ('upper'). \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}int{]} The DPI to store in the metadata of the file. This does not affect the resolution of the output image. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{pil\_to\_array() (in module matplotlib.image)@\spxentry{pil\_to\_array()}\spxextra{in module matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.pil_to_array}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{pil\_to\_array}}}{\emph{pilImage}}{} Load a \sphinxhref{https://pillow.readthedocs.io/en/latest/reference/Image.html}{PIL image} and return it as a numpy array. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{numpy.array}] \leavevmode The array shape depends on the image type: \begin{itemize} \item {} (M, N) for grayscale images. \item {} (M, N, 3) for RGB images. \item {} (M, N, 4) for RGBA images. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{thumbnail() (in module matplotlib.image)@\spxentry{thumbnail()}\spxextra{in module matplotlib.image}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/image_api:matplotlib.image.thumbnail}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.image.}}\sphinxbfcode{\sphinxupquote{thumbnail}}}{\emph{infile}, \emph{thumbfile}, \emph{scale=0.1}, \emph{interpolation='bilinear'}, \emph{preview=False}}{} Make a thumbnail of image in \sphinxstyleemphasis{infile} with output filename \sphinxstyleemphasis{thumbfile}. See \DUrole{xref,std,std-doc}{/gallery/misc/image\_thumbnail\_sgskip}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{infile}}] \leavevmode{[}str or file-like{]} The image file -- must be PNG, or Pillow-readable if you have \sphinxhref{http://python-pillow.org/}{Pillow} installed. \item[{\sphinxstylestrong{thumbfile}}] \leavevmode{[}str or file-like{]} The thumbnail filename. \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The scale factor for the thumbnail. \item[{\sphinxstylestrong{interpolation}}] \leavevmode{[}str, optional{]} The interpolation scheme used in the resampling. See the \sphinxstyleemphasis{interpolation} parameter of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} for possible values. \item[{\sphinxstylestrong{preview}}] \leavevmode{[}bool, optional{]} If True, the default backend (presumably a user interface backend) will be used which will cause a figure to be raised if {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}} is called. If it is False, the figure is created using \sphinxcode{\sphinxupquote{FigureCanvasBase}} and the drawing backend is selected as \sphinxcode{\sphinxupquote{savefig}} would normally do. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The figure instance containing the thumbnail. \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.legend}}} \label{\detokenize{api/legend_api:module-matplotlib.legend}}\label{\detokenize{api/legend_api:matplotlib-legend}}\label{\detokenize{api/legend_api::doc}}\index{matplotlib.legend (module)@\spxentry{matplotlib.legend}\spxextra{module}} The legend module defines the Legend class, which is responsible for drawing legends associated with axes and/or figures. \begin{sphinxadmonition}{important}{Important:} It is unlikely that you would ever create a Legend instance manually. Most users would normally create a legend via the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend()}}}}} function. For more details on legends there is also a {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{legend guide}}}}. \end{sphinxadmonition} The Legend class can be considered as a container of legend handles and legend texts. Creation of corresponding legend handles from the plot elements in the axes or figures (e.g., lines, patches, etc.) are specified by the handler map, which defines the mapping between the plot elements and the legend handlers to be used (the default legend handlers are defined in the {\hyperref[\detokenize{api/legend_handler_api:module-matplotlib.legend_handler}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend\_handler}}}}} module). Note that not all kinds of artist are supported by the legend yet by default but it is possible to extend the legend handler's capabilities to support arbitrary objects. See the {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{legend guide}}}} for more information. \index{DraggableLegend (class in matplotlib.legend)@\spxentry{DraggableLegend}\spxextra{class in matplotlib.legend}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.DraggableLegend}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend.}}\sphinxbfcode{\sphinxupquote{DraggableLegend}}}{\emph{legend}, \emph{use\_blit=False}, \emph{update='loc'}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableOffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.DraggableOffsetBox}}}}} Wrapper around a {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend}}}}} to support mouse dragging. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{legend}}] \leavevmode{[}{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend}}}}}{]} The {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend}}}}} instance to wrap. \item[{\sphinxstylestrong{use\_blit}}] \leavevmode{[}bool, optional{]} Use blitting for faster image composition. For details see {\hyperref[\detokenize{api/animation_api:func-animation}]{\sphinxcrossref{\DUrole{std,std-ref}{FuncAnimation}}}}. \item[{\sphinxstylestrong{update}}] \leavevmode{[}\{'loc', 'bbox'\}, optional{]} If "loc", update the \sphinxstyleemphasis{loc} parameter of the legend upon finalizing. If "bbox", update the \sphinxstyleemphasis{bbox\_to\_anchor} parameter. \end{description} \end{description}\end{quote} \index{artist\_picker() (matplotlib.legend.DraggableLegend method)@\spxentry{artist\_picker()}\spxextra{matplotlib.legend.DraggableLegend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.DraggableLegend.artist_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{artist\_picker}}}{\emph{self}, \emph{legend}, \emph{evt}}{}~ \end{fulllineitems} \index{finalize\_offset() (matplotlib.legend.DraggableLegend method)@\spxentry{finalize\_offset()}\spxextra{matplotlib.legend.DraggableLegend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.DraggableLegend.finalize_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{Legend (class in matplotlib.legend)@\spxentry{Legend}\spxextra{class in matplotlib.legend}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend.}}\sphinxbfcode{\sphinxupquote{Legend}}}{\emph{parent}, \emph{handles}, \emph{labels}, \emph{loc=None}, \emph{numpoints=None}, \emph{markerscale=None}, \emph{markerfirst=True}, \emph{scatterpoints=None}, \emph{scatteryoffsets=None}, \emph{prop=None}, \emph{fontsize=None}, \emph{borderpad=None}, \emph{labelspacing=None}, \emph{handlelength=None}, \emph{handleheight=None}, \emph{handletextpad=None}, \emph{borderaxespad=None}, \emph{columnspacing=None}, \emph{ncol=1}, \emph{mode=None}, \emph{fancybox=None}, \emph{shadow=None}, \emph{title=None}, \emph{title\_fontsize=None}, \emph{framealpha=None}, \emph{edgecolor=None}, \emph{facecolor=None}, \emph{bbox\_to\_anchor=None}, \emph{bbox\_transform=None}, \emph{frameon=None}, \emph{handler\_map=None}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} Place a legend on the axes at location loc. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parent}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The artist that contains the legend. \item[{\sphinxstylestrong{handles}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} A list of Artists (lines, patches) to be added to the legend. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence of strings{]} A list of labels to show next to the artists. The length of handles and labels should be the same. If they are not, they are truncated to the smaller of both lengths. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str or pair of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.loc"{]}}}} ('best' for axes, 'upper right' for figures){]} The location of the legend. The strings \sphinxcode{\sphinxupquote{'upper left', 'upper right', 'lower left', 'lower right'}} place the legend at the corresponding corner of the axes/figure. The strings \sphinxcode{\sphinxupquote{'upper center', 'lower center', 'center left', 'center right'}} place the legend at the center of the corresponding edge of the axes/figure. The string \sphinxcode{\sphinxupquote{'center'}} places the legend at the center of the axes/figure. The string \sphinxcode{\sphinxupquote{'best'}} places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case \sphinxstyleemphasis{bbox\_to\_anchor} will be ignored). For back-compatibility, \sphinxcode{\sphinxupquote{'center right'}} (but no other location) can also be spelled \sphinxcode{\sphinxupquote{'right'}}, and each "string" locations can also be given as a numeric value: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Location String &\sphinxstyletheadfamily Location Code \\ \hline 'best' & 0 \\ \hline 'upper right' & 1 \\ \hline 'upper left' & 2 \\ \hline 'lower left' & 3 \\ \hline 'lower right' & 4 \\ \hline 'right' & 5 \\ \hline 'center left' & 6 \\ \hline 'center right' & 7 \\ \hline 'lower center' & 8 \\ \hline 'upper center' & 9 \\ \hline 'center' & 10 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}, 2-tuple, or 4-tuple of floats{]} Box that is used to position the legend in conjunction with \sphinxstyleemphasis{loc}. Defaults to \sphinxcode{\sphinxupquote{axes.bbox}} (if called as a method to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}) or \sphinxcode{\sphinxupquote{figure.bbox}} (if {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}). This argument allows arbitrary placement of the legend. Bbox coordinates are interpreted in the coordinate system given by \sphinxcode{\sphinxupquote{bbox\_transform}}, with the default transform Axes or Figure coordinates, depending on which \sphinxcode{\sphinxupquote{legend}} is called. If a 4-tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} is given, then it specifies the bbox \sphinxcode{\sphinxupquote{(x, y, width, height)}} that the legend is placed in. To put the legend in the best location in the bottom right quadrant of the axes (or figure): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{best}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} A 2-tuple \sphinxcode{\sphinxupquote{(x, y)}} places the corner of the legend specified by \sphinxstyleemphasis{loc} at x, y. For example, to put the legend's upper right-hand corner in the center of the axes (or figure) the following keywords can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{ncol}}] \leavevmode{[}integer{]} The number of columns that the legend has. Default is 1. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}None or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} or dict{]} The font properties of the legend. If None (default), the current {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} will be used. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int or float or \{'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only used if \sphinxcode{\sphinxupquote{prop}} is not specified. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} (line). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.numpoints"{]}}}}. \item[{\sphinxstylestrong{scatterpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} (scatter plot). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.scatterpoints"{]}}}}. \item[{\sphinxstylestrong{scatteryoffsets}}] \leavevmode{[}iterable of floats{]} The vertical offset (relative to the font size) for the markers created for a scatter plot legend entry. 0.0 is at the base the legend text, and 1.0 is at the top. To draw all markers at the same height, set to \sphinxcode{\sphinxupquote{{[}0.5{]}}}. Default is \sphinxcode{\sphinxupquote{{[}0.375, 0.5, 0.3125{]}}}. \item[{\sphinxstylestrong{markerscale}}] \leavevmode{[}None or int or float{]} The relative size of legend markers compared with the originally drawn ones. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.markerscale"{]}}}}. \item[{\sphinxstylestrong{markerfirst}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, legend marker is placed to the left of the legend label. If \sphinxstyleemphasis{False}, legend marker is placed to the right of the legend label. Default is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}None or bool{]} Control whether the legend should be drawn on a patch (frame). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.frameon"{]}}}}. \item[{\sphinxstylestrong{fancybox}}] \leavevmode{[}None or bool{]} Control whether round edges should be enabled around the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} which makes up the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fancybox"{]}}}}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}None or bool{]} Control whether to draw a shadow behind the legend. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.shadow"{]}}}}. \item[{\sphinxstylestrong{framealpha}}] \leavevmode{[}None or float{]} Control the alpha transparency of the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.framealpha"{]}}}}. If shadow is activated and \sphinxstyleemphasis{framealpha} is \sphinxcode{\sphinxupquote{None}}, the default value is ignored. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.facecolor"{]}}}}. If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background patch edge color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.edgecolor"{]}}}} If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.edgecolor"{]}}}}. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"expand", None\}{]} If \sphinxcode{\sphinxupquote{mode}} is set to \sphinxcode{\sphinxupquote{"expand"}} the legend will be horizontally expanded to fill the axes area (or \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} if defines the legend's size). \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transform for the bounding box (\sphinxcode{\sphinxupquote{bbox\_to\_anchor}}). For a value of \sphinxcode{\sphinxupquote{None}} (default) the Axes' \sphinxcode{\sphinxupquote{transAxes}} transform will be used. \item[{\sphinxstylestrong{title}}] \leavevmode{[}str or None{]} The legend's title. Default is no title (\sphinxcode{\sphinxupquote{None}}). \item[{\sphinxstylestrong{title\_fontsize: str or None}}] \leavevmode The fontsize of the legend's title. Default is the default fontsize. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float or None{]} The fractional whitespace inside the legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderpad"{]}}}}. \item[{\sphinxstylestrong{labelspacing}}] \leavevmode{[}float or None{]} The vertical space between the legend entries. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.labelspacing"{]}}}}. \item[{\sphinxstylestrong{handlelength}}] \leavevmode{[}float or None{]} The length of the legend handles. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handlelength"{]}}}}. \item[{\sphinxstylestrong{handletextpad}}] \leavevmode{[}float or None{]} The pad between the legend handle and text. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handletextpad"{]}}}}. \item[{\sphinxstylestrong{borderaxespad}}] \leavevmode{[}float or None{]} The pad between the axes and legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderaxespad"{]}}}}. \item[{\sphinxstylestrong{columnspacing}}] \leavevmode{[}float or None{]} The spacing between columns. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.columnspacing"{]}}}}. \item[{\sphinxstylestrong{handler\_map}}] \leavevmode{[}dict or None{]} The custom dictionary mapping instances or types to a legend handler. This \sphinxcode{\sphinxupquote{handler\_map}} updates the default handler map found at {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend.get\_legend\_handler\_map()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Users can specify any arbitrary location for the legend using the \sphinxstyleemphasis{bbox\_to\_anchor} keyword argument. bbox\_to\_anchor can be an instance of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. See {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.set_bbox_to_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_bbox\_to\_anchor()}}}}} for more detail. The legend location can be specified by setting \sphinxstyleemphasis{loc} with a tuple of 2 floats, which is interpreted as the lower-left corner of the legend in the normalized axes coordinate. \index{codes (matplotlib.legend.Legend attribute)@\spxentry{codes}\spxextra{matplotlib.legend.Legend attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.codes}}\pysigline{\sphinxbfcode{\sphinxupquote{codes}}\sphinxbfcode{\sphinxupquote{ = \{'best': 0, 'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, 'upper right': 1\}}}} \end{fulllineitems} \index{contains() (matplotlib.legend.Legend method)@\spxentry{contains()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{event}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{set\_contains}}, \sphinxcode{\sphinxupquote{get\_contains}}}] \leavevmode \end{description} \end{fulllineitems} \index{draw() (matplotlib.legend.Legend method)@\spxentry{draw()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw everything that belongs to the legend. \end{fulllineitems} \index{draw\_frame() (matplotlib.legend.Legend method)@\spxentry{draw\_frame()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.draw_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_frame}}}{\emph{self}, \emph{b}}{} Set draw frame to b. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_bbox\_to\_anchor() (matplotlib.legend.Legend method)@\spxentry{get\_bbox\_to\_anchor()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_bbox_to_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox\_to\_anchor}}}{\emph{self}}{} Return the bbox that the legend will be anchored to. \end{fulllineitems} \index{get\_children() (matplotlib.legend.Legend method)@\spxentry{get\_children()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of child artists. \end{fulllineitems} \index{get\_default\_handler\_map() (matplotlib.legend.Legend class method)@\spxentry{get\_default\_handler\_map()}\spxextra{matplotlib.legend.Legend class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_default_handler_map}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{get\_default\_handler\_map}}}{}{} A class method that returns the default handler map. \end{fulllineitems} \index{get\_draggable() (matplotlib.legend.Legend method)@\spxentry{get\_draggable()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_draggable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_draggable}}}{\emph{self}}{} Return \sphinxcode{\sphinxupquote{True}} if the legend is draggable, \sphinxcode{\sphinxupquote{False}} otherwise. \end{fulllineitems} \index{get\_frame() (matplotlib.legend.Legend method)@\spxentry{get\_frame()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_frame}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} instances used to frame the legend. \end{fulllineitems} \index{get\_frame\_on() (matplotlib.legend.Legend method)@\spxentry{get\_frame\_on()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_frame_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_frame\_on}}}{\emph{self}}{} Get whether the legend box patch is drawn. \end{fulllineitems} \index{get\_legend\_handler() (matplotlib.legend.Legend static method)@\spxentry{get\_legend\_handler()}\spxextra{matplotlib.legend.Legend static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_legend\_handler}}}{\emph{legend\_handler\_map}, \emph{orig\_handle}}{} Return a legend handler from \sphinxstyleemphasis{legend\_handler\_map} that corresponds to \sphinxstyleemphasis{orig\_handler}. \sphinxstyleemphasis{legend\_handler\_map} should be a dictionary object (that is returned by the get\_legend\_handler\_map method). It first checks if the \sphinxstyleemphasis{orig\_handle} itself is a key in the \sphinxstyleemphasis{legend\_handler\_map} and return the associated value. Otherwise, it checks for each of the classes in its method-resolution-order. If no matching key is found, it returns \sphinxcode{\sphinxupquote{None}}. \end{fulllineitems} \index{get\_legend\_handler\_map() (matplotlib.legend.Legend method)@\spxentry{get\_legend\_handler\_map()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_legend\_handler\_map}}}{\emph{self}}{} Return the handler map. \end{fulllineitems} \index{get\_lines() (matplotlib.legend.Legend method)@\spxentry{get\_lines()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_lines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lines}}}{\emph{self}}{} Return a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances in the legend. \end{fulllineitems} \index{get\_patches() (matplotlib.legend.Legend method)@\spxentry{get\_patches()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_patches}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patches}}}{\emph{self}}{} Return a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} instances in the legend. \end{fulllineitems} \index{get\_texts() (matplotlib.legend.Legend method)@\spxentry{get\_texts()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_texts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_texts}}}{\emph{self}}{} Return a list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances in the legend. \end{fulllineitems} \index{get\_tightbbox() (matplotlib.legend.Legend method)@\spxentry{get\_tightbbox()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Legend.get\_window\_extent}}}}}, but uses the box for the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{{}`.BboxBase{}`}}] \leavevmode{[}containing the bounding box in figure pixel co-ordinates.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_title() (matplotlib.legend.Legend method)@\spxentry{get\_title()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_title}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance for the legend title. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.legend.Legend method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Return extent of the legend. \end{fulllineitems} \index{set\_bbox\_to\_anchor() (matplotlib.legend.Legend method)@\spxentry{set\_bbox\_to\_anchor()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.set_bbox_to_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bbox\_to\_anchor}}}{\emph{self}, \emph{bbox}, \emph{transform=None}}{} Set the bbox that the legend will be anchored to. \sphinxstyleemphasis{bbox} can be \begin{itemize} \item {} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} instance \item {} A tuple of \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} in the given transform (normalized axes coordinate if None) \item {} A tuple of \sphinxcode{\sphinxupquote{(left, bottom)}} where the width and height will be assumed to be zero. \end{itemize} \end{fulllineitems} \index{set\_default\_handler\_map() (matplotlib.legend.Legend class method)@\spxentry{set\_default\_handler\_map()}\spxextra{matplotlib.legend.Legend class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.set_default_handler_map}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{set\_default\_handler\_map}}}{\emph{handler\_map}}{} A class method to set the default handler map. \end{fulllineitems} \index{set\_draggable() (matplotlib.legend.Legend method)@\spxentry{set\_draggable()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.set_draggable}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_draggable}}}{\emph{self}, \emph{state}, \emph{use\_blit=False}, \emph{update='loc'}}{} Enable or disable mouse dragging support of the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{state}}] \leavevmode{[}bool{]} Whether mouse dragging is enabled. \item[{\sphinxstylestrong{use\_blit}}] \leavevmode{[}bool, optional{]} Use blitting for faster image composition. For details see {\hyperref[\detokenize{api/animation_api:func-animation}]{\sphinxcrossref{\DUrole{std,std-ref}{FuncAnimation}}}}. \item[{\sphinxstylestrong{update}}] \leavevmode{[}\{'loc', 'bbox'\}, optional{]} The legend parameter to be changed when dragged: \begin{itemize} \item {} 'loc': update the \sphinxstyleemphasis{loc} parameter of the legend \item {} 'bbox': update the \sphinxstyleemphasis{bbox\_to\_anchor} parameter of the legend \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{If \sphinxstyleemphasis{state} is \sphinxcode{\sphinxupquote{True}} this returns the {\hyperref[\detokenize{api/legend_api:matplotlib.legend.DraggableLegend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DraggableLegend}}}}} helper}] \leavevmode \item[{instance. Otherwise this returns \sphinxcode{\sphinxupquote{None}}.}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_frame\_on() (matplotlib.legend.Legend method)@\spxentry{set\_frame\_on()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.set_frame_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_frame\_on}}}{\emph{self}, \emph{b}}{} Set whether the legend box patch is drawn. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_title() (matplotlib.legend.Legend method)@\spxentry{set\_title()}\spxextra{matplotlib.legend.Legend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.set_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_title}}}{\emph{self}, \emph{title}, \emph{prop=None}}{} Set the legend title. Fontproperties can be optionally set with \sphinxstyleemphasis{prop} parameter. \end{fulllineitems} \index{update\_default\_handler\_map() (matplotlib.legend.Legend class method)@\spxentry{update\_default\_handler\_map()}\spxextra{matplotlib.legend.Legend class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.update_default_handler_map}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{update\_default\_handler\_map}}}{\emph{handler\_map}}{} A class method to update the default handler map. \end{fulllineitems} \index{zorder (matplotlib.legend.Legend attribute)@\spxentry{zorder}\spxextra{matplotlib.legend.Legend attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_api:matplotlib.legend.Legend.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 5}}} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.legend\_handler}}} \label{\detokenize{api/legend_handler_api:module-matplotlib.legend_handler}}\label{\detokenize{api/legend_handler_api:matplotlib-legend-handler}}\label{\detokenize{api/legend_handler_api::doc}}\index{matplotlib.legend\_handler (module)@\spxentry{matplotlib.legend\_handler}\spxextra{module}} This module defines default legend handlers. It is strongly encouraged to have read the {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{legend guide}}}} before this documentation. Legend handlers are expected to be a callable object with a following signature. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend\PYGZus{}handler}\PYG{p}{(}\PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{fontsize}\PYG{p}{,} \PYG{n}{handlebox}\PYG{p}{)} \end{sphinxVerbatim} Where \sphinxstyleemphasis{legend} is the legend itself, \sphinxstyleemphasis{orig\_handle} is the original plot, \sphinxstyleemphasis{fontsize} is the fontsize in pixels, and \sphinxstyleemphasis{handlebox} is a OffsetBox instance. Within the call, you should create relevant artists (using relevant properties from the \sphinxstyleemphasis{legend} and/or \sphinxstyleemphasis{orig\_handle}) and add them into the handlebox. The artists needs to be scaled according to the fontsize (note that the size is in pixel, i.e., this is dpi-scaled value). This module includes definition of several legend handler classes derived from the base class (HandlerBase) with the following method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{legend\PYGZus{}artist}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{fontsize}\PYG{p}{,} \PYG{n}{handlebox}\PYG{p}{)} \end{sphinxVerbatim} \index{HandlerBase (class in matplotlib.legend\_handler)@\spxentry{HandlerBase}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerBase}}}{\emph{xpad=0.0}, \emph{ypad=0.0}, \emph{update\_func=None}}{} A Base class for default legend handlers. The derived classes are meant to override \sphinxstyleemphasis{create\_artists} method, which has a following signature.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{create\PYGZus{}artists}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{ydescent}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{fontsize}\PYG{p}{,} \PYG{n}{trans}\PYG{p}{)}\PYG{p}{:} \end{sphinxVerbatim} The overridden method needs to create artists of the given transform that fits in the given dimension (xdescent, ydescent, width, height) that are scaled by fontsize if necessary. \index{adjust\_drawing\_area() (matplotlib.legend\_handler.HandlerBase method)@\spxentry{adjust\_drawing\_area()}\spxextra{matplotlib.legend\_handler.HandlerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.adjust_drawing_area}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{adjust\_drawing\_area}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \index{create\_artists() (matplotlib.legend\_handler.HandlerBase method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \index{legend\_artist() (matplotlib.legend\_handler.HandlerBase method)@\spxentry{legend\_artist()}\spxextra{matplotlib.legend\_handler.HandlerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.legend_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{legend\_artist}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{fontsize}, \emph{handlebox}}{} Return the artist that this HandlerBase generates for the given original artist/handle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{legend}}] \leavevmode{[}{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} instance{]} The legend for which these legend artists are being created. \item[{\sphinxstylestrong{orig\_handle}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} or similar{]} The object for which these legend artists are being created. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}float or int{]} The fontsize in pixels. The artists being created should be scaled according to the given fontsize. \item[{\sphinxstylestrong{handlebox}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} instance{]} The box which has been created to hold this legend entry's artists. Artists created in the {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.legend_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend\_artist}}}}} method must be added to this handlebox inside this method. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_prop() (matplotlib.legend\_handler.HandlerBase method)@\spxentry{update\_prop()}\spxextra{matplotlib.legend\_handler.HandlerBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase.update_prop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_prop}}}{\emph{self}, \emph{legend\_handle}, \emph{orig\_handle}, \emph{legend}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerCircleCollection (class in matplotlib.legend\_handler)@\spxentry{HandlerCircleCollection}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerCircleCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerCircleCollection}}}{\emph{yoffsets=None}, \emph{sizes=None}, \emph{**kw}}{} Handler for \sphinxcode{\sphinxupquote{CircleCollections}}. \index{create\_collection() (matplotlib.legend\_handler.HandlerCircleCollection method)@\spxentry{create\_collection()}\spxextra{matplotlib.legend\_handler.HandlerCircleCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerCircleCollection.create_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_collection}}}{\emph{self}, \emph{orig\_handle}, \emph{sizes}, \emph{offsets}, \emph{transOffset}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerErrorbar (class in matplotlib.legend\_handler)@\spxentry{HandlerErrorbar}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerErrorbar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerErrorbar}}}{\emph{xerr\_size=0.5}, \emph{yerr\_size=None}, \emph{marker\_pad=0.3}, \emph{numpoints=None}, \emph{**kw}}{} Handler for Errorbars. \index{create\_artists() (matplotlib.legend\_handler.HandlerErrorbar method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerErrorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerErrorbar.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \index{get\_err\_size() (matplotlib.legend\_handler.HandlerErrorbar method)@\spxentry{get\_err\_size()}\spxextra{matplotlib.legend\_handler.HandlerErrorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerErrorbar.get_err_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_err\_size}}}{\emph{self}, \emph{legend}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerLine2D (class in matplotlib.legend\_handler)@\spxentry{HandlerLine2D}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLine2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerLine2D}}}{\emph{marker\_pad=0.3}, \emph{numpoints=None}, \emph{**kw}}{} Handler for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker\_pad}}] \leavevmode{[}float{]} Padding between points in legend entry. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}int{]} Number of points to show in legend entry. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerNpoints}}}}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerLine2D method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerLine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLine2D.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerLineCollection (class in matplotlib.legend\_handler)@\spxentry{HandlerLineCollection}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLineCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerLineCollection}}}{\emph{marker\_pad=0.3}, \emph{numpoints=None}, \emph{**kw}}{} Handler for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker\_pad}}] \leavevmode{[}float{]} Padding between points in legend entry. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}int{]} Number of points to show in legend entry. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerNpoints}}}}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerLineCollection method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerLineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLineCollection.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \index{get\_numpoints() (matplotlib.legend\_handler.HandlerLineCollection method)@\spxentry{get\_numpoints()}\spxextra{matplotlib.legend\_handler.HandlerLineCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerLineCollection.get_numpoints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numpoints}}}{\emph{self}, \emph{legend}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerNpoints (class in matplotlib.legend\_handler)@\spxentry{HandlerNpoints}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerNpoints}}}{\emph{marker\_pad=0.3}, \emph{numpoints=None}, \emph{**kw}}{} A legend handler that shows \sphinxstyleemphasis{numpoints} points in the legend entry. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker\_pad}}] \leavevmode{[}float{]} Padding between points in legend entry. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}int{]} Number of points to show in legend entry. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerBase}}}}}. \index{get\_numpoints() (matplotlib.legend\_handler.HandlerNpoints method)@\spxentry{get\_numpoints()}\spxextra{matplotlib.legend\_handler.HandlerNpoints method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints.get_numpoints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numpoints}}}{\emph{self}, \emph{legend}}{}~ \end{fulllineitems} \index{get\_xdata() (matplotlib.legend\_handler.HandlerNpoints method)@\spxentry{get\_xdata()}\spxextra{matplotlib.legend\_handler.HandlerNpoints method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints.get_xdata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xdata}}}{\emph{self}, \emph{legend}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerNpointsYoffsets (class in matplotlib.legend\_handler)@\spxentry{HandlerNpointsYoffsets}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpointsYoffsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerNpointsYoffsets}}}{\emph{numpoints=None}, \emph{yoffsets=None}, \emph{**kw}}{} A legend handler that shows \sphinxstyleemphasis{numpoints} in the legend, and allows them to be individually offest in the y-direction. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}int{]} Number of points to show in legend entry. \item[{\sphinxstylestrong{yoffsets}}] \leavevmode{[}array of floats{]} Length \sphinxstyleemphasis{numpoints} list of y offsets for each point in legend entry. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpoints}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerNpoints}}}}}. \index{get\_ydata() (matplotlib.legend\_handler.HandlerNpointsYoffsets method)@\spxentry{get\_ydata()}\spxextra{matplotlib.legend\_handler.HandlerNpointsYoffsets method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpointsYoffsets.get_ydata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ydata}}}{\emph{self}, \emph{legend}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerPatch (class in matplotlib.legend\_handler)@\spxentry{HandlerPatch}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerPatch}}}{\emph{patch\_func=None}, \emph{**kw}}{} Handler for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} instances. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patch\_func}}] \leavevmode{[}callable, optional{]} The function that creates the legend key artist. \sphinxstyleemphasis{patch\_func} should have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{patch\PYGZus{}func}\PYG{p}{(}\PYG{n}{legend}\PYG{o}{=}\PYG{n}{legend}\PYG{p}{,} \PYG{n}{orig\PYGZus{}handle}\PYG{o}{=}\PYG{n}{orig\PYGZus{}handle}\PYG{p}{,} \PYG{n}{xdescent}\PYG{o}{=}\PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{ydescent}\PYG{o}{=}\PYG{n}{ydescent}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{n}{height}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{n}{fontsize}\PYG{p}{)} \end{sphinxVerbatim} Subsequently the created artist will have its \sphinxcode{\sphinxupquote{update\_prop}} method called and the appropriate transform will be applied. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerBase}}}}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerPatch method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPatch.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerPathCollection (class in matplotlib.legend\_handler)@\spxentry{HandlerPathCollection}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPathCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerPathCollection}}}{\emph{yoffsets=None}, \emph{sizes=None}, \emph{**kw}}{} Handler for \sphinxcode{\sphinxupquote{PathCollections}}, which are used by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \index{create\_collection() (matplotlib.legend\_handler.HandlerPathCollection method)@\spxentry{create\_collection()}\spxextra{matplotlib.legend\_handler.HandlerPathCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPathCollection.create_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_collection}}}{\emph{self}, \emph{orig\_handle}, \emph{sizes}, \emph{offsets}, \emph{transOffset}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerPolyCollection (class in matplotlib.legend\_handler)@\spxentry{HandlerPolyCollection}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPolyCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerPolyCollection}}}{\emph{xpad=0.0}, \emph{ypad=0.0}, \emph{update\_func=None}}{} Handler for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} used in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.fill_between:matplotlib.axes.Axes.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stackplot:matplotlib.axes.Axes.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stackplot}}}}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerPolyCollection method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerPolyCollection.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerRegularPolyCollection (class in matplotlib.legend\_handler)@\spxentry{HandlerRegularPolyCollection}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerRegularPolyCollection}}}{\emph{yoffsets=None}, \emph{sizes=None}, \emph{**kw}}{} Handler for \sphinxcode{\sphinxupquote{RegularPolyCollections}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerRegularPolyCollection method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerRegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \index{create\_collection() (matplotlib.legend\_handler.HandlerRegularPolyCollection method)@\spxentry{create\_collection()}\spxextra{matplotlib.legend\_handler.HandlerRegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection.create_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_collection}}}{\emph{self}, \emph{orig\_handle}, \emph{sizes}, \emph{offsets}, \emph{transOffset}}{}~ \end{fulllineitems} \index{get\_numpoints() (matplotlib.legend\_handler.HandlerRegularPolyCollection method)@\spxentry{get\_numpoints()}\spxextra{matplotlib.legend\_handler.HandlerRegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection.get_numpoints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_numpoints}}}{\emph{self}, \emph{legend}}{}~ \end{fulllineitems} \index{get\_sizes() (matplotlib.legend\_handler.HandlerRegularPolyCollection method)@\spxentry{get\_sizes()}\spxextra{matplotlib.legend\_handler.HandlerRegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection.get_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sizes}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \index{update\_prop() (matplotlib.legend\_handler.HandlerRegularPolyCollection method)@\spxentry{update\_prop()}\spxextra{matplotlib.legend\_handler.HandlerRegularPolyCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerRegularPolyCollection.update_prop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_prop}}}{\emph{self}, \emph{legend\_handle}, \emph{orig\_handle}, \emph{legend}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerStem (class in matplotlib.legend\_handler)@\spxentry{HandlerStem}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerStem}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerStem}}}{\emph{marker\_pad=0.3}, \emph{numpoints=None}, \emph{bottom=None}, \emph{yoffsets=None}, \emph{**kw}}{} Handler for plots produced by {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.stem:matplotlib.axes.Axes.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker\_pad}}] \leavevmode{[}float{]} Padding between points in legend entry. Default is 0.3. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}int, optional{]} Number of points to show in legend entry. \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}float, optional{]} \item[{\sphinxstylestrong{yoffsets}}] \leavevmode{[}array of floats, optional{]} Length \sphinxstyleemphasis{numpoints} list of y offsets for each point in legend entry. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Any other keyword arguments are given to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerNpointsYoffsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerNpointsYoffsets}}}}}. \index{create\_artists() (matplotlib.legend\_handler.HandlerStem method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerStem method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerStem.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \index{get\_ydata() (matplotlib.legend\_handler.HandlerStem method)@\spxentry{get\_ydata()}\spxextra{matplotlib.legend\_handler.HandlerStem method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerStem.get_ydata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ydata}}}{\emph{self}, \emph{legend}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HandlerTuple (class in matplotlib.legend\_handler)@\spxentry{HandlerTuple}\spxextra{class in matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerTuple}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{HandlerTuple}}}{\emph{ndivide=1}, \emph{pad=None}, \emph{**kwargs}}{} Handler for Tuple. Additional kwargs are passed through to {\hyperref[\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HandlerBase}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ndivide}}] \leavevmode{[}int, optional{]} The number of sections to divide the legend area into. If None, use the length of the input tuple. Default is 1. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} If None, fall back to \sphinxcode{\sphinxupquote{legend.borderpad}} as the default. In units of fraction of font size. Default is None. \end{description} \end{description}\end{quote} \index{create\_artists() (matplotlib.legend\_handler.HandlerTuple method)@\spxentry{create\_artists()}\spxextra{matplotlib.legend\_handler.HandlerTuple method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.HandlerTuple.create_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_artists}}}{\emph{self}, \emph{legend}, \emph{orig\_handle}, \emph{xdescent}, \emph{ydescent}, \emph{width}, \emph{height}, \emph{fontsize}, \emph{trans}}{}~ \end{fulllineitems} \end{fulllineitems} \index{update\_from\_first\_child() (in module matplotlib.legend\_handler)@\spxentry{update\_from\_first\_child()}\spxextra{in module matplotlib.legend\_handler}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/legend_handler_api:matplotlib.legend_handler.update_from_first_child}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.legend\_handler.}}\sphinxbfcode{\sphinxupquote{update\_from\_first\_child}}}{\emph{tgt}, \emph{src}}{}~ \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.lines}}} \label{\detokenize{api/lines_api:module-matplotlib.lines}}\label{\detokenize{api/lines_api:matplotlib-lines}}\label{\detokenize{api/lines_api::doc}}\index{matplotlib.lines (module)@\spxentry{matplotlib.lines}\spxextra{module}} This module contains all the 2D line class which can draw with a variety of line styles, markers and colors. \subsection{Classes} \label{\detokenize{api/lines_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}(xdata, ydata{[}, linewidth, linestyle, ...{]}) & A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{VertexSelector}}}}}(line) & Manage the callbacks to maintain a list of selected vertices for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}}. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.lines.Line2D} \label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib-lines-line2d}}\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D::doc}}\index{Line2D (class in matplotlib.lines)@\spxentry{Line2D}\spxextra{class in matplotlib.lines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.lines.}}\sphinxbfcode{\sphinxupquote{Line2D}}}{\emph{xdata}, \emph{ydata}, \emph{linewidth=None}, \emph{linestyle=None}, \emph{color=None}, \emph{marker=None}, \emph{markersize=None}, \emph{markeredgewidth=None}, \emph{markeredgecolor=None}, \emph{markerfacecolor=None}, \emph{markerfacecoloralt='none'}, \emph{fillstyle=None}, \emph{antialiased=None}, \emph{dash\_capstyle=None}, \emph{solid\_capstyle=None}, \emph{dash\_joinstyle=None}, \emph{solid\_joinstyle=None}, \emph{pickradius=5}, \emph{drawstyle=None}, \emph{markevery=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} A line - the line can have both a solid linestyle connecting all the vertices, and a marker at each vertex. Additionally, the drawing of the solid line is influenced by the drawstyle, e.g., one can create "stepped" lines in various styles. Create a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance with \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} data in sequences \sphinxstyleemphasis{xdata}, \sphinxstyleemphasis{ydata}. The kwargs are {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} See {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle()}}}}} for a description of the line styles, {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_marker()}}}}} for a description of the markers, and {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_drawstyle()}}}}} for a description of the draw styles. \index{axes (matplotlib.lines.Line2D attribute)@\spxentry{axes}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{contains() (matplotlib.lines.Line2D method)@\spxentry{contains()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred on the line. The pick radius determines the precision of the location test (usually within five points of the value). Use {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_pickradius()}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_pickradius()}}}}} to view or modify it. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} A dictionary \sphinxcode{\sphinxupquote{\{'ind': pointlist\}}}, where \sphinxstyleemphasis{pointlist} is a list of points of the line that are within the pickradius around the event position. TODO: sort returned indices by distance \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw() (matplotlib.lines.Line2D method)@\spxentry{draw()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{drawStyleKeys (matplotlib.lines.Line2D attribute)@\spxentry{drawStyleKeys}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.drawStyleKeys}}\pysigline{\sphinxbfcode{\sphinxupquote{drawStyleKeys}}\sphinxbfcode{\sphinxupquote{ = {[}'default', 'steps-mid', 'steps-pre', 'steps-post', 'steps'{]}}}} \end{fulllineitems} \index{drawStyles (matplotlib.lines.Line2D attribute)@\spxentry{drawStyles}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.drawStyles}}\pysigline{\sphinxbfcode{\sphinxupquote{drawStyles}}\sphinxbfcode{\sphinxupquote{ = \{'default': '\_draw\_lines', 'steps': '\_draw\_steps\_pre', 'steps-mid': '\_draw\_steps\_mid', 'steps-post': '\_draw\_steps\_post', 'steps-pre': '\_draw\_steps\_pre'\}}}} \end{fulllineitems} \index{fillStyles (matplotlib.lines.Line2D attribute)@\spxentry{fillStyles}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.fillStyles}}\pysigline{\sphinxbfcode{\sphinxupquote{fillStyles}}\sphinxbfcode{\sphinxupquote{ = ('full', 'left', 'right', 'bottom', 'top', 'none')}}} \end{fulllineitems} \index{filled\_markers (matplotlib.lines.Line2D attribute)@\spxentry{filled\_markers}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.filled_markers}}\pysigline{\sphinxbfcode{\sphinxupquote{filled\_markers}}\sphinxbfcode{\sphinxupquote{ = ('o', 'v', '\textasciicircum{}', '\textless{}', '\textgreater{}', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')}}} \end{fulllineitems} \index{get\_aa() (matplotlib.lines.Line2D method)@\spxentry{get\_aa()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aa}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_antialiased}}}}}. \end{fulllineitems} \index{get\_antialiased() (matplotlib.lines.Line2D method)@\spxentry{get\_antialiased()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_antialiased}}}{\emph{self}}{} Return whether antialiased rendering is used. \end{fulllineitems} \index{get\_c() (matplotlib.lines.Line2D method)@\spxentry{get\_c()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_c}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_c}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_color}}}}}. \end{fulllineitems} \index{get\_color() (matplotlib.lines.Line2D method)@\spxentry{get\_color()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{} Return the line color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_color}}}}}. \end{fulllineitems} \index{get\_dash\_capstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_dash\_capstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_dash_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dash\_capstyle}}}{\emph{self}}{} Return the cap style for dashed lines. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dash\_capstyle}}}}}. \end{fulllineitems} \index{get\_dash\_joinstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_dash\_joinstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_dash_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dash\_joinstyle}}}{\emph{self}}{} Return the join style for dashed lines. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dash\_joinstyle}}}}}. \end{fulllineitems} \index{get\_data() (matplotlib.lines.Line2D method)@\spxentry{get\_data()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data}}}{\emph{self}, \emph{orig=True}}{} Return the xdata, ydata. If \sphinxstyleemphasis{orig} is \sphinxstyleemphasis{True}, return the original data. \end{fulllineitems} \index{get\_drawstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_drawstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_drawstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_drawstyle}}}{\emph{self}}{} Return the drawstyle. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_drawstyle}}}}}. \end{fulllineitems} \index{get\_ds() (matplotlib.lines.Line2D method)@\spxentry{get\_ds()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_ds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ds}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_drawstyle}}}}}. \end{fulllineitems} \index{get\_fillstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_fillstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_fillstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fillstyle}}}{\emph{self}}{} Return the marker fill style. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fillstyle}}}}}. \end{fulllineitems} \index{get\_linestyle() (matplotlib.lines.Line2D method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{} Return the linestyle. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{get\_linewidth() (matplotlib.lines.Line2D method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{} Return the linewidth in points. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{get\_ls() (matplotlib.lines.Line2D method)@\spxentry{get\_ls()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.lines.Line2D method)@\spxentry{get\_lw()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_marker() (matplotlib.lines.Line2D method)@\spxentry{get\_marker()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_marker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_marker}}}{\emph{self}}{} Return the line marker. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_marker}}}}}. \end{fulllineitems} \index{get\_markeredgecolor() (matplotlib.lines.Line2D method)@\spxentry{get\_markeredgecolor()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markeredgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markeredgecolor}}}{\emph{self}}{} Return the marker edge color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgecolor}}}}}. \end{fulllineitems} \index{get\_markeredgewidth() (matplotlib.lines.Line2D method)@\spxentry{get\_markeredgewidth()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markeredgewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markeredgewidth}}}{\emph{self}}{} Return the marker edge width in points. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgewidth}}}}}. \end{fulllineitems} \index{get\_markerfacecolor() (matplotlib.lines.Line2D method)@\spxentry{get\_markerfacecolor()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markerfacecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markerfacecolor}}}{\emph{self}}{} Return the marker face color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markerfacecolor}}}}}. \end{fulllineitems} \index{get\_markerfacecoloralt() (matplotlib.lines.Line2D method)@\spxentry{get\_markerfacecoloralt()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markerfacecoloralt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markerfacecoloralt}}}{\emph{self}}{} Return the alternate marker face color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markerfacecoloralt}}}}}. \end{fulllineitems} \index{get\_markersize() (matplotlib.lines.Line2D method)@\spxentry{get\_markersize()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markersize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markersize}}}{\emph{self}}{} Return the marker size in points. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markersize}}}}}. \end{fulllineitems} \index{get\_markevery() (matplotlib.lines.Line2D method)@\spxentry{get\_markevery()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markevery}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markevery}}}{\emph{self}}{} Return the markevery setting for marker subsampling. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markevery}}}}}. \end{fulllineitems} \index{get\_mec() (matplotlib.lines.Line2D method)@\spxentry{get\_mec()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_mec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_markeredgecolor}}}}}. \end{fulllineitems} \index{get\_mew() (matplotlib.lines.Line2D method)@\spxentry{get\_mew()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_mew}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mew}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_markeredgewidth}}}}}. \end{fulllineitems} \index{get\_mfc() (matplotlib.lines.Line2D method)@\spxentry{get\_mfc()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_mfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mfc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_markerfacecolor}}}}}. \end{fulllineitems} \index{get\_mfcalt() (matplotlib.lines.Line2D method)@\spxentry{get\_mfcalt()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_mfcalt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mfcalt}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_markerfacecoloralt}}}}}. \end{fulllineitems} \index{get\_ms() (matplotlib.lines.Line2D method)@\spxentry{get\_ms()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_ms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ms}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_markersize}}}}}. \end{fulllineitems} \index{get\_path() (matplotlib.lines.Line2D method)@\spxentry{get\_path()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} object associated with this line. \end{fulllineitems} \index{get\_pickradius() (matplotlib.lines.Line2D method)@\spxentry{get\_pickradius()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pickradius}}}{\emph{self}}{} Return the pick radius used for containment tests. See {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} for more details. \end{fulllineitems} \index{get\_solid\_capstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_solid\_capstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_solid_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_solid\_capstyle}}}{\emph{self}}{} Return the cap style for solid lines. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_solid\_capstyle}}}}}. \end{fulllineitems} \index{get\_solid\_joinstyle() (matplotlib.lines.Line2D method)@\spxentry{get\_solid\_joinstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_solid_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_solid\_joinstyle}}}{\emph{self}}{} Return the join style for solid lines. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_solid\_joinstyle}}}}}. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.lines.Line2D method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{get\_xdata() (matplotlib.lines.Line2D method)@\spxentry{get\_xdata()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_xdata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xdata}}}{\emph{self}, \emph{orig=True}}{} Return the xdata. If \sphinxstyleemphasis{orig} is \sphinxstyleemphasis{True}, return the original data, else the processed data. \end{fulllineitems} \index{get\_xydata() (matplotlib.lines.Line2D method)@\spxentry{get\_xydata()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_xydata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xydata}}}{\emph{self}}{} Return the \sphinxstyleemphasis{xy} data as a Nx2 numpy array. \end{fulllineitems} \index{get\_ydata() (matplotlib.lines.Line2D method)@\spxentry{get\_ydata()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.get_ydata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ydata}}}{\emph{self}, \emph{orig=True}}{} Return the ydata. If \sphinxstyleemphasis{orig} is \sphinxstyleemphasis{True}, return the original data, else the processed data. \end{fulllineitems} \index{is\_dashed() (matplotlib.lines.Line2D method)@\spxentry{is\_dashed()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.is_dashed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_dashed}}}{\emph{self}}{} Return whether line has a dashed linestyle. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{lineStyles (matplotlib.lines.Line2D attribute)@\spxentry{lineStyles}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.lineStyles}}\pysigline{\sphinxbfcode{\sphinxupquote{lineStyles}}\sphinxbfcode{\sphinxupquote{ = \{'': '\_draw\_nothing', ' ': '\_draw\_nothing', '-': '\_draw\_solid', '--': '\_draw\_dashed', '-.': '\_draw\_dash\_dot', ':': '\_draw\_dotted', 'None': '\_draw\_nothing'\}}}} \end{fulllineitems} \index{markers (matplotlib.lines.Line2D attribute)@\spxentry{markers}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.markers}}\pysigline{\sphinxbfcode{\sphinxupquote{markers}}\sphinxbfcode{\sphinxupquote{ = \{'.': 'point', ',': 'pixel', 'o': 'circle', 'v': 'triangle\_down', '\textasciicircum{}': 'triangle\_up', '\textless{}': 'triangle\_left', '\textgreater{}': 'triangle\_right', '1': 'tri\_down', '2': 'tri\_up', '3': 'tri\_left', '4': 'tri\_right', '8': 'octagon', 's': 'square', 'p': 'pentagon', '*': 'star', 'h': 'hexagon1', 'H': 'hexagon2', '+': 'plus', 'x': 'x', 'D': 'diamond', 'd': 'thin\_diamond', '\textbar{}': 'vline', '\_': 'hline', 'P': 'plus\_filled', 'X': 'x\_filled', 0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', 'None': 'nothing', None: 'nothing', ' ': 'nothing', '': 'nothing'\}}}} \end{fulllineitems} \index{recache() (matplotlib.lines.Line2D method)@\spxentry{recache()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.recache}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{recache}}}{\emph{self}, \emph{always=False}}{}~ \end{fulllineitems} \index{recache\_always() (matplotlib.lines.Line2D method)@\spxentry{recache\_always()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.recache_always}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{recache\_always}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_aa() (matplotlib.lines.Line2D method)@\spxentry{set\_aa()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{b}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_antialiased() (matplotlib.lines.Line2D method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{b}}{} Set whether to use antialiased rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_c() (matplotlib.lines.Line2D method)@\spxentry{set\_c()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_c}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_c}}}{\emph{self}, \emph{color}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_color}}}}}. \end{fulllineitems} \index{set\_color() (matplotlib.lines.Line2D method)@\spxentry{set\_color()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{color}}{} Set the color of the line. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dash\_capstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_dash\_capstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dash\_capstyle}}}{\emph{self}, \emph{s}}{} Set the cap style for dashed lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dash\_joinstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_dash\_joinstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dash\_joinstyle}}}{\emph{self}, \emph{s}}{} Set the join style for dashed lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} For examples see \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/joinstyle}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashes() (matplotlib.lines.Line2D method)@\spxentry{set\_dashes()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashes}}}{\emph{self}, \emph{seq}}{} Set the dash sequence. The dash sequence is a sequence of floats of even length describing the length of dashes and spaces in points. For example, (5, 2, 1, 2) describes a sequence of 5 point and 1 point dashes separated by 2 point spaces. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{seq}}] \leavevmode{[}sequence of floats (on/off ink in points) or (None, None){]} If \sphinxstyleemphasis{seq} is empty or \sphinxcode{\sphinxupquote{(None, None)}}, the linestyle will be set to solid. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_data() (matplotlib.lines.Line2D method)@\spxentry{set\_data()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{*args}}{} Set the x and y data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*args}}] \leavevmode{[}(2, N) array or two 1D arrays{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_drawstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_drawstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_drawstyle}}}{\emph{self}, \emph{drawstyle}}{} Set the drawstyle of the plot. The drawstyle determines how the points are connected. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{drawstyle}}] \leavevmode{[}\{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default'{]} For 'default', the points are connected with straight lines. The steps variants connect the points with step-like lines, i.e. horizontal lines with vertical steps. They differ in the location of the step: \begin{itemize} \item {} 'steps-pre': The step is at the beginning of the line segment, i.e. the line will be at the y-value of point to the right. \item {} 'steps-mid': The step is halfway between the points. \item {} 'steps-post: The step is at the end of the line segment, i.e. the line will be at the y-value of the point to the left. \item {} 'steps' is equal to 'steps-pre' and is maintained for backward-compatibility. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ds() (matplotlib.lines.Line2D method)@\spxentry{set\_ds()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ds}}}{\emph{self}, \emph{drawstyle}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_drawstyle}}}}}. \end{fulllineitems} \index{set\_fillstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_fillstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fillstyle}}}{\emph{self}, \emph{fs}}{} Set the marker fill style. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fs}}] \leavevmode{[}\{'full', 'left', 'right', 'bottom', 'top', 'none'\}{]} Possible values: \begin{itemize} \item {} 'full': Fill the whole marker with the \sphinxstyleemphasis{markerfacecolor}. \item {} 'left', 'right', 'bottom', 'top': Fill the marker half at the given side with the \sphinxstyleemphasis{markerfacecolor}. The other half of the marker is filled with \sphinxstyleemphasis{markerfacecoloralt}. \item {} 'none': No filling. \end{itemize} For examples see \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/marker\_fillstyle\_reference}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.lines.Line2D method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the linestyle of the line. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} Possible values: \begin{itemize} \item {} A string: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Linestyle &\sphinxstyletheadfamily Description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \sphinxcode{\sphinxupquote{'None'}} or \sphinxcode{\sphinxupquote{' '}} or \sphinxcode{\sphinxupquote{'{'}}} & draw nothing \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Optionally, the string may be preceded by a drawstyle, e.g. \sphinxcode{\sphinxupquote{'steps-{-}'}}. See {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_drawstyle()}}}}} for details. \item {} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_dashes()}}}}}. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidth() (matplotlib.lines.Line2D method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{w}}{} Set the line width in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{w}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ls() (matplotlib.lines.Line2D method)@\spxentry{set\_ls()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.lines.Line2D method)@\spxentry{set\_lw()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{w}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{set\_marker() (matplotlib.lines.Line2D method)@\spxentry{set\_marker()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_marker}}}{\emph{self}, \emph{marker}}{} Set the line marker. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker}}] \leavevmode{[}marker style{]} See {\hyperref[\detokenize{api/markers_api:module-matplotlib.markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markers}}}}} for full description of possible arguments. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markeredgecolor() (matplotlib.lines.Line2D method)@\spxentry{set\_markeredgecolor()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markeredgecolor}}}{\emph{self}, \emph{ec}}{} Set the marker edge color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ec}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markeredgewidth() (matplotlib.lines.Line2D method)@\spxentry{set\_markeredgewidth()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markeredgewidth}}}{\emph{self}, \emph{ew}}{} Set the marker edge width in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ew}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markerfacecolor() (matplotlib.lines.Line2D method)@\spxentry{set\_markerfacecolor()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markerfacecolor}}}{\emph{self}, \emph{fc}}{} Set the marker face color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fc}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markerfacecoloralt() (matplotlib.lines.Line2D method)@\spxentry{set\_markerfacecoloralt()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markerfacecoloralt}}}{\emph{self}, \emph{fc}}{} Set the alternate marker face color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fc}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markersize() (matplotlib.lines.Line2D method)@\spxentry{set\_markersize()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markersize}}}{\emph{self}, \emph{sz}}{} Set the marker size in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{sz}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_markevery() (matplotlib.lines.Line2D method)@\spxentry{set\_markevery()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_markevery}}}{\emph{self}, \emph{every}}{} Set the markevery property to subsample the plot when using markers. e.g., if \sphinxcode{\sphinxupquote{every=5}}, every 5-th marker will be plotted. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{every}}] \leavevmode{[}None or int or (int, int) or slice or List{[}int{]} or float or (float, float){]} Which markers to plot. \begin{itemize} \item {} every=None, every point will be plotted. \item {} every=N, every N-th marker will be plotted starting with marker 0. \item {} every=(start, N), every N-th marker, starting at point start, will be plotted. \item {} every=slice(start, end, N), every N-th marker, starting at point start, up to but not including point end, will be plotted. \item {} every={[}i, j, m, n{]}, only markers at points i, j, m, and n will be plotted. \item {} every=0.1, (i.e. a float) then markers will be spaced at approximately equal distances along the line; the distance along the line between markers is determined by multiplying the display-coordinate distance of the axes bounding-box diagonal by the value of every. \item {} every=(0.5, 0.1) (i.e. a length-2 tuple of float), the same functionality as every=0.1 is exhibited but the first marker will be 0.5 multiplied by the display-coordinate-diagonal-distance along the line. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Setting the markevery property will only show markers at actual data points. When using float arguments to set the markevery property on irregularly spaced data, the markers will likely not appear evenly spaced because the actual data points do not coincide with the theoretical spacing between markers. When using a start offset to specify the first marker, the offset will be from the first data point which may be different from the first the visible data point if the plot is zoomed in. If zooming in on a plot when using float arguments then the actual data points that have markers will change because the distance between markers is always determined from the display-coordinates axes-bounding-box-diagonal regardless of the actual axes data limits. \end{fulllineitems} \index{set\_mec() (matplotlib.lines.Line2D method)@\spxentry{set\_mec()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_mec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mec}}}{\emph{self}, \emph{ec}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgecolor}}}}}. \end{fulllineitems} \index{set\_mew() (matplotlib.lines.Line2D method)@\spxentry{set\_mew()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_mew}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mew}}}{\emph{self}, \emph{ew}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgewidth}}}}}. \end{fulllineitems} \index{set\_mfc() (matplotlib.lines.Line2D method)@\spxentry{set\_mfc()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_mfc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mfc}}}{\emph{self}, \emph{fc}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markerfacecolor}}}}}. \end{fulllineitems} \index{set\_mfcalt() (matplotlib.lines.Line2D method)@\spxentry{set\_mfcalt()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_mfcalt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mfcalt}}}{\emph{self}, \emph{fc}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markerfacecoloralt}}}}}. \end{fulllineitems} \index{set\_ms() (matplotlib.lines.Line2D method)@\spxentry{set\_ms()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ms}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ms}}}{\emph{self}, \emph{sz}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markersize}}}}}. \end{fulllineitems} \index{set\_picker() (matplotlib.lines.Line2D method)@\spxentry{set\_picker()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_picker}}}{\emph{self}, \emph{p}}{} Sets the event picker details for the line. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{p}}] \leavevmode{[}float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]}{]} If a float, it is used as the pick radius in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_pickradius() (matplotlib.lines.Line2D method)@\spxentry{set\_pickradius()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pickradius}}}{\emph{self}, \emph{d}}{} Set the pick radius used for containment tests. See {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} for more details. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{d}}] \leavevmode{[}float{]} Pick radius, in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_solid\_capstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_solid\_capstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_solid\_capstyle}}}{\emph{self}, \emph{s}}{} Set the cap style for solid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_solid\_joinstyle() (matplotlib.lines.Line2D method)@\spxentry{set\_solid\_joinstyle()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_solid\_joinstyle}}}{\emph{self}, \emph{s}}{} Set the join style for solid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} For examples see \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/joinstyle}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.lines.Line2D method)@\spxentry{set\_transform()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the Transformation instance used by this artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_xdata() (matplotlib.lines.Line2D method)@\spxentry{set\_xdata()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xdata}}}{\emph{self}, \emph{x}}{} Set the data array for x. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1D array{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ydata() (matplotlib.lines.Line2D method)@\spxentry{set\_ydata()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ydata}}}{\emph{self}, \emph{y}}{} Set the data array for y. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}1D array{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_from() (matplotlib.lines.Line2D method)@\spxentry{update\_from()}\spxextra{matplotlib.lines.Line2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from other to self. \end{fulllineitems} \index{validCap (matplotlib.lines.Line2D attribute)@\spxentry{validCap}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.validCap}}\pysigline{\sphinxbfcode{\sphinxupquote{validCap}}\sphinxbfcode{\sphinxupquote{ = ('butt', 'round', 'projecting')}}} \end{fulllineitems} \index{validJoin (matplotlib.lines.Line2D attribute)@\spxentry{validJoin}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.validJoin}}\pysigline{\sphinxbfcode{\sphinxupquote{validJoin}}\sphinxbfcode{\sphinxupquote{ = ('miter', 'round', 'bevel')}}} \end{fulllineitems} \index{verticalOffset (matplotlib.lines.Line2D attribute)@\spxentry{verticalOffset}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.verticalOffset}}\pysigline{\sphinxbfcode{\sphinxupquote{verticalOffset}}}~ \end{fulllineitems} \index{zorder (matplotlib.lines.Line2D attribute)@\spxentry{zorder}\spxextra{matplotlib.lines.Line2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.lines.Line2D}}} \label{\detokenize{api/_as_gen/matplotlib.lines.Line2D:examples-using-matplotlib-lines-line2d}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_custom\_legends.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_line\_with\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_customize\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_x.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/strip_chart:sphx-glr-gallery-animation-strip-chart-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Oscilloscope}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_poly\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_artist\_tests.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Artist tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \subsubsection{matplotlib.lines.VertexSelector} \label{\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib-lines-vertexselector}}\label{\detokenize{api/_as_gen/matplotlib.lines.VertexSelector::doc}}\index{VertexSelector (class in matplotlib.lines)@\spxentry{VertexSelector}\spxextra{class in matplotlib.lines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.lines.}}\sphinxbfcode{\sphinxupquote{VertexSelector}}}{\emph{line}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Manage the callbacks to maintain a list of selected vertices for {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}}. Derived classes should override {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector.process_selected}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{process\_selected()}}}}} to do something with the picks. Here is an example which highlights the selected verts with red circles: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{lines} \PYG{k}{as} \PYG{n+nn}{lines} \PYG{k}{class} \PYG{n+nc}{HighlightSelected}\PYG{p}{(}\PYG{n}{lines}\PYG{o}{.}\PYG{n}{VertexSelector}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{line}\PYG{p}{,} \PYG{n}{fmt}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ro}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{VertexSelector}\PYG{o}{.}\PYG{n+nf+fm}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{line}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{markers}\PYG{p}{,} \PYG{o}{=} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{axes}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fmt}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{process\PYGZus{}selected}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{ind}\PYG{p}{,} \PYG{n}{xs}\PYG{p}{,} \PYG{n}{ys}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{markers}\PYG{o}{.}\PYG{n}{set\PYGZus{}data}\PYG{p}{(}\PYG{n}{xs}\PYG{p}{,} \PYG{n}{ys}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bs\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{picker}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \PYG{n}{selector} \PYG{o}{=} \PYG{n}{HighlightSelected}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Initialize the class with a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} instance. The line should already be added to some {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance and should have the picker property set. \index{onpick() (matplotlib.lines.VertexSelector method)@\spxentry{onpick()}\spxextra{matplotlib.lines.VertexSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector.onpick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onpick}}}{\emph{self}, \emph{event}}{} When the line is picked, update the set of selected indices. \end{fulllineitems} \index{process\_selected() (matplotlib.lines.VertexSelector method)@\spxentry{process\_selected()}\spxextra{matplotlib.lines.VertexSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector.process_selected}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{process\_selected}}}{\emph{self}, \emph{ind}, \emph{xs}, \emph{ys}}{} Default "do nothing" implementation of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.VertexSelector:matplotlib.lines.VertexSelector.process_selected}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{process\_selected()}}}}} method. \sphinxstyleemphasis{ind} are the indices of the selected vertices. \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} are the coordinates of the selected vertices. \end{fulllineitems} \end{fulllineitems} \subsection{Functions} \label{\detokenize{api/lines_api:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.segment_hits:matplotlib.lines.segment_hits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{segment\_hits}}}}}(cx, cy, x, y, radius) & Return the indices of the segments in the polyline with coordinates (\sphinxstyleemphasis{cx}, \sphinxstyleemphasis{cy}) that are within a distance \sphinxstyleemphasis{radius} of the point (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.lines.segment\_hits} \label{\detokenize{api/_as_gen/matplotlib.lines.segment_hits:matplotlib-lines-segment-hits}}\label{\detokenize{api/_as_gen/matplotlib.lines.segment_hits::doc}}\index{segment\_hits() (in module matplotlib.lines)@\spxentry{segment\_hits()}\spxextra{in module matplotlib.lines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.lines.segment_hits:matplotlib.lines.segment_hits}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.lines.}}\sphinxbfcode{\sphinxupquote{segment\_hits}}}{\emph{cx}, \emph{cy}, \emph{x}, \emph{y}, \emph{radius}}{} Return the indices of the segments in the polyline with coordinates (\sphinxstyleemphasis{cx}, \sphinxstyleemphasis{cy}) that are within a distance \sphinxstyleemphasis{radius} of the point (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.markers}}} \label{\detokenize{api/markers_api:module-matplotlib.markers}}\label{\detokenize{api/markers_api:matplotlib-markers}}\label{\detokenize{api/markers_api::doc}}\index{matplotlib.markers (module)@\spxentry{matplotlib.markers}\spxextra{module}} This module contains functions to handle markers. Used by both the marker functionality of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. All possible markers are defined here: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|*{3}{\X{1}{3}|}} \hline \sphinxstyletheadfamily marker &\sphinxstyletheadfamily symbol &\sphinxstyletheadfamily description \\ \hline \endfirsthead \multicolumn{3}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily marker &\sphinxstyletheadfamily symbol &\sphinxstyletheadfamily description \\ \hline \endhead \hline \multicolumn{3}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot \sphinxcode{\sphinxupquote{"."}} & \sphinxincludegraphics{{m00}.png} & point \\ \hline \sphinxcode{\sphinxupquote{","}} & \sphinxincludegraphics{{m01}.png} & pixel \\ \hline \sphinxcode{\sphinxupquote{"o"}} & \sphinxincludegraphics{{m02}.png} & circle \\ \hline \sphinxcode{\sphinxupquote{"v"}} & \sphinxincludegraphics{{m03}.png} & triangle\_down \\ \hline \sphinxcode{\sphinxupquote{"\textasciicircum{}"}} & \sphinxincludegraphics{{m04}.png} & triangle\_up \\ \hline \sphinxcode{\sphinxupquote{"\textless{}"}} & \sphinxincludegraphics{{m05}.png} & triangle\_left \\ \hline \sphinxcode{\sphinxupquote{"\textgreater{}"}} & \sphinxincludegraphics{{m06}.png} & triangle\_right \\ \hline \sphinxcode{\sphinxupquote{"1"}} & \sphinxincludegraphics{{m07}.png} & tri\_down \\ \hline \sphinxcode{\sphinxupquote{"2"}} & \sphinxincludegraphics{{m08}.png} & tri\_up \\ \hline \sphinxcode{\sphinxupquote{"3"}} & \sphinxincludegraphics{{m09}.png} & tri\_left \\ \hline \sphinxcode{\sphinxupquote{"4"}} & \sphinxincludegraphics{{m10}.png} & tri\_right \\ \hline \sphinxcode{\sphinxupquote{"8"}} & \sphinxincludegraphics{{m11}.png} & octagon \\ \hline \sphinxcode{\sphinxupquote{"s"}} & \sphinxincludegraphics{{m12}.png} & square \\ \hline \sphinxcode{\sphinxupquote{"p"}} & \sphinxincludegraphics{{m13}.png} & pentagon \\ \hline \sphinxcode{\sphinxupquote{"P"}} & \sphinxincludegraphics{{m23}.png} & plus (filled) \\ \hline \sphinxcode{\sphinxupquote{"*"}} & \sphinxincludegraphics{{m14}.png} & star \\ \hline \sphinxcode{\sphinxupquote{"h"}} & \sphinxincludegraphics{{m15}.png} & hexagon1 \\ \hline \sphinxcode{\sphinxupquote{"H"}} & \sphinxincludegraphics{{m16}.png} & hexagon2 \\ \hline \sphinxcode{\sphinxupquote{"+"}} & \sphinxincludegraphics{{m17}.png} & plus \\ \hline \sphinxcode{\sphinxupquote{"x"}} & \sphinxincludegraphics{{m18}.png} & x \\ \hline \sphinxcode{\sphinxupquote{"X"}} & \sphinxincludegraphics{{m24}.png} & x (filled) \\ \hline \sphinxcode{\sphinxupquote{"D"}} & \sphinxincludegraphics{{m19}.png} & diamond \\ \hline \sphinxcode{\sphinxupquote{"d"}} & \sphinxincludegraphics{{m20}.png} & thin\_diamond \\ \hline \sphinxcode{\sphinxupquote{"\textbar{}"}} & \sphinxincludegraphics{{m21}.png} & vline \\ \hline \sphinxcode{\sphinxupquote{"\_"}} & \sphinxincludegraphics{{m22}.png} & hline \\ \hline \sphinxcode{\sphinxupquote{0}} (\sphinxcode{\sphinxupquote{TICKLEFT}}) & \sphinxincludegraphics{{m25}.png} & tickleft \\ \hline \sphinxcode{\sphinxupquote{1}} (\sphinxcode{\sphinxupquote{TICKRIGHT}}) & \sphinxincludegraphics{{m26}.png} & tickright \\ \hline \sphinxcode{\sphinxupquote{2}} (\sphinxcode{\sphinxupquote{TICKUP}}) & \sphinxincludegraphics{{m27}.png} & tickup \\ \hline \sphinxcode{\sphinxupquote{3}} (\sphinxcode{\sphinxupquote{TICKDOWN}}) & \sphinxincludegraphics{{m28}.png} & tickdown \\ \hline \sphinxcode{\sphinxupquote{4}} (\sphinxcode{\sphinxupquote{CARETLEFT}}) & \sphinxincludegraphics{{m29}.png} & caretleft \\ \hline \sphinxcode{\sphinxupquote{5}} (\sphinxcode{\sphinxupquote{CARETRIGHT}}) & \sphinxincludegraphics{{m30}.png} & caretright \\ \hline \sphinxcode{\sphinxupquote{6}} (\sphinxcode{\sphinxupquote{CARETUP}}) & \sphinxincludegraphics{{m31}.png} & caretup \\ \hline \sphinxcode{\sphinxupquote{7}} (\sphinxcode{\sphinxupquote{CARETDOWN}}) & \sphinxincludegraphics{{m32}.png} & caretdown \\ \hline \sphinxcode{\sphinxupquote{8}} (\sphinxcode{\sphinxupquote{CARETLEFTBASE}}) & \sphinxincludegraphics{{m33}.png} & caretleft (centered at base) \\ \hline \sphinxcode{\sphinxupquote{9}} (\sphinxcode{\sphinxupquote{CARETRIGHTBASE}}) & \sphinxincludegraphics{{m34}.png} & caretright (centered at base) \\ \hline \sphinxcode{\sphinxupquote{10}} (\sphinxcode{\sphinxupquote{CARETUPBASE}}) & \sphinxincludegraphics{{m35}.png} & caretup (centered at base) \\ \hline \sphinxcode{\sphinxupquote{11}} (\sphinxcode{\sphinxupquote{CARETDOWNBASE}}) & \sphinxincludegraphics{{m36}.png} & caretdown (centered at base) \\ \hline \sphinxcode{\sphinxupquote{"None"}}, \sphinxcode{\sphinxupquote{" "}} or \sphinxcode{\sphinxupquote{""}} && nothing \\ \hline \sphinxcode{\sphinxupquote{'\$...\$'}} & \sphinxincludegraphics{{m37}.png} & Render the string using mathtext. E.g \sphinxcode{\sphinxupquote{"\$f\$"}} for marker showing the letter \sphinxcode{\sphinxupquote{f}}. \\ \hline \sphinxcode{\sphinxupquote{verts}} && A list of (x, y) pairs used for Path vertices. The center of the marker is located at (0,0) and the size is normalized, such that the created path is encapsulated inside the unit cell. \\ \hline path && A {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \\ \hline \sphinxcode{\sphinxupquote{(numsides, style, angle)}} && The marker can also be a tuple \sphinxcode{\sphinxupquote{(numsides, style, angle)}}, which will create a custom, regular symbol. \begin{description} \item[{\sphinxcode{\sphinxupquote{numsides}}:}] \leavevmode the number of sides \item[{\sphinxcode{\sphinxupquote{style}}:}] \leavevmode the style of the regular symbol: \begin{itemize} \item {} 0: a regular polygon \item {} 1: a star-like symbol \item {} 2: an asterisk \item {} 3: a circle (\sphinxcode{\sphinxupquote{numsides}} and \sphinxcode{\sphinxupquote{angle}} is ignored); deprecated. \end{itemize} \item[{\sphinxcode{\sphinxupquote{angle}}:}] \leavevmode the angle of rotation of the symbol \end{description} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} For backward compatibility, the form \sphinxcode{\sphinxupquote{(verts, 0)}} is also accepted, but it is deprecated and equivalent to just \sphinxcode{\sphinxupquote{verts}} for giving a raw set of vertices that define the shape. \sphinxcode{\sphinxupquote{None}} is the default which means 'nothing', however this table is referred to from other docs for the valid inputs from marker inputs and in those cases \sphinxcode{\sphinxupquote{None}} still means 'default'. Note that special symbols can be defined via the {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{STIX math font}}}}, e.g. \sphinxcode{\sphinxupquote{"\$♫\$"}}. For an overview over the STIX font symbols refer to the \sphinxhref{http://www.stixfonts.org/allGlyphs.html}{STIX font table}. Also see the \DUrole{xref,std,std-doc}{/gallery/text\_labels\_and\_annotations/stix\_fonts\_demo}. Integer numbers from \sphinxcode{\sphinxupquote{0}} to \sphinxcode{\sphinxupquote{11}} create lines and triangles. Those are equally accessible via capitalized variables, like \sphinxcode{\sphinxupquote{CARETDOWNBASE}}. Hence the following are equivalent: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+m+mi}{11}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{markers}\PYG{o}{.}\PYG{n}{CARETDOWNBASE}\PYG{p}{)} \end{sphinxVerbatim} Examples showing the use of markers: \begin{itemize} \item {} \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/marker\_reference} \item {} \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/marker\_fillstyle\_reference} \item {} \DUrole{xref,std,std-doc}{/gallery/shapes\_and\_collections/marker\_path} \end{itemize} \subsection{Classes} \label{\detokenize{api/markers_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MarkerStyle}}}}}({[}marker, fillstyle{]}) & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.markers.MarkerStyle} \label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib-markers-markerstyle}}\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle::doc}}\index{MarkerStyle (class in matplotlib.markers)@\spxentry{MarkerStyle}\spxextra{class in matplotlib.markers}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.markers.}}\sphinxbfcode{\sphinxupquote{MarkerStyle}}}{\emph{marker=None}, \emph{fillstyle=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{marker}}] \leavevmode{[}string or array\_like, optional, default: None{]} See the descriptions of possible markers in the module docstring. \item[{\sphinxstylestrong{fillstyle}}] \leavevmode{[}string, optional, default: 'full'{]} 'full', 'left", 'right', 'bottom', 'top', 'none' \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{markers}}] \leavevmode{[}list of known marks{]} \item[{\sphinxstylestrong{fillstyles}}] \leavevmode{[}list of known fillstyles{]} \item[{\sphinxstylestrong{filled\_markers}}] \leavevmode{[}list of known filled markers.{]} \end{description} \end{description}\end{quote} \index{filled\_markers (matplotlib.markers.MarkerStyle attribute)@\spxentry{filled\_markers}\spxextra{matplotlib.markers.MarkerStyle attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.filled_markers}}\pysigline{\sphinxbfcode{\sphinxupquote{filled\_markers}}\sphinxbfcode{\sphinxupquote{ = ('o', 'v', '\textasciicircum{}', '\textless{}', '\textgreater{}', '8', 's', 'p', '*', 'h', 'H', 'D', 'd', 'P', 'X')}}} \end{fulllineitems} \index{fillstyles (matplotlib.markers.MarkerStyle attribute)@\spxentry{fillstyles}\spxextra{matplotlib.markers.MarkerStyle attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.fillstyles}}\pysigline{\sphinxbfcode{\sphinxupquote{fillstyles}}\sphinxbfcode{\sphinxupquote{ = ('full', 'left', 'right', 'bottom', 'top', 'none')}}} \end{fulllineitems} \index{get\_alt\_path() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_alt\_path()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_alt_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alt\_path}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_alt\_transform() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_alt\_transform()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_alt_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_alt\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_capstyle() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_fillstyle() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_fillstyle()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_fillstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fillstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_joinstyle() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_marker() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_marker()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_marker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_marker}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_path() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_path()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_snap\_threshold() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_snap\_threshold()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_snap_threshold}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_snap\_threshold}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_transform() (matplotlib.markers.MarkerStyle method)@\spxentry{get\_transform()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{}~ \end{fulllineitems} \index{is\_filled() (matplotlib.markers.MarkerStyle method)@\spxentry{is\_filled()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.is_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_filled}}}{\emph{self}}{}~ \end{fulllineitems} \index{markers (matplotlib.markers.MarkerStyle attribute)@\spxentry{markers}\spxextra{matplotlib.markers.MarkerStyle attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.markers}}\pysigline{\sphinxbfcode{\sphinxupquote{markers}}\sphinxbfcode{\sphinxupquote{ = \{'.': 'point', ',': 'pixel', 'o': 'circle', 'v': 'triangle\_down', '\textasciicircum{}': 'triangle\_up', '\textless{}': 'triangle\_left', '\textgreater{}': 'triangle\_right', '1': 'tri\_down', '2': 'tri\_up', '3': 'tri\_left', '4': 'tri\_right', '8': 'octagon', 's': 'square', 'p': 'pentagon', '*': 'star', 'h': 'hexagon1', 'H': 'hexagon2', '+': 'plus', 'x': 'x', 'D': 'diamond', 'd': 'thin\_diamond', '\textbar{}': 'vline', '\_': 'hline', 'P': 'plus\_filled', 'X': 'x\_filled', 0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 5: 'caretright', 6: 'caretup', 7: 'caretdown', 8: 'caretleftbase', 9: 'caretrightbase', 10: 'caretupbase', 11: 'caretdownbase', 'None': 'nothing', None: 'nothing', ' ': 'nothing', '': 'nothing'\}}}} \end{fulllineitems} \index{set\_fillstyle() (matplotlib.markers.MarkerStyle method)@\spxentry{set\_fillstyle()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.set_fillstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fillstyle}}}{\emph{self}, \emph{fillstyle}}{} Sets fillstyle \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fillstyle}}] \leavevmode{[}string amongst known fillstyles{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_marker() (matplotlib.markers.MarkerStyle method)@\spxentry{set\_marker()}\spxextra{matplotlib.markers.MarkerStyle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle.set_marker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_marker}}}{\emph{self}, \emph{marker}}{}~ \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.mathtext}}} \label{\detokenize{api/mathtext_api:matplotlib-mathtext}}\label{\detokenize{api/mathtext_api::doc}} \sphinxincludegraphics[]{inheritance-440f65e2340cee050ef7f8a73c04c0e2f4022eec.pdf} \phantomsection\label{\detokenize{api/mathtext_api:module-matplotlib.mathtext}}\index{matplotlib.mathtext (module)@\spxentry{matplotlib.mathtext}\spxextra{module}} {\hyperref[\detokenize{api/mathtext_api:module-matplotlib.mathtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mathtext}}}}} is a module for parsing a subset of the TeX math syntax and drawing them to a matplotlib backend. For a tutorial of its usage see {\hyperref[\detokenize{tutorials/text/mathtext::doc}]{\sphinxcrossref{\DUrole{doc}{Writing mathematical expressions}}}}. This document is primarily concerned with implementation details. The module uses \sphinxhref{http://pyparsing.wikispaces.com/}{pyparsing} to parse the TeX expression. The Bakoma distribution of the TeX Computer Modern fonts, and STIX fonts are supported. There is experimental support for using arbitrary fonts, but results may vary without proper tweaking and metrics for those fonts. \index{Accent (class in matplotlib.mathtext)@\spxentry{Accent}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Accent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Accent}}}{\emph{c}, \emph{state}, \emph{math=True}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Char}}}}} The font metrics need to be dealt with differently for accents, since they are already offset correctly from the baseline in TrueType fonts. \index{grow() (matplotlib.mathtext.Accent method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Accent method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Accent.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{render() (matplotlib.mathtext.Accent method)@\spxentry{render()}\spxextra{matplotlib.mathtext.Accent method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Accent.render}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render}}}{\emph{self}, \emph{x}, \emph{y}}{} Render the character to the canvas. \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Accent method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Accent method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Accent.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{AutoHeightChar (class in matplotlib.mathtext)@\spxentry{AutoHeightChar}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.AutoHeightChar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{AutoHeightChar}}}{\emph{c}, \emph{height}, \emph{depth}, \emph{state}, \emph{always=False}, \emph{factor=None}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Hlist}}}}} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.AutoHeightChar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoHeightChar}}}}} will create a character as close to the given height and depth as possible. When using a font with multiple height versions of some characters (such as the BaKoMa fonts), the correct glyph will be selected, otherwise this will always just return a scaled version of the glyph. \end{fulllineitems} \index{AutoWidthChar (class in matplotlib.mathtext)@\spxentry{AutoWidthChar}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.AutoWidthChar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{AutoWidthChar}}}{\emph{c}, \emph{width}, \emph{state}, \emph{always=False}, \emph{char\_class=\textless{}class 'matplotlib.mathtext.Char'\textgreater{}}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Hlist}}}}} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.AutoWidthChar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoWidthChar}}}}} will create a character as close to the given width as possible. When using a font with multiple width versions of some characters (such as the BaKoMa fonts), the correct glyph will be selected, otherwise this will always just return a scaled version of the glyph. \end{fulllineitems} \index{BakomaFonts (class in matplotlib.mathtext)@\spxentry{BakomaFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.BakomaFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{BakomaFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.TruetypeFonts}}}}} Use the Bakoma TrueType fonts for rendering. Symbols are strewn about a number of font files, each of which has its own proprietary 8-bit encoding. \index{alias (matplotlib.mathtext.BakomaFonts attribute)@\spxentry{alias}\spxextra{matplotlib.mathtext.BakomaFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.BakomaFonts.alias}}\pysigline{\sphinxbfcode{\sphinxupquote{alias}}\sphinxbfcode{\sphinxupquote{ = '\textbackslash{}\textbackslash{}{]}'}}} \end{fulllineitems} \index{get\_sized\_alternatives\_for\_symbol() (matplotlib.mathtext.BakomaFonts method)@\spxentry{get\_sized\_alternatives\_for\_symbol()}\spxextra{matplotlib.mathtext.BakomaFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.BakomaFonts.get_sized_alternatives_for_symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sized\_alternatives\_for\_symbol}}}{\emph{self}, \emph{fontname}, \emph{sym}}{} Override if your font provides multiple sizes of the same symbol. Should return a list of symbols matching \sphinxstyleemphasis{sym} in various sizes. The expression renderer will select the most appropriate size for a given situation from this list. \end{fulllineitems} \index{target (matplotlib.mathtext.BakomaFonts attribute)@\spxentry{target}\spxextra{matplotlib.mathtext.BakomaFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.BakomaFonts.target}}\pysigline{\sphinxbfcode{\sphinxupquote{target}}\sphinxbfcode{\sphinxupquote{ = '{]}'}}} \end{fulllineitems} \end{fulllineitems} \index{Box (class in matplotlib.mathtext)@\spxentry{Box}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Box}}}{\emph{width}, \emph{height}, \emph{depth}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Node}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Node}}}}} Represents any node with a physical location. \index{grow() (matplotlib.mathtext.Box method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Box method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Box.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{render() (matplotlib.mathtext.Box method)@\spxentry{render()}\spxextra{matplotlib.mathtext.Box method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Box.render}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{}~ \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Box method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Box method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Box.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{Char (class in matplotlib.mathtext)@\spxentry{Char}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Char}}}{\emph{c}, \emph{state}, \emph{math=True}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Node}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Node}}}}} Represents a single character. Unlike TeX, the font information and metrics are stored with each {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Char}}}}} to make it easier to lookup the font metrics when needed. Note that TeX boxes have a width, height, and depth, unlike Type1 and Truetype which use a full bounding box and an advance in the x-direction. The metrics must be converted to the TeX way, and the advance (if different from width) must be converted into a {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Kern}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Kern}}}}} node when the {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Char}}}}} is added to its parent {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}}. \index{get\_kerning() (matplotlib.mathtext.Char method)@\spxentry{get\_kerning()}\spxextra{matplotlib.mathtext.Char method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char.get_kerning}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kerning}}}{\emph{self}, \emph{next}}{} Return the amount of kerning between this and the given character. Called when characters are strung together into {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}} to create {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Kern}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Kern}}}}} nodes. \end{fulllineitems} \index{grow() (matplotlib.mathtext.Char method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Char method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{is\_slanted() (matplotlib.mathtext.Char method)@\spxentry{is\_slanted()}\spxextra{matplotlib.mathtext.Char method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char.is_slanted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_slanted}}}{\emph{self}}{}~ \end{fulllineitems} \index{render() (matplotlib.mathtext.Char method)@\spxentry{render()}\spxextra{matplotlib.mathtext.Char method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char.render}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render}}}{\emph{self}, \emph{x}, \emph{y}}{} Render the character to the canvas \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Char method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Char method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Char.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{ComputerModernFontConstants (class in matplotlib.mathtext)@\spxentry{ComputerModernFontConstants}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{ComputerModernFontConstants}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.FontConstantsBase}}}}} \index{delta (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{delta}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.delta}}\pysigline{\sphinxbfcode{\sphinxupquote{delta}}\sphinxbfcode{\sphinxupquote{ = 0.075}}} \end{fulllineitems} \index{delta\_integral (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{delta\_integral}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.delta_integral}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_integral}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{delta\_slanted (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{delta\_slanted}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.delta_slanted}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_slanted}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{script\_space (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{script\_space}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.script_space}}\pysigline{\sphinxbfcode{\sphinxupquote{script\_space}}\sphinxbfcode{\sphinxupquote{ = 0.075}}} \end{fulllineitems} \index{sub1 (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{sub1}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.sub1}}\pysigline{\sphinxbfcode{\sphinxupquote{sub1}}\sphinxbfcode{\sphinxupquote{ = 0.2}}} \end{fulllineitems} \index{sub2 (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{sub2}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.sub2}}\pysigline{\sphinxbfcode{\sphinxupquote{sub2}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{subdrop (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{subdrop}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.subdrop}}\pysigline{\sphinxbfcode{\sphinxupquote{subdrop}}\sphinxbfcode{\sphinxupquote{ = 0.2}}} \end{fulllineitems} \index{sup1 (matplotlib.mathtext.ComputerModernFontConstants attribute)@\spxentry{sup1}\spxextra{matplotlib.mathtext.ComputerModernFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.ComputerModernFontConstants.sup1}}\pysigline{\sphinxbfcode{\sphinxupquote{sup1}}\sphinxbfcode{\sphinxupquote{ = 0.45}}} \end{fulllineitems} \end{fulllineitems} \index{DejaVuFonts (class in matplotlib.mathtext)@\spxentry{DejaVuFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{DejaVuFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.UnicodeFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.UnicodeFonts}}}}} \index{use\_cmex (matplotlib.mathtext.DejaVuFonts attribute)@\spxentry{use\_cmex}\spxextra{matplotlib.mathtext.DejaVuFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuFonts.use_cmex}}\pysigline{\sphinxbfcode{\sphinxupquote{use\_cmex}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \end{fulllineitems} \index{DejaVuSansFontConstants (class in matplotlib.mathtext)@\spxentry{DejaVuSansFontConstants}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuSansFontConstants}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{DejaVuSansFontConstants}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.FontConstantsBase}}}}} \end{fulllineitems} \index{DejaVuSansFonts (class in matplotlib.mathtext)@\spxentry{DejaVuSansFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuSansFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{DejaVuSansFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.DejaVuFonts}}}}} A font handling class for the DejaVu Sans fonts If a glyph is not found it will fallback to Stix Sans \end{fulllineitems} \index{DejaVuSerifFontConstants (class in matplotlib.mathtext)@\spxentry{DejaVuSerifFontConstants}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuSerifFontConstants}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{DejaVuSerifFontConstants}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.FontConstantsBase}}}}} \end{fulllineitems} \index{DejaVuSerifFonts (class in matplotlib.mathtext)@\spxentry{DejaVuSerifFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuSerifFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{DejaVuSerifFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.DejaVuFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.DejaVuFonts}}}}} A font handling class for the DejaVu Serif fonts If a glyph is not found it will fallback to Stix Serif \end{fulllineitems} \index{Error() (in module matplotlib.mathtext)@\spxentry{Error()}\spxextra{in module matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Error}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Error}}}{\emph{msg}}{} Helper class to raise parser errors. \end{fulllineitems} \index{Fil (class in matplotlib.mathtext)@\spxentry{Fil}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fil}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Fil}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{Fill (class in matplotlib.mathtext)@\spxentry{Fill}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fill}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Fill}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{Filll (class in matplotlib.mathtext)@\spxentry{Filll}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Filll}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Filll}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{FontConstantsBase (class in matplotlib.mathtext)@\spxentry{FontConstantsBase}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{FontConstantsBase}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A set of constants that controls how certain things, such as sub- and superscripts are laid out. These are all metrics that can't be reliably retrieved from the font metrics in the font itself. \index{delta (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{delta}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.delta}}\pysigline{\sphinxbfcode{\sphinxupquote{delta}}\sphinxbfcode{\sphinxupquote{ = 0.025}}} \end{fulllineitems} \index{delta\_integral (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{delta\_integral}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.delta_integral}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_integral}}\sphinxbfcode{\sphinxupquote{ = 0.1}}} \end{fulllineitems} \index{delta\_slanted (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{delta\_slanted}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.delta_slanted}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_slanted}}\sphinxbfcode{\sphinxupquote{ = 0.2}}} \end{fulllineitems} \index{script\_space (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{script\_space}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.script_space}}\pysigline{\sphinxbfcode{\sphinxupquote{script\_space}}\sphinxbfcode{\sphinxupquote{ = 0.05}}} \end{fulllineitems} \index{sub1 (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{sub1}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.sub1}}\pysigline{\sphinxbfcode{\sphinxupquote{sub1}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{sub2 (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{sub2}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.sub2}}\pysigline{\sphinxbfcode{\sphinxupquote{sub2}}\sphinxbfcode{\sphinxupquote{ = 0.5}}} \end{fulllineitems} \index{subdrop (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{subdrop}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.subdrop}}\pysigline{\sphinxbfcode{\sphinxupquote{subdrop}}\sphinxbfcode{\sphinxupquote{ = 0.4}}} \end{fulllineitems} \index{sup1 (matplotlib.mathtext.FontConstantsBase attribute)@\spxentry{sup1}\spxextra{matplotlib.mathtext.FontConstantsBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase.sup1}}\pysigline{\sphinxbfcode{\sphinxupquote{sup1}}\sphinxbfcode{\sphinxupquote{ = 0.7}}} \end{fulllineitems} \end{fulllineitems} \index{Fonts (class in matplotlib.mathtext)@\spxentry{Fonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Fonts}}}{\emph{default\_font\_prop}, \emph{mathtext\_backend}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} An abstract base class for a system of fonts to use for mathtext. The class must be able to take symbol keys and font file names and return the character metrics. It also delegates to a backend class to do the actual drawing. \sphinxstyleemphasis{default\_font\_prop}: A {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} object to use for the default non-math font, or the base font for Unicode (generic) font rendering. \sphinxstyleemphasis{mathtext\_backend}: A subclass of \sphinxcode{\sphinxupquote{MathTextBackend}} used to delegate the actual rendering. \index{destroy() (matplotlib.mathtext.Fonts method)@\spxentry{destroy()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.destroy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{destroy}}}{\emph{self}}{} Fix any cyclical references before the object is about to be destroyed. \end{fulllineitems} \index{get\_kern() (matplotlib.mathtext.Fonts method)@\spxentry{get\_kern()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_kern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kern}}}{\emph{self}, \emph{font1}, \emph{fontclass1}, \emph{sym1}, \emph{fontsize1}, \emph{font2}, \emph{fontclass2}, \emph{sym2}, \emph{fontsize2}, \emph{dpi}}{} Get the kerning distance for font between \sphinxstyleemphasis{sym1} and \sphinxstyleemphasis{sym2}. \sphinxstyleemphasis{fontX}: one of the TeX font names: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tt}\PYG{p}{,} \PYG{n}{it}\PYG{p}{,} \PYG{n}{rm}\PYG{p}{,} \PYG{n}{cal}\PYG{p}{,} \PYG{n}{sf}\PYG{p}{,} \PYG{n}{bf} \PYG{o+ow}{or} \PYG{n}{default}\PYG{o}{/}\PYG{n}{regular} \PYG{p}{(}\PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{math}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{fontclassX}: TODO \sphinxstyleemphasis{symX}: a symbol in raw TeX form. e.g., '1', 'x' or 'sigma' \sphinxstyleemphasis{fontsizeX}: the fontsize in points \sphinxstyleemphasis{dpi}: the current dots-per-inch \end{fulllineitems} \index{get\_metrics() (matplotlib.mathtext.Fonts method)@\spxentry{get\_metrics()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_metrics}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_metrics}}}{\emph{self}, \emph{font}, \emph{font\_class}, \emph{sym}, \emph{fontsize}, \emph{dpi}, \emph{math=True}}{} \sphinxstyleemphasis{font}: one of the TeX font names: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tt}\PYG{p}{,} \PYG{n}{it}\PYG{p}{,} \PYG{n}{rm}\PYG{p}{,} \PYG{n}{cal}\PYG{p}{,} \PYG{n}{sf}\PYG{p}{,} \PYG{n}{bf} \PYG{o+ow}{or} \PYG{n}{default}\PYG{o}{/}\PYG{n}{regular} \PYG{p}{(}\PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{math}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{font\_class}: TODO \sphinxstyleemphasis{sym}: a symbol in raw TeX form. e.g., '1', 'x' or 'sigma' \sphinxstyleemphasis{fontsize}: font size in points \sphinxstyleemphasis{dpi}: current dots-per-inch \sphinxstyleemphasis{math}: whether sym is a math character Returns an object with the following attributes: \begin{itemize} \item {} \sphinxstyleemphasis{advance}: The advance distance (in points) of the glyph. \item {} \sphinxstyleemphasis{height}: The height of the glyph in points. \item {} \sphinxstyleemphasis{width}: The width of the glyph in points. \item {} \sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xmax}, \sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ymax} - the ink rectangle of the glyph \item {} \sphinxstyleemphasis{iceberg} - the distance from the baseline to the top of the glyph. This corresponds to TeX's definition of "height". \end{itemize} \end{fulllineitems} \index{get\_results() (matplotlib.mathtext.Fonts method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}}{} Get the data needed by the backend to render the math expression. The return value is backend-specific. \end{fulllineitems} \index{get\_sized\_alternatives\_for\_symbol() (matplotlib.mathtext.Fonts method)@\spxentry{get\_sized\_alternatives\_for\_symbol()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_sized_alternatives_for_symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sized\_alternatives\_for\_symbol}}}{\emph{self}, \emph{fontname}, \emph{sym}}{} Override if your font provides multiple sizes of the same symbol. Should return a list of symbols matching \sphinxstyleemphasis{sym} in various sizes. The expression renderer will select the most appropriate size for a given situation from this list. \end{fulllineitems} \index{get\_underline\_thickness() (matplotlib.mathtext.Fonts method)@\spxentry{get\_underline\_thickness()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_underline_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_underline\_thickness}}}{\emph{self}, \emph{font}, \emph{fontsize}, \emph{dpi}}{} Get the line thickness that matches the given font. Used as a base unit for drawing lines such as in a fraction or radical. \end{fulllineitems} \index{get\_used\_characters() (matplotlib.mathtext.Fonts method)@\spxentry{get\_used\_characters()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_used_characters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_used\_characters}}}{\emph{self}}{} Get the set of characters that were used in the math expression. Used by backends that need to subset fonts so they know which glyphs to include. \end{fulllineitems} \index{get\_xheight() (matplotlib.mathtext.Fonts method)@\spxentry{get\_xheight()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.get_xheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xheight}}}{\emph{self}, \emph{font}, \emph{fontsize}, \emph{dpi}}{} Get the xheight for the given \sphinxstyleemphasis{font} and \sphinxstyleemphasis{fontsize}. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.Fonts method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{facename}, \emph{font\_class}, \emph{sym}, \emph{fontsize}, \emph{dpi}}{} Draw a glyph at \begin{itemize} \item {} \sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}: position \item {} \sphinxstyleemphasis{facename}: One of the TeX face names \item {} \sphinxstyleemphasis{font\_class}: \item {} \sphinxstyleemphasis{sym}: TeX symbol name or single character \item {} \sphinxstyleemphasis{fontsize}: fontsize in points \item {} \sphinxstyleemphasis{dpi}: The dpi to draw at. \end{itemize} \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.Fonts method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \index{set\_canvas\_size() (matplotlib.mathtext.Fonts method)@\spxentry{set\_canvas\_size()}\spxextra{matplotlib.mathtext.Fonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts.set_canvas_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_canvas\_size}}}{\emph{self}, \emph{w}, \emph{h}, \emph{d}}{} Set the size of the buffer used to render the math expression. Only really necessary for the bitmap backends. \end{fulllineitems} \end{fulllineitems} \index{Glue (class in matplotlib.mathtext)@\spxentry{Glue}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Glue}}}{\emph{glue\_type}, \emph{copy=False}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Node}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Node}}}}} Most of the information in this object is stored in the underlying {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.GlueSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GlueSpec}}}}} class, which is shared between multiple glue objects. (This is a memory optimization which probably doesn't matter anymore, but it's easier to stick to what TeX does.) \index{grow() (matplotlib.mathtext.Glue method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Glue method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Glue.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Glue method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Glue method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Glue.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{GlueSpec (class in matplotlib.mathtext)@\spxentry{GlueSpec}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.GlueSpec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{GlueSpec}}}{\emph{width=0.0}, \emph{stretch=0.0}, \emph{stretch\_order=0}, \emph{shrink=0.0}, \emph{shrink\_order=0}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} See {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Glue}}}}}. \index{copy() (matplotlib.mathtext.GlueSpec method)@\spxentry{copy()}\spxextra{matplotlib.mathtext.GlueSpec method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.GlueSpec.copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy}}}{\emph{self}}{}~ \end{fulllineitems} \index{factory() (matplotlib.mathtext.GlueSpec class method)@\spxentry{factory()}\spxextra{matplotlib.mathtext.GlueSpec class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.GlueSpec.factory}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{factory}}}{\emph{glue\_type}}{}~ \end{fulllineitems} \end{fulllineitems} \index{HCentered (class in matplotlib.mathtext)@\spxentry{HCentered}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.HCentered}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{HCentered}}}{\emph{elements}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Hlist}}}}} A convenience class to create an {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}} whose contents are centered within its enclosing box. \end{fulllineitems} \index{Hbox (class in matplotlib.mathtext)@\spxentry{Hbox}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Hbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Hbox}}}{\emph{width}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Box}}}}} A box with only width (zero height and depth). \end{fulllineitems} \index{Hlist (class in matplotlib.mathtext)@\spxentry{Hlist}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Hlist}}}{\emph{elements}, \emph{w=0.0}, \emph{m='additional'}, \emph{do\_kern=True}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.List}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.List}}}}} A horizontal list of boxes. \index{hpack() (matplotlib.mathtext.Hlist method)@\spxentry{hpack()}\spxextra{matplotlib.mathtext.Hlist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist.hpack}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hpack}}}{\emph{self}, \emph{w=0.0}, \emph{m='additional'}}{} The main duty of {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist.hpack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hpack()}}}}} is to compute the dimensions of the resulting boxes, and to adjust the glue if one of those dimensions is pre-specified. The computed sizes normally enclose all of the material inside the new box; but some items may stick out if negative glue is used, if the box is overfull, or if a \sphinxcode{\sphinxupquote{\textbackslash{}vbox}} includes other boxes that have been shifted left. \begin{itemize} \item {} \sphinxstyleemphasis{w}: specifies a width \item {} \sphinxstyleemphasis{m}: is either 'exactly' or 'additional'. \end{itemize} Thus, \sphinxcode{\sphinxupquote{hpack(w, 'exactly')}} produces a box whose width is exactly \sphinxstyleemphasis{w}, while \sphinxcode{\sphinxupquote{hpack(w, 'additional')}} yields a box whose width is the natural width plus \sphinxstyleemphasis{w}. The default values produce a box with the natural width. \end{fulllineitems} \index{kern() (matplotlib.mathtext.Hlist method)@\spxentry{kern()}\spxextra{matplotlib.mathtext.Hlist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist.kern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{kern}}}{\emph{self}}{} Insert {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Kern}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Kern}}}}} nodes between {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Char}}}}} nodes to set kerning. The {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Char}}}}} nodes themselves determine the amount of kerning they need (in {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Char.get_kerning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_kerning()}}}}}), and this function just creates the linked list in the correct way. \end{fulllineitems} \end{fulllineitems} \index{Hrule (class in matplotlib.mathtext)@\spxentry{Hrule}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Hrule}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Hrule}}}{\emph{state}, \emph{thickness=None}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Rule}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Rule}}}}} Convenience class to create a horizontal rule. \end{fulllineitems} \index{Kern (class in matplotlib.mathtext)@\spxentry{Kern}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Kern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Kern}}}{\emph{width}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Node}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Node}}}}} A {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Kern}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Kern}}}}} node has a width field to specify a (normally negative) amount of spacing. This spacing correction appears in horizontal lists between letters like A and V when the font designer said that it looks better to move them closer together or further apart. A kern node can also appear in a vertical list, when its \sphinxstyleemphasis{width} denotes additional spacing in the vertical direction. \index{depth (matplotlib.mathtext.Kern attribute)@\spxentry{depth}\spxextra{matplotlib.mathtext.Kern attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Kern.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \index{grow() (matplotlib.mathtext.Kern method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Kern method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Kern.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{height (matplotlib.mathtext.Kern attribute)@\spxentry{height}\spxextra{matplotlib.mathtext.Kern attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Kern.height}}\pysigline{\sphinxbfcode{\sphinxupquote{height}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Kern method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Kern method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Kern.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{List (class in matplotlib.mathtext)@\spxentry{List}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.List}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{List}}}{\emph{elements}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Box}}}}} A list of nodes (either horizontal or vertical). \index{grow() (matplotlib.mathtext.List method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.List method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.List.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{shrink() (matplotlib.mathtext.List method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.List method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.List.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{MathTextParser (class in matplotlib.mathtext)@\spxentry{MathTextParser}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathTextParser}}}{\emph{output}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Create a MathTextParser for the given backend \sphinxstyleemphasis{output}. \index{get\_depth() (matplotlib.mathtext.MathTextParser method)@\spxentry{get\_depth()}\spxextra{matplotlib.mathtext.MathTextParser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.get_depth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_depth}}}{\emph{self}, \emph{texstr}, \emph{dpi=120}, \emph{fontsize=14}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{texstr}}] \leavevmode{[}str{]} A valid mathtext string, e.g., r'IQ: \$sigma\_i=15\$'. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dots-per-inch setting used to render the text. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{depth}}] \leavevmode{[}int{]} Offset of the baseline from the bottom of the image, in pixels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{parse (matplotlib.mathtext.MathTextParser attribute)@\spxentry{parse}\spxextra{matplotlib.mathtext.MathTextParser attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.parse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{parse}}}{\emph{self}, \emph{s}, \emph{dpi=72}, \emph{prop=None}}{} Parse the given math expression \sphinxstyleemphasis{s} at the given \sphinxstyleemphasis{dpi}. If \sphinxstyleemphasis{prop} is provided, it is a {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} object specifying the "default" font to use in the math expression, used for all non-math text. The results are cached, so multiple calls to {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.parse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{parse()}}}}} with the same expression should be fast. \end{fulllineitems} \index{to\_mask() (matplotlib.mathtext.MathTextParser method)@\spxentry{to\_mask()}\spxextra{matplotlib.mathtext.MathTextParser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.to_mask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_mask}}}{\emph{self}, \emph{texstr}, \emph{dpi=120}, \emph{fontsize=14}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{texstr}}] \leavevmode{[}str{]} A valid mathtext string, e.g., r'IQ: \$sigma\_i=15\$'. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dots-per-inch setting used to render the text. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int{]} The font size in points \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{array}}] \leavevmode{[}2D uint8 alpha{]} Mask array of rasterized tex. \item[{\sphinxstylestrong{depth}}] \leavevmode{[}int{]} Offset of the baseline from the bottom of the image, in pixels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{to\_png() (matplotlib.mathtext.MathTextParser method)@\spxentry{to\_png()}\spxextra{matplotlib.mathtext.MathTextParser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.to_png}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_png}}}{\emph{self}, \emph{filename}, \emph{texstr}, \emph{color='black'}, \emph{dpi=120}, \emph{fontsize=14}}{} Render a tex expression to a PNG file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filename}}] \leavevmode A writable filename or fileobject. \item[{\sphinxstylestrong{texstr}}] \leavevmode{[}str{]} A valid mathtext string, e.g., r'IQ: \$sigma\_i=15\$'. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} The text color. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dots-per-inch setting used to render the text. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int{]} The font size in points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{depth}}] \leavevmode{[}int{]} Offset of the baseline from the bottom of the image, in pixels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{to\_rgba() (matplotlib.mathtext.MathTextParser method)@\spxentry{to\_rgba()}\spxextra{matplotlib.mathtext.MathTextParser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextParser.to_rgba}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_rgba}}}{\emph{self}, \emph{texstr}, \emph{color='black'}, \emph{dpi=120}, \emph{fontsize=14}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{texstr}}] \leavevmode{[}str{]} A valid mathtext string, e.g., r'IQ: \$sigma\_i=15\$'. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} The text color. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float{]} The dots-per-inch setting used to render the text. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int{]} The font size in points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{array}}] \leavevmode{[}(M, N, 4) array{]} RGBA color values of rasterized tex, colorized with \sphinxstyleemphasis{color}. \item[{\sphinxstylestrong{depth}}] \leavevmode{[}int{]} Offset of the baseline from the bottom of the image, in pixels. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{MathTextWarning@\spxentry{MathTextWarning}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathTextWarning}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathTextWarning}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#Warning}{\sphinxcode{\sphinxupquote{Warning}}} \end{fulllineitems} \index{MathtextBackend (class in matplotlib.mathtext)@\spxentry{MathtextBackend}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackend}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The base class for the mathtext backend-specific code. The purpose of {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MathtextBackend}}}}} subclasses is to interface between mathtext and a specific matplotlib graphics backend. Subclasses need to override the following: \begin{itemize} \item {} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.render_glyph}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{render\_glyph()}}}}} \item {} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.render_rect_filled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{render\_rect\_filled()}}}}} \item {} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.get_results}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_results()}}}}} \end{itemize} And optionally, if you need to use a FreeType hinting style: \begin{itemize} \item {} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.get_hinting_type}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_hinting\_type()}}}}} \end{itemize} \index{get\_hinting\_type() (matplotlib.mathtext.MathtextBackend method)@\spxentry{get\_hinting\_type()}\spxextra{matplotlib.mathtext.MathtextBackend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.get_hinting_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hinting\_type}}}{\emph{self}}{} Get the FreeType hinting type to use with this particular backend. \end{fulllineitems} \index{get\_results() (matplotlib.mathtext.MathtextBackend method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackend method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackend method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \index{set\_canvas\_size() (matplotlib.mathtext.MathtextBackend method)@\spxentry{set\_canvas\_size()}\spxextra{matplotlib.mathtext.MathtextBackend method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend.set_canvas_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_canvas\_size}}}{\emph{self}, \emph{w}, \emph{h}, \emph{d}}{} Dimension the drawing canvas \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendAgg (class in matplotlib.mathtext)@\spxentry{MathtextBackendAgg}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendAgg}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Render glyphs and rectangles to an FTImage buffer, which is later transferred to the Agg image by the Agg backend. \index{get\_hinting\_type() (matplotlib.mathtext.MathtextBackendAgg method)@\spxentry{get\_hinting\_type()}\spxextra{matplotlib.mathtext.MathtextBackendAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg.get_hinting_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hinting\_type}}}{\emph{self}}{} Get the FreeType hinting type to use with this particular backend. \end{fulllineitems} \index{get\_results() (matplotlib.mathtext.MathtextBackendAgg method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendAgg method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendAgg method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \index{set\_canvas\_size() (matplotlib.mathtext.MathtextBackendAgg method)@\spxentry{set\_canvas\_size()}\spxextra{matplotlib.mathtext.MathtextBackendAgg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg.set_canvas_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_canvas\_size}}}{\emph{self}, \emph{w}, \emph{h}, \emph{d}}{} Dimension the drawing canvas \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendBitmap (class in matplotlib.mathtext)@\spxentry{MathtextBackendBitmap}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendBitmap}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendBitmap}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendAgg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackendAgg}}}}} \index{get\_results() (matplotlib.mathtext.MathtextBackendBitmap method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendBitmap method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendBitmap.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendCairo (class in matplotlib.mathtext)@\spxentry{MathtextBackendCairo}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendCairo}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendCairo}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Store information to write a mathtext rendering to the Cairo backend. \index{get\_results() (matplotlib.mathtext.MathtextBackendCairo method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendCairo.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendCairo method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendCairo.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendCairo method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendCairo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendCairo.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendPath (class in matplotlib.mathtext)@\spxentry{MathtextBackendPath}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPath}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendPath}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Store information to write a mathtext rendering to the text path machinery. \index{get\_results() (matplotlib.mathtext.MathtextBackendPath method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPath.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendPath method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPath.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendPath method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPath.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendPdf (class in matplotlib.mathtext)@\spxentry{MathtextBackendPdf}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPdf}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendPdf}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Store information to write a mathtext rendering to the PDF backend. \index{get\_results() (matplotlib.mathtext.MathtextBackendPdf method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPdf.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendPdf method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPdf.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendPdf method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendPdf method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPdf.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendPs (class in matplotlib.mathtext)@\spxentry{MathtextBackendPs}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPs}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendPs}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Store information to write a mathtext rendering to the PostScript backend. \index{get\_results() (matplotlib.mathtext.MathtextBackendPs method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendPs method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPs.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendPs method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendPs method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPs.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendPs method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendPs method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendPs.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \end{fulllineitems} \index{MathtextBackendSvg (class in matplotlib.mathtext)@\spxentry{MathtextBackendSvg}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendSvg}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{MathtextBackendSvg}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.MathtextBackend}}}}} Store information to write a mathtext rendering to the SVG backend. \index{get\_results() (matplotlib.mathtext.MathtextBackendSvg method)@\spxentry{get\_results()}\spxextra{matplotlib.mathtext.MathtextBackendSvg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendSvg.get_results}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_results}}}{\emph{self}, \emph{box}, \emph{used\_characters}}{} Return a backend-specific tuple to return to the backend after all processing is done. \end{fulllineitems} \index{render\_glyph() (matplotlib.mathtext.MathtextBackendSvg method)@\spxentry{render\_glyph()}\spxextra{matplotlib.mathtext.MathtextBackendSvg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendSvg.render_glyph}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_glyph}}}{\emph{self}, \emph{ox}, \emph{oy}, \emph{info}}{} Draw a glyph described by \sphinxstyleemphasis{info} to the reference point (\sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}). \end{fulllineitems} \index{render\_rect\_filled() (matplotlib.mathtext.MathtextBackendSvg method)@\spxentry{render\_rect\_filled()}\spxextra{matplotlib.mathtext.MathtextBackendSvg method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.MathtextBackendSvg.render_rect_filled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render\_rect\_filled}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{} Draw a filled black rectangle from (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) to (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}). \end{fulllineitems} \end{fulllineitems} \index{NegFil (class in matplotlib.mathtext)@\spxentry{NegFil}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.NegFil}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{NegFil}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{NegFill (class in matplotlib.mathtext)@\spxentry{NegFill}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.NegFill}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{NegFill}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{NegFilll (class in matplotlib.mathtext)@\spxentry{NegFilll}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.NegFilll}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{NegFilll}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{Node (class in matplotlib.mathtext)@\spxentry{Node}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Node}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Node}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A node in the TeX box model \index{get\_kerning() (matplotlib.mathtext.Node method)@\spxentry{get\_kerning()}\spxextra{matplotlib.mathtext.Node method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Node.get_kerning}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kerning}}}{\emph{self}, \emph{next}}{}~ \end{fulllineitems} \index{grow() (matplotlib.mathtext.Node method)@\spxentry{grow()}\spxextra{matplotlib.mathtext.Node method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Node.grow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grow}}}{\emph{self}}{} Grows one level larger. There is no limit to how big something can get. \end{fulllineitems} \index{render() (matplotlib.mathtext.Node method)@\spxentry{render()}\spxextra{matplotlib.mathtext.Node method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Node.render}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render}}}{\emph{self}, \emph{x}, \emph{y}}{}~ \end{fulllineitems} \index{shrink() (matplotlib.mathtext.Node method)@\spxentry{shrink()}\spxextra{matplotlib.mathtext.Node method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Node.shrink}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrink}}}{\emph{self}}{} Shrinks one level smaller. There are only three levels of sizes, after which things will no longer get smaller. \end{fulllineitems} \end{fulllineitems} \index{Parser (class in matplotlib.mathtext)@\spxentry{Parser}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Parser}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} This is the pyparsing-based parser for math expressions. It actually parses full strings \sphinxstyleemphasis{containing} math expressions, in that raw text may also appear outside of pairs of \sphinxcode{\sphinxupquote{\$}}. The grammar is based directly on that in TeX, though it cuts a few corners. \index{Parser.State (class in matplotlib.mathtext)@\spxentry{Parser.State}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{State}}}{\emph{font\_output}, \emph{font}, \emph{font\_class}, \emph{fontsize}, \emph{dpi}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Stores the state of the parser. States are pushed and popped from a stack as necessary, and the "current" state is always at the top of the stack. \index{copy() (matplotlib.mathtext.Parser.State method)@\spxentry{copy()}\spxextra{matplotlib.mathtext.Parser.State method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State.copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy}}}{\emph{self}}{}~ \end{fulllineitems} \index{font (matplotlib.mathtext.Parser.State attribute)@\spxentry{font}\spxextra{matplotlib.mathtext.Parser.State attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State.font}}\pysigline{\sphinxbfcode{\sphinxupquote{font}}}~ \end{fulllineitems} \end{fulllineitems} \index{accent() (matplotlib.mathtext.Parser method)@\spxentry{accent()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.accent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{accent}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{auto\_delim() (matplotlib.mathtext.Parser method)@\spxentry{auto\_delim()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.auto_delim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{auto\_delim}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{binom() (matplotlib.mathtext.Parser method)@\spxentry{binom()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.binom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{binom}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{c\_over\_c() (matplotlib.mathtext.Parser method)@\spxentry{c\_over\_c()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.c_over_c}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{c\_over\_c}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{customspace() (matplotlib.mathtext.Parser method)@\spxentry{customspace()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.customspace}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{customspace}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{dfrac() (matplotlib.mathtext.Parser method)@\spxentry{dfrac()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.dfrac}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{dfrac}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{end\_group() (matplotlib.mathtext.Parser method)@\spxentry{end\_group()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.end_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{end\_group}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{font() (matplotlib.mathtext.Parser method)@\spxentry{font()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.font}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{font}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{frac() (matplotlib.mathtext.Parser method)@\spxentry{frac()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.frac}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frac}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{function() (matplotlib.mathtext.Parser method)@\spxentry{function()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.function}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{function}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{genfrac() (matplotlib.mathtext.Parser method)@\spxentry{genfrac()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.genfrac}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{genfrac}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{get\_state() (matplotlib.mathtext.Parser method)@\spxentry{get\_state()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.get_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_state}}}{\emph{self}}{} Get the current {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{State}}}}} of the parser. \end{fulllineitems} \index{group() (matplotlib.mathtext.Parser method)@\spxentry{group()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{group}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{is\_between\_brackets() (matplotlib.mathtext.Parser method)@\spxentry{is\_between\_brackets()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.is_between_brackets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_between\_brackets}}}{\emph{self}, \emph{s}, \emph{loc}}{}~ \end{fulllineitems} \index{is\_dropsub() (matplotlib.mathtext.Parser method)@\spxentry{is\_dropsub()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.is_dropsub}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_dropsub}}}{\emph{self}, \emph{nucleus}}{}~ \end{fulllineitems} \index{is\_overunder() (matplotlib.mathtext.Parser method)@\spxentry{is\_overunder()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.is_overunder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_overunder}}}{\emph{self}, \emph{nucleus}}{}~ \end{fulllineitems} \index{is\_slanted() (matplotlib.mathtext.Parser method)@\spxentry{is\_slanted()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.is_slanted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_slanted}}}{\emph{self}, \emph{nucleus}}{}~ \end{fulllineitems} \index{main() (matplotlib.mathtext.Parser method)@\spxentry{main()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.main}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{main}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{math() (matplotlib.mathtext.Parser method)@\spxentry{math()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.math}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{math}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{math\_string() (matplotlib.mathtext.Parser method)@\spxentry{math\_string()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.math_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{math\_string}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{non\_math() (matplotlib.mathtext.Parser method)@\spxentry{non\_math()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.non_math}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{non\_math}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{operatorname() (matplotlib.mathtext.Parser method)@\spxentry{operatorname()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.operatorname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{operatorname}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{overline() (matplotlib.mathtext.Parser method)@\spxentry{overline()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.overline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{overline}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{parse() (matplotlib.mathtext.Parser method)@\spxentry{parse()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.parse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{parse}}}{\emph{self}, \emph{s}, \emph{fonts\_object}, \emph{fontsize}, \emph{dpi}}{} Parse expression \sphinxstyleemphasis{s} using the given \sphinxstyleemphasis{fonts\_object} for output, at the given \sphinxstyleemphasis{fontsize} and \sphinxstyleemphasis{dpi}. Returns the parse tree of {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Node}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Node}}}}} instances. \end{fulllineitems} \index{pop\_state() (matplotlib.mathtext.Parser method)@\spxentry{pop\_state()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.pop_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pop\_state}}}{\emph{self}}{} Pop a {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{State}}}}} off of the stack. \end{fulllineitems} \index{push\_state() (matplotlib.mathtext.Parser method)@\spxentry{push\_state()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.push_state}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{push\_state}}}{\emph{self}}{} Push a new {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.State}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{State}}}}} onto the stack which is just a copy of the current state. \end{fulllineitems} \index{required\_group() (matplotlib.mathtext.Parser method)@\spxentry{required\_group()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.required_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{required\_group}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{simple\_group() (matplotlib.mathtext.Parser method)@\spxentry{simple\_group()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.simple_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{simple\_group}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{snowflake() (matplotlib.mathtext.Parser method)@\spxentry{snowflake()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.snowflake}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{snowflake}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{space() (matplotlib.mathtext.Parser method)@\spxentry{space()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.space}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{space}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{sqrt() (matplotlib.mathtext.Parser method)@\spxentry{sqrt()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.sqrt}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{sqrt}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{stackrel() (matplotlib.mathtext.Parser method)@\spxentry{stackrel()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.stackrel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stackrel}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{start\_group() (matplotlib.mathtext.Parser method)@\spxentry{start\_group()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.start_group}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_group}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{subsuper() (matplotlib.mathtext.Parser method)@\spxentry{subsuper()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.subsuper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subsuper}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{symbol() (matplotlib.mathtext.Parser method)@\spxentry{symbol()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{symbol}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \index{unknown\_symbol() (matplotlib.mathtext.Parser method)@\spxentry{unknown\_symbol()}\spxextra{matplotlib.mathtext.Parser method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Parser.unknown_symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{unknown\_symbol}}}{\emph{self}, \emph{s}, \emph{loc}, \emph{toks}}{}~ \end{fulllineitems} \end{fulllineitems} \index{Rule (class in matplotlib.mathtext)@\spxentry{Rule}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Rule}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Rule}}}{\emph{width}, \emph{height}, \emph{depth}, \emph{state}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Box}}}}} A {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Rule}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rule}}}}} node stands for a solid black rectangle; it has \sphinxstyleemphasis{width}, \sphinxstyleemphasis{depth}, and \sphinxstyleemphasis{height} fields just as in an {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}}. However, if any of these dimensions is inf, the actual value will be determined by running the rule up to the boundary of the innermost enclosing box. This is called a "running dimension." The width is never running in an {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}}; the height and depth are never running in a {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Vlist}}}}}. \index{render() (matplotlib.mathtext.Rule method)@\spxentry{render()}\spxextra{matplotlib.mathtext.Rule method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Rule.render}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{render}}}{\emph{self}, \emph{x}, \emph{y}, \emph{w}, \emph{h}}{}~ \end{fulllineitems} \end{fulllineitems} \index{STIXFontConstants (class in matplotlib.mathtext)@\spxentry{STIXFontConstants}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{STIXFontConstants}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.FontConstantsBase}}}}} \index{delta (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{delta}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.delta}}\pysigline{\sphinxbfcode{\sphinxupquote{delta}}\sphinxbfcode{\sphinxupquote{ = 0.05}}} \end{fulllineitems} \index{delta\_integral (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{delta\_integral}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.delta_integral}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_integral}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{delta\_slanted (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{delta\_slanted}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.delta_slanted}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_slanted}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{script\_space (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{script\_space}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.script_space}}\pysigline{\sphinxbfcode{\sphinxupquote{script\_space}}\sphinxbfcode{\sphinxupquote{ = 0.1}}} \end{fulllineitems} \index{sub2 (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{sub2}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.sub2}}\pysigline{\sphinxbfcode{\sphinxupquote{sub2}}\sphinxbfcode{\sphinxupquote{ = 0.6}}} \end{fulllineitems} \index{sup1 (matplotlib.mathtext.STIXFontConstants attribute)@\spxentry{sup1}\spxextra{matplotlib.mathtext.STIXFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXFontConstants.sup1}}\pysigline{\sphinxbfcode{\sphinxupquote{sup1}}\sphinxbfcode{\sphinxupquote{ = 0.8}}} \end{fulllineitems} \end{fulllineitems} \index{STIXSansFontConstants (class in matplotlib.mathtext)@\spxentry{STIXSansFontConstants}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXSansFontConstants}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{STIXSansFontConstants}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.FontConstantsBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.FontConstantsBase}}}}} \index{delta\_integral (matplotlib.mathtext.STIXSansFontConstants attribute)@\spxentry{delta\_integral}\spxextra{matplotlib.mathtext.STIXSansFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXSansFontConstants.delta_integral}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_integral}}\sphinxbfcode{\sphinxupquote{ = 0.3}}} \end{fulllineitems} \index{delta\_slanted (matplotlib.mathtext.STIXSansFontConstants attribute)@\spxentry{delta\_slanted}\spxextra{matplotlib.mathtext.STIXSansFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXSansFontConstants.delta_slanted}}\pysigline{\sphinxbfcode{\sphinxupquote{delta\_slanted}}\sphinxbfcode{\sphinxupquote{ = 0.6}}} \end{fulllineitems} \index{script\_space (matplotlib.mathtext.STIXSansFontConstants attribute)@\spxentry{script\_space}\spxextra{matplotlib.mathtext.STIXSansFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXSansFontConstants.script_space}}\pysigline{\sphinxbfcode{\sphinxupquote{script\_space}}\sphinxbfcode{\sphinxupquote{ = 0.05}}} \end{fulllineitems} \index{sup1 (matplotlib.mathtext.STIXSansFontConstants attribute)@\spxentry{sup1}\spxextra{matplotlib.mathtext.STIXSansFontConstants attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.STIXSansFontConstants.sup1}}\pysigline{\sphinxbfcode{\sphinxupquote{sup1}}\sphinxbfcode{\sphinxupquote{ = 0.8}}} \end{fulllineitems} \end{fulllineitems} \index{Ship (class in matplotlib.mathtext)@\spxentry{Ship}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Ship}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Ship}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Once the boxes have been set up, this sends them to output. Since boxes can be inside of boxes inside of boxes, the main work of {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Ship}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ship}}}}} is done by two mutually recursive routines, {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Ship.hlist_out}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlist\_out()}}}}} and {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Ship.vlist_out}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlist\_out()}}}}}, which traverse the {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Hlist}}}}} nodes and {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Vlist}}}}} nodes inside of horizontal and vertical boxes. The global variables used in TeX to store state as it processes have become member variables here. \index{clamp() (matplotlib.mathtext.Ship static method)@\spxentry{clamp()}\spxextra{matplotlib.mathtext.Ship static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Ship.clamp}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{clamp}}}{\emph{value}}{}~ \end{fulllineitems} \index{hlist\_out() (matplotlib.mathtext.Ship method)@\spxentry{hlist\_out()}\spxextra{matplotlib.mathtext.Ship method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Ship.hlist_out}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hlist\_out}}}{\emph{self}, \emph{box}}{}~ \end{fulllineitems} \index{vlist\_out() (matplotlib.mathtext.Ship method)@\spxentry{vlist\_out()}\spxextra{matplotlib.mathtext.Ship method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Ship.vlist_out}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{vlist\_out}}}{\emph{self}, \emph{box}}{}~ \end{fulllineitems} \end{fulllineitems} \index{SsGlue (class in matplotlib.mathtext)@\spxentry{SsGlue}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.SsGlue}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{SsGlue}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Glue}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Glue}}}}} \end{fulllineitems} \index{StandardPsFonts (class in matplotlib.mathtext)@\spxentry{StandardPsFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{StandardPsFonts}}}{\emph{default\_font\_prop}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Fonts}}}}} Use the standard postscript fonts for rendering to backend\_ps Unlike the other font classes, BakomaFont and UnicodeFont, this one requires the Ps backend. \index{basepath (matplotlib.mathtext.StandardPsFonts attribute)@\spxentry{basepath}\spxextra{matplotlib.mathtext.StandardPsFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts.basepath}}\pysigline{\sphinxbfcode{\sphinxupquote{basepath}}\sphinxbfcode{\sphinxupquote{ = '/tmp/mpl\_docs/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/afm'}}} \end{fulllineitems} \index{fontmap (matplotlib.mathtext.StandardPsFonts attribute)@\spxentry{fontmap}\spxextra{matplotlib.mathtext.StandardPsFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts.fontmap}}\pysigline{\sphinxbfcode{\sphinxupquote{fontmap}}\sphinxbfcode{\sphinxupquote{ = \{'cal': 'pzcmi8a', 'rm': 'pncr8a', 'tt': 'pcrr8a', 'it': 'pncri8a', 'sf': 'phvr8a', 'bf': 'pncb8a', None: 'psyr'\}}}} \end{fulllineitems} \index{get\_kern() (matplotlib.mathtext.StandardPsFonts method)@\spxentry{get\_kern()}\spxextra{matplotlib.mathtext.StandardPsFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts.get_kern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kern}}}{\emph{self}, \emph{font1}, \emph{fontclass1}, \emph{sym1}, \emph{fontsize1}, \emph{font2}, \emph{fontclass2}, \emph{sym2}, \emph{fontsize2}, \emph{dpi}}{} Get the kerning distance for font between \sphinxstyleemphasis{sym1} and \sphinxstyleemphasis{sym2}. \sphinxstyleemphasis{fontX}: one of the TeX font names: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tt}\PYG{p}{,} \PYG{n}{it}\PYG{p}{,} \PYG{n}{rm}\PYG{p}{,} \PYG{n}{cal}\PYG{p}{,} \PYG{n}{sf}\PYG{p}{,} \PYG{n}{bf} \PYG{o+ow}{or} \PYG{n}{default}\PYG{o}{/}\PYG{n}{regular} \PYG{p}{(}\PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{math}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{fontclassX}: TODO \sphinxstyleemphasis{symX}: a symbol in raw TeX form. e.g., '1', 'x' or 'sigma' \sphinxstyleemphasis{fontsizeX}: the fontsize in points \sphinxstyleemphasis{dpi}: the current dots-per-inch \end{fulllineitems} \index{get\_underline\_thickness() (matplotlib.mathtext.StandardPsFonts method)@\spxentry{get\_underline\_thickness()}\spxextra{matplotlib.mathtext.StandardPsFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts.get_underline_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_underline\_thickness}}}{\emph{self}, \emph{font}, \emph{fontsize}, \emph{dpi}}{} Get the line thickness that matches the given font. Used as a base unit for drawing lines such as in a fraction or radical. \end{fulllineitems} \index{get\_xheight() (matplotlib.mathtext.StandardPsFonts method)@\spxentry{get\_xheight()}\spxextra{matplotlib.mathtext.StandardPsFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StandardPsFonts.get_xheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xheight}}}{\emph{self}, \emph{font}, \emph{fontsize}, \emph{dpi}}{} Get the xheight for the given \sphinxstyleemphasis{font} and \sphinxstyleemphasis{fontsize}. \end{fulllineitems} \end{fulllineitems} \index{StixFonts (class in matplotlib.mathtext)@\spxentry{StixFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StixFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{StixFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.UnicodeFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.UnicodeFonts}}}}} A font handling class for the STIX fonts. In addition to what UnicodeFonts provides, this class: \begin{itemize} \item {} supports "virtual fonts" which are complete alpha numeric character sets with different font styles at special Unicode code points, such as "Blackboard". \item {} handles sized alternative characters for the STIXSizeX fonts. \end{itemize} \index{cm\_fallback (matplotlib.mathtext.StixFonts attribute)@\spxentry{cm\_fallback}\spxextra{matplotlib.mathtext.StixFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StixFonts.cm_fallback}}\pysigline{\sphinxbfcode{\sphinxupquote{cm\_fallback}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{get\_sized\_alternatives\_for\_symbol() (matplotlib.mathtext.StixFonts method)@\spxentry{get\_sized\_alternatives\_for\_symbol()}\spxextra{matplotlib.mathtext.StixFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StixFonts.get_sized_alternatives_for_symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sized\_alternatives\_for\_symbol}}}{\emph{self}, \emph{fontname}, \emph{sym}}{} Override if your font provides multiple sizes of the same symbol. Should return a list of symbols matching \sphinxstyleemphasis{sym} in various sizes. The expression renderer will select the most appropriate size for a given situation from this list. \end{fulllineitems} \index{use\_cmex (matplotlib.mathtext.StixFonts attribute)@\spxentry{use\_cmex}\spxextra{matplotlib.mathtext.StixFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StixFonts.use_cmex}}\pysigline{\sphinxbfcode{\sphinxupquote{use\_cmex}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \end{fulllineitems} \index{StixSansFonts (class in matplotlib.mathtext)@\spxentry{StixSansFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.StixSansFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{StixSansFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.StixFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.StixFonts}}}}} A font handling class for the STIX fonts (that uses sans-serif characters by default). \end{fulllineitems} \index{SubSuperCluster (class in matplotlib.mathtext)@\spxentry{SubSuperCluster}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.SubSuperCluster}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{SubSuperCluster}}} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Hlist}}}}} {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.SubSuperCluster}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubSuperCluster}}}}} is a sort of hack to get around that fact that this code do a two-pass parse like TeX. This lets us store enough information in the hlist itself, namely the nucleus, sub- and super-script, such that if another script follows that needs to be attached, it can be reconfigured on the fly. \end{fulllineitems} \index{TruetypeFonts (class in matplotlib.mathtext)@\spxentry{TruetypeFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{TruetypeFonts}}}{\emph{default\_font\_prop}, \emph{mathtext\_backend}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Fonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Fonts}}}}} A generic base class for all font setups that use Truetype fonts (through FT2Font). \index{destroy() (matplotlib.mathtext.TruetypeFonts method)@\spxentry{destroy()}\spxextra{matplotlib.mathtext.TruetypeFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts.destroy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{destroy}}}{\emph{self}}{} Fix any cyclical references before the object is about to be destroyed. \end{fulllineitems} \index{get\_kern() (matplotlib.mathtext.TruetypeFonts method)@\spxentry{get\_kern()}\spxextra{matplotlib.mathtext.TruetypeFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts.get_kern}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_kern}}}{\emph{self}, \emph{font1}, \emph{fontclass1}, \emph{sym1}, \emph{fontsize1}, \emph{font2}, \emph{fontclass2}, \emph{sym2}, \emph{fontsize2}, \emph{dpi}}{} Get the kerning distance for font between \sphinxstyleemphasis{sym1} and \sphinxstyleemphasis{sym2}. \sphinxstyleemphasis{fontX}: one of the TeX font names: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tt}\PYG{p}{,} \PYG{n}{it}\PYG{p}{,} \PYG{n}{rm}\PYG{p}{,} \PYG{n}{cal}\PYG{p}{,} \PYG{n}{sf}\PYG{p}{,} \PYG{n}{bf} \PYG{o+ow}{or} \PYG{n}{default}\PYG{o}{/}\PYG{n}{regular} \PYG{p}{(}\PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{math}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{fontclassX}: TODO \sphinxstyleemphasis{symX}: a symbol in raw TeX form. e.g., '1', 'x' or 'sigma' \sphinxstyleemphasis{fontsizeX}: the fontsize in points \sphinxstyleemphasis{dpi}: the current dots-per-inch \end{fulllineitems} \index{get\_underline\_thickness() (matplotlib.mathtext.TruetypeFonts method)@\spxentry{get\_underline\_thickness()}\spxextra{matplotlib.mathtext.TruetypeFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts.get_underline_thickness}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_underline\_thickness}}}{\emph{self}, \emph{font}, \emph{fontsize}, \emph{dpi}}{} Get the line thickness that matches the given font. Used as a base unit for drawing lines such as in a fraction or radical. \end{fulllineitems} \index{get\_xheight() (matplotlib.mathtext.TruetypeFonts method)@\spxentry{get\_xheight()}\spxextra{matplotlib.mathtext.TruetypeFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts.get_xheight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xheight}}}{\emph{self}, \emph{fontname}, \emph{fontsize}, \emph{dpi}}{} Get the xheight for the given \sphinxstyleemphasis{font} and \sphinxstyleemphasis{fontsize}. \end{fulllineitems} \end{fulllineitems} \index{UnicodeFonts (class in matplotlib.mathtext)@\spxentry{UnicodeFonts}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.UnicodeFonts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{UnicodeFonts}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.TruetypeFonts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.TruetypeFonts}}}}} An abstract base class for handling Unicode fonts. While some reasonably complete Unicode fonts (such as DejaVu) may work in some situations, the only Unicode font I'm aware of with a complete set of math symbols is STIX. This class will "fallback" on the Bakoma fonts when a required symbol can not be found in the font. \index{get\_sized\_alternatives\_for\_symbol() (matplotlib.mathtext.UnicodeFonts method)@\spxentry{get\_sized\_alternatives\_for\_symbol()}\spxextra{matplotlib.mathtext.UnicodeFonts method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.UnicodeFonts.get_sized_alternatives_for_symbol}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_sized\_alternatives\_for\_symbol}}}{\emph{self}, \emph{fontname}, \emph{sym}}{} Override if your font provides multiple sizes of the same symbol. Should return a list of symbols matching \sphinxstyleemphasis{sym} in various sizes. The expression renderer will select the most appropriate size for a given situation from this list. \end{fulllineitems} \index{use\_cmex (matplotlib.mathtext.UnicodeFonts attribute)@\spxentry{use\_cmex}\spxextra{matplotlib.mathtext.UnicodeFonts attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.UnicodeFonts.use_cmex}}\pysigline{\sphinxbfcode{\sphinxupquote{use\_cmex}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \end{fulllineitems} \index{VCentered (class in matplotlib.mathtext)@\spxentry{VCentered}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.VCentered}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{VCentered}}}{\emph{elements}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Hlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Hlist}}}}} A convenience class to create a {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Vlist}}}}} whose contents are centered within its enclosing box. \end{fulllineitems} \index{Vbox (class in matplotlib.mathtext)@\spxentry{Vbox}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Vbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Vbox}}}{\emph{height}, \emph{depth}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Box}}}}} A box with only height (zero width). \end{fulllineitems} \index{Vlist (class in matplotlib.mathtext)@\spxentry{Vlist}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Vlist}}}{\emph{elements}, \emph{h=0.0}, \emph{m='additional'}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.List}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.List}}}}} A vertical list of boxes. \index{vpack() (matplotlib.mathtext.Vlist method)@\spxentry{vpack()}\spxextra{matplotlib.mathtext.Vlist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist.vpack}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{vpack}}}{\emph{self}, \emph{h=0.0}, \emph{m='additional'}, \emph{l=inf}}{} The main duty of {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Vlist.vpack}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vpack()}}}}} is to compute the dimensions of the resulting boxes, and to adjust the glue if one of those dimensions is pre-specified. \begin{itemize} \item {} \sphinxstyleemphasis{h}: specifies a height \item {} \sphinxstyleemphasis{m}: is either 'exactly' or 'additional'. \item {} \sphinxstyleemphasis{l}: a maximum height \end{itemize} Thus, \sphinxcode{\sphinxupquote{vpack(h, 'exactly')}} produces a box whose height is exactly \sphinxstyleemphasis{h}, while \sphinxcode{\sphinxupquote{vpack(h, 'additional')}} yields a box whose height is the natural height plus \sphinxstyleemphasis{h}. The default values produce a box with the natural width. \end{fulllineitems} \end{fulllineitems} \index{Vrule (class in matplotlib.mathtext)@\spxentry{Vrule}\spxextra{class in matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.Vrule}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{Vrule}}}{\emph{state}}{} Bases: {\hyperref[\detokenize{api/mathtext_api:matplotlib.mathtext.Rule}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.mathtext.Rule}}}}} Convenience class to create a vertical rule. \end{fulllineitems} \index{get\_unicode\_index() (in module matplotlib.mathtext)@\spxentry{get\_unicode\_index()}\spxextra{in module matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.get_unicode_index}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{get\_unicode\_index}}}{\emph{symbol}, \emph{math=True}}{} Return the integer index (from the Unicode table) of \sphinxstyleemphasis{symbol}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{symbol}}] \leavevmode{[}str{]} A single unicode character, a TeX command (e.g. r'pi') or a Type1 symbol name (e.g. 'phi'). \item[{\sphinxstylestrong{math}}] \leavevmode{[}bool, default is True{]} If False, always treat as a single unicode character. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{math\_to\_image() (in module matplotlib.mathtext)@\spxentry{math\_to\_image()}\spxextra{in module matplotlib.mathtext}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mathtext_api:matplotlib.mathtext.math_to_image}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mathtext.}}\sphinxbfcode{\sphinxupquote{math\_to\_image}}}{\emph{s}, \emph{filename\_or\_obj}, \emph{prop=None}, \emph{dpi=None}, \emph{format=None}}{} Given a math expression, renders it in a closely-clipped bounding box to an image file. \begin{description} \item[{\sphinxstyleemphasis{s}}] \leavevmode A math expression. The math portion should be enclosed in dollar signs. \item[{\sphinxstyleemphasis{filename\_or\_obj}}] \leavevmode A filepath or writable file-like object to write the image data to. \item[{\sphinxstyleemphasis{prop}}] \leavevmode If provided, a FontProperties() object describing the size and style of the text. \item[{\sphinxstyleemphasis{dpi}}] \leavevmode Override the output dpi, otherwise use the default associated with the output format. \item[{\sphinxstyleemphasis{format}}] \leavevmode The output format, e.g., 'svg', 'pdf', 'ps' or 'png'. If not provided, will be deduced from the filename. \end{description} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.mlab}}} \label{\detokenize{api/mlab_api:module-matplotlib.mlab}}\label{\detokenize{api/mlab_api:matplotlib-mlab}}\label{\detokenize{api/mlab_api::doc}}\index{matplotlib.mlab (module)@\spxentry{matplotlib.mlab}\spxextra{module}} Numerical python functions written for compatibility with MATLAB commands with the same names. Most numerical python functions can be found in the \sphinxhref{https://docs.scipy.org/doc/numpy/reference/index.html\#module-numpy}{\sphinxcode{\sphinxupquote{numpy}}} and \sphinxhref{https://docs.scipy.org/doc/scipy/reference/index.html\#module-scipy}{\sphinxcode{\sphinxupquote{scipy}}} libraries. What remains here is code for performing spectral computations. \subsection{Spectral functions} \label{\detokenize{api/mlab_api:spectral-functions}}\begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cohere}}}}}}] \leavevmode Coherence (normalized cross spectral density) \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd}}}}}}] \leavevmode Cross spectral density using Welch's average periodogram \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend}}}}}}] \leavevmode Remove the mean or best fit line from an array \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}}}] \leavevmode Power spectral density using Welch's average periodogram \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode Spectrogram (spectrum over segments of time) \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}}] \leavevmode Return the complex-valued frequency spectrum of a signal \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode Return the magnitude of the frequency spectrum of a signal \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}}] \leavevmode Return the angle (wrapped phase) of the frequency spectrum of a signal \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}}] \leavevmode Return the phase (unwrapped angle) of the frequency spectrum of a signal \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}}] \leavevmode Remove the mean from a line. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}}] \leavevmode Remove the best fit line from a line. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}}] \leavevmode Return the original line. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.stride_windows}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stride\_windows}}}}}}] \leavevmode Get all windows in an array in a memory-efficient manner \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.stride_repeat}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stride\_repeat}}}}}}] \leavevmode Repeat an array in a memory-efficient manner \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.apply_window}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{apply\_window}}}}}}] \leavevmode Apply a window along a given axis \end{description} \index{GaussianKDE (class in matplotlib.mlab)@\spxentry{GaussianKDE}\spxextra{class in matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{GaussianKDE}}}{\emph{dataset}, \emph{bw\_method=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Representation of a kernel-density estimate using Gaussian kernels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dataset}}] \leavevmode{[}array\_like{]} Datapoints to estimate from. In case of univariate data this is a 1-D array, otherwise a 2-D array with shape (\# of dims, \# of data). \item[{\sphinxstylestrong{bw\_method}}] \leavevmode{[}str, scalar or callable, optional{]} The method used to calculate the estimator bandwidth. This can be 'scott', 'silverman', a scalar constant or a callable. If a scalar, this will be used directly as \sphinxcode{\sphinxupquote{kde.factor}}. If a callable, it should take a {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GaussianKDE}}}}} instance as only parameter and return a scalar. If None (default), 'scott' is used. \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dataset}}] \leavevmode{[}ndarray{]} The dataset with which \sphinxcode{\sphinxupquote{gaussian\_kde}} was initialized. \item[{\sphinxstylestrong{dim}}] \leavevmode{[}int{]} Number of dimensions. \item[{\sphinxstylestrong{num\_dp}}] \leavevmode{[}int{]} Number of datapoints. \item[{\sphinxstylestrong{factor}}] \leavevmode{[}float{]} The bandwidth factor, obtained from \sphinxcode{\sphinxupquote{kde.covariance\_factor}}, with which the covariance matrix is multiplied. \item[{\sphinxstylestrong{covariance}}] \leavevmode{[}ndarray{]} The covariance matrix of \sphinxcode{\sphinxupquote{dataset}}, scaled by the calculated bandwidth (\sphinxcode{\sphinxupquote{kde.factor}}). \item[{\sphinxstylestrong{inv\_cov}}] \leavevmode{[}ndarray{]} The inverse of \sphinxcode{\sphinxupquote{covariance}}. \end{description} \end{description}\end{quote} \subsubsection*{Methods} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstylestrong{kde.evaluate(points)} & (ndarray) Evaluate the estimated pdf on a provided set of points. \\ \hline \sphinxstylestrong{kde(points)} & (ndarray) Same as kde.evaluate(points) \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \index{covariance\_factor() (matplotlib.mlab.GaussianKDE method)@\spxentry{covariance\_factor()}\spxextra{matplotlib.mlab.GaussianKDE method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE.covariance_factor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{covariance\_factor}}}{\emph{self}}{}~ \end{fulllineitems} \index{evaluate() (matplotlib.mlab.GaussianKDE method)@\spxentry{evaluate()}\spxextra{matplotlib.mlab.GaussianKDE method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE.evaluate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{evaluate}}}{\emph{self}, \emph{points}}{} Evaluate the estimated pdf on a set of points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}(\# of dimensions, \# of points)-array{]} Alternatively, a (\# of dimensions,) vector can be passed in and treated as a single point. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{values}}] \leavevmode{[}(\# of points,)-array{]} The values at each point. \end{description} \item[{Raises}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ValueError}}] \leavevmode{[}if the dimensionality of the input points is different{]} than the dimensionality of the KDE. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{scotts\_factor() (matplotlib.mlab.GaussianKDE method)@\spxentry{scotts\_factor()}\spxextra{matplotlib.mlab.GaussianKDE method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE.scotts_factor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scotts\_factor}}}{\emph{self}}{}~ \end{fulllineitems} \index{silverman\_factor() (matplotlib.mlab.GaussianKDE method)@\spxentry{silverman\_factor()}\spxextra{matplotlib.mlab.GaussianKDE method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.GaussianKDE.silverman_factor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{silverman\_factor}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{angle\_spectrum() (in module matplotlib.mlab)@\spxentry{angle\_spectrum()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{angle\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}}{} Compute the angle of the frequency spectrum (wrapped phase spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the angle spectrum in radians (real valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}}] \leavevmode This function returns the angle value of {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode Returns the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}}] \leavevmode Returns the phase (unwrapped angle) of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode Can return the complex spectrum of segments within the signal. \end{description} \end{fulllineitems} \index{apply\_window() (in module matplotlib.mlab)@\spxentry{apply\_window()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.apply_window}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{apply\_window}}}{\emph{x}, \emph{window}, \emph{axis=0}, \emph{return\_window=None}}{} Apply the given window to the given 1D or 2D array along the given axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1D or 2D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{window}}] \leavevmode{[}function or array.{]} Either a function to generate a window or an array with length \sphinxstyleemphasis{x}.shape{[}\sphinxstyleemphasis{axis}{]} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis over which to do the repetition. Must be 0 or 1. The default is 0 \item[{\sphinxstylestrong{return\_window}}] \leavevmode{[}bool{]} If true, also return the 1D values of the window that was applied \end{description} \end{description}\end{quote} \end{fulllineitems} \index{cohere() (in module matplotlib.mlab)@\spxentry{cohere()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.cohere}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{cohere}}}{\emph{x}, \emph{y}, \emph{NFFT=256}, \emph{Fs=2}, \emph{detrend=\textless{}function detrend\_none at 0x7ff96bc60a60\textgreater{}}, \emph{window=\textless{}function window\_hanning at 0x7ff96bc60400\textgreater{}}, \emph{noverlap=0}, \emph{pad\_to=None}, \emph{sides='default'}, \emph{scale\_by\_freq=None}}{} The coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Coherence is the normalized cross spectral density: \begin{equation*} \begin{split}C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}\end{split} \end{equation*}\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}integer{]} The number of points of overlap between blocks. The default value is 0 (no overlap). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{The return value is the tuple (\sphinxstyleemphasis{Cxy}, \sphinxstyleemphasis{f}), where \sphinxstyleemphasis{f} are the}] \leavevmode \item[{frequencies of the coherence vector. For cohere, scaling the}] \leavevmode \item[{individual densities by the sampling frequency has no effect,}] \leavevmode \item[{since the factors cancel out.}] \leavevmode \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd()}}}}}}] \leavevmode For information about the methods used to compute \(P_{xy}\), \(P_{xx}\) and \(P_{yy}\). \end{description} \end{fulllineitems} \index{complex\_spectrum() (in module matplotlib.mlab)@\spxentry{complex\_spectrum()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{complex\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}}{} Compute the complex-valued frequency spectrum of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the complex spectrum (complex valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode Returns the absolute value of this function. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}}] \leavevmode Returns the angle of this function. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}}] \leavevmode Returns the phase (unwrapped angle) of this function. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode Can return the complex spectrum of segments within the signal. \end{description} \end{fulllineitems} \index{csd() (in module matplotlib.mlab)@\spxentry{csd()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.csd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{csd}}}{\emph{x}, \emph{y}, \emph{NFFT=None}, \emph{Fs=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}}{} Compute the cross-spectral density. The cross spectral density \(P_{xy}\) by Welch's average periodogram method. The vectors \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The product of the direct FFTs of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are averaged over each segment to compute \(P_{xy}\), with a scaling to correct for power loss due to windowing. If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT} or len(\sphinxstyleemphasis{y}) \textless{} \sphinxstyleemphasis{NFFT}, they will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1-D arrays or sequences{]} Arrays or sequences containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}integer{]} The number of points of overlap between segments. The default value is 0 (no overlap). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxy}}] \leavevmode{[}1-D array{]} The values for the cross spectrum \sphinxcode{\sphinxupquote{P\_\{xy\}}} before scaling (real valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxy} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}}}] \leavevmode equivalent to setting \sphinxcode{\sphinxupquote{y = x}}. \end{description} \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \end{fulllineitems} \index{demean() (in module matplotlib.mlab)@\spxentry{demean()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.demean}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{demean}}}{\emph{x}, \emph{axis=0}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return x minus its mean along the specified axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array or sequence{]} Array or sequence containing the data Can have any dimensionality \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which to take the mean. See numpy.mean for a description of this argument. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}}] \leavevmode Same as {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.demean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{demean}}}}} except for the default \sphinxstyleemphasis{axis}. \end{description} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{detrend() (in module matplotlib.mlab)@\spxentry{detrend()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.detrend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{detrend}}}{\emph{x}, \emph{key=None}, \emph{axis=None}}{} Return x with its trend removed. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{key}}] \leavevmode{[}{[} 'default' \textbar{} 'constant' \textbar{} 'mean' \textbar{} 'linear' \textbar{} 'none'{]} or function{]} Specifies the detrend algorithm to use. 'default' is 'mean', which is the same as {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'constant' is the same. 'linear' is the same as {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. 'none' is the same as {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. The default is 'mean'. See the corresponding functions for more details regarding the algorithms. Can also be a function that carries out the detrend operation. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which to do the detrending. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}}] \leavevmode Implementation of the 'mean' algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}}] \leavevmode Implementation of the 'linear' algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}}] \leavevmode Implementation of the 'none' algorithm. \end{description} \end{fulllineitems} \index{detrend\_linear() (in module matplotlib.mlab)@\spxentry{detrend\_linear()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{detrend\_linear}}}{\emph{y}}{} Return x minus best fit line; 'linear' detrending. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}0-D or 1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which to take the mean. See numpy.mean for a description of this argument. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend}}}}}}] \leavevmode A wrapper around all the detrend algorithms. \end{description} \end{fulllineitems} \index{detrend\_mean() (in module matplotlib.mlab)@\spxentry{detrend\_mean()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{detrend\_mean}}}{\emph{x}, \emph{axis=None}}{} Return x minus the mean(x). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array or sequence{]} Array or sequence containing the data Can have any dimensionality \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which to take the mean. See numpy.mean for a description of this argument. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend}}}}}}] \leavevmode A wrapper around all the detrend algorithms. \end{description} \end{fulllineitems} \index{detrend\_none() (in module matplotlib.mlab)@\spxentry{detrend\_none()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{detrend\_none}}}{\emph{x}, \emph{axis=None}}{} Return x: no detrending. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}any object{]} An object containing the data \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} This parameter is ignored. It is included for compatibility with detrend\_mean \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}}] \leavevmode Another detrend algorithm. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend}}}}}}] \leavevmode A wrapper around all the detrend algorithms. \end{description} \end{fulllineitems} \index{magnitude\_spectrum() (in module matplotlib.mlab)@\spxentry{magnitude\_spectrum()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{magnitude\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}}{} Compute the magnitude (absolute value) of the frequency spectrum of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the magnitude spectrum (real valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}}}] \leavevmode Returns the power spectral density. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}}] \leavevmode This function returns the absolute value of {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}}] \leavevmode Returns the angles of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}}] \leavevmode Returns the phase (unwrapped angle) of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode Can return the complex spectrum of segments within the signal. \end{description} \end{fulllineitems} \index{phase\_spectrum() (in module matplotlib.mlab)@\spxentry{phase\_spectrum()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{phase\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}}{} Compute the phase of the frequency spectrum (unwrapped angle spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the phase spectrum in radians (real valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}}] \leavevmode This function returns the phase value of {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode Returns the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}}] \leavevmode Returns the angle (wrapped phase) of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode Can return the complex spectrum of segments within the signal. \end{description} \end{fulllineitems} \index{psd() (in module matplotlib.mlab)@\spxentry{psd()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.psd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{psd}}}{\emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}}{} Compute the power spectral density. The power spectral density \(P_{xx}\) by Welch's average periodogram method. The vector \sphinxstyleemphasis{x} is divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The \(|\mathrm{fft}(i)|^2\) of each segment \(i\) are averaged to compute \(P_{xx}\). If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT}, it will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}integer{]} The number of points of overlap between segments. The default value is 0 (no overlap). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxx}}] \leavevmode{[}1-D array{]} The values for the power spectrum \sphinxcode{\sphinxupquote{P\_\{xx\}}} (real valued) \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxx} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}}] \leavevmode {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}} differs in the default overlap; in not returning the mean of the segment periodograms; and in returning the times of the segments. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode returns the magnitude spectrum. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd}}}}}}] \leavevmode returns the spectral density between two signals. \end{description} \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \end{fulllineitems} \index{specgram() (in module matplotlib.mlab)@\spxentry{specgram()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.specgram}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{specgram}}}{\emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{mode=None}}{} Compute a spectrogram. Compute and plot a spectrogram of data in x. Data are split into NFFT length segments and the spectrum of each section is computed. The windowing function window is applied to each segment, and the amount of overlap of each segment is specified with noverlap. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array\_like{]} 1-D array or sequence. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int, optional{]} The number of points of overlap between blocks. The default value is 128. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}str, optional{]}\begin{description} \item[{What sort of spectrum to use, default is 'psd'.}] \leavevmode\begin{description} \item[{'psd'}] \leavevmode Returns the power spectral density. \item[{'complex'}] \leavevmode Returns the complex-valued frequency spectrum. \item[{'magnitude'}] \leavevmode Returns the magnitude spectrum. \item[{'angle'}] \leavevmode Returns the phase spectrum without unwrapping. \item[{'phase'}] \leavevmode Returns the phase spectrum with unwrapping. \end{description} \end{description} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}array\_like{]} 2-D array, columns are the periodograms of successive segments. \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}array\_like{]} 1-D array, frequencies corresponding to the rows in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{t}}] \leavevmode{[}array\_like{]} 1-D array, the times corresponding to midpoints of segments (i.e the columns in \sphinxstyleemphasis{spectrum}). \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}}}] \leavevmode differs in the overlap and in the return values. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.complex_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{complex\_spectrum}}}}}}] \leavevmode similar, but with complex valued frequencies. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}}] \leavevmode similar single segment when mode is 'magnitude'. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}}] \leavevmode similar to single segment when mode is 'angle'. \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}}] \leavevmode similar to single segment when mode is 'phase'. \end{description} \subsubsection*{Notes} detrend and scale\_by\_freq only apply when \sphinxstyleemphasis{mode} is set to 'psd'. \end{fulllineitems} \index{stride\_repeat() (in module matplotlib.mlab)@\spxentry{stride\_repeat()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.stride_repeat}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{stride\_repeat}}}{\emph{x}, \emph{n}, \emph{axis=0}}{} Repeat the values in an array in a memory-efficient manner. Array x is stacked vertically n times. \begin{sphinxadmonition}{warning}{Warning:} It is not safe to write to the output array. Multiple elements may point to the same piece of memory, so modifying one value may change others. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{n}}] \leavevmode{[}integer{]} The number of time to repeat the array. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which the data will run. \end{description} \end{description}\end{quote} \subsubsection*{References} \sphinxhref{http://stackoverflow.com/a/5568169}{stackoverflow: Repeat NumPy array without replicating data?} \end{fulllineitems} \index{stride\_windows() (in module matplotlib.mlab)@\spxentry{stride\_windows()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.stride_windows}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{stride\_windows}}}{\emph{x}, \emph{n}, \emph{noverlap=None}, \emph{axis=0}}{} Get all windows of x with length n as a single array, using strides to avoid data duplication. \begin{sphinxadmonition}{warning}{Warning:} It is not safe to write to the output array. Multiple elements may point to the same piece of memory, so modifying one value may change others. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{n}}] \leavevmode{[}integer{]} The number of data points in each window. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}integer{]} The overlap between adjacent windows. Default is 0 (no overlap) \item[{\sphinxstylestrong{axis}}] \leavevmode{[}integer{]} The axis along which the windows will run. \end{description} \end{description}\end{quote} \subsubsection*{References} \sphinxhref{http://stackoverflow.com/a/6811241}{stackoverflow: Rolling window for 1D arrays in Numpy?} \sphinxhref{http://stackoverflow.com/a/4947453}{stackoverflow: Using strides for an efficient moving average filter} \end{fulllineitems} \index{window\_hanning() (in module matplotlib.mlab)@\spxentry{window\_hanning()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{window\_hanning}}}{\emph{x}}{} Return x times the hanning window of len(x). \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_none}}}}}}] \leavevmode Another window algorithm. \end{description} \end{fulllineitems} \index{window\_none() (in module matplotlib.mlab)@\spxentry{window\_none()}\spxextra{in module matplotlib.mlab}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/mlab_api:matplotlib.mlab.window_none}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.mlab.}}\sphinxbfcode{\sphinxupquote{window\_none}}}{\emph{x}}{} No window function; simply return x. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.window_hanning}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{window\_hanning}}}}}}] \leavevmode Another window algorithm. \end{description} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.offsetbox}}} \label{\detokenize{api/offsetbox_api:module-matplotlib.offsetbox}}\label{\detokenize{api/offsetbox_api:matplotlib-offsetbox}}\label{\detokenize{api/offsetbox_api::doc}}\index{matplotlib.offsetbox (module)@\spxentry{matplotlib.offsetbox}\spxextra{module}} The OffsetBox is a simple container artist. The child artist are meant to be drawn at a relative position to its parent. The {[}VH{]}Packer, DrawingArea and TextArea are derived from the OffsetBox. The {[}VH{]}Packer automatically adjust the relative positions of their children, which should be instances of the OffsetBox. This is used to align similar artists together, e.g., in legend. The DrawingArea can contain any Artist as a child. The DrawingArea has a fixed width and height. The position of children relative to the parent is fixed. The TextArea is contains a single Text instance. The width and height of the TextArea instance is the width and height of the its child text. \index{AnchoredOffsetbox (class in matplotlib.offsetbox)@\spxentry{AnchoredOffsetbox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{AnchoredOffsetbox}}}{\emph{loc}, \emph{pad=0.4}, \emph{borderpad=0.5}, \emph{child=None}, \emph{prop=None}, \emph{frameon=True}, \emph{bbox\_to\_anchor=None}, \emph{bbox\_transform=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} An offset box placed according to the legend location loc. AnchoredOffsetbox has a single child. When multiple children is needed, use other OffsetBox class to enclose them. By default, the offset box is anchored against its parent axes. You may explicitly specify the bbox\_to\_anchor. loc is a string or an integer specifying the legend location. The valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{p}{(}\PYG{n}{same} \PYG{k}{as} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{k}{for} \PYG{n}{back}\PYG{o}{\PYGZhy{}}\PYG{n}{compatibility}\PYG{p}{)} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10}\PYG{p}{,} \end{sphinxVerbatim} \begin{description} \item[{pad}] \leavevmode{[}pad around the child for drawing a frame. given in{]} fraction of fontsize. \end{description} borderpad : pad between offsetbox frame and the bbox\_to\_anchor, child : OffsetBox instance that will be anchored. prop : font property. This is only used as a reference for paddings. frameon : draw a frame box if True. bbox\_to\_anchor : bbox to anchor. Use self.axes.bbox if None. bbox\_transform : with which the bbox\_to\_anchor will be transformed. \index{codes (matplotlib.offsetbox.AnchoredOffsetbox attribute)@\spxentry{codes}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.codes}}\pysigline{\sphinxbfcode{\sphinxupquote{codes}}\sphinxbfcode{\sphinxupquote{ = \{'center': 10, 'center left': 6, 'center right': 7, 'lower center': 8, 'lower left': 3, 'lower right': 4, 'right': 5, 'upper center': 9, 'upper left': 2, 'upper right': 1\}}}} \end{fulllineitems} \index{draw() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} draw the artist \end{fulllineitems} \index{get\_bbox\_to\_anchor() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{get\_bbox\_to\_anchor()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.get_bbox_to_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox\_to\_anchor}}}{\emph{self}}{} return the bbox that the legend will be anchored \end{fulllineitems} \index{get\_child() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{get\_child()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.get_child}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_child}}}{\emph{self}}{} return the child \end{fulllineitems} \index{get\_children() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{get\_children()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} return the list of children \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} return the extent of the artist. The extent of the child added with the pad is returned \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{set\_bbox\_to\_anchor() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{set\_bbox\_to\_anchor()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.set_bbox_to_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bbox\_to\_anchor}}}{\emph{self}, \emph{bbox}, \emph{transform=None}}{} set the bbox that the child will be anchored. \sphinxstyleemphasis{bbox} can be a Bbox instance, a list of {[}left, bottom, width, height{]}, or a list of {[}left, bottom{]} where the width and height will be assumed to be zero. The bbox will be transformed to display coordinate by the given transform. \end{fulllineitems} \index{set\_child() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{set\_child()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.set_child}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_child}}}{\emph{self}, \emph{child}}{} set the child to be anchored \end{fulllineitems} \index{update\_frame() (matplotlib.offsetbox.AnchoredOffsetbox method)@\spxentry{update\_frame()}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.update_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_frame}}}{\emph{self}, \emph{bbox}, \emph{fontsize=None}}{}~ \end{fulllineitems} \index{zorder (matplotlib.offsetbox.AnchoredOffsetbox attribute)@\spxentry{zorder}\spxextra{matplotlib.offsetbox.AnchoredOffsetbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 5}}} \end{fulllineitems} \end{fulllineitems} \index{AnchoredText (class in matplotlib.offsetbox)@\spxentry{AnchoredText}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{AnchoredText}}}{\emph{s}, \emph{loc}, \emph{pad=0.4}, \emph{borderpad=0.5}, \emph{prop=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} AnchoredOffsetbox with Text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}string{]} Text. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str{]} Location code. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} Pad between the text and the frame as fraction of the font size. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float, optional{]} Pad between the frame and the axes (or \sphinxstyleemphasis{bbox\_to\_anchor}). \item[{\sphinxstylestrong{prop}}] \leavevmode{[}dictionary, optional, default: None{]} Dictionary of keyword parameters to be passed to the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance contained inside AnchoredText. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Other keyword parameters of {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredOffsetbox}}}}} are also allowed. \end{fulllineitems} \index{AnnotationBbox (class in matplotlib.offsetbox)@\spxentry{AnnotationBbox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{AnnotationBbox}}}{\emph{offsetbox}, \emph{xy}, \emph{xybox=None}, \emph{xycoords='data'}, \emph{boxcoords=None}, \emph{frameon=True}, \emph{pad=0.4}, \emph{annotation\_clip=None}, \emph{box\_alignment=(0.5}, \emph{0.5)}, \emph{bboxprops=None}, \emph{arrowprops=None}, \emph{fontsize=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}}, \sphinxcode{\sphinxupquote{matplotlib.text.\_AnnotationBase}} Annotation-like class, but with offsetbox instead of Text. \sphinxstyleemphasis{offsetbox} : OffsetBox instance \begin{description} \item[{\sphinxstyleemphasis{xycoords}}] \leavevmode{[}same as Annotation but can be a tuple of two{]} strings which are interpreted as x and y coordinates. \item[{\sphinxstyleemphasis{boxcoords}}] \leavevmode{[}similar to textcoords as Annotation but can be a{]} tuple of two strings which are interpreted as x and y coordinates. \item[{\sphinxstyleemphasis{box\_alignment}}] \leavevmode{[}a tuple of two floats for a vertical and{]} horizontal alignment of the offset box w.r.t. the \sphinxstyleemphasis{boxcoords}. The lower-left corner is (0.0) and upper-right corner is (1.1). \end{description} other parameters are identical to that of Annotation. \index{anncoords (matplotlib.offsetbox.AnnotationBbox attribute)@\spxentry{anncoords}\spxextra{matplotlib.offsetbox.AnnotationBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.anncoords}}\pysigline{\sphinxbfcode{\sphinxupquote{anncoords}}}~ \end{fulllineitems} \index{contains() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{contains()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{event}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{set\_contains}}, \sphinxcode{\sphinxupquote{get\_contains}}}] \leavevmode \end{description} \end{fulllineitems} \index{draw() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the \sphinxcode{\sphinxupquote{Annotation}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_children() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{get\_children()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_fontsize() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{get\_fontsize()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.get_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontsize}}}{\emph{self}, \emph{s=None}}{} return fontsize in points \end{fulllineitems} \index{set\_figure() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{set\_figure()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_fontsize() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{set\_fontsize()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.set_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontsize}}}{\emph{self}, \emph{s=None}}{} set fontsize in points \end{fulllineitems} \index{update\_positions() (matplotlib.offsetbox.AnnotationBbox method)@\spxentry{update\_positions()}\spxextra{matplotlib.offsetbox.AnnotationBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.update_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_positions}}}{\emph{self}, \emph{renderer}}{} Update the pixel positions of the annotated point and the text. \end{fulllineitems} \index{xyann (matplotlib.offsetbox.AnnotationBbox attribute)@\spxentry{xyann}\spxextra{matplotlib.offsetbox.AnnotationBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.xyann}}\pysigline{\sphinxbfcode{\sphinxupquote{xyann}}}~ \end{fulllineitems} \index{zorder (matplotlib.offsetbox.AnnotationBbox attribute)@\spxentry{zorder}\spxextra{matplotlib.offsetbox.AnnotationBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnnotationBbox.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \end{fulllineitems} \index{AuxTransformBox (class in matplotlib.offsetbox)@\spxentry{AuxTransformBox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{AuxTransformBox}}}{\emph{aux\_transform}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} Offset Box with the aux\_transform. Its children will be transformed with the aux\_transform first then will be offseted. The absolute coordinate of the aux\_transform is meaning as it will be automatically adjust so that the left-lower corner of the bounding box of children will be set to (0,0) before the offset transform. It is similar to drawing area, except that the extent of the box is not predetermined but calculated from the window extent of its children. Furthermore, the extent of the children will be calculated in the transformed coordinate. \index{add\_artist() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{add\_artist()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{} Add any {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} to the container box \end{fulllineitems} \index{draw() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the children \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} Return with, height, xdescent, ydescent of box \end{fulllineitems} \index{get\_offset() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{get\_offset()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{} return offset of the container. \end{fulllineitems} \index{get\_transform() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{get\_transform()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} applied to the children \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{set\_offset() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{set\_offset()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.set_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset}}}{\emph{self}, \emph{xy}}{} Set the offset of the container. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The (x,y) coordinates of the offset in display units. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.offsetbox.AuxTransformBox method)@\spxentry{set\_transform()}\spxextra{matplotlib.offsetbox.AuxTransformBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} set\_transform is ignored. \end{fulllineitems} \end{fulllineitems} \index{DraggableAnnotation (class in matplotlib.offsetbox)@\spxentry{DraggableAnnotation}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableAnnotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{DraggableAnnotation}}}{\emph{annotation}, \emph{use\_blit=False}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.DraggableBase}}}}} \index{save\_offset() (matplotlib.offsetbox.DraggableAnnotation method)@\spxentry{save\_offset()}\spxextra{matplotlib.offsetbox.DraggableAnnotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableAnnotation.save_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{save\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{update\_offset() (matplotlib.offsetbox.DraggableAnnotation method)@\spxentry{update\_offset()}\spxextra{matplotlib.offsetbox.DraggableAnnotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableAnnotation.update_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_offset}}}{\emph{self}, \emph{dx}, \emph{dy}}{}~ \end{fulllineitems} \end{fulllineitems} \index{DraggableBase (class in matplotlib.offsetbox)@\spxentry{DraggableBase}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{DraggableBase}}}{\emph{ref\_artist}, \emph{use\_blit=False}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} helper code for a draggable artist (legend, offsetbox) The derived class must override following two method. \begin{quote} \begin{description} \item[{def save\_offset(self):}] \leavevmode pass \item[{def update\_offset(self, dx, dy):}] \leavevmode pass \end{description} \end{quote} \sphinxstyleemphasis{save\_offset} is called when the object is picked for dragging and it is meant to save reference position of the artist. \begin{description} \item[{\sphinxstyleemphasis{update\_offset} is called during the dragging. dx and dy is the pixel}] \leavevmode offset from the point where the mouse drag started. \end{description} Optionally you may override following two methods. \begin{quote} \begin{description} \item[{def artist\_picker(self, artist, evt):}] \leavevmode return self.ref\_artist.contains(evt) \item[{def finalize\_offset(self):}] \leavevmode pass \end{description} \end{quote} \begin{description} \item[{\sphinxstyleemphasis{artist\_picker} is a picker method that will be}] \leavevmode used. \sphinxstyleemphasis{finalize\_offset} is called when the mouse is released. In current implementation of DraggableLegend and DraggableAnnotation, \sphinxstyleemphasis{update\_offset} places the artists simply in display coordinates. And \sphinxstyleemphasis{finalize\_offset} recalculate their position in the normalized axes coordinate and set a relevant attribute. \end{description} \index{artist\_picker() (matplotlib.offsetbox.DraggableBase method)@\spxentry{artist\_picker()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.artist_picker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{artist\_picker}}}{\emph{self}, \emph{artist}, \emph{evt}}{}~ \end{fulllineitems} \index{disconnect() (matplotlib.offsetbox.DraggableBase method)@\spxentry{disconnect()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}}{} disconnect the callbacks \end{fulllineitems} \index{finalize\_offset() (matplotlib.offsetbox.DraggableBase method)@\spxentry{finalize\_offset()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.finalize_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finalize\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{on\_motion() (matplotlib.offsetbox.DraggableBase method)@\spxentry{on\_motion()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.on_motion}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_motion}}}{\emph{self}, \emph{evt}}{}~ \end{fulllineitems} \index{on\_motion\_blit() (matplotlib.offsetbox.DraggableBase method)@\spxentry{on\_motion\_blit()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.on_motion_blit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_motion\_blit}}}{\emph{self}, \emph{evt}}{}~ \end{fulllineitems} \index{on\_pick() (matplotlib.offsetbox.DraggableBase method)@\spxentry{on\_pick()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.on_pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_pick}}}{\emph{self}, \emph{evt}}{}~ \end{fulllineitems} \index{on\_release() (matplotlib.offsetbox.DraggableBase method)@\spxentry{on\_release()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.on_release}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_release}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \index{save\_offset() (matplotlib.offsetbox.DraggableBase method)@\spxentry{save\_offset()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.save_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{save\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{update\_offset() (matplotlib.offsetbox.DraggableBase method)@\spxentry{update\_offset()}\spxextra{matplotlib.offsetbox.DraggableBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase.update_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_offset}}}{\emph{self}, \emph{dx}, \emph{dy}}{}~ \end{fulllineitems} \end{fulllineitems} \index{DraggableOffsetBox (class in matplotlib.offsetbox)@\spxentry{DraggableOffsetBox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableOffsetBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{DraggableOffsetBox}}}{\emph{ref\_artist}, \emph{offsetbox}, \emph{use\_blit=False}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.DraggableBase}}}}} \index{get\_loc\_in\_canvas() (matplotlib.offsetbox.DraggableOffsetBox method)@\spxentry{get\_loc\_in\_canvas()}\spxextra{matplotlib.offsetbox.DraggableOffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableOffsetBox.get_loc_in_canvas}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_loc\_in\_canvas}}}{\emph{self}}{}~ \end{fulllineitems} \index{save\_offset() (matplotlib.offsetbox.DraggableOffsetBox method)@\spxentry{save\_offset()}\spxextra{matplotlib.offsetbox.DraggableOffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableOffsetBox.save_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{save\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{update\_offset() (matplotlib.offsetbox.DraggableOffsetBox method)@\spxentry{update\_offset()}\spxextra{matplotlib.offsetbox.DraggableOffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DraggableOffsetBox.update_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_offset}}}{\emph{self}, \emph{dx}, \emph{dy}}{}~ \end{fulllineitems} \end{fulllineitems} \index{DrawingArea (class in matplotlib.offsetbox)@\spxentry{DrawingArea}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{DrawingArea}}}{\emph{width}, \emph{height}, \emph{xdescent=0.0}, \emph{ydescent=0.0}, \emph{clip=False}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} The DrawingArea can contain any Artist as a child. The DrawingArea has a fixed width and height. The position of children relative to the parent is fixed. The children can be clipped at the boundaries of the parent. \sphinxstyleemphasis{width}, \sphinxstyleemphasis{height} : width and height of the container box. \sphinxstyleemphasis{xdescent}, \sphinxstyleemphasis{ydescent} : descent of the box in x- and y-direction. \sphinxstyleemphasis{clip} : Whether to clip the children \index{add\_artist() (matplotlib.offsetbox.DrawingArea method)@\spxentry{add\_artist()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{} Add any {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} to the container box \end{fulllineitems} \index{clip\_children (matplotlib.offsetbox.DrawingArea attribute)@\spxentry{clip\_children}\spxextra{matplotlib.offsetbox.DrawingArea attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.clip_children}}\pysigline{\sphinxbfcode{\sphinxupquote{clip\_children}}} If the children of this DrawingArea should be clipped by DrawingArea bounding box. \end{fulllineitems} \index{draw() (matplotlib.offsetbox.DrawingArea method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the children \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.DrawingArea method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} Return with, height, xdescent, ydescent of box \end{fulllineitems} \index{get\_offset() (matplotlib.offsetbox.DrawingArea method)@\spxentry{get\_offset()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{} return offset of the container. \end{fulllineitems} \index{get\_transform() (matplotlib.offsetbox.DrawingArea method)@\spxentry{get\_transform()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} applied to the children \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.DrawingArea method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{set\_offset() (matplotlib.offsetbox.DrawingArea method)@\spxentry{set\_offset()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.set_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset}}}{\emph{self}, \emph{xy}}{} Set the offset of the container. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The (x,y) coordinates of the offset in display units. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.offsetbox.DrawingArea method)@\spxentry{set\_transform()}\spxextra{matplotlib.offsetbox.DrawingArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} set\_transform is ignored. \end{fulllineitems} \end{fulllineitems} \index{HPacker (class in matplotlib.offsetbox)@\spxentry{HPacker}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.HPacker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{HPacker}}}{\emph{pad=None}, \emph{sep=None}, \emph{width=None}, \emph{height=None}, \emph{align='baseline'}, \emph{mode='fixed'}, \emph{children=None}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.PackerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.PackerBase}}}}} The HPacker has its children packed horizontally. It automatically adjusts the relative positions of children at draw time. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} Boundary pad. \item[{\sphinxstylestrong{sep}}] \leavevmode{[}float, optional{]} Spacing between items. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float, optional{]} \item[{\sphinxstylestrong{height}}] \leavevmode{[}float, optional{]} Width and height of the container box, calculated if \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. \item[{\sphinxstylestrong{align}}] \leavevmode{[}str{]} Alignment of boxes. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}str{]} Packing mode. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstyleemphasis{pad} and \sphinxstyleemphasis{sep} need to given in points and will be scale with the renderer dpi, while \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} need to be in pixels. \index{get\_extent\_offsets() (matplotlib.offsetbox.HPacker method)@\spxentry{get\_extent\_offsets()}\spxextra{matplotlib.offsetbox.HPacker method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.HPacker.get_extent_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent\_offsets}}}{\emph{self}, \emph{renderer}}{} update offset of children and return the extents of the box \end{fulllineitems} \end{fulllineitems} \index{OffsetBox (class in matplotlib.offsetbox)@\spxentry{OffsetBox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{OffsetBox}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} The OffsetBox is a simple container artist. The child artist are meant to be drawn at a relative position to its parent. \index{axes (matplotlib.offsetbox.OffsetBox attribute)@\spxentry{axes}\spxextra{matplotlib.offsetbox.OffsetBox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.axes}}\pysigline{\sphinxbfcode{\sphinxupquote{axes}}} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance the artist resides in, or \sphinxstyleemphasis{None}. \end{fulllineitems} \index{contains() (matplotlib.offsetbox.OffsetBox method)@\spxentry{contains()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{set\_contains}}, \sphinxcode{\sphinxupquote{get\_contains}}}] \leavevmode \end{description} \end{fulllineitems} \index{draw() (matplotlib.offsetbox.OffsetBox method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Update the location of children if necessary and draw them to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_children() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_children()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of artists it contains. \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} Return with, height, xdescent, ydescent of box \end{fulllineitems} \index{get\_extent\_offsets() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_extent\_offsets()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_extent_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent\_offsets}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_offset() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_offset()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}, \emph{width}, \emph{height}, \emph{xdescent}, \emph{ydescent}, \emph{renderer}}{} Get the offset accepts extent of the box \end{fulllineitems} \index{get\_visible\_children() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_visible\_children()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_visible_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_visible\_children}}}{\emph{self}}{} Return a list of visible artists it contains. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.OffsetBox method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{set\_figure() (matplotlib.offsetbox.OffsetBox method)@\spxentry{set\_figure()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the figure accepts a class:{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance \end{fulllineitems} \index{set\_height() (matplotlib.offsetbox.OffsetBox method)@\spxentry{set\_height()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.set_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_height}}}{\emph{self}, \emph{height}}{} Set the height accepts float \end{fulllineitems} \index{set\_offset() (matplotlib.offsetbox.OffsetBox method)@\spxentry{set\_offset()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.set_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset}}}{\emph{self}, \emph{xy}}{} Set the offset. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float) or callable{]} The (x,y) coordinates of the offset in display units. A callable must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{offset}\PYG{p}{(}\PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{xdescent}\PYG{p}{,} \PYG{n}{ydescent}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{p}{(}\PYG{n+nb}{float}\PYG{p}{,} \PYG{n+nb}{float}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_width() (matplotlib.offsetbox.OffsetBox method)@\spxentry{set\_width()}\spxextra{matplotlib.offsetbox.OffsetBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox.set_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width}}}{\emph{self}, \emph{width}}{} Set the width accepts float \end{fulllineitems} \end{fulllineitems} \index{OffsetImage (class in matplotlib.offsetbox)@\spxentry{OffsetImage}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{OffsetImage}}}{\emph{arr}, \emph{zoom=1}, \emph{cmap=None}, \emph{norm=None}, \emph{interpolation=None}, \emph{origin=None}, \emph{filternorm=1}, \emph{filterrad=4.0}, \emph{resample=False}, \emph{dpi\_cor=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} \index{draw() (matplotlib.offsetbox.OffsetImage method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the children \end{fulllineitems} \index{get\_children() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_children()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of artists it contains. \end{fulllineitems} \index{get\_data() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_data()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} Return with, height, xdescent, ydescent of box \end{fulllineitems} \index{get\_offset() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_offset()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{} return offset of the container. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{get\_zoom() (matplotlib.offsetbox.OffsetImage method)@\spxentry{get\_zoom()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.get_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zoom}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_data() (matplotlib.offsetbox.OffsetImage method)@\spxentry{set\_data()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{arr}}{}~ \end{fulllineitems} \index{set\_zoom() (matplotlib.offsetbox.OffsetImage method)@\spxentry{set\_zoom()}\spxextra{matplotlib.offsetbox.OffsetImage method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetImage.set_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zoom}}}{\emph{self}, \emph{zoom}}{}~ \end{fulllineitems} \end{fulllineitems} \index{PackerBase (class in matplotlib.offsetbox)@\spxentry{PackerBase}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PackerBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{PackerBase}}}{\emph{pad=None}, \emph{sep=None}, \emph{width=None}, \emph{height=None}, \emph{align=None}, \emph{mode=None}, \emph{children=None}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} Boundary pad. \item[{\sphinxstylestrong{sep}}] \leavevmode{[}float, optional{]} Spacing between items. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float, optional{]} \item[{\sphinxstylestrong{height}}] \leavevmode{[}float, optional{]} Width and height of the container box, calculated if \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. \item[{\sphinxstylestrong{align}}] \leavevmode{[}str, optional{]} Alignment of boxes. Can be one of \sphinxcode{\sphinxupquote{top}}, \sphinxcode{\sphinxupquote{bottom}}, \sphinxcode{\sphinxupquote{left}}, \sphinxcode{\sphinxupquote{right}}, \sphinxcode{\sphinxupquote{center}} and \sphinxcode{\sphinxupquote{baseline}} \item[{\sphinxstylestrong{mode}}] \leavevmode{[}str, optional{]} Packing mode. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstyleemphasis{pad} and \sphinxstyleemphasis{sep} need to given in points and will be scale with the renderer dpi, while \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} need to be in pixels. \end{fulllineitems} \index{PaddedBox (class in matplotlib.offsetbox)@\spxentry{PaddedBox}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PaddedBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{PaddedBox}}}{\emph{child}, \emph{pad=None}, \emph{draw\_frame=False}, \emph{patch\_attrs=None}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} \sphinxstyleemphasis{pad} : boundary pad \begin{sphinxadmonition}{note}{Note:} \sphinxstyleemphasis{pad} need to given in points and will be scale with the renderer dpi, while \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} need to be in pixels. \end{sphinxadmonition} \index{draw() (matplotlib.offsetbox.PaddedBox method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.PaddedBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PaddedBox.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Update the location of children if necessary and draw them to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{draw\_frame() (matplotlib.offsetbox.PaddedBox method)@\spxentry{draw\_frame()}\spxextra{matplotlib.offsetbox.PaddedBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PaddedBox.draw_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_frame}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_extent\_offsets() (matplotlib.offsetbox.PaddedBox method)@\spxentry{get\_extent\_offsets()}\spxextra{matplotlib.offsetbox.PaddedBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PaddedBox.get_extent_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent\_offsets}}}{\emph{self}, \emph{renderer}}{} update offset of childrens and return the extents of the box \end{fulllineitems} \index{update\_frame() (matplotlib.offsetbox.PaddedBox method)@\spxentry{update\_frame()}\spxextra{matplotlib.offsetbox.PaddedBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.PaddedBox.update_frame}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_frame}}}{\emph{self}, \emph{bbox}, \emph{fontsize=None}}{}~ \end{fulllineitems} \end{fulllineitems} \index{TextArea (class in matplotlib.offsetbox)@\spxentry{TextArea}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{TextArea}}}{\emph{s}, \emph{textprops=None}, \emph{multilinebaseline=None}, \emph{minimumdescent=True}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.OffsetBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.OffsetBox}}}}} The TextArea is contains a single Text instance. The text is placed at (0,0) with baseline+left alignment. The width and height of the TextArea instance is the width and height of the its child text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} a string to be displayed. \item[{\sphinxstylestrong{textprops}}] \leavevmode{[}dictionary, optional, default: None{]} Dictionary of keyword parameters to be passed to the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance contained inside TextArea. \item[{\sphinxstylestrong{multilinebaseline}}] \leavevmode{[}bool, optional{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, baseline for multiline text is adjusted so that it is (approximately) center-aligned with singleline text. \item[{\sphinxstylestrong{minimumdescent}}] \leavevmode{[}bool, optional{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, the box has a minimum descent of "p". \end{description} \end{description}\end{quote} \index{draw() (matplotlib.offsetbox.TextArea method)@\spxentry{draw()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the children \end{fulllineitems} \index{get\_extent() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_extent()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} Return with, height, xdescent, ydescent of box \end{fulllineitems} \index{get\_minimumdescent() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_minimumdescent()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_minimumdescent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_minimumdescent}}}{\emph{self}}{} get minimumdescent. \end{fulllineitems} \index{get\_multilinebaseline() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_multilinebaseline()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_multilinebaseline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_multilinebaseline}}}{\emph{self}}{} get multilinebaseline . \end{fulllineitems} \index{get\_offset() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_offset()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{} return offset of the container. \end{fulllineitems} \index{get\_text() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_text()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text}}}{\emph{self}}{} Returns the string representation of this area's text \end{fulllineitems} \index{get\_window\_extent() (matplotlib.offsetbox.TextArea method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} get the bounding box in display space. \end{fulllineitems} \index{set\_minimumdescent() (matplotlib.offsetbox.TextArea method)@\spxentry{set\_minimumdescent()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.set_minimumdescent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_minimumdescent}}}{\emph{self}, \emph{t}}{} Set minimumdescent . If True, extent of the single line text is adjusted so that it has minimum descent of "p" \end{fulllineitems} \index{set\_multilinebaseline() (matplotlib.offsetbox.TextArea method)@\spxentry{set\_multilinebaseline()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.set_multilinebaseline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_multilinebaseline}}}{\emph{self}, \emph{t}}{} Set multilinebaseline . If True, baseline for multiline text is adjusted so that it is (approximately) center-aligned with single-line text. \end{fulllineitems} \index{set\_offset() (matplotlib.offsetbox.TextArea method)@\spxentry{set\_offset()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.set_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset}}}{\emph{self}, \emph{xy}}{} Set the offset of the container. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The (x,y) coordinates of the offset in display units. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_text() (matplotlib.offsetbox.TextArea method)@\spxentry{set\_text()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.set_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_text}}}{\emph{self}, \emph{s}}{} Set the text of this area as a string. \end{fulllineitems} \index{set\_transform() (matplotlib.offsetbox.TextArea method)@\spxentry{set\_transform()}\spxextra{matplotlib.offsetbox.TextArea method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} set\_transform is ignored. \end{fulllineitems} \end{fulllineitems} \index{VPacker (class in matplotlib.offsetbox)@\spxentry{VPacker}\spxextra{class in matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.VPacker}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{VPacker}}}{\emph{pad=None}, \emph{sep=None}, \emph{width=None}, \emph{height=None}, \emph{align='baseline'}, \emph{mode='fixed'}, \emph{children=None}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.PackerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.PackerBase}}}}} The VPacker has its children packed vertically. It automatically adjust the relative positions of children in the drawing time. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float, optional{]} Boundary pad. \item[{\sphinxstylestrong{sep}}] \leavevmode{[}float, optional{]} Spacing between items. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float, optional{]} \item[{\sphinxstylestrong{height}}] \leavevmode{[}float, optional{]} width and height of the container box, calculated if \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. \item[{\sphinxstylestrong{align}}] \leavevmode{[}str, optional{]} Alignment of boxes. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}str, optional{]} Packing mode. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstyleemphasis{pad} and \sphinxstyleemphasis{sep} need to given in points and will be scale with the renderer dpi, while \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} need to be in pixels. \index{get\_extent\_offsets() (matplotlib.offsetbox.VPacker method)@\spxentry{get\_extent\_offsets()}\spxextra{matplotlib.offsetbox.VPacker method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.VPacker.get_extent_offsets}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent\_offsets}}}{\emph{self}, \emph{renderer}}{} update offset of childrens and return the extents of the box \end{fulllineitems} \end{fulllineitems} \index{bbox\_artist() (in module matplotlib.offsetbox)@\spxentry{bbox\_artist()}\spxextra{in module matplotlib.offsetbox}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/offsetbox_api:matplotlib.offsetbox.bbox_artist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.}}\sphinxbfcode{\sphinxupquote{bbox\_artist}}}{\emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches}}} \label{\detokenize{api/patches_api:module-matplotlib.patches}}\label{\detokenize{api/patches_api:matplotlib-patches}}\label{\detokenize{api/patches_api::doc}}\index{matplotlib.patches (module)@\spxentry{matplotlib.patches}\spxextra{module}} \subsection{Classes} \label{\detokenize{api/patches_api:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib.patches.Arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Arc}}}}}(xy, width, height{[}, angle, theta1, theta2{]}) & An elliptical arc, i.e. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Arrow:matplotlib.patches.Arrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Arrow}}}}}(x, y, dx, dy{[}, width{]}) & An arrow patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}} is a container class which defines several arrowstyle classes, which is used to create an arrow path along a given path. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} is a container class which defines several boxstyle classes, which are used for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Circle}}}}}(xy{[}, radius{]}) & A circle patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.CirclePolygon:matplotlib.patches.CirclePolygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CirclePolygon}}}}}(xy{[}, radius, resolution{]}) & A polygon-approximation of a circle patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionPatch}}}}}(xyA, xyB, coordsA{[}, ...{]}) & A {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionPatch}}}}} class is to make connecting lines between two points (possibly in different axes). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}} is a container class which defines several connectionstyle classes, which is used to create a path between two points. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ellipse}}}}}(xy, width, height{[}, angle{]}) & A scale-free ellipse. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}}(x, y, dx, dy{[}, width, ...{]}) & Like Arrow, but lets you set head width and head height independently. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}}({[}posA, posB, path, ...{]}) & A fancy arrow patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}}(xy, width, height{[}, ...{]}) & A fancy box around a rectangle with lower left at \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with specified width and height. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}({[}edgecolor, facecolor, color, ...{]}) & A patch is a 2D artist with a face color and an edge color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}}(path, **kwargs) & A general polycurve path patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}(xy{[}, closed{]}) & A general polygon patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}}(xy, width, height{[}, angle{]}) & A rectangle with lower left at \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with specified \sphinxstyleemphasis{width}, \sphinxstyleemphasis{height} and rotation \sphinxstyleemphasis{angle}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RegularPolygon}}}}}(xy, numVertices{[}, radius, ...{]}) & A regular polygon patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib.patches.Shadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Shadow}}}}}(patch, ox, oy{[}, props{]}) & Create a shadow of the given \sphinxstyleemphasis{patch} offset by \sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Wedge}}}}}(center, r, theta1, theta2{[}, width{]}) & Wedge shaped patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib.patches.YAArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{YAArrow}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} Yet another arrow class. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.patches.Arc} \label{\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib-patches-arc}}\label{\detokenize{api/_as_gen/matplotlib.patches.Arc::doc}}\index{Arc (class in matplotlib.patches)@\spxentry{Arc}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib.patches.Arc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Arc}}}{\emph{xy}, \emph{width}, \emph{height}, \emph{angle=0.0}, \emph{theta1=0.0}, \emph{theta2=360.0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Ellipse}}}}} An elliptical arc, i.e. a segment of an ellipse. Due to internal optimizations, there are certain restrictions on using Arc: \begin{itemize} \item {} The arc cannot be filled. \item {} The arc must be used in an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance---it can not be added directly to a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}---because it is optimized to only render the segments that are inside the axes bounding box with high resolution. \end{itemize} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The center of the ellipse. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} The length of the horizontal axis. \item[{\sphinxstylestrong{height}}] \leavevmode{[}float{]} The length of the vertical axis. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}float{]} Rotation of the ellipse in degrees (counterclockwise). \item[{\sphinxstylestrong{theta1, theta2}}] \leavevmode{[}float, optional{]} Starting and ending angles of the arc in degrees. These values are relative to \sphinxstyleemphasis{angle}, e.g. if \sphinxstyleemphasis{angle} = 45 and \sphinxstyleemphasis{theta1} = 90 the absolute starting angle is 135. Default \sphinxstyleemphasis{theta1} = 0, \sphinxstyleemphasis{theta2} = 360, i.e. a complete ellipse. The arc is drawn in the counterclockwise direction. Angles greater than or equal to 360, or smaller than 0, are represented by an equivalent angle in the range {[}0, 360), by taking the input value mod 360. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties{]} Most {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties are supported as keyword arguments, with the exception of \sphinxstyleemphasis{fill} and \sphinxstyleemphasis{facecolor} because filling is not supported. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \index{draw() (matplotlib.patches.Arc method)@\spxentry{draw()}\spxextra{matplotlib.patches.Arc method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Arc:matplotlib.patches.Arc.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the arc to the given \sphinxstyleemphasis{renderer}. \subsubsection*{Notes} Ellipses are normally drawn using an approximation that uses eight cubic Bezier splines. The error of this approximation is 1.89818e-6, according to this unverified source: \begin{quote} Lancaster, Don. \sphinxstyleemphasis{Approximating a Circle or an Ellipse Using Four Bezier Cubic Splines.} \sphinxurl{http://www.tinaja.com/glib/ellipse4.pdf} \end{quote} There is a use case where very large ellipses must be drawn with very high accuracy, and it is too expensive to render the entire ellipse with enough segments (either splines or line segments). Therefore, in the case where either radius of the ellipse is large enough that the error of the spline approximation will be visible (greater than one pixel offset from the ideal), a different technique is used. In that case, only the visible parts of the ellipse are drawn, with each visible arc using a fixed number of spline segments (8). The algorithm proceeds as follows: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} The points where the ellipse intersects the axes bounding box are located. (This is done be performing an inverse transformation on the axes bbox such that it is relative to the unit circle -- this makes the intersection calculation much easier than doing rotated ellipse intersection directly). This uses the "line intersecting a circle" algorithm from: \begin{quote} Vince, John. \sphinxstyleemphasis{Geometry for Computer Graphics: Formulae, Examples \& Proofs.} London: Springer-Verlag, 2005. \end{quote} \item {} The angles of each of the intersection points are calculated. \item {} Proceeding counterclockwise starting in the positive x-direction, each of the visible arc-segments between the pairs of vertices are drawn using the Bezier arc approximation technique implemented in {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path.arc()}}}}}. \end{enumerate} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Arc}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Arc:examples-using-matplotlib-patches-arc}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_ellipse\_with\_units.py} \end{itemize} \subsubsection{matplotlib.patches.Arrow} \label{\detokenize{api/_as_gen/matplotlib.patches.Arrow:matplotlib-patches-arrow}}\label{\detokenize{api/_as_gen/matplotlib.patches.Arrow::doc}}\index{Arrow (class in matplotlib.patches)@\spxentry{Arrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Arrow:matplotlib.patches.Arrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Arrow}}}{\emph{x}, \emph{y}, \emph{dx}, \emph{dy}, \emph{width=1.0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} An arrow patch. Draws an arrow from (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) to (\sphinxstyleemphasis{x} + \sphinxstyleemphasis{dx}, \sphinxstyleemphasis{y} + \sphinxstyleemphasis{dy}). The width of the arrow is scaled by \sphinxstyleemphasis{width}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar{]} x coordinate of the arrow tail \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar{]} y coordinate of the arrow tail \item[{\sphinxstylestrong{dx}}] \leavevmode{[}scalar{]} Arrow length in the x direction \item[{\sphinxstylestrong{dy}}] \leavevmode{[}scalar{]} Arrow length in the y direction \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar, optional (default: 1){]} Scale factor for the width of the arrow. With a default value of 1, the tail width is 0.2 and head width is 0.6. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}}}] \leavevmode Patch that allows independent control of the head and tail properties \end{description} \index{get\_patch\_transform() (matplotlib.patches.Arrow method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.Arrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Arrow:matplotlib.patches.Arrow.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.Arrow method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Arrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Arrow:matplotlib.patches.Arrow.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Arrow}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Arrow:examples-using-matplotlib-patches-arrow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_arrow\_guide.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \subsubsection{matplotlib.patches.ArrowStyle} \label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib-patches-arrowstyle}}\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle::doc}}\index{ArrowStyle (class in matplotlib.patches)@\spxentry{ArrowStyle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{ArrowStyle}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Style}} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}} is a container class which defines several arrowstyle classes, which is used to create an arrow path along a given path. These are mainly used with {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}}. A arrowstyle object can be either created as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ArrowStyle}\PYG{o}{.}\PYG{n}{Fancy}\PYG{p}{(}\PYG{n}{head\PYGZus{}length}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{head\PYGZus{}width}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{tail\PYGZus{}width}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ArrowStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Fancy}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{head\PYGZus{}length}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{head\PYGZus{}width}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{tail\PYGZus{}width}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ArrowStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Fancy, head\PYGZus{}length=.4, head\PYGZus{}width=.4, tail\PYGZus{}width=.4}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} The following classes are defined \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Curve & \sphinxcode{\sphinxupquote{-}} & None \\ \hline CurveB & \sphinxcode{\sphinxupquote{-\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline BracketB & \sphinxcode{\sphinxupquote{-{[}}} & widthB=1.0, lengthB=0.2, angleB=None \\ \hline CurveFilledB & \sphinxcode{\sphinxupquote{-\textbar{}\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveA & \sphinxcode{\sphinxupquote{\textless{}-}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveAB & \sphinxcode{\sphinxupquote{\textless{}-\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveFilledA & \sphinxcode{\sphinxupquote{\textless{}\textbar{}-}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveFilledAB & \sphinxcode{\sphinxupquote{\textless{}\textbar{}-\textbar{}\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline BracketA & \sphinxcode{\sphinxupquote{{]}-}} & widthA=1.0, lengthA=0.2, angleA=None \\ \hline BracketAB & \sphinxcode{\sphinxupquote{{]}-{[}}} & widthA=1.0, lengthA=0.2, angleA=None, widthB=1.0, lengthB=0.2, angleB=None \\ \hline Fancy & \sphinxcode{\sphinxupquote{fancy}} & head\_length=0.4, head\_width=0.4, tail\_width=0.4 \\ \hline Simple & \sphinxcode{\sphinxupquote{simple}} & head\_length=0.5, head\_width=0.5, tail\_width=0.2 \\ \hline Wedge & \sphinxcode{\sphinxupquote{wedge}} & tail\_width=0.3, shrink\_factor=0.5 \\ \hline BarAB & \sphinxcode{\sphinxupquote{\textbar{}-\textbar{}}} & widthA=1.0, angleA=None, widthB=1.0, angleB=None \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} An instance of any arrow style class is a callable object, whose call signature is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nf+fm}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{path}\PYG{p}{,} \PYG{n}{mutation\PYGZus{}size}\PYG{p}{,} \PYG{n}{linewidth}\PYG{p}{,} \PYG{n}{aspect\PYGZus{}ratio}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{)} \end{sphinxVerbatim} and it returns a tuple of a \sphinxcode{\sphinxupquote{Path}} instance and a boolean value. \sphinxstyleemphasis{path} is a \sphinxcode{\sphinxupquote{Path}} instance along which the arrow will be drawn. \sphinxstyleemphasis{mutation\_size} and \sphinxstyleemphasis{aspect\_ratio} have the same meaning as in {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}}. \sphinxstyleemphasis{linewidth} is a line width to be stroked. This is meant to be used to correct the location of the head so that it does not overshoot the destination point, but not all classes support it. return the instance of the subclass with the given style name. \index{ArrowStyle.BarAB (class in matplotlib.patches)@\spxentry{ArrowStyle.BarAB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.BarAB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{BarAB}}}{\emph{widthA=1.0}, \emph{angleA=None}, \emph{widthB=1.0}, \emph{angleB=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Bracket}} An arrow with a bar(\textbar{}) at both ends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{widthA}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{angleA}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \item[{\sphinxstylestrong{widthB}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{angleB}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.BracketA (class in matplotlib.patches)@\spxentry{ArrowStyle.BracketA}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.BracketA}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{BracketA}}}{\emph{widthA=1.0}, \emph{lengthA=0.2}, \emph{angleA=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Bracket}} An arrow with a bracket({]}) at its end. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{widthA}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{lengthA}}] \leavevmode{[}float, optional, default{]} Length of the bracket \item[{\sphinxstylestrong{angleA}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.BracketAB (class in matplotlib.patches)@\spxentry{ArrowStyle.BracketAB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.BracketAB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{BracketAB}}}{\emph{widthA=1.0}, \emph{lengthA=0.2}, \emph{angleA=None}, \emph{widthB=1.0}, \emph{lengthB=0.2}, \emph{angleB=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Bracket}} An arrow with a bracket({]}) at both ends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{widthA}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{lengthA}}] \leavevmode{[}float, optional, default{]} Length of the bracket \item[{\sphinxstylestrong{angleA}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \item[{\sphinxstylestrong{widthB}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{lengthB}}] \leavevmode{[}float, optional, default{]} Length of the bracket \item[{\sphinxstylestrong{angleB}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.BracketB (class in matplotlib.patches)@\spxentry{ArrowStyle.BracketB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.BracketB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{BracketB}}}{\emph{widthB=1.0}, \emph{lengthB=0.2}, \emph{angleB=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Bracket}} An arrow with a bracket({[}) at its end. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{widthB}}] \leavevmode{[}float, optional, default{]} Width of the bracket \item[{\sphinxstylestrong{lengthB}}] \leavevmode{[}float, optional, default{]} Length of the bracket \item[{\sphinxstylestrong{angleB}}] \leavevmode{[}float, optional, default{]} Angle between the bracket and the line \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.Curve (class in matplotlib.patches)@\spxentry{ArrowStyle.Curve}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Curve}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Curve}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} A simple curve without any arrow head. \end{fulllineitems} \index{ArrowStyle.CurveA (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveA}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveA}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveA}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with a head at its begin point. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.CurveAB (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveAB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveAB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveAB}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with heads both at the begin and the end point. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.CurveB (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveB}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with a head at its end point. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.CurveFilledA (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveFilledA}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveFilledA}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveFilledA}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with filled triangle head at the begin. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.CurveFilledAB (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveFilledAB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveFilledAB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveFilledAB}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with filled triangle heads at both ends. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.CurveFilledB (class in matplotlib.patches)@\spxentry{ArrowStyle.CurveFilledB}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.CurveFilledB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{CurveFilledB}}}{\emph{head\_length=0.4}, \emph{head\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Curve}} An arrow with filled triangle head at the end. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \end{description} \end{description}\end{quote} \end{fulllineitems} \index{ArrowStyle.Fancy (class in matplotlib.patches)@\spxentry{ArrowStyle.Fancy}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Fancy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Fancy}}}{\emph{head\_length=0.4}, \emph{head\_width=0.4}, \emph{tail\_width=0.4}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A fancy arrow. Only works with a quadratic Bezier curve. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \item[{\sphinxstylestrong{tail\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow tail \end{description} \end{description}\end{quote} \index{transmute() (matplotlib.patches.ArrowStyle.Fancy method)@\spxentry{transmute()}\spxextra{matplotlib.patches.ArrowStyle.Fancy method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Fancy.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{path}, \emph{mutation\_size}, \emph{linewidth}}{} The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation\_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length. \end{fulllineitems} \end{fulllineitems} \index{ArrowStyle.Simple (class in matplotlib.patches)@\spxentry{ArrowStyle.Simple}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Simple}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Simple}}}{\emph{head\_length=0.5}, \emph{head\_width=0.5}, \emph{tail\_width=0.2}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A simple arrow. Only works with a quadratic Bezier curve. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}float, optional, default{]} Length of the arrow head \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow head \item[{\sphinxstylestrong{tail\_width}}] \leavevmode{[}float, optional, default{]} Width of the arrow tail \end{description} \end{description}\end{quote} \index{transmute() (matplotlib.patches.ArrowStyle.Simple method)@\spxentry{transmute()}\spxextra{matplotlib.patches.ArrowStyle.Simple method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Simple.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{path}, \emph{mutation\_size}, \emph{linewidth}}{} The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation\_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length. \end{fulllineitems} \end{fulllineitems} \index{ArrowStyle.Wedge (class in matplotlib.patches)@\spxentry{ArrowStyle.Wedge}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Wedge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Wedge}}}{\emph{tail\_width=0.3}, \emph{shrink\_factor=0.5}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Wedge(?) shape. Only works with a quadratic Bezier curve. The begin point has a width of the tail\_width and the end point has a width of 0. At the middle, the width is shrink\_factor*tail\_width. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tail\_width}}] \leavevmode{[}float, optional, default{]} Width of the tail \item[{\sphinxstylestrong{shrink\_factor}}] \leavevmode{[}float, optional, default{]} Fraction of the arrow width at the middle point \end{description} \end{description}\end{quote} \index{transmute() (matplotlib.patches.ArrowStyle.Wedge method)@\spxentry{transmute()}\spxextra{matplotlib.patches.ArrowStyle.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle.Wedge.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{path}, \emph{mutation\_size}, \emph{linewidth}}{} The transmute method is the very core of the ArrowStyle class and must be overridden in the subclasses. It receives the path object along which the arrow will be drawn, and the mutation\_size, with which the arrow head etc. will be scaled. The linewidth may be used to adjust the path so that it does not pass beyond the given points. It returns a tuple of a Path instance and a boolean. The boolean value indicate whether the path can be filled or not. The return value can also be a list of paths and list of booleans of a same length. \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.ArrowStyle}}} \label{\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:examples-using-matplotlib-patches-arrowstyle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \subsubsection{matplotlib.patches.BoxStyle} \label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib-patches-boxstyle}}\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle::doc}}\index{BoxStyle (class in matplotlib.patches)@\spxentry{BoxStyle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{BoxStyle}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Style}} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} is a container class which defines several boxstyle classes, which are used for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}}. A style object can be created as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{BoxStyle}\PYG{o}{.}\PYG{n}{Round}\PYG{p}{(}\PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{BoxStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Round}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{BoxStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Round, pad=0.2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} Following boxstyle classes are defined. \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Circle & \sphinxcode{\sphinxupquote{circle}} & pad=0.3 \\ \hline DArrow & \sphinxcode{\sphinxupquote{darrow}} & pad=0.3 \\ \hline LArrow & \sphinxcode{\sphinxupquote{larrow}} & pad=0.3 \\ \hline RArrow & \sphinxcode{\sphinxupquote{rarrow}} & pad=0.3 \\ \hline Round & \sphinxcode{\sphinxupquote{round}} & pad=0.3, rounding\_size=None \\ \hline Round4 & \sphinxcode{\sphinxupquote{round4}} & pad=0.3, rounding\_size=None \\ \hline Roundtooth & \sphinxcode{\sphinxupquote{roundtooth}} & pad=0.3, tooth\_size=None \\ \hline Sawtooth & \sphinxcode{\sphinxupquote{sawtooth}} & pad=0.3, tooth\_size=None \\ \hline Square & \sphinxcode{\sphinxupquote{square}} & pad=0.3 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} An instance of any boxstyle class is an callable object, whose call signature is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nf+fm}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{,} \PYG{n}{mutation\PYGZus{}size}\PYG{p}{,} \PYG{n}{aspect\PYGZus{}ratio}\PYG{o}{=}\PYG{l+m+mf}{1.}\PYG{p}{)} \end{sphinxVerbatim} and returns a \sphinxcode{\sphinxupquote{Path}} instance. \sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}, \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} specify the location and size of the box to be drawn. \sphinxstyleemphasis{mutation\_scale} determines the overall size of the mutation (by which I mean the transformation of the rectangle to the fancy box). \sphinxstyleemphasis{mutation\_aspect} determines the aspect-ratio of the mutation. return the instance of the subclass with the given style name. \index{BoxStyle.Circle (class in matplotlib.patches)@\spxentry{BoxStyle.Circle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Circle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Circle}}}{\emph{pad=0.3}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A simple circle box. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} The amount of padding around the original box. \end{description} \end{description}\end{quote} \index{transmute() (matplotlib.patches.BoxStyle.Circle method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Circle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Circle.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.DArrow (class in matplotlib.patches)@\spxentry{BoxStyle.DArrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.DArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{DArrow}}}{\emph{pad=0.3}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} (Double) Arrow Box \index{transmute() (matplotlib.patches.BoxStyle.DArrow method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.DArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.DArrow.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.LArrow (class in matplotlib.patches)@\spxentry{BoxStyle.LArrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.LArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{LArrow}}}{\emph{pad=0.3}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} (left) Arrow Box \index{transmute() (matplotlib.patches.BoxStyle.LArrow method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.LArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.LArrow.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.RArrow (class in matplotlib.patches)@\spxentry{BoxStyle.RArrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.RArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{RArrow}}}{\emph{pad=0.3}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.LArrow}} (right) Arrow Box \index{transmute() (matplotlib.patches.BoxStyle.RArrow method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.RArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.RArrow.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.Round (class in matplotlib.patches)@\spxentry{BoxStyle.Round}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Round}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Round}}}{\emph{pad=0.3}, \emph{rounding\_size=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A box with round corners. \begin{description} \item[{\sphinxstyleemphasis{pad}}] \leavevmode amount of padding \item[{\sphinxstyleemphasis{rounding\_size}}] \leavevmode rounding radius of corners. \sphinxstyleemphasis{pad} if None \end{description} \index{transmute() (matplotlib.patches.BoxStyle.Round method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Round method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Round.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.Round4 (class in matplotlib.patches)@\spxentry{BoxStyle.Round4}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Round4}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Round4}}}{\emph{pad=0.3}, \emph{rounding\_size=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Another box with round edges. \begin{description} \item[{\sphinxstyleemphasis{pad}}] \leavevmode amount of padding \item[{\sphinxstyleemphasis{rounding\_size}}] \leavevmode rounding size of edges. \sphinxstyleemphasis{pad} if None \end{description} \index{transmute() (matplotlib.patches.BoxStyle.Round4 method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Round4 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Round4.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.Roundtooth (class in matplotlib.patches)@\spxentry{BoxStyle.Roundtooth}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Roundtooth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Roundtooth}}}{\emph{pad=0.3}, \emph{tooth\_size=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.Sawtooth}} A rounded tooth box. \begin{description} \item[{\sphinxstyleemphasis{pad}}] \leavevmode amount of padding \item[{\sphinxstyleemphasis{tooth\_size}}] \leavevmode size of the sawtooth. pad* if None \end{description} \index{transmute() (matplotlib.patches.BoxStyle.Roundtooth method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Roundtooth method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Roundtooth.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.Sawtooth (class in matplotlib.patches)@\spxentry{BoxStyle.Sawtooth}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Sawtooth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Sawtooth}}}{\emph{pad=0.3}, \emph{tooth\_size=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A sawtooth box. \begin{description} \item[{\sphinxstyleemphasis{pad}}] \leavevmode amount of padding \item[{\sphinxstyleemphasis{tooth\_size}}] \leavevmode size of the sawtooth. pad* if None \end{description} \index{transmute() (matplotlib.patches.BoxStyle.Sawtooth method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Sawtooth method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Sawtooth.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \index{BoxStyle.Square (class in matplotlib.patches)@\spxentry{BoxStyle.Square}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Square}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Square}}}{\emph{pad=0.3}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A simple square box. \begin{description} \item[{\sphinxstyleemphasis{pad}}] \leavevmode amount of padding \end{description} \index{transmute() (matplotlib.patches.BoxStyle.Square method)@\spxentry{transmute()}\spxextra{matplotlib.patches.BoxStyle.Square method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle.Square.transmute}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transmute}}}{\emph{self}, \emph{x0}, \emph{y0}, \emph{width}, \emph{height}, \emph{mutation\_size}}{} The transmute method is a very core of the \sphinxcode{\sphinxupquote{BboxTransmuter}} class and must be overridden in the subclasses. It receives the location and size of the rectangle, and the mutation\_size, with which the amount of padding and etc. will be scaled. It returns a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.BoxStyle}}} \label{\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:examples-using-matplotlib-patches-boxstyle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \subsubsection{matplotlib.patches.Circle} \label{\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib-patches-circle}}\label{\detokenize{api/_as_gen/matplotlib.patches.Circle::doc}}\index{Circle (class in matplotlib.patches)@\spxentry{Circle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Circle}}}{\emph{xy}, \emph{radius=5}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Ellipse}}}}} A circle patch. Create true circle at center \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with given \sphinxstyleemphasis{radius}. Unlike {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.CirclePolygon:matplotlib.patches.CirclePolygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CirclePolygon}}}}} which is a polygonal approximation, this uses Bezier splines and is much closer to a scale-free circle. Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_radius() (matplotlib.patches.Circle method)@\spxentry{get\_radius()}\spxextra{matplotlib.patches.Circle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle.get_radius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_radius}}}{\emph{self}}{} Return the radius of the circle \end{fulllineitems} \index{radius (matplotlib.patches.Circle attribute)@\spxentry{radius}\spxextra{matplotlib.patches.Circle attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle.radius}}\pysigline{\sphinxbfcode{\sphinxupquote{radius}}} Return the radius of the circle \end{fulllineitems} \index{set\_radius() (matplotlib.patches.Circle method)@\spxentry{set\_radius()}\spxextra{matplotlib.patches.Circle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle.set_radius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_radius}}}{\emph{self}, \emph{radius}}{} Set the radius of the circle \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{radius}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Circle}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Circle:examples-using-matplotlib-patches-circle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_annotation\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fancyarrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_anatomy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_looking\_glass.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_pathpatch3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_radar\_chart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box02.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \subsubsection{matplotlib.patches.CirclePolygon} \label{\detokenize{api/_as_gen/matplotlib.patches.CirclePolygon:matplotlib-patches-circlepolygon}}\label{\detokenize{api/_as_gen/matplotlib.patches.CirclePolygon::doc}}\index{CirclePolygon (class in matplotlib.patches)@\spxentry{CirclePolygon}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.CirclePolygon:matplotlib.patches.CirclePolygon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{CirclePolygon}}}{\emph{xy}, \emph{radius=5}, \emph{resolution=20}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.RegularPolygon}}}}} A polygon-approximation of a circle patch. Create a circle at \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with given \sphinxstyleemphasis{radius}. This circle is approximated by a regular polygon with \sphinxstyleemphasis{resolution} sides. For a smoother circle drawn with splines, see {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Circle}}}}}. Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \subsubsection{matplotlib.patches.ConnectionPatch} \label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib-patches-connectionpatch}}\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch::doc}}\index{ConnectionPatch (class in matplotlib.patches)@\spxentry{ConnectionPatch}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{ConnectionPatch}}}{\emph{xyA}, \emph{xyB}, \emph{coordsA}, \emph{coordsB=None}, \emph{axesA=None}, \emph{axesB=None}, \emph{arrowstyle='-'}, \emph{arrow\_transmuter=None}, \emph{connectionstyle='arc3'}, \emph{connector=None}, \emph{patchA=None}, \emph{patchB=None}, \emph{shrinkA=0.0}, \emph{shrinkB=0.0}, \emph{mutation\_scale=10.0}, \emph{mutation\_aspect=None}, \emph{clip\_on=False}, \emph{dpi\_cor=1.0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} A {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionPatch}}}}} class is to make connecting lines between two points (possibly in different axes). Connect point \sphinxstyleemphasis{xyA} in \sphinxstyleemphasis{coordsA} with point \sphinxstyleemphasis{xyB} in \sphinxstyleemphasis{coordsB} Valid keys are \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline arrowstyle & the arrow style \\ \hline connectionstyle & the connection style \\ \hline relpos & default is (0.5, 0.5) \\ \hline patchA & default is bounding box of the text \\ \hline patchB & default is None \\ \hline shrinkA & default is 2 points \\ \hline shrinkB & default is 2 points \\ \hline mutation\_scale & default is text size (in points) \\ \hline mutation\_aspect & default is 1. \\ \hline ? & any key for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \sphinxstyleemphasis{coordsA} and \sphinxstyleemphasis{coordsB} are strings that indicate the coordinates of \sphinxstyleemphasis{xyA} and \sphinxstyleemphasis{xyB}. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline 'figure points' & points from the lower left corner of the figure \\ \hline 'figure pixels' & pixels from the lower left corner of the figure \\ \hline 'figure fraction' & 0,0 is lower left of figure and 1,1 is upper, right \\ \hline 'axes points' & points from lower left corner of axes \\ \hline 'axes pixels' & pixels from lower left corner of axes \\ \hline 'axes fraction' & 0,1 is lower left of axes and 1,1 is upper right \\ \hline 'data' & use the coordinate system of the object being annotated (default) \\ \hline 'offset points' & Specify an offset (in points) from the \sphinxstyleemphasis{xy} value \\ \hline 'polar' & you can specify \sphinxstyleemphasis{theta}, \sphinxstyleemphasis{r} for the annotation, even in cartesian plots. Note that if you are using a polar axes, you do not need to specify polar for the coordinate system since that is the native "data" coordinate system. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively they can be set to any valid {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}. \index{draw() (matplotlib.patches.ConnectionPatch method)@\spxentry{draw()}\spxextra{matplotlib.patches.ConnectionPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_annotation\_clip() (matplotlib.patches.ConnectionPatch method)@\spxentry{get\_annotation\_clip()}\spxextra{matplotlib.patches.ConnectionPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch.get_annotation_clip}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_annotation\_clip}}}{\emph{self}}{} Return \sphinxstyleemphasis{annotation\_clip} attribute. See {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch.set_annotation_clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_annotation\_clip()}}}}} for the meaning of return values. \end{fulllineitems} \index{get\_path\_in\_displaycoord() (matplotlib.patches.ConnectionPatch method)@\spxentry{get\_path\_in\_displaycoord()}\spxextra{matplotlib.patches.ConnectionPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch.get_path_in_displaycoord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_in\_displaycoord}}}{\emph{self}}{} Return the mutated path of the arrow in the display coord \end{fulllineitems} \index{set\_annotation\_clip() (matplotlib.patches.ConnectionPatch method)@\spxentry{set\_annotation\_clip()}\spxextra{matplotlib.patches.ConnectionPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:matplotlib.patches.ConnectionPatch.set_annotation_clip}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_annotation\_clip}}}{\emph{self}, \emph{b}}{} set \sphinxstyleemphasis{annotation\_clip} attribute. \begin{itemize} \item {} \begin{description} \item[{True: the annotation will only be drawn when self.xy is inside the}] \leavevmode axes. \end{description} \item {} \begin{description} \item[{False: the annotation will always be drawn regardless of its}] \leavevmode position. \end{description} \item {} None: the self.xy will be checked only if \sphinxstyleemphasis{xycoords} is "data" \end{itemize} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.ConnectionPatch}}} \label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionPatch:examples-using-matplotlib-patches-connectionpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_bar\_of\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connect\_simple01.py} \end{itemize} \subsubsection{matplotlib.patches.ConnectionStyle} \label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib-patches-connectionstyle}}\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle::doc}}\index{ConnectionStyle (class in matplotlib.patches)@\spxentry{ConnectionStyle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{ConnectionStyle}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Style}} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}} is a container class which defines several connectionstyle classes, which is used to create a path between two points. These are mainly used with {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}}. A connectionstyle object can be either created as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ConnectionStyle}\PYG{o}{.}\PYG{n}{Arc3}\PYG{p}{(}\PYG{n}{rad}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ConnectionStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Arc3}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{rad}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ConnectionStyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Arc3, rad=0.2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} The following classes are defined \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Angle & \sphinxcode{\sphinxupquote{angle}} & angleA=90, angleB=0, rad=0.0 \\ \hline Angle3 & \sphinxcode{\sphinxupquote{angle3}} & angleA=90, angleB=0 \\ \hline Arc & \sphinxcode{\sphinxupquote{arc}} & angleA=0, angleB=0, armA=None, armB=None, rad=0.0 \\ \hline Arc3 & \sphinxcode{\sphinxupquote{arc3}} & rad=0.0 \\ \hline Bar & \sphinxcode{\sphinxupquote{bar}} & armA=0.0, armB=0.0, fraction=0.3, angle=None \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} An instance of any connection style class is an callable object, whose call signature is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nf+fm}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{posA}\PYG{p}{,} \PYG{n}{posB}\PYG{p}{,} \PYG{n}{patchA}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{patchB}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{shrinkA}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{p}{,} \PYG{n}{shrinkB}\PYG{o}{=}\PYG{l+m+mf}{2.}\PYG{p}{)} \end{sphinxVerbatim} and it returns a \sphinxcode{\sphinxupquote{Path}} instance. \sphinxstyleemphasis{posA} and \sphinxstyleemphasis{posB} are tuples of x,y coordinates of the two points to be connected. \sphinxstyleemphasis{patchA} (or \sphinxstyleemphasis{patchB}) is given, the returned path is clipped so that it start (or end) from the boundary of the patch. The path is further shrunk by \sphinxstyleemphasis{shrinkA} (or \sphinxstyleemphasis{shrinkB}) which is given in points. return the instance of the subclass with the given style name. \index{ConnectionStyle.Angle (class in matplotlib.patches)@\spxentry{ConnectionStyle.Angle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Angle}}}{\emph{angleA=90}, \emph{angleB=0}, \emph{rad=0.0}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Creates a piecewise continuous quadratic Bezier path between two points. The path has a one passing-through point placed at the intersecting point of two lines which cross the start and end point, and have a slope of angleA and angleB, respectively. The connecting edges are rounded with \sphinxstyleemphasis{rad}. \begin{description} \item[{\sphinxstyleemphasis{angleA}}] \leavevmode starting angle of the path \item[{\sphinxstyleemphasis{angleB}}] \leavevmode ending angle of the path \item[{\sphinxstyleemphasis{rad}}] \leavevmode rounding radius of the edge \end{description} \index{connect() (matplotlib.patches.ConnectionStyle.Angle method)@\spxentry{connect()}\spxextra{matplotlib.patches.ConnectionStyle.Angle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Angle.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{posA}, \emph{posB}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ConnectionStyle.Angle3 (class in matplotlib.patches)@\spxentry{ConnectionStyle.Angle3}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Angle3}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Angle3}}}{\emph{angleA=90}, \emph{angleB=0}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Creates a simple quadratic Bezier curve between two points. The middle control points is placed at the intersecting point of two lines which cross the start and end point, and have a slope of angleA and angleB, respectively. \begin{description} \item[{\sphinxstyleemphasis{angleA}}] \leavevmode starting angle of the path \item[{\sphinxstyleemphasis{angleB}}] \leavevmode ending angle of the path \end{description} \index{connect() (matplotlib.patches.ConnectionStyle.Angle3 method)@\spxentry{connect()}\spxextra{matplotlib.patches.ConnectionStyle.Angle3 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Angle3.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{posA}, \emph{posB}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ConnectionStyle.Arc (class in matplotlib.patches)@\spxentry{ConnectionStyle.Arc}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Arc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Arc}}}{\emph{angleA=0}, \emph{angleB=0}, \emph{armA=None}, \emph{armB=None}, \emph{rad=0.0}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Creates a piecewise continuous quadratic Bezier path between two points. The path can have two passing-through points, a point placed at the distance of armA and angle of angleA from point A, another point with respect to point B. The edges are rounded with \sphinxstyleemphasis{rad}. \begin{description} \item[{\sphinxstyleemphasis{angleA} :}] \leavevmode starting angle of the path \item[{\sphinxstyleemphasis{angleB} :}] \leavevmode ending angle of the path \item[{\sphinxstyleemphasis{armA} :}] \leavevmode length of the starting arm \item[{\sphinxstyleemphasis{armB} :}] \leavevmode length of the ending arm \item[{\sphinxstyleemphasis{rad} :}] \leavevmode rounding radius of the edges \end{description} \index{connect() (matplotlib.patches.ConnectionStyle.Arc method)@\spxentry{connect()}\spxextra{matplotlib.patches.ConnectionStyle.Arc method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Arc.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{posA}, \emph{posB}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ConnectionStyle.Arc3 (class in matplotlib.patches)@\spxentry{ConnectionStyle.Arc3}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Arc3}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Arc3}}}{\emph{rad=0.0}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} Creates a simple quadratic Bezier curve between two points. The curve is created so that the middle control point (C1) is located at the same distance from the start (C0) and end points(C2) and the distance of the C1 to the line connecting C0-C2 is \sphinxstyleemphasis{rad} times the distance of C0-C2. \begin{description} \item[{\sphinxstyleemphasis{rad}}] \leavevmode curvature of the curve. \end{description} \index{connect() (matplotlib.patches.ConnectionStyle.Arc3 method)@\spxentry{connect()}\spxextra{matplotlib.patches.ConnectionStyle.Arc3 method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Arc3.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{posA}, \emph{posB}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ConnectionStyle.Bar (class in matplotlib.patches)@\spxentry{ConnectionStyle.Bar}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Bar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Bar}}}{\emph{armA=0.0}, \emph{armB=0.0}, \emph{fraction=0.3}, \emph{angle=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Base}} A line with \sphinxstyleemphasis{angle} between A and B with \sphinxstyleemphasis{armA} and \sphinxstyleemphasis{armB}. One of the arms is extended so that they are connected in a right angle. The length of armA is determined by (\sphinxstyleemphasis{armA} + \sphinxstyleemphasis{fraction} x AB distance). Same for armB. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{armA}}] \leavevmode{[}float{]} minimum length of armA \item[{\sphinxstylestrong{armB}}] \leavevmode{[}float{]} minimum length of armB \item[{\sphinxstylestrong{fraction}}] \leavevmode{[}float{]} a fraction of the distance between two points that will be added to armA and armB. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}float or None{]} angle of the connecting line (if None, parallel to A and B) \end{description} \end{description}\end{quote} \index{connect() (matplotlib.patches.ConnectionStyle.Bar method)@\spxentry{connect()}\spxextra{matplotlib.patches.ConnectionStyle.Bar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle.Bar.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}, \emph{posA}, \emph{posB}}{}~ \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \subsubsection{matplotlib.patches.Ellipse} \label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib-patches-ellipse}}\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse::doc}}\index{Ellipse (class in matplotlib.patches)@\spxentry{Ellipse}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Ellipse}}}{\emph{xy}, \emph{width}, \emph{height}, \emph{angle=0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A scale-free ellipse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} xy coordinates of ellipse centre. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} Total length (diameter) of horizontal axis. \item[{\sphinxstylestrong{height}}] \leavevmode{[}float{]} Total length (diameter) of vertical axis. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}scalar, optional{]} Rotation in degrees anti-clockwise. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Valid keyword arguments are \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{center (matplotlib.patches.Ellipse attribute)@\spxentry{center}\spxextra{matplotlib.patches.Ellipse attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse.center}}\pysigline{\sphinxbfcode{\sphinxupquote{center}}} Return the center of the ellipse \end{fulllineitems} \index{get\_center() (matplotlib.patches.Ellipse method)@\spxentry{get\_center()}\spxextra{matplotlib.patches.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse.get_center}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_center}}}{\emph{self}}{} Return the center of the ellipse \end{fulllineitems} \index{get\_patch\_transform() (matplotlib.patches.Ellipse method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.Ellipse method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the vertices of the rectangle \end{fulllineitems} \index{set\_center() (matplotlib.patches.Ellipse method)@\spxentry{set\_center()}\spxextra{matplotlib.patches.Ellipse method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse.set_center}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_center}}}{\emph{self}, \emph{xy}}{} Set the center of the ellipse. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Ellipse}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Ellipse:examples-using-matplotlib-patches-ellipse}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_confidence\_ellipse.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_annotation\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_ellipse\_with\_units.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_explain.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_annotate01.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \subsubsection{matplotlib.patches.FancyArrow} \label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib-patches-fancyarrow}}\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrow::doc}}\index{FancyArrow (class in matplotlib.patches)@\spxentry{FancyArrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{FancyArrow}}}{\emph{x}, \emph{y}, \emph{dx}, \emph{dy}, \emph{width=0.001}, \emph{length\_includes\_head=False}, \emph{head\_width=None}, \emph{head\_length=None}, \emph{shape='full'}, \emph{overhang=0}, \emph{head\_starts\_at\_zero=False}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Polygon}}}}} Like Arrow, but lets you set head width and head height independently. \begin{description} \item[{Constructor arguments}] \leavevmode\begin{description} \item[{\sphinxstyleemphasis{width}: float (default: 0.001)}] \leavevmode width of full arrow tail \item[{\sphinxstyleemphasis{length\_includes\_head}: bool (default: False)}] \leavevmode True if head is to be counted in calculating the length. \item[{\sphinxstyleemphasis{head\_width}: float or None (default: 3*width)}] \leavevmode total width of the full arrow head \item[{\sphinxstyleemphasis{head\_length}: float or None (default: 1.5 * head\_width)}] \leavevmode length of arrow head \item[{\sphinxstyleemphasis{shape}: {[}'full', 'left', 'right'{]} (default: 'full')}] \leavevmode draw the left-half, right-half, or full arrow \item[{\sphinxstyleemphasis{overhang}: float (default: 0)}] \leavevmode fraction that the arrow is swept back (0 overhang means triangular shape). Can be negative or greater than one. \item[{\sphinxstyleemphasis{head\_starts\_at\_zero}: bool (default: False)}] \leavevmode if True, the head starts being drawn at coordinate 0 instead of ending at coordinate 0. \end{description} \end{description} Other valid kwargs (inherited from {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}) are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \subsubsection{matplotlib.patches.FancyArrowPatch} \label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib-patches-fancyarrowpatch}}\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch::doc}}\index{FancyArrowPatch (class in matplotlib.patches)@\spxentry{FancyArrowPatch}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{FancyArrowPatch}}}{\emph{posA=None}, \emph{posB=None}, \emph{path=None}, \emph{arrowstyle='simple'}, \emph{arrow\_transmuter=None}, \emph{connectionstyle='arc3'}, \emph{connector=None}, \emph{patchA=None}, \emph{patchB=None}, \emph{shrinkA=2}, \emph{shrinkB=2}, \emph{mutation\_scale=1}, \emph{mutation\_aspect=None}, \emph{dpi\_cor=1}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A fancy arrow patch. It draws an arrow using the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}}. The head and tail positions are fixed at the specified start and end points of the arrow, but the size and shape (in display coordinates) of the arrow does not change when the axis is moved or zoomed. If \sphinxstyleemphasis{posA} and \sphinxstyleemphasis{posB} are given, a path connecting two points is created according to \sphinxstyleemphasis{connectionstyle}. The path will be clipped with \sphinxstyleemphasis{patchA} and \sphinxstyleemphasis{patchB} and further shrunken by \sphinxstyleemphasis{shrinkA} and \sphinxstyleemphasis{shrinkB}. An arrow is drawn along this resulting path using the \sphinxstyleemphasis{arrowstyle} parameter. Alternatively if \sphinxstyleemphasis{path} is provided, an arrow is drawn along this path and \sphinxstyleemphasis{patchA}, \sphinxstyleemphasis{patchB}, \sphinxstyleemphasis{shrinkA}, and \sphinxstyleemphasis{shrinkB} are ignored. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{posA, posB}}] \leavevmode{[}None, tuple, optional (default: None){]} (x,y) coordinates of arrow tail and arrow head respectively. \item[{\sphinxstylestrong{path}}] \leavevmode{[}None, Path (default: None){]} {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} instance. If provided, an arrow is drawn along this path and \sphinxstyleemphasis{patchA}, \sphinxstyleemphasis{patchB}, \sphinxstyleemphasis{shrinkA}, and \sphinxstyleemphasis{shrinkB} are ignored. \item[{\sphinxstylestrong{arrowstyle}}] \leavevmode{[}str or ArrowStyle, optional (default: 'simple'){]}\begin{quote} Describes how the fancy arrow will be drawn. It can be string of the available arrowstyle names, with optional comma-separated attributes, or an {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ArrowStyle:matplotlib.patches.ArrowStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ArrowStyle}}}}} instance. The optional attributes are meant to be scaled with the \sphinxstyleemphasis{mutation\_scale}. The following arrow styles are available: \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Curve & \sphinxcode{\sphinxupquote{-}} & None \\ \hline CurveB & \sphinxcode{\sphinxupquote{-\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline BracketB & \sphinxcode{\sphinxupquote{-{[}}} & widthB=1.0, lengthB=0.2, angleB=None \\ \hline CurveFilledB & \sphinxcode{\sphinxupquote{-\textbar{}\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveA & \sphinxcode{\sphinxupquote{\textless{}-}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveAB & \sphinxcode{\sphinxupquote{\textless{}-\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveFilledA & \sphinxcode{\sphinxupquote{\textless{}\textbar{}-}} & head\_length=0.4, head\_width=0.2 \\ \hline CurveFilledAB & \sphinxcode{\sphinxupquote{\textless{}\textbar{}-\textbar{}\textgreater{}}} & head\_length=0.4, head\_width=0.2 \\ \hline BracketA & \sphinxcode{\sphinxupquote{{]}-}} & widthA=1.0, lengthA=0.2, angleA=None \\ \hline BracketAB & \sphinxcode{\sphinxupquote{{]}-{[}}} & widthA=1.0, lengthA=0.2, angleA=None, widthB=1.0, lengthB=0.2, angleB=None \\ \hline Fancy & \sphinxcode{\sphinxupquote{fancy}} & head\_length=0.4, head\_width=0.4, tail\_width=0.4 \\ \hline Simple & \sphinxcode{\sphinxupquote{simple}} & head\_length=0.5, head\_width=0.5, tail\_width=0.2 \\ \hline Wedge & \sphinxcode{\sphinxupquote{wedge}} & tail\_width=0.3, shrink\_factor=0.5 \\ \hline BarAB & \sphinxcode{\sphinxupquote{\textbar{}-\textbar{}}} & widthA=1.0, angleA=None, widthB=1.0, angleB=None \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{arrow\_transmuter}}] \leavevmode Ignored \item[{\sphinxstylestrong{connectionstyle}}] \leavevmode{[}str, ConnectionStyle, or None, optional{]} \item[{\sphinxstylestrong{(default: 'arc3')}}] \leavevmode\begin{quote} Describes how \sphinxstyleemphasis{posA} and \sphinxstyleemphasis{posB} are connected. It can be an instance of the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}} class or a string of the connectionstyle name, with optional comma-separated attributes. The following connection styles are available: \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Angle & \sphinxcode{\sphinxupquote{angle}} & angleA=90, angleB=0, rad=0.0 \\ \hline Angle3 & \sphinxcode{\sphinxupquote{angle3}} & angleA=90, angleB=0 \\ \hline Arc & \sphinxcode{\sphinxupquote{arc}} & angleA=0, angleB=0, armA=None, armB=None, rad=0.0 \\ \hline Arc3 & \sphinxcode{\sphinxupquote{arc3}} & rad=0.0 \\ \hline Bar & \sphinxcode{\sphinxupquote{bar}} & armA=0.0, armB=0.0, fraction=0.3, angle=None \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{connector}}] \leavevmode Ignored \item[{\sphinxstylestrong{patchA, patchB}}] \leavevmode{[}None, Patch, optional (default: None){]} Head and tail patch respectively. \sphinxcode{\sphinxupquote{matplotlib.patch.Patch}} instance. \item[{\sphinxstylestrong{shrinkA, shrinkB}}] \leavevmode{[}scalar, optional (default: 2){]} Shrinking factor of the tail and head of the arrow respectively \item[{\sphinxstylestrong{mutation\_scale}}] \leavevmode{[}scalar, optional (default: 1){]} Value with which attributes of \sphinxstyleemphasis{arrowstyle} (e.g., \sphinxstyleemphasis{head\_length}) will be scaled. \item[{\sphinxstylestrong{mutation\_aspect}}] \leavevmode{[}None, scalar, optional (default: None){]} The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. \item[{\sphinxstylestrong{dpi\_cor}}] \leavevmode{[}scalar, optional (default: 1){]} dpi\_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{draw() (matplotlib.patches.FancyArrowPatch method)@\spxentry{draw()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_arrowstyle() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_arrowstyle()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_arrowstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_arrowstyle}}}{\emph{self}}{} Return the arrowstyle object. \end{fulllineitems} \index{get\_connectionstyle() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_connectionstyle()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_connectionstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_connectionstyle}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.ConnectionStyle:matplotlib.patches.ConnectionStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConnectionStyle}}}}} instance. \end{fulllineitems} \index{get\_dpi\_cor() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_dpi\_cor()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_dpi_cor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dpi\_cor}}}{\emph{self}}{} dpi\_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dpi\_cor}}] \leavevmode{[}scalar{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_mutation\_aspect() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_mutation\_aspect()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_mutation_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mutation\_aspect}}}{\emph{self}}{} Return the aspect ratio of the bbox mutation. \end{fulllineitems} \index{get\_mutation\_scale() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_mutation\_scale()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_mutation_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mutation\_scale}}}{\emph{self}}{} Return the mutation scale. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}scalar{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_path() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of the arrow in the data coordinates. Use get\_path\_in\_displaycoord() method to retrieve the arrow path in display coordinates. \end{fulllineitems} \index{get\_path\_in\_displaycoord() (matplotlib.patches.FancyArrowPatch method)@\spxentry{get\_path\_in\_displaycoord()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.get_path_in_displaycoord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_in\_displaycoord}}}{\emph{self}}{} Return the mutated path of the arrow in display coordinates. \end{fulllineitems} \index{set\_arrowstyle() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_arrowstyle()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_arrowstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_arrowstyle}}}{\emph{self}, \emph{arrowstyle=None}, \emph{**kw}}{} Set the arrow style. Old attributes are forgotten. Without arguments (or with \sphinxcode{\sphinxupquote{arrowstyle=None}}) returns available box styles as a list of strings. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arrowstyle}}] \leavevmode{[}None, ArrowStyle, str, optional (default: None){]} Can be a string with arrowstyle name with optional comma-separated attributes, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}arrowstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Fancy,head\PYGZus{}length=0.2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} Alternatively attributes can be provided as keywords, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}arrowstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{fancy}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{head\PYGZus{}length}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_connectionstyle() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_connectionstyle()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_connectionstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_connectionstyle}}}{\emph{self}, \emph{connectionstyle}, \emph{**kw}}{} Set the connection style. Old attributes are forgotten. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{connectionstyle}}] \leavevmode{[}None, ConnectionStyle instance, or string{]} Can be a string with connectionstyle name with optional comma-separated attributes, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}connectionstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{arc,angleA=0,armA=30,rad=10}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} Alternatively, the attributes can be provided as keywords, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}connectionstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{arc}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{angleA}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{n}{armA}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{,}\PYG{n}{rad}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{)} \end{sphinxVerbatim} Without any arguments (or with \sphinxcode{\sphinxupquote{connectionstyle=None}}), return available styles as a list of strings. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dpi\_cor() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_dpi\_cor()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_dpi_cor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dpi\_cor}}}{\emph{self}, \emph{dpi\_cor}}{} dpi\_cor is currently used for linewidth-related things and shrink factor. Mutation scale is affected by this. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dpi\_cor}}] \leavevmode{[}scalar{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_mutation\_aspect() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_mutation\_aspect()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_mutation_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mutation\_aspect}}}{\emph{self}, \emph{aspect}}{} Set the aspect ratio of the bbox mutation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}scalar{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_mutation\_scale() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_mutation\_scale()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_mutation_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mutation\_scale}}}{\emph{self}, \emph{scale}}{} Set the mutation scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}scalar{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_patchA() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_patchA()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_patchA}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_patchA}}}{\emph{self}, \emph{patchA}}{} Set the tail patch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patchA}}] \leavevmode{[}Patch{]} \sphinxcode{\sphinxupquote{matplotlib.patch.Patch}} instance. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_patchB() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_patchB()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_patchB}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_patchB}}}{\emph{self}, \emph{patchB}}{} Set the head patch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patchB}}] \leavevmode{[}Patch{]} \sphinxcode{\sphinxupquote{matplotlib.patch.Patch}} instance. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_positions() (matplotlib.patches.FancyArrowPatch method)@\spxentry{set\_positions()}\spxextra{matplotlib.patches.FancyArrowPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch.set_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_positions}}}{\emph{self}, \emph{posA}, \emph{posB}}{} Set the begin and end positions of the connecting path. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{posA, posB}}] \leavevmode{[}None, tuple{]} (x,y) coordinates of arrow tail and arrow head respectively. If \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}} use current value. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}} \label{\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:examples-using-matplotlib-patches-fancyarrowpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_arrow\_guide.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connectionstyle\_demo.py} \end{itemize} \subsubsection{matplotlib.patches.FancyBboxPatch} \label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib-patches-fancybboxpatch}}\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch::doc}}\index{FancyBboxPatch (class in matplotlib.patches)@\spxentry{FancyBboxPatch}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{FancyBboxPatch}}}{\emph{xy}, \emph{width}, \emph{height}, \emph{boxstyle='round'}, \emph{bbox\_transmuter=None}, \emph{mutation\_scale=1.0}, \emph{mutation\_aspect=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A fancy box around a rectangle with lower left at \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with specified width and height. {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} is similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}}, but it draws a fancy box around the rectangle. The transformation of the rectangle box to the fancy box is delegated to the \sphinxcode{\sphinxupquote{BoxTransmuterBase}} and its derived classes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}float, float{]} The lower left corner of the box. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} The width of the box. \item[{\sphinxstylestrong{height}}] \leavevmode{[}float{]} The height of the box. \item[{\sphinxstylestrong{boxstyle}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.BoxStyle}}}}}{]}\begin{quote} The style of the fancy box. This can either be a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} instance or a string of the style name and optionally comma seprarated attributes (e.g. "Round, pad=0.2"). This string is passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} to construct a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.BoxStyle:matplotlib.patches.BoxStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BoxStyle}}}}} object. See there for a full documentation. The following box styles are available: \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Circle & \sphinxcode{\sphinxupquote{circle}} & pad=0.3 \\ \hline DArrow & \sphinxcode{\sphinxupquote{darrow}} & pad=0.3 \\ \hline LArrow & \sphinxcode{\sphinxupquote{larrow}} & pad=0.3 \\ \hline RArrow & \sphinxcode{\sphinxupquote{rarrow}} & pad=0.3 \\ \hline Round & \sphinxcode{\sphinxupquote{round}} & pad=0.3, rounding\_size=None \\ \hline Round4 & \sphinxcode{\sphinxupquote{round4}} & pad=0.3, rounding\_size=None \\ \hline Roundtooth & \sphinxcode{\sphinxupquote{roundtooth}} & pad=0.3, tooth\_size=None \\ \hline Sawtooth & \sphinxcode{\sphinxupquote{sawtooth}} & pad=0.3, tooth\_size=None \\ \hline Square & \sphinxcode{\sphinxupquote{square}} & pad=0.3 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{mutation\_scale}}] \leavevmode{[}float, optional, default: 1{]} Scaling factor applied to the attributes of the box style (e.g. pad or rounding\_size). \item[{\sphinxstylestrong{mutation\_aspect}}] \leavevmode{[}float, optional{]} The height of the rectangle will be squeezed by this value before the mutation and the mutated box will be stretched by the inverse of it. For example, this allows different horizontal and vertical padding. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties{]} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \index{get\_bbox() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_bbox()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} of the rectangle. \end{fulllineitems} \index{get\_boxstyle() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_boxstyle()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_boxstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_boxstyle}}}{\emph{self}}{} Return the boxstyle object. \end{fulllineitems} \index{get\_height() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_height()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_height}}}{\emph{self}}{} Return the height of the rectangle. \end{fulllineitems} \index{get\_mutation\_aspect() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_mutation\_aspect()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_mutation_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mutation\_aspect}}}{\emph{self}}{} Return the aspect ratio of the bbox mutation. \end{fulllineitems} \index{get\_mutation\_scale() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_mutation\_scale()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_mutation_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_mutation\_scale}}}{\emph{self}}{} Return the mutation scale. \end{fulllineitems} \index{get\_path() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the mutated path of the rectangle. \end{fulllineitems} \index{get\_width() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_width()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width}}}{\emph{self}}{} Return the width of the rectangle. \end{fulllineitems} \index{get\_x() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_x()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_x}}}{\emph{self}}{} Return the left coord of the rectangle. \end{fulllineitems} \index{get\_y() (matplotlib.patches.FancyBboxPatch method)@\spxentry{get\_y()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.get_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_y}}}{\emph{self}}{} Return the bottom coord of the rectangle. \end{fulllineitems} \index{set\_bounds() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_bounds()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bounds}}}{\emph{self}, \emph{*args}}{} Set the bounds of the rectangle. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}bounds}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{)} \PYG{n}{set\PYGZus{}bounds}\PYG{p}{(}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left, bottom}}] \leavevmode{[}float{]} The coordinates of the bottom left corner of the rectangle. \item[{\sphinxstylestrong{width, height}}] \leavevmode{[}float{]} The width/height of the rectangle. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_boxstyle() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_boxstyle()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_boxstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_boxstyle}}}{\emph{self}, \emph{boxstyle=None}, \emph{**kw}}{} Set the box style. \sphinxstyleemphasis{boxstyle} can be a string with boxstyle name with optional comma-separated attributes. Alternatively, the attrs can be provided as keywords: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{set\PYGZus{}boxstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round,pad=0.2}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{set\PYGZus{}boxstyle}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{round}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)} \end{sphinxVerbatim} Old attrs simply are forgotten. Without argument (or with \sphinxstyleemphasis{boxstyle} = None), it returns available box styles. The following boxstyles are available: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily Class &\sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline Circle & \sphinxcode{\sphinxupquote{circle}} & pad=0.3 \\ \hline DArrow & \sphinxcode{\sphinxupquote{darrow}} & pad=0.3 \\ \hline LArrow & \sphinxcode{\sphinxupquote{larrow}} & pad=0.3 \\ \hline RArrow & \sphinxcode{\sphinxupquote{rarrow}} & pad=0.3 \\ \hline Round & \sphinxcode{\sphinxupquote{round}} & pad=0.3, rounding\_size=None \\ \hline Round4 & \sphinxcode{\sphinxupquote{round4}} & pad=0.3, rounding\_size=None \\ \hline Roundtooth & \sphinxcode{\sphinxupquote{roundtooth}} & pad=0.3, tooth\_size=None \\ \hline Sawtooth & \sphinxcode{\sphinxupquote{sawtooth}} & pad=0.3, tooth\_size=None \\ \hline Square & \sphinxcode{\sphinxupquote{square}} & pad=0.3 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} ACCEPTS: {[} 'circle' \textbar{} 'darrow' \textbar{} 'larrow' \textbar{} 'rarrow' \textbar{} 'round' \textbar{} 'round4' \textbar{} 'roundtooth' \textbar{} 'sawtooth' \textbar{} 'square' {]} \end{fulllineitems} \index{set\_height() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_height()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_height}}}{\emph{self}, \emph{h}}{} Set the rectangle height. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{h}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_mutation\_aspect() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_mutation\_aspect()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_mutation_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mutation\_aspect}}}{\emph{self}, \emph{aspect}}{} Set the aspect ratio of the bbox mutation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_mutation\_scale() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_mutation\_scale()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_mutation_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mutation\_scale}}}{\emph{self}, \emph{scale}}{} Set the mutation scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_width() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_width()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width}}}{\emph{self}, \emph{w}}{} Set the rectangle width. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{w}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_x() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_x()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_x}}}{\emph{self}, \emph{x}}{} Set the left coord of the rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_y() (matplotlib.patches.FancyBboxPatch method)@\spxentry{set\_y()}\spxextra{matplotlib.patches.FancyBboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch.set_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_y}}}{\emph{self}, \emph{y}}{} Set the bottom coord of the rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.FancyBboxPatch}}} \label{\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:examples-using-matplotlib-patches-fancybboxpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \subsubsection{matplotlib.patches.Patch} \label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib-patches-patch}}\label{\detokenize{api/_as_gen/matplotlib.patches.Patch::doc}}\index{Patch (class in matplotlib.patches)@\spxentry{Patch}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Patch}}}{\emph{edgecolor=None}, \emph{facecolor=None}, \emph{color=None}, \emph{linewidth=None}, \emph{linestyle=None}, \emph{antialiased=None}, \emph{hatch=None}, \emph{fill=True}, \emph{capstyle=None}, \emph{joinstyle=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} A patch is a 2D artist with a face color and an edge color. If any of \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{facecolor}, \sphinxstyleemphasis{linewidth}, or \sphinxstyleemphasis{antialiased} are \sphinxstyleemphasis{None}, they default to their rc params setting. The following kwarg properties are supported \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \index{contains() (matplotlib.patches.Patch method)@\spxentry{contains()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}, \emph{radius=None}}{} Test whether the mouse event occurred in the patch. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{(bool, empty dict)}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{contains\_point() (matplotlib.patches.Patch method)@\spxentry{contains\_point()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.contains_point}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_point}}}{\emph{self}, \emph{point}, \emph{radius=None}}{} Returns \sphinxcode{\sphinxupquote{True}} if the given \sphinxstyleemphasis{point} is inside the path (transformed with its transform attribute). \sphinxstyleemphasis{radius} allows the path to be made slightly larger or smaller. \end{fulllineitems} \index{contains\_points() (matplotlib.patches.Patch method)@\spxentry{contains\_points()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.contains_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_points}}}{\emph{self}, \emph{points}, \emph{radius=None}}{} Returns a bool array which is \sphinxcode{\sphinxupquote{True}} if the (closed) path contains the corresponding point. (transformed with its transform attribute). \sphinxstyleemphasis{points} must be Nx2 array. \sphinxstyleemphasis{radius} allows the path to be made slightly larger or smaller. \end{fulllineitems} \index{draw() (matplotlib.patches.Patch method)@\spxentry{draw()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{fill (matplotlib.patches.Patch attribute)@\spxentry{fill}\spxextra{matplotlib.patches.Patch attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.fill}}\pysigline{\sphinxbfcode{\sphinxupquote{fill}}} return whether fill is set \end{fulllineitems} \index{get\_aa() (matplotlib.patches.Patch method)@\spxentry{get\_aa()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aa}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_antialiased}}}}}. \end{fulllineitems} \index{get\_antialiased() (matplotlib.patches.Patch method)@\spxentry{get\_antialiased()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_antialiased}}}{\emph{self}}{} Returns True if the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} is to be drawn with antialiasing. \end{fulllineitems} \index{get\_capstyle() (matplotlib.patches.Patch method)@\spxentry{get\_capstyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_capstyle}}}{\emph{self}}{} Return the current capstyle \end{fulllineitems} \index{get\_data\_transform() (matplotlib.patches.Patch method)@\spxentry{get\_data\_transform()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_data_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which maps data coordinates to physical coordinates. \end{fulllineitems} \index{get\_ec() (matplotlib.patches.Patch method)@\spxentry{get\_ec()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ec}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_edgecolor}}}}}. \end{fulllineitems} \index{get\_edgecolor() (matplotlib.patches.Patch method)@\spxentry{get\_edgecolor()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{} Return the edge color of the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}. \end{fulllineitems} \index{get\_extents() (matplotlib.patches.Patch method)@\spxentry{get\_extents()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_extents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extents}}}{\emph{self}}{} Return a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} object defining the axis-aligned extents of the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}. \end{fulllineitems} \index{get\_facecolor() (matplotlib.patches.Patch method)@\spxentry{get\_facecolor()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{} Return the face color of the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}. \end{fulllineitems} \index{get\_fc() (matplotlib.patches.Patch method)@\spxentry{get\_fc()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fc}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_facecolor}}}}}. \end{fulllineitems} \index{get\_fill() (matplotlib.patches.Patch method)@\spxentry{get\_fill()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fill}}}{\emph{self}}{} return whether fill is set \end{fulllineitems} \index{get\_hatch() (matplotlib.patches.Patch method)@\spxentry{get\_hatch()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_hatch}}}{\emph{self}}{} Return the current hatching pattern \end{fulllineitems} \index{get\_joinstyle() (matplotlib.patches.Patch method)@\spxentry{get\_joinstyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_joinstyle}}}{\emph{self}}{} Return the current joinstyle \end{fulllineitems} \index{get\_linestyle() (matplotlib.patches.Patch method)@\spxentry{get\_linestyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linestyle}}}{\emph{self}}{} Return the linestyle. \end{fulllineitems} \index{get\_linewidth() (matplotlib.patches.Patch method)@\spxentry{get\_linewidth()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_linewidth}}}{\emph{self}}{} Return the line width in points. \end{fulllineitems} \index{get\_ls() (matplotlib.patches.Patch method)@\spxentry{get\_ls()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ls}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linestyle}}}}}. \end{fulllineitems} \index{get\_lw() (matplotlib.patches.Patch method)@\spxentry{get\_lw()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_lw}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_linewidth}}}}}. \end{fulllineitems} \index{get\_patch\_transform() (matplotlib.patches.Patch method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.Patch method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{get\_transform() (matplotlib.patches.Patch method)@\spxentry{get\_transform()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} applied to the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}. \end{fulllineitems} \index{get\_verts() (matplotlib.patches.Patch method)@\spxentry{get\_verts()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_verts}}}{\emph{self}}{} Return a copy of the vertices used in this patch If the patch contains Bezier curves, the curves will be interpolated by line segments. To access the curves as curves, use {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_path()}}}}}. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.patches.Patch method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Get the axes bounding box in display space. The bounding box' width and height are nonnegative. Subclasses should override for inclusion in the bounding box "tight" calculation. Default is to return an empty bounding box at 0, 0. Be careful when using this function, the results will not update if the artist window extent of the artist changes. The extent can change due to any changes in the transform stack, such as changing the axes limits, the figure size, or the canvas used (as is done when saving a figure). This can lead to unexpected behavior where interactive figures will look fine on the screen, but will save incorrectly. \end{fulllineitems} \index{set\_aa() (matplotlib.patches.Patch method)@\spxentry{set\_aa()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_aa}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aa}}}{\emph{self}, \emph{aa}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_antialiased}}}}}. \end{fulllineitems} \index{set\_alpha() (matplotlib.patches.Patch method)@\spxentry{set\_alpha()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparency of the patch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_antialiased() (matplotlib.patches.Patch method)@\spxentry{set\_antialiased()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_antialiased}}}{\emph{self}, \emph{aa}}{} Set whether to use antialiased rendering. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_capstyle() (matplotlib.patches.Patch method)@\spxentry{set\_capstyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_capstyle}}}{\emph{self}, \emph{s}}{} Set the patch capstyle \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'butt', 'round', 'projecting'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_color() (matplotlib.patches.Patch method)@\spxentry{set\_color()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set both the edgecolor and the facecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch.set\_facecolor}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch.set\_edgecolor}}}}}}] \leavevmode For setting the edge or face color individually. \end{description} \end{fulllineitems} \index{set\_ec() (matplotlib.patches.Patch method)@\spxentry{set\_ec()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_ec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ec}}}{\emph{self}, \emph{color}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_edgecolor}}}}}. \end{fulllineitems} \index{set\_edgecolor() (matplotlib.patches.Patch method)@\spxentry{set\_edgecolor()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{color}}{} Set the patch edge color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or None or 'auto'{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolor() (matplotlib.patches.Patch method)@\spxentry{set\_facecolor()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{color}}{} Set the patch face color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_fc() (matplotlib.patches.Patch method)@\spxentry{set\_fc()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fc}}}{\emph{self}, \emph{color}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_facecolor}}}}}. \end{fulllineitems} \index{set\_fill() (matplotlib.patches.Patch method)@\spxentry{set\_fill()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fill}}}{\emph{self}, \emph{b}}{} Set whether to fill the patch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_hatch() (matplotlib.patches.Patch method)@\spxentry{set\_hatch()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_hatch}}}{\emph{self}, \emph{hatch}}{} Set the hatching pattern \sphinxstyleemphasis{hatch} can be one of: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{/} \PYG{o}{\PYGZhy{}} \PYG{n}{diagonal} \PYG{n}{hatching} \PYGZbs{} \PYG{o}{\PYGZhy{}} \PYG{n}{back} \PYG{n}{diagonal} \PYG{o}{\textbar{}} \PYG{o}{\PYGZhy{}} \PYG{n}{vertical} \PYG{o}{\PYGZhy{}} \PYG{o}{\PYGZhy{}} \PYG{n}{horizontal} \PYG{o}{+} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{x} \PYG{o}{\PYGZhy{}} \PYG{n}{crossed} \PYG{n}{diagonal} \PYG{n}{o} \PYG{o}{\PYGZhy{}} \PYG{n}{small} \PYG{n}{circle} \PYG{n}{O} \PYG{o}{\PYGZhy{}} \PYG{n}{large} \PYG{n}{circle} \PYG{o}{.} \PYG{o}{\PYGZhy{}} \PYG{n}{dots} \PYG{o}{*} \PYG{o}{\PYGZhy{}} \PYG{n}{stars} \end{sphinxVerbatim} Letters can be combined, in which case all the specified hatchings are done. If same letter repeats, it increases the density of hatching of that pattern. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{hatch}}] \leavevmode{[}\{'/', '\textbackslash{}\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_joinstyle() (matplotlib.patches.Patch method)@\spxentry{set\_joinstyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_joinstyle}}}{\emph{self}, \emph{s}}{} Set the patch joinstyle \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{'miter', 'round', 'bevel'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linestyle() (matplotlib.patches.Patch method)@\spxentry{set\_linestyle()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linestyle}}}{\emph{self}, \emph{ls}}{} Set the patch linestyle. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily linestyle &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} or \sphinxcode{\sphinxupquote{'solid'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} or \sphinxcode{\sphinxupquote{'dashed'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} or \sphinxcode{\sphinxupquote{'dashdot'}} & dash-dotted line \\ \hline \sphinxcode{\sphinxupquote{':'}} or \sphinxcode{\sphinxupquote{'dotted'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Alternatively a dash tuple of the following form can be provided: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ls}}] \leavevmode{[}\{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\}{]} The line style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linewidth() (matplotlib.patches.Patch method)@\spxentry{set\_linewidth()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linewidth}}}{\emph{self}, \emph{w}}{} Set the patch linewidth in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{w}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ls() (matplotlib.patches.Patch method)@\spxentry{set\_ls()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_ls}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ls}}}{\emph{self}, \emph{ls}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linestyle}}}}}. \end{fulllineitems} \index{set\_lw() (matplotlib.patches.Patch method)@\spxentry{set\_lw()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_lw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_lw}}}{\emph{self}, \emph{w}}{} Alias for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_linewidth}}}}}. \end{fulllineitems} \index{update\_from() (matplotlib.patches.Patch method)@\spxentry{update\_from()}\spxextra{matplotlib.patches.Patch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Updates this {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} from the properties of \sphinxstyleemphasis{other}. \end{fulllineitems} \index{validCap (matplotlib.patches.Patch attribute)@\spxentry{validCap}\spxextra{matplotlib.patches.Patch attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.validCap}}\pysigline{\sphinxbfcode{\sphinxupquote{validCap}}\sphinxbfcode{\sphinxupquote{ = ('butt', 'round', 'projecting')}}} \end{fulllineitems} \index{validJoin (matplotlib.patches.Patch attribute)@\spxentry{validJoin}\spxextra{matplotlib.patches.Patch attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.validJoin}}\pysigline{\sphinxbfcode{\sphinxupquote{validJoin}}\sphinxbfcode{\sphinxupquote{ = ('miter', 'round', 'bevel')}}} \end{fulllineitems} \index{zorder (matplotlib.patches.Patch attribute)@\spxentry{zorder}\spxextra{matplotlib.patches.Patch attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Patch}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Patch:examples-using-matplotlib-patches-patch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_custom\_legends.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \subsubsection{matplotlib.patches.PathPatch} \label{\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib-patches-pathpatch}}\label{\detokenize{api/_as_gen/matplotlib.patches.PathPatch::doc}}\index{PathPatch (class in matplotlib.patches)@\spxentry{PathPatch}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{PathPatch}}}{\emph{path}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A general polycurve path patch. \sphinxstyleemphasis{path} is a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} object. Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_path() (matplotlib.patches.PathPatch method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.PathPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.PathPatch}}} \label{\detokenize{api/_as_gen/matplotlib.patches.PathPatch:examples-using-matplotlib-patches-pathpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_compound\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_path\_patch.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_quad\_bezier.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_firefox.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/animated_histogram:sphx-glr-gallery-animation-animated-histogram-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated histogram}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_path\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_histogram\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_logos2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_pathpatch3d.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/path_tutorial:sphx-glr-tutorials-advanced-path-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path Tutorial}}}} \end{itemize} \subsubsection{matplotlib.patches.Polygon} \label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib-patches-polygon}}\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon::doc}}\index{Polygon (class in matplotlib.patches)@\spxentry{Polygon}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Polygon}}}{\emph{xy}, \emph{closed=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A general polygon patch. \sphinxstyleemphasis{xy} is a numpy array with shape Nx2. If \sphinxstyleemphasis{closed} is \sphinxstyleemphasis{True}, the polygon will be closed so the starting and ending points are the same. Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_closed() (matplotlib.patches.Polygon method)@\spxentry{get\_closed()}\spxextra{matplotlib.patches.Polygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.get_closed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_closed}}}{\emph{self}}{} Returns if the polygon is closed \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{closed}}] \leavevmode{[}bool{]} If the path is closed \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_path() (matplotlib.patches.Polygon method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Polygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Get the path of the polygon \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path}}] \leavevmode{[}Path{]} The {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} object for the polygon \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_xy() (matplotlib.patches.Polygon method)@\spxentry{get\_xy()}\spxextra{matplotlib.patches.Polygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.get_xy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xy}}}{\emph{self}}{} Get the vertices of the path. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vertices}}] \leavevmode{[}(N, 2) numpy array{]} The coordinates of the vertices. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_closed() (matplotlib.patches.Polygon method)@\spxentry{set\_closed()}\spxextra{matplotlib.patches.Polygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.set_closed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_closed}}}{\emph{self}, \emph{closed}}{} Set if the polygon is closed \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{closed}}] \leavevmode{[}bool{]} True if the polygon is closed \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_xy() (matplotlib.patches.Polygon method)@\spxentry{set\_xy()}\spxextra{matplotlib.patches.Polygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.set_xy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xy}}}{\emph{self}, \emph{xy}}{} Set the vertices of the polygon. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(N, 2) array-like{]} The coordinates of the vertices. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{xy (matplotlib.patches.Polygon attribute)@\spxentry{xy}\spxextra{matplotlib.patches.Polygon attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon.xy}}\pysigline{\sphinxbfcode{\sphinxupquote{xy}}} The vertices of the path as (N, 2) numpy array. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Polygon}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Polygon:examples-using-matplotlib-patches-polygon}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_integral.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_poly\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/annotations:sphx-glr-tutorials-text-annotations-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Annotations}}}} \end{itemize} \subsubsection{matplotlib.patches.Rectangle} \label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib-patches-rectangle}}\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle::doc}}\index{Rectangle (class in matplotlib.patches)@\spxentry{Rectangle}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Rectangle}}}{\emph{xy}, \emph{width}, \emph{height}, \emph{angle=0.0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A rectangle with lower left at \sphinxstyleemphasis{xy} = (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) with specified \sphinxstyleemphasis{width}, \sphinxstyleemphasis{height} and rotation \sphinxstyleemphasis{angle}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The bottom and left rectangle coordinates \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} Rectangle width \item[{\sphinxstylestrong{height}}] \leavevmode{[}float{]} Rectangle height \item[{\sphinxstylestrong{angle}}] \leavevmode{[}float, optional{]} rotation in degrees anti-clockwise about \sphinxstyleemphasis{xy} (default is 0.0) \item[{\sphinxstylestrong{fill}}] \leavevmode{[}bool, optional{]} Whether to fill the rectangle (default is \sphinxcode{\sphinxupquote{True}}) \end{description} \end{description}\end{quote} \subsubsection*{Notes} Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_bbox() (matplotlib.patches.Rectangle method)@\spxentry{get\_bbox()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_height() (matplotlib.patches.Rectangle method)@\spxentry{get\_height()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_height}}}{\emph{self}}{} Return the height of the rectangle. \end{fulllineitems} \index{get\_patch\_transform() (matplotlib.patches.Rectangle method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.Rectangle method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the vertices of the rectangle. \end{fulllineitems} \index{get\_width() (matplotlib.patches.Rectangle method)@\spxentry{get\_width()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_width}}}{\emph{self}}{} Return the width of the rectangle. \end{fulllineitems} \index{get\_x() (matplotlib.patches.Rectangle method)@\spxentry{get\_x()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_x}}}{\emph{self}}{} Return the left coord of the rectangle. \end{fulllineitems} \index{get\_xy() (matplotlib.patches.Rectangle method)@\spxentry{get\_xy()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_xy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xy}}}{\emph{self}}{} Return the left and bottom coords of the rectangle. \end{fulllineitems} \index{get\_y() (matplotlib.patches.Rectangle method)@\spxentry{get\_y()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.get_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_y}}}{\emph{self}}{} Return the bottom coord of the rectangle. \end{fulllineitems} \index{set\_bounds() (matplotlib.patches.Rectangle method)@\spxentry{set\_bounds()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bounds}}}{\emph{self}, \emph{*args}}{} Set the bounds of the rectangle: l,b,w,h ACCEPTS: (left, bottom, width, height) \end{fulllineitems} \index{set\_height() (matplotlib.patches.Rectangle method)@\spxentry{set\_height()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_height}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_height}}}{\emph{self}, \emph{h}}{} Set the height of the rectangle. \end{fulllineitems} \index{set\_width() (matplotlib.patches.Rectangle method)@\spxentry{set\_width()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width}}}{\emph{self}, \emph{w}}{} Set the width of the rectangle. \end{fulllineitems} \index{set\_x() (matplotlib.patches.Rectangle method)@\spxentry{set\_x()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_x}}}{\emph{self}, \emph{x}}{} Set the left coord of the rectangle. \end{fulllineitems} \index{set\_xy() (matplotlib.patches.Rectangle method)@\spxentry{set\_xy()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_xy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xy}}}{\emph{self}, \emph{xy}}{} Set the left and bottom coords of the rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_y() (matplotlib.patches.Rectangle method)@\spxentry{set\_y()}\spxextra{matplotlib.patches.Rectangle method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.set_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_y}}}{\emph{self}, \emph{y}}{} Set the bottom coord of the rectangle. \end{fulllineitems} \index{xy (matplotlib.patches.Rectangle attribute)@\spxentry{xy}\spxextra{matplotlib.patches.Rectangle attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle.xy}}\pysigline{\sphinxbfcode{\sphinxupquote{xy}}} Return the left and bottom coords of the rectangle. \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Rectangle}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Rectangle:examples-using-matplotlib-patches-rectangle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbars\_and\_boxes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_viewlims.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_logos2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_artist\_tests.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_menu.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colors:sphx-glr-tutorials-colors-colors-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Specifying Colors}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_props:sphx-glr-tutorials-text-text-props-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text properties and layout}}}} \end{itemize} \subsubsection{matplotlib.patches.RegularPolygon} \label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib-patches-regularpolygon}}\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon::doc}}\index{RegularPolygon (class in matplotlib.patches)@\spxentry{RegularPolygon}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{RegularPolygon}}}{\emph{xy}, \emph{numVertices}, \emph{radius=5}, \emph{orientation=0}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} A regular polygon patch. Constructor arguments: \begin{description} \item[{\sphinxstyleemphasis{xy}}] \leavevmode A length 2 tuple (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) of the center. \item[{\sphinxstyleemphasis{numVertices}}] \leavevmode the number of vertices. \item[{\sphinxstyleemphasis{radius}}] \leavevmode The distance from the center to each of the vertices. \item[{\sphinxstyleemphasis{orientation}}] \leavevmode rotates the polygon (in radians). \end{description} Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_patch\_transform() (matplotlib.patches.RegularPolygon method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.RegularPolygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.RegularPolygon method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.RegularPolygon method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{numvertices (matplotlib.patches.RegularPolygon attribute)@\spxentry{numvertices}\spxextra{matplotlib.patches.RegularPolygon attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.numvertices}}\pysigline{\sphinxbfcode{\sphinxupquote{numvertices}}}~ \end{fulllineitems} \index{orientation (matplotlib.patches.RegularPolygon attribute)@\spxentry{orientation}\spxextra{matplotlib.patches.RegularPolygon attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.orientation}}\pysigline{\sphinxbfcode{\sphinxupquote{orientation}}}~ \end{fulllineitems} \index{radius (matplotlib.patches.RegularPolygon attribute)@\spxentry{radius}\spxextra{matplotlib.patches.RegularPolygon attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.radius}}\pysigline{\sphinxbfcode{\sphinxupquote{radius}}}~ \end{fulllineitems} \index{xy (matplotlib.patches.RegularPolygon attribute)@\spxentry{xy}\spxextra{matplotlib.patches.RegularPolygon attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:matplotlib.patches.RegularPolygon.xy}}\pysigline{\sphinxbfcode{\sphinxupquote{xy}}}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.RegularPolygon}}} \label{\detokenize{api/_as_gen/matplotlib.patches.RegularPolygon:examples-using-matplotlib-patches-regularpolygon}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_radar\_chart.py} \end{itemize} \subsubsection{matplotlib.patches.Shadow} \label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib-patches-shadow}}\label{\detokenize{api/_as_gen/matplotlib.patches.Shadow::doc}}\index{Shadow (class in matplotlib.patches)@\spxentry{Shadow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib.patches.Shadow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Shadow}}}{\emph{patch}, \emph{ox}, \emph{oy}, \emph{props=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} Create a shadow of the given \sphinxstyleemphasis{patch} offset by \sphinxstyleemphasis{ox}, \sphinxstyleemphasis{oy}. \sphinxstyleemphasis{props}, if not \sphinxstyleemphasis{None}, is a patch property update dictionary. If \sphinxstyleemphasis{None}, the shadow will have have the same color as the face, but darkened. kwargs are \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{draw() (matplotlib.patches.Shadow method)@\spxentry{draw()}\spxextra{matplotlib.patches.Shadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib.patches.Shadow.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_patch\_transform() (matplotlib.patches.Shadow method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.Shadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib.patches.Shadow.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.Shadow method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Shadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:matplotlib.patches.Shadow.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Shadow}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Shadow:examples-using-matplotlib-patches-shadow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_svg\_filter\_pie.py} \end{itemize} \subsubsection{matplotlib.patches.Wedge} \label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib-patches-wedge}}\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge::doc}}\index{Wedge (class in matplotlib.patches)@\spxentry{Wedge}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{Wedge}}}{\emph{center}, \emph{r}, \emph{theta1}, \emph{theta2}, \emph{width=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} Wedge shaped patch. A wedge centered at \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} center with radius \sphinxstyleemphasis{r} that sweeps \sphinxstyleemphasis{theta1} to \sphinxstyleemphasis{theta2} (in degrees). If \sphinxstyleemphasis{width} is given, then a partial wedge is drawn from inner radius \sphinxstyleemphasis{r} - \sphinxstyleemphasis{width} to outer radius \sphinxstyleemphasis{r}. Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{get\_path() (matplotlib.patches.Wedge method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{set\_center() (matplotlib.patches.Wedge method)@\spxentry{set\_center()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.set_center}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_center}}}{\emph{self}, \emph{center}}{}~ \end{fulllineitems} \index{set\_radius() (matplotlib.patches.Wedge method)@\spxentry{set\_radius()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.set_radius}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_radius}}}{\emph{self}, \emph{radius}}{}~ \end{fulllineitems} \index{set\_theta1() (matplotlib.patches.Wedge method)@\spxentry{set\_theta1()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.set_theta1}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_theta1}}}{\emph{self}, \emph{theta1}}{}~ \end{fulllineitems} \index{set\_theta2() (matplotlib.patches.Wedge method)@\spxentry{set\_theta2()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.set_theta2}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_theta2}}}{\emph{self}, \emph{theta2}}{}~ \end{fulllineitems} \index{set\_width() (matplotlib.patches.Wedge method)@\spxentry{set\_width()}\spxextra{matplotlib.patches.Wedge method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge.set_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_width}}}{\emph{self}, \emph{width}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patches.Wedge}}} \label{\detokenize{api/_as_gen/matplotlib.patches.Wedge:examples-using-matplotlib-patches-wedge}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \subsubsection{matplotlib.patches.YAArrow} \label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib-patches-yaarrow}}\label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow::doc}}\index{YAArrow (class in matplotlib.patches)@\spxentry{YAArrow}\spxextra{class in matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib.patches.YAArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{YAArrow}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} Yet another arrow class. This is an arrow that is defined in display space and has a tip at \sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1} and a base at \sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \index{get\_patch\_transform() (matplotlib.patches.YAArrow method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.patches.YAArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib.patches.YAArrow.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.patches.YAArrow method)@\spxentry{get\_path()}\spxextra{matplotlib.patches.YAArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib.patches.YAArrow.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{getpoints() (matplotlib.patches.YAArrow method)@\spxentry{getpoints()}\spxextra{matplotlib.patches.YAArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.YAArrow:matplotlib.patches.YAArrow.getpoints}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{getpoints}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}, \emph{k}}{} For line segment defined by (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) and (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}) return the points on the line that is perpendicular to the line and intersects (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}) and the distance from (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y2}) of the returned points is \sphinxstyleemphasis{k}. \end{fulllineitems} \end{fulllineitems} \subsection{Functions} \label{\detokenize{api/patches_api:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.bbox_artist:matplotlib.patches.bbox_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox\_artist}}}}}(artist, renderer{[}, props, fill{]}) & This is a debug function to draw a rectangle around the bounding box returned by {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} of an artist, to test whether the artist is returning the correct bbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.draw_bbox:matplotlib.patches.draw_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_bbox}}}}}(bbox, renderer{[}, color, trans{]}) & This is a debug function to draw a rectangle around the bounding box returned by {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} of an artist, to test whether the artist is returning the correct bbox. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.patches.bbox\_artist} \label{\detokenize{api/_as_gen/matplotlib.patches.bbox_artist:matplotlib-patches-bbox-artist}}\label{\detokenize{api/_as_gen/matplotlib.patches.bbox_artist::doc}}\index{bbox\_artist() (in module matplotlib.patches)@\spxentry{bbox\_artist()}\spxextra{in module matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.bbox_artist:matplotlib.patches.bbox_artist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{bbox\_artist}}}{\emph{artist}, \emph{renderer}, \emph{props=None}, \emph{fill=True}}{} This is a debug function to draw a rectangle around the bounding box returned by {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} of an artist, to test whether the artist is returning the correct bbox. \sphinxstyleemphasis{props} is a dict of rectangle props with the additional property 'pad' that sets the padding around the bbox in points. \end{fulllineitems} \subsubsection{matplotlib.patches.draw\_bbox} \label{\detokenize{api/_as_gen/matplotlib.patches.draw_bbox:matplotlib-patches-draw-bbox}}\label{\detokenize{api/_as_gen/matplotlib.patches.draw_bbox::doc}}\index{draw\_bbox() (in module matplotlib.patches)@\spxentry{draw\_bbox()}\spxextra{in module matplotlib.patches}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.patches.draw_bbox:matplotlib.patches.draw_bbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.patches.}}\sphinxbfcode{\sphinxupquote{draw\_bbox}}}{\emph{bbox}, \emph{renderer}, \emph{color='k'}, \emph{trans=None}}{} This is a debug function to draw a rectangle around the bounding box returned by {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} of an artist, to test whether the artist is returning the correct bbox. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.path}}} \label{\detokenize{api/path_api:module-matplotlib.path}}\label{\detokenize{api/path_api:matplotlib-path}}\label{\detokenize{api/path_api::doc}}\index{matplotlib.path (module)@\spxentry{matplotlib.path}\spxextra{module}} A module for dealing with the polylines used throughout Matplotlib. The primary class for polyline handling in Matplotlib is {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}. Almost all vector drawing makes use of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}s somewhere in the drawing pipeline. Whilst a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance itself cannot be drawn, some {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} subclasses, such as {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}} and {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}, can be used for convenient {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} visualisation. \index{Path (class in matplotlib.path)@\spxentry{Path}\spxextra{class in matplotlib.path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.path.}}\sphinxbfcode{\sphinxupquote{Path}}}{\emph{vertices}, \emph{codes=None}, \emph{\_interpolation\_steps=1}, \emph{closed=False}, \emph{readonly=False}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} represents a series of possibly disconnected, possibly closed, line and curve segments. \begin{description} \item[{The underlying storage is made up of two parallel numpy arrays:}] \leavevmode\begin{itemize} \item {} \sphinxstyleemphasis{vertices}: an Nx2 float array of vertices \item {} \sphinxstyleemphasis{codes}: an N-length uint8 array of vertex types \end{itemize} \end{description} These two arrays always have the same length in the first dimension. For example, to represent a cubic curve, you must provide three vertices as well as three codes \sphinxcode{\sphinxupquote{CURVE3}}. The code types are: \begin{itemize} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{STOP}}}] \leavevmode{[}1 vertex (ignored){]} A marker for the end of the entire path (currently not required and ignored) \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{MOVETO}}}] \leavevmode{[}1 vertex{]} Pick up the pen and move to the given vertex. \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{LINETO}}}] \leavevmode{[}1 vertex{]} Draw a line from the current position to the given vertex. \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{CURVE3}}}] \leavevmode{[}1 control point, 1 endpoint{]} Draw a quadratic Bezier curve from the current position, with the given control point, to the given end point. \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{CURVE4}}}] \leavevmode{[}2 control points, 1 endpoint{]} Draw a cubic Bezier curve from the current position, with the given control points, to the given end point. \end{description} \item {} \begin{description} \item[{\sphinxcode{\sphinxupquote{CLOSEPOLY}}}] \leavevmode{[}1 vertex (ignored){]} Draw a line segment to the start point of the current polyline. \end{description} \end{itemize} Users of Path objects should not access the vertices and codes arrays directly. Instead, they should use {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.iter_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{iter\_segments()}}}}} or {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.cleaned}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cleaned()}}}}} to get the vertex/code pairs. This is important, since many {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} objects, as an optimization, do not store a \sphinxstyleemphasis{codes} at all, but have a default one provided for them by {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.iter_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{iter\_segments()}}}}}. Some behavior of Path objects can be controlled by rcParams. See the rcParams whose keys contain 'path.'. \begin{sphinxadmonition}{note}{Note:} The vertices and codes arrays should be treated as immutable -- there are a number of optimizations and assumptions made up front in the constructor that will not change when the data changes. \end{sphinxadmonition} Create a new path with the given vertices and codes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vertices}}] \leavevmode{[}array\_like{]} The \sphinxcode{\sphinxupquote{(n, 2)}} float array, masked array or sequence of pairs representing the vertices of the path. If \sphinxstyleemphasis{vertices} contains masked values, they will be converted to NaNs which are then handled correctly by the Agg PathIterator and other consumers of path data, such as {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.iter_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{iter\_segments()}}}}}. \item[{\sphinxstylestrong{codes}}] \leavevmode{[}\{None, array\_like\}, optional{]} n-length array integers representing the codes of the path. If not None, codes must be the same length as vertices. If None, \sphinxstyleemphasis{vertices} will be treated as a series of line segments. \item[{\sphinxstylestrong{\_interpolation\_steps}}] \leavevmode{[}int, optional{]} Used as a hint to certain projections, such as Polar, that this path should be linearly interpolated immediately before drawing. This attribute is primarily an implementation detail and is not intended for public use. \item[{\sphinxstylestrong{closed}}] \leavevmode{[}bool, optional{]} If \sphinxstyleemphasis{codes} is None and closed is True, vertices will be treated as line segments of a closed polygon. \item[{\sphinxstylestrong{readonly}}] \leavevmode{[}bool, optional{]} Makes the path behave in an immutable way and sets the vertices and codes as read-only arrays. \end{description} \end{description}\end{quote} \index{CLOSEPOLY (matplotlib.path.Path attribute)@\spxentry{CLOSEPOLY}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.CLOSEPOLY}}\pysigline{\sphinxbfcode{\sphinxupquote{CLOSEPOLY}}\sphinxbfcode{\sphinxupquote{ = 79}}} \end{fulllineitems} \index{CURVE3 (matplotlib.path.Path attribute)@\spxentry{CURVE3}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.CURVE3}}\pysigline{\sphinxbfcode{\sphinxupquote{CURVE3}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \index{CURVE4 (matplotlib.path.Path attribute)@\spxentry{CURVE4}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.CURVE4}}\pysigline{\sphinxbfcode{\sphinxupquote{CURVE4}}\sphinxbfcode{\sphinxupquote{ = 4}}} \end{fulllineitems} \index{LINETO (matplotlib.path.Path attribute)@\spxentry{LINETO}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.LINETO}}\pysigline{\sphinxbfcode{\sphinxupquote{LINETO}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{MOVETO (matplotlib.path.Path attribute)@\spxentry{MOVETO}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.MOVETO}}\pysigline{\sphinxbfcode{\sphinxupquote{MOVETO}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{NUM\_VERTICES\_FOR\_CODE (matplotlib.path.Path attribute)@\spxentry{NUM\_VERTICES\_FOR\_CODE}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.NUM_VERTICES_FOR_CODE}}\pysigline{\sphinxbfcode{\sphinxupquote{NUM\_VERTICES\_FOR\_CODE}}\sphinxbfcode{\sphinxupquote{ = \{0: 1, 1: 1, 2: 1, 3: 2, 4: 3, 79: 1\}}}} A dictionary mapping Path codes to the number of vertices that the code expects. \end{fulllineitems} \index{STOP (matplotlib.path.Path attribute)@\spxentry{STOP}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.STOP}}\pysigline{\sphinxbfcode{\sphinxupquote{STOP}}\sphinxbfcode{\sphinxupquote{ = 0}}} \end{fulllineitems} \index{arc() (matplotlib.path.Path class method)@\spxentry{arc()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.arc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{arc}}}{\emph{theta1}, \emph{theta2}, \emph{n=None}, \emph{is\_wedge=False}}{} Return the unit circle arc from angles \sphinxstyleemphasis{theta1} to \sphinxstyleemphasis{theta2} (in degrees). \sphinxstyleemphasis{theta2} is unwrapped to produce the shortest arc within 360 degrees. That is, if \sphinxstyleemphasis{theta2} \textgreater{} \sphinxstyleemphasis{theta1} + 360, the arc will be from \sphinxstyleemphasis{theta1} to \sphinxstyleemphasis{theta2} - 360 and not a full circle plus some extra overlap. If \sphinxstyleemphasis{n} is provided, it is the number of spline segments to make. If \sphinxstyleemphasis{n} is not provided, the number of spline segments is determined based on the delta between \sphinxstyleemphasis{theta1} and \sphinxstyleemphasis{theta2}. \begin{quote} Masionobe, L. 2003. \sphinxhref{http://www.spaceroots.org/documents/ellipse/index.html}{Drawing an elliptical arc using polylines, quadratic or cubic Bezier curves}. \end{quote} \end{fulllineitems} \index{circle() (matplotlib.path.Path class method)@\spxentry{circle()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.circle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{circle}}}{\emph{center=(0.0}, \emph{0.0)}, \emph{radius=1.0}, \emph{readonly=False}}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} representing a circle of a given radius and center. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{center}}] \leavevmode{[}pair of floats{]} The center of the circle. Default \sphinxcode{\sphinxupquote{(0, 0)}}. \item[{\sphinxstylestrong{radius}}] \leavevmode{[}float{]} The radius of the circle. Default is 1. \item[{\sphinxstylestrong{readonly}}] \leavevmode{[}bool{]} Whether the created path should have the "readonly" argument set when creating the Path instance. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The circle is approximated using 8 cubic Bezier curves, as described in \begin{quote} Lancaster, Don. \sphinxhref{http://www.tinaja.com/glib/ellipse4.pdf}{Approximating a Circle or an Ellipse Using Four Bezier Cubic Splines}. \end{quote} \end{fulllineitems} \index{cleaned() (matplotlib.path.Path method)@\spxentry{cleaned()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.cleaned}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cleaned}}}{\emph{self}, \emph{transform=None}, \emph{remove\_nans=False}, \emph{clip=None}, \emph{quantize=False}, \emph{simplify=False}, \emph{curves=False}, \emph{stroke\_width=1.0}, \emph{snap=False}, \emph{sketch=None}}{} Return a new Path with vertices and codes cleaned according to the parameters. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/path_api:matplotlib.path.Path.iter_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.iter\_segments}}}}}}] \leavevmode for details of the keyword arguments. \end{description} \end{fulllineitems} \index{clip\_to\_bbox() (matplotlib.path.Path method)@\spxentry{clip\_to\_bbox()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.clip_to_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clip\_to\_bbox}}}{\emph{self}, \emph{bbox}, \emph{inside=True}}{} Clip the path to the given bounding box. The path must be made up of one or more closed polygons. This algorithm will not behave correctly for unclosed paths. If \sphinxstyleemphasis{inside} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, clip to the inside of the box, otherwise to the outside of the box. \end{fulllineitems} \index{code\_type (matplotlib.path.Path attribute)@\spxentry{code\_type}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.code_type}}\pysigline{\sphinxbfcode{\sphinxupquote{code\_type}}} alias of \sphinxcode{\sphinxupquote{numpy.uint8}} \end{fulllineitems} \index{codes (matplotlib.path.Path attribute)@\spxentry{codes}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.codes}}\pysigline{\sphinxbfcode{\sphinxupquote{codes}}} The list of codes in the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} as a 1-D numpy array. Each code is one of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.STOP}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{STOP}}}}}, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.MOVETO}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MOVETO}}}}}, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.LINETO}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LINETO}}}}}, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.CURVE3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CURVE3}}}}}, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.CURVE4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CURVE4}}}}} or {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.CLOSEPOLY}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CLOSEPOLY}}}}}. For codes that correspond to more than one vertex ({\hyperref[\detokenize{api/path_api:matplotlib.path.Path.CURVE3}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CURVE3}}}}} and {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.CURVE4}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CURVE4}}}}}), that code will be repeated so that the length of \sphinxcode{\sphinxupquote{self.vertices}} and \sphinxcode{\sphinxupquote{self.codes}} is always the same. \end{fulllineitems} \index{contains\_path() (matplotlib.path.Path method)@\spxentry{contains\_path()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.contains_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Returns whether this (closed) path completely contains the given path. If \sphinxstyleemphasis{transform} is not \sphinxcode{\sphinxupquote{None}}, the path will be transformed before performing the test. \end{fulllineitems} \index{contains\_point() (matplotlib.path.Path method)@\spxentry{contains\_point()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.contains_point}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_point}}}{\emph{self}, \emph{point}, \emph{transform=None}, \emph{radius=0.0}}{} Returns whether the (closed) path contains the given point. If \sphinxstyleemphasis{transform} is not \sphinxcode{\sphinxupquote{None}}, the path will be transformed before performing the test. \sphinxstyleemphasis{radius} allows the path to be made slightly larger or smaller. \end{fulllineitems} \index{contains\_points() (matplotlib.path.Path method)@\spxentry{contains\_points()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.contains_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_points}}}{\emph{self}, \emph{points}, \emph{transform=None}, \emph{radius=0.0}}{} Returns a bool array which is \sphinxcode{\sphinxupquote{True}} if the (closed) path contains the corresponding point. If \sphinxstyleemphasis{transform} is not \sphinxcode{\sphinxupquote{None}}, the path will be transformed before performing the test. \sphinxstyleemphasis{radius} allows the path to be made slightly larger or smaller. \end{fulllineitems} \index{copy() (matplotlib.path.Path method)@\spxentry{copy()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.copy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy}}}{\emph{self}}{} Returns a shallow copy of the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, which will share the vertices and codes with the source {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}. \end{fulllineitems} \index{deepcopy() (matplotlib.path.Path method)@\spxentry{deepcopy()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.deepcopy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{deepcopy}}}{\emph{self}, \emph{memo=None}}{} Returns a deepcopy of the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}. The {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} will not be readonly, even if the source {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} is. \end{fulllineitems} \index{get\_extents() (matplotlib.path.Path method)@\spxentry{get\_extents()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.get_extents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extents}}}{\emph{self}, \emph{transform=None}}{} Returns the extents (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{xmax}, \sphinxstyleemphasis{ymax}) of the path. Unlike computing the extents on the \sphinxstyleemphasis{vertices} alone, this algorithm will take into account the curves and deal with control points appropriately. \end{fulllineitems} \index{has\_nonfinite (matplotlib.path.Path attribute)@\spxentry{has\_nonfinite}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.has_nonfinite}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_nonfinite}}}~ \end{fulllineitems} \index{hatch (matplotlib.path.Path attribute)@\spxentry{hatch}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.hatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{hatch}}}{\emph{hatchpattern}, \emph{density=6}}{} Given a hatch specifier, \sphinxstyleemphasis{hatchpattern}, generates a Path that can be used in a repeated hatching pattern. \sphinxstyleemphasis{density} is the number of lines per unit square. \end{fulllineitems} \index{interpolated() (matplotlib.path.Path method)@\spxentry{interpolated()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.interpolated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{interpolated}}}{\emph{self}, \emph{steps}}{} Returns a new path resampled to length N x steps. Does not currently handle interpolating curves. \end{fulllineitems} \index{intersects\_bbox() (matplotlib.path.Path method)@\spxentry{intersects\_bbox()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.intersects_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{intersects\_bbox}}}{\emph{self}, \emph{bbox}, \emph{filled=True}}{} Returns \sphinxstyleemphasis{True} if this path intersects a given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \sphinxstyleemphasis{filled}, when True, treats the path as if it was filled. That is, if the path completely encloses the bounding box, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.intersects_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{intersects\_bbox()}}}}} will return True. The bounding box is always considered filled. \end{fulllineitems} \index{intersects\_path() (matplotlib.path.Path method)@\spxentry{intersects\_path()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.intersects_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{intersects\_path}}}{\emph{self}, \emph{other}, \emph{filled=True}}{} Returns \sphinxstyleemphasis{True} if this path intersects another given path. \sphinxstyleemphasis{filled}, when True, treats the paths as if they were filled. That is, if one path completely encloses the other, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.intersects_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{intersects\_path()}}}}} will return True. \end{fulllineitems} \index{iter\_segments() (matplotlib.path.Path method)@\spxentry{iter\_segments()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.iter_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{iter\_segments}}}{\emph{self}, \emph{transform=None}, \emph{remove\_nans=True}, \emph{clip=None}, \emph{snap=False}, \emph{stroke\_width=1.0}, \emph{simplify=None}, \emph{curves=True}, \emph{sketch=None}}{} Iterates over all of the curve segments in the path. Each iteration returns a 2-tuple \sphinxcode{\sphinxupquote{(vertices, code)}}, where \sphinxcode{\sphinxupquote{vertices}} is a sequence of 1-3 coordinate pairs, and \sphinxcode{\sphinxupquote{code}} is a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} code. Additionally, this method can provide a number of standard cleanups and conversions to the path. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} If not None, the given affine transformation will be applied to the path. \item[{\sphinxstylestrong{remove\_nans}}] \leavevmode{[}bool, optional{]} Whether to remove all NaNs from the path and skip over them using MOVETO commands. \item[{\sphinxstylestrong{clip}}] \leavevmode{[}None or (float, float, float, float), optional{]} If not None, must be a four-tuple (x1, y1, x2, y2) defining a rectangle in which to clip the path. \item[{\sphinxstylestrong{snap}}] \leavevmode{[}None or bool, optional{]} If True, snap all nodes to pixels; if False, don't snap them. If None, perform snapping if the path contains only segments parallel to the x or y axes, and no more than 1024 of them. \item[{\sphinxstylestrong{stroke\_width}}] \leavevmode{[}float, optional{]} The width of the stroke being drawn (used for path snapping). \item[{\sphinxstylestrong{simplify}}] \leavevmode{[}None or bool, optional{]} Whether to simplify the path by removing vertices that do not affect its appearance. If None, use the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.should_simplify}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{should\_simplify}}}}} attribute. See also \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"path.simplify"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"path.simplify\_threshold"{]}}}}. \item[{\sphinxstylestrong{curves}}] \leavevmode{[}bool, optional{]} If True, curve segments will be returned as curve segments. If False, all curves will be converted to line segments. \item[{\sphinxstylestrong{sketch}}] \leavevmode{[}None or sequence, optional{]} If not None, must be a 3-tuple of the form (scale, length, randomness), representing the sketch parameters. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{make\_compound\_path() (matplotlib.path.Path class method)@\spxentry{make\_compound\_path()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.make_compound_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{make\_compound\_path}}}{\emph{*args}}{} Make a compound path from a list of Path objects. \end{fulllineitems} \index{make\_compound\_path\_from\_polys() (matplotlib.path.Path class method)@\spxentry{make\_compound\_path\_from\_polys()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.make_compound_path_from_polys}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{make\_compound\_path\_from\_polys}}}{\emph{XY}}{} Make a compound path object to draw a number of polygons with equal numbers of sides XY is a (numpolys x numsides x 2) numpy array of vertices. Return object is a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{histogram_path_00_00}.pdf} \end{figure} \end{fulllineitems} \index{readonly (matplotlib.path.Path attribute)@\spxentry{readonly}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.readonly}}\pysigline{\sphinxbfcode{\sphinxupquote{readonly}}} \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} if the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} is read-only. \end{fulllineitems} \index{should\_simplify (matplotlib.path.Path attribute)@\spxentry{should\_simplify}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.should_simplify}}\pysigline{\sphinxbfcode{\sphinxupquote{should\_simplify}}} \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} if the vertices array should be simplified. \end{fulllineitems} \index{simplify\_threshold (matplotlib.path.Path attribute)@\spxentry{simplify\_threshold}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.simplify_threshold}}\pysigline{\sphinxbfcode{\sphinxupquote{simplify\_threshold}}} The fraction of a pixel difference below which vertices will be simplified out. \end{fulllineitems} \index{to\_polygons() (matplotlib.path.Path method)@\spxentry{to\_polygons()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.to_polygons}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_polygons}}}{\emph{self}, \emph{transform=None}, \emph{width=0}, \emph{height=0}, \emph{closed\_only=True}}{} Convert this path to a list of polygons or polylines. Each polygon/polyline is an Nx2 array of vertices. In other words, each polygon has no \sphinxcode{\sphinxupquote{MOVETO}} instructions or curves. This is useful for displaying in backends that do not support compound paths or Bezier curves. If \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} are both non-zero then the lines will be simplified so that vertices outside of (0, 0), (width, height) will be clipped. If \sphinxstyleemphasis{closed\_only} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (default), only closed polygons, with the last point being the same as the first point, will be returned. Any unclosed polylines in the path will be explicitly closed. If \sphinxstyleemphasis{closed\_only} is \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, any unclosed polygons in the path will be returned as unclosed polygons, and the closed polygons will be returned explicitly closed by setting the last point to the same as the first point. \end{fulllineitems} \index{transformed() (matplotlib.path.Path method)@\spxentry{transformed()}\spxextra{matplotlib.path.Path method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.transformed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transformed}}}{\emph{self}, \emph{transform}}{} Return a transformed copy of the path. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformedPath}}}}}}] \leavevmode A specialized path class that will cache the transformed result and automatically update when the transform changes. \end{description} \end{fulllineitems} \index{unit\_circle() (matplotlib.path.Path class method)@\spxentry{unit\_circle()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_circle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_circle}}}{}{} Return the readonly {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} of the unit circle. For most cases, {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.circle()}}}}} will be what you want. \end{fulllineitems} \index{unit\_circle\_righthalf() (matplotlib.path.Path class method)@\spxentry{unit\_circle\_righthalf()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_circle_righthalf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_circle\_righthalf}}}{}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} of the right half of a unit circle. See {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.circle}}}}} for the reference on the approximation used. \end{fulllineitems} \index{unit\_rectangle() (matplotlib.path.Path class method)@\spxentry{unit\_rectangle()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_rectangle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_rectangle}}}{}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance of the unit rectangle from (0, 0) to (1, 1). \end{fulllineitems} \index{unit\_regular\_asterisk() (matplotlib.path.Path class method)@\spxentry{unit\_regular\_asterisk()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_regular_asterisk}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_regular\_asterisk}}}{\emph{numVertices}}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} for a unit regular asterisk with the given numVertices and radius of 1.0, centered at (0, 0). \end{fulllineitems} \index{unit\_regular\_polygon() (matplotlib.path.Path class method)@\spxentry{unit\_regular\_polygon()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_regular_polygon}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_regular\_polygon}}}{\emph{numVertices}}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance for a unit regular polygon with the given \sphinxstyleemphasis{numVertices} and radius of 1.0, centered at (0, 0). \end{fulllineitems} \index{unit\_regular\_star() (matplotlib.path.Path class method)@\spxentry{unit\_regular\_star()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.unit_regular_star}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{unit\_regular\_star}}}{\emph{numVertices}, \emph{innerCircle=0.5}}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} for a unit regular star with the given numVertices and radius of 1.0, centered at (0, 0). \end{fulllineitems} \index{vertices (matplotlib.path.Path attribute)@\spxentry{vertices}\spxextra{matplotlib.path.Path attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.vertices}}\pysigline{\sphinxbfcode{\sphinxupquote{vertices}}} The list of vertices in the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} as an Nx2 numpy array. \end{fulllineitems} \index{wedge() (matplotlib.path.Path class method)@\spxentry{wedge()}\spxextra{matplotlib.path.Path class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.Path.wedge}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{wedge}}}{\emph{theta1}, \emph{theta2}, \emph{n=None}}{} Return the unit circle wedge from angles \sphinxstyleemphasis{theta1} to \sphinxstyleemphasis{theta2} (in degrees). \sphinxstyleemphasis{theta2} is unwrapped to produce the shortest wedge within 360 degrees. That is, if \sphinxstyleemphasis{theta2} \textgreater{} \sphinxstyleemphasis{theta1} + 360, the wedge will be from \sphinxstyleemphasis{theta1} to \sphinxstyleemphasis{theta2} - 360 and not a full circle plus some extra overlap. If \sphinxstyleemphasis{n} is provided, it is the number of spline segments to make. If \sphinxstyleemphasis{n} is not provided, the number of spline segments is determined based on the delta between \sphinxstyleemphasis{theta1} and \sphinxstyleemphasis{theta2}. See {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path.arc}}}}} for the reference on the approximation used. \end{fulllineitems} \end{fulllineitems} \index{get\_path\_collection\_extents() (in module matplotlib.path)@\spxentry{get\_path\_collection\_extents()}\spxextra{in module matplotlib.path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.get_path_collection_extents}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.path.}}\sphinxbfcode{\sphinxupquote{get\_path\_collection\_extents}}}{\emph{master\_transform}, \emph{paths}, \emph{transforms}, \emph{offsets}, \emph{offset\_transform}}{} Given a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}s, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}s objects, and offsets, as found in a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}, returns the bounding box that encapsulates all of them. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{master\_transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} Global transformation applied to all paths. \item[{\sphinxstylestrong{paths}}] \leavevmode{[}list of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}{]} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}list of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}}{]} \item[{\sphinxstylestrong{offsets}}] \leavevmode{[}(N, 2) array-like{]} \item[{\sphinxstylestrong{offset\_transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}}{]} Transform applied to the offsets before offsetting the path. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The way that \sphinxstyleemphasis{paths}, \sphinxstyleemphasis{transforms} and \sphinxstyleemphasis{offsets} are combined follows the same method as for collections: Each is iterated over independently, so if you have 3 paths, 2 transforms and 1 offset, their combinations are as follows: \begin{quote} (A, A, A), (B, B, A), (C, A, A) \end{quote} \end{fulllineitems} \index{get\_paths\_extents() (in module matplotlib.path)@\spxentry{get\_paths\_extents()}\spxextra{in module matplotlib.path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/path_api:matplotlib.path.get_paths_extents}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.path.}}\sphinxbfcode{\sphinxupquote{get\_paths\_extents}}}{\emph{paths}, \emph{transforms={[}{]}}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Given a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} objects and optional {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} objects, returns the bounding box that encapsulates all of them. \sphinxstyleemphasis{paths} is a sequence of {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instances. \sphinxstyleemphasis{transforms} is an optional sequence of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}} instances to apply to each path. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.patheffects}}} \label{\detokenize{api/patheffects_api:module-matplotlib.patheffects}}\label{\detokenize{api/patheffects_api:matplotlib-patheffects}}\label{\detokenize{api/patheffects_api::doc}}\index{matplotlib.patheffects (module)@\spxentry{matplotlib.patheffects}\spxextra{module}} Defines classes for path effects. The path effects are supported in {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}. \index{AbstractPathEffect (class in matplotlib.patheffects)@\spxentry{AbstractPathEffect}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{AbstractPathEffect}}}{\emph{offset=(0.0}, \emph{0.0)}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A base class for path effects. Subclasses should override the \sphinxcode{\sphinxupquote{draw\_path}} method to add effect functionality. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset to apply to the path, measured in points. \end{description} \end{description}\end{quote} \index{draw\_path() (matplotlib.patheffects.AbstractPathEffect method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.AbstractPathEffect method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace=None}}{} Derived should override this method. The arguments are the same as {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase.draw\_path()}}}}} except the first argument is a renderer. \end{fulllineitems} \end{fulllineitems} \index{Normal (class in matplotlib.patheffects)@\spxentry{Normal}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.Normal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{Normal}}}{\emph{offset=(0.0}, \emph{0.0)}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}} The "identity" PathEffect. The Normal PathEffect's sole purpose is to draw the original artist with no special path effect. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset to apply to the path, measured in points. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{PathEffectRenderer (class in matplotlib.patheffects)@\spxentry{PathEffectRenderer}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{PathEffectRenderer}}}{\emph{path\_effects}, \emph{renderer}}{} Bases: {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} Implements a Renderer which contains another renderer. This proxy then intercepts draw calls, calling the appropriate {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} draw method. \begin{sphinxadmonition}{note}{Note:} Not all methods have been overridden on this RendererBase subclass. It may be necessary to add further methods to extend the PathEffects capabilities further. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path\_effects}}] \leavevmode{[}iterable of {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}}{]} The path effects which this renderer represents. \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase}}}}} instance{]} \end{description} \end{description}\end{quote} \index{copy\_with\_path\_effect() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{copy\_with\_path\_effect()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.copy_with_path_effect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{copy\_with\_path\_effect}}}{\emph{self}, \emph{path\_effects}}{}~ \end{fulllineitems} \index{draw\_markers() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{draw\_markers()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_markers}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_markers}}}{\emph{self}, \emph{gc}, \emph{marker\_path}, \emph{marker\_trans}, \emph{path}, \emph{*args}, \emph{**kwargs}}{} Draws a marker at each of the vertices in path. This includes all vertices, including control points on curves. To avoid that behavior, those vertices should be removed before calling this function. This provides a fallback implementation of draw\_markers that makes multiple calls to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this method in order to draw the marker only once and reuse it multiple times. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{gc}}] \leavevmode{[}\sphinxcode{\sphinxupquote{GraphicsContextBase}}{]} The graphics context \item[{\sphinxstylestrong{marker\_trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the marker. \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} An affine transform applied to the path. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw\_path() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace=None}}{} Draws a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance using the given affine transform. \end{fulllineitems} \index{draw\_path\_collection() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{draw\_path\_collection()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path_collection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path\_collection}}}{\emph{self}, \emph{gc}, \emph{master\_transform}, \emph{paths}, \emph{*args}, \emph{**kwargs}}{} Draws a collection of paths selecting drawing properties from the lists \sphinxstyleemphasis{facecolors}, \sphinxstyleemphasis{edgecolors}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{linestyles} and \sphinxstyleemphasis{antialiaseds}. \sphinxstyleemphasis{offsets} is a list of offsets to apply to each of the paths. The offsets in \sphinxstyleemphasis{offsets} are first transformed by \sphinxstyleemphasis{offsetTrans} before being applied. \sphinxstyleemphasis{offset\_position} may be either "screen" or "data" depending on the space that the offsets are in. This provides a fallback implementation of {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} that makes multiple calls to {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path()}}}}}. Some backends may want to override this in order to render each set of path data only once, and then reference that path multiple times with the different offsets, colors, styles etc. The generator methods \sphinxcode{\sphinxupquote{\_iter\_collection\_raw\_paths()}} and \sphinxcode{\sphinxupquote{\_iter\_collection()}} are provided to help with (and standardize) the implementation across backends. It is highly recommended to use those generators, so that changes to the behavior of {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.draw_path_collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw\_path\_collection()}}}}} can be made globally. \end{fulllineitems} \index{new\_gc() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{new\_gc()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.new_gc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gc}}}{\emph{self}}{} Return an instance of a \sphinxcode{\sphinxupquote{GraphicsContextBase}}. \end{fulllineitems} \index{points\_to\_pixels() (matplotlib.patheffects.PathEffectRenderer method)@\spxentry{points\_to\_pixels()}\spxextra{matplotlib.patheffects.PathEffectRenderer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathEffectRenderer.points_to_pixels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{points\_to\_pixels}}}{\emph{self}, \emph{points}}{} Convert points to display units. You need to override this function (unless your backend doesn't have a dpi, e.g., postscript or svg). Some imaging systems assume some value for pixels per inch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{points} \PYG{n}{to} \PYG{n}{pixels} \PYG{o}{=} \PYG{n}{points} \PYG{o}{*} \PYG{n}{pixels\PYGZus{}per\PYGZus{}inch}\PYG{o}{/}\PYG{l+m+mf}{72.0} \PYG{o}{*} \PYG{n}{dpi}\PYG{o}{/}\PYG{l+m+mf}{72.0} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar or array\_like{]} a float or a numpy array of float \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Points converted to pixels}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{PathPatchEffect (class in matplotlib.patheffects)@\spxentry{PathPatchEffect}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathPatchEffect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{PathPatchEffect}}}{\emph{offset=(0}, \emph{0)}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}} Draws a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}} instance whose Path comes from the original PathEffect artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset to apply to the path, in points. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All keyword arguments are passed through to the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}} constructor. The properties which cannot be overridden are "path", "clip\_box" "transform" and "clip\_path". \end{description} \end{description}\end{quote} \index{draw\_path() (matplotlib.patheffects.PathPatchEffect method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.PathPatchEffect method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.PathPatchEffect.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} Derived should override this method. The arguments are the same as {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase.draw_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.RendererBase.draw\_path()}}}}} except the first argument is a renderer. \end{fulllineitems} \end{fulllineitems} \index{SimpleLineShadow (class in matplotlib.patheffects)@\spxentry{SimpleLineShadow}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.SimpleLineShadow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{SimpleLineShadow}}}{\emph{offset=(2}, \emph{-2)}, \emph{shadow\_color='k'}, \emph{alpha=0.3}, \emph{rho=0.3}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}} A simple shadow via a line. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset to apply to the path, in points. \item[{\sphinxstylestrong{shadow\_color}}] \leavevmode{[}color{]} The shadow color. Default is black. A value of \sphinxcode{\sphinxupquote{None}} takes the original artist's color with a scale factor of \sphinxcode{\sphinxupquote{rho}}. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} The alpha transparency of the created shadow patch. Default is 0.3. \item[{\sphinxstylestrong{rho}}] \leavevmode{[}float{]} A scale factor to apply to the rgbFace color if \sphinxcode{\sphinxupquote{shadow\_rgbFace}} is \sphinxcode{\sphinxupquote{None}}. Default is 0.3. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Extra keywords are stored and passed through to \sphinxcode{\sphinxupquote{AbstractPathEffect.\_update\_gc()}}. \end{description} \end{description}\end{quote} \index{draw\_path() (matplotlib.patheffects.SimpleLineShadow method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.SimpleLineShadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.SimpleLineShadow.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} Overrides the standard draw\_path to add the shadow offset and necessary color changes for the shadow. \end{fulllineitems} \end{fulllineitems} \index{SimplePatchShadow (class in matplotlib.patheffects)@\spxentry{SimplePatchShadow}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{SimplePatchShadow}}}{\emph{offset=(2}, \emph{-2)}, \emph{shadow\_rgbFace=None}, \emph{alpha=None}, \emph{rho=0.3}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}} A simple shadow via a filled patch. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset of the shadow in points. \item[{\sphinxstylestrong{shadow\_rgbFace}}] \leavevmode{[}color{]} The shadow color. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} The alpha transparency of the created shadow patch. Default is 0.3. \sphinxurl{http://matplotlib.1069221.n5.nabble.com/path-effects-question-td27630.html} \item[{\sphinxstylestrong{rho}}] \leavevmode{[}float{]} A scale factor to apply to the rgbFace color if \sphinxcode{\sphinxupquote{shadow\_rgbFace}} is not specified. Default is 0.3. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Extra keywords are stored and passed through to \sphinxcode{\sphinxupquote{AbstractPathEffect.\_update\_gc()}}. \end{description} \end{description}\end{quote} \index{draw\_path() (matplotlib.patheffects.SimplePatchShadow method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.SimplePatchShadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} Overrides the standard draw\_path to add the shadow offset and necessary color changes for the shadow. \end{fulllineitems} \end{fulllineitems} \index{Stroke (class in matplotlib.patheffects)@\spxentry{Stroke}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{Stroke}}}{\emph{offset=(0}, \emph{0)}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.AbstractPathEffect}}}}} A line based PathEffect which re-draws a stroke. The path will be stroked with its gc updated with the given keyword arguments, i.e., the keyword arguments should be valid gc parameter values. \index{draw\_path() (matplotlib.patheffects.Stroke method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.Stroke method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} draw the path with updated gc. \end{fulllineitems} \end{fulllineitems} \index{withSimplePatchShadow (class in matplotlib.patheffects)@\spxentry{withSimplePatchShadow}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.withSimplePatchShadow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{withSimplePatchShadow}}}{\emph{offset=(2}, \emph{-2)}, \emph{shadow\_rgbFace=None}, \emph{alpha=None}, \emph{rho=0.3}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.SimplePatchShadow}}}}} Adds a simple {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.SimplePatchShadow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimplePatchShadow}}}}} and then draws the original Artist to avoid needing to call {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Normal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normal}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{offset}}] \leavevmode{[}pair of floats{]} The offset of the shadow in points. \item[{\sphinxstylestrong{shadow\_rgbFace}}] \leavevmode{[}color{]} The shadow color. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float{]} The alpha transparency of the created shadow patch. Default is 0.3. \sphinxurl{http://matplotlib.1069221.n5.nabble.com/path-effects-question-td27630.html} \item[{\sphinxstylestrong{rho}}] \leavevmode{[}float{]} A scale factor to apply to the rgbFace color if \sphinxcode{\sphinxupquote{shadow\_rgbFace}} is not specified. Default is 0.3. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Extra keywords are stored and passed through to \sphinxcode{\sphinxupquote{AbstractPathEffect.\_update\_gc()}}. \end{description} \end{description}\end{quote} \index{draw\_path() (matplotlib.patheffects.withSimplePatchShadow method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.withSimplePatchShadow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.withSimplePatchShadow.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} Overrides the standard draw\_path to add the shadow offset and necessary color changes for the shadow. \end{fulllineitems} \end{fulllineitems} \index{withStroke (class in matplotlib.patheffects)@\spxentry{withStroke}\spxextra{class in matplotlib.patheffects}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.withStroke}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.patheffects.}}\sphinxbfcode{\sphinxupquote{withStroke}}}{\emph{offset=(0}, \emph{0)}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patheffects.Stroke}}}}} Adds a simple {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Stroke}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Stroke}}}}} and then draws the original Artist to avoid needing to call {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.Normal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normal}}}}}. The path will be stroked with its gc updated with the given keyword arguments, i.e., the keyword arguments should be valid gc parameter values. \index{draw\_path() (matplotlib.patheffects.withStroke method)@\spxentry{draw\_path()}\spxextra{matplotlib.patheffects.withStroke method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/patheffects_api:matplotlib.patheffects.withStroke.draw_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_path}}}{\emph{self}, \emph{renderer}, \emph{gc}, \emph{tpath}, \emph{affine}, \emph{rgbFace}}{} draw the path with updated gc. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot}}} \label{\detokenize{api/pyplot_summary:matplotlib-pyplot}}\label{\detokenize{api/pyplot_summary::doc}} \subsection{Pyplot function overview} \label{\detokenize{api/pyplot_summary:pyplot-function-overview}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} is a state-based interface to matplotlib. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{matplotlib.pyplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot:matplotlib-pyplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot::doc}}\index{matplotlib.pyplot (module)@\spxentry{matplotlib.pyplot}\spxextra{module}} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot}}}}} is a state-based interface to matplotlib. It provides a MATLAB-like way of plotting. pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \end{sphinxVerbatim} The object-oriented API is recommended for more complex plots. \paragraph{Functions} \label{\detokenize{api/_as_gen/matplotlib.pyplot:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.acorr:matplotlib.pyplot.acorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{acorr}}}}}(x, \textbackslash{}*{[}, data{]}) & Plot the autocorrelation of \sphinxstyleemphasis{x}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}}(x{[}, Fs, Fc, window, pad\_to, ...{]}) & Plot the angle spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate}}}}}(s, xy, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.arrow:matplotlib.pyplot.arrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{arrow}}}}}(x, y, dx, dy, \textbackslash{}*\textbackslash{}*kwargs) & Add an arrow to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.autoscale:matplotlib.pyplot.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale}}}}}({[}enable, axis, tight{]}) & Autoscale the axis view to the data (toggle). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.autumn:matplotlib.pyplot.autumn}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autumn}}}}}() & Set the colormap to "autumn". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes}}}}}({[}arg{]}) & Add an axes to the current figure and make it the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhline:matplotlib.pyplot.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline}}}}}({[}y, xmin, xmax{]}) & Add a horizontal line across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib.pyplot.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}}(ymin, ymax{[}, xmin, xmax{]}) & Add a horizontal span (rectangle) across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axis:matplotlib.pyplot.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Convenience method to get or set some axis properties. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvline:matplotlib.pyplot.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvline}}}}}({[}x, ymin, ymax{]}) & Add a vertical line across the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib.pyplot.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}}(xmin, xmax{[}, ymin, ymax{]}) & Add a vertical span (rectangle) across the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}}}}}(x, height{[}, width, bottom, align, data{]}) & Make a bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barbs:matplotlib.pyplot.barbs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barbs}}}}}(\textbackslash{}*args{[}, data{]}) & Plot a 2-D field of barbs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}}(y, width{[}, height, left, align{]}) & Make a horizontal bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bone:matplotlib.pyplot.bone}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bone}}}}}() & Set the colormap to "bone". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib.pyplot.box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{box}}}}}({[}on{]}) & Turn the axes box on or off on the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}}(x{[}, notch, sym, vert, whis, ...{]}) & Make a box and whisker plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.broken_barh:matplotlib.pyplot.broken_barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{broken\_barh}}}}}(xranges, yrange, \textbackslash{}*{[}, data{]}) & Plot a horizontal sequence of rectangles. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cla:matplotlib.pyplot.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cla}}}}}() & Clear the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clabel:matplotlib.pyplot.clabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clabel}}}}}(CS, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Label a contour plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clf:matplotlib.pyplot.clf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clf}}}}}() & Clear the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clim:matplotlib.pyplot.clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}}({[}vmin, vmax{]}) & Set the color limits of the current image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close}}}}}({[}fig{]}) & Close a figure window. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib.pyplot.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cohere}}}}}(x, y{[}, NFFT, Fs, Fc, detrend, ...{]}) & Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}}({[}mappable, cax, ax{]}) & Add a colorbar to a plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.connect:matplotlib.pyplot.connect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{connect}}}}}(s, func) & Connect event with string \sphinxstyleemphasis{s} to \sphinxstyleemphasis{func}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}(\textbackslash{}*args{[}, data{]}) & Plot contours. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}(\textbackslash{}*args{[}, data{]}) & Plot contours. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cool:matplotlib.pyplot.cool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cool}}}}}() & Set the colormap to "cool". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.copper:matplotlib.pyplot.copper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{copper}}}}}() & Set the colormap to "copper". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd}}}}}(x, y{[}, NFFT, Fs, Fc, detrend, window, ...{]}) & Plot the cross-spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.delaxes:matplotlib.pyplot.delaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delaxes}}}}}({[}ax{]}) & Remove the \sphinxcode{\sphinxupquote{Axes}} \sphinxstyleemphasis{ax} (defaulting to the current axes) from its figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.disconnect:matplotlib.pyplot.disconnect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{disconnect}}}}}(cid) & Disconnect callback id cid \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}}() & Redraw the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}}(x, y{[}, yerr, xerr, fmt, ecolor, ...{]}) & Plot y versus x as lines and/or markers with attached errorbars. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.eventplot:matplotlib.pyplot.eventplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eventplot}}}}}(positions{[}, orientation, ...{]}) & Plot identical parallel lines at the given positions. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figimage:matplotlib.pyplot.figimage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figimage}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Add a non-resampled image to the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figlegend:matplotlib.pyplot.figlegend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figlegend}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Place a legend on the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists:matplotlib.pyplot.fignum_exists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fignum\_exists}}}}}(num) & Return whether the figure with the given id exists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figtext:matplotlib.pyplot.figtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figtext}}}}}(x, y, s, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Add text to figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}}({[}num, figsize, dpi, facecolor, ...{]}) & Create a new figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill:matplotlib.pyplot.fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}}(\textbackslash{}*args{[}, data{]}) & Plot filled polygons. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}}(x, y1{[}, y2, where, ...{]}) & Fill the area between two horizontal curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx:matplotlib.pyplot.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx}}}}}(y, x1{[}, x2, where, step, ...{]}) & Fill the area between two vertical curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.findobj:matplotlib.pyplot.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{findobj}}}}}({[}o, match, include\_self{]}) & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.flag:matplotlib.pyplot.flag}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{flag}}}}}() & Set the colormap to "flag". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gca:matplotlib.pyplot.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gca}}}}}(\textbackslash{}*\textbackslash{}*kwargs) & Get the current {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance on the current figure matching the given keyword args, or create one. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib.pyplot.gcf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gcf}}}}}() & Get the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gci:matplotlib.pyplot.gci}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gci}}}}}() & Get the current colorable artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_current_fig_manager:matplotlib.pyplot.get_current_fig_manager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_current\_fig\_manager}}}}}() & Return the figure manager of the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_figlabels:matplotlib.pyplot.get_figlabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_figlabels}}}}}() & Return a list of existing figure labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums:matplotlib.pyplot.get_fignums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fignums}}}}}() & Return a list of existing figure numbers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_plot_commands:matplotlib.pyplot.get_plot_commands}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_plot\_commands}}}}}() & Get a sorted list of all of the plotting commands. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ginput:matplotlib.pyplot.ginput}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ginput}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Blocking call to interact with a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gray:matplotlib.pyplot.gray}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gray}}}}}() & Set the colormap to "gray". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.grid:matplotlib.pyplot.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid}}}}}({[}b, which, axis{]}) & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hexbin:matplotlib.pyplot.hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hexbin}}}}}(x, y{[}, C, gridsize, bins, xscale, ...{]}) & Make a hexagonal binning plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist}}}}}(x{[}, bins, range, density, weights, ...{]}) & Plot a histogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:matplotlib.pyplot.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist2d}}}}}(x, y{[}, bins, range, density, ...{]}) & Make a 2D histogram plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib.pyplot.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}}(y, xmin, xmax{[}, colors, linestyles, ...{]}) & Plot horizontal lines at each \sphinxstyleemphasis{y} from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmax}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hot:matplotlib.pyplot.hot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hot}}}}}() & Set the colormap to "hot". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hsv:matplotlib.pyplot.hsv}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hsv}}}}}() & Set the colormap to "hsv". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib.pyplot.imread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imread}}}}}(fname{[}, format{]}) & Read an image from a file into an array. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imsave:matplotlib.pyplot.imsave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imsave}}}}}(fname, arr, \textbackslash{}*\textbackslash{}*kwargs) & Save an array as an image file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}(X{[}, cmap, norm, aspect, ...{]}) & Display an image, i.e. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.inferno:matplotlib.pyplot.inferno}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inferno}}}}}() & Set the colormap to "inferno". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.install_repl_displayhook:matplotlib.pyplot.install_repl_displayhook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{install\_repl\_displayhook}}}}}() & Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib.pyplot.ioff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ioff}}}}}() & Turn the interactive mode off. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ion}}}}}() & Turn the interactive mode on. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive:matplotlib.pyplot.isinteractive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isinteractive}}}}}() & Return the status of interactive mode. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.jet:matplotlib.pyplot.jet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{jet}}}}}() & Set the colormap to "jet". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Place a legend on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.locator_params:matplotlib.pyplot.locator_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{locator\_params}}}}}({[}axis, tight{]}) & Control behavior of major tick locators. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.loglog:matplotlib.pyplot.loglog}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loglog}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Make a plot with log scaling on both the x and y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magma:matplotlib.pyplot.magma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magma}}}}}() & Set the colormap to "magma". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}}(x{[}, Fs, Fc, window, ...{]}) & Plot the magnitude spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.margins:matplotlib.pyplot.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{margins}}}}}(\textbackslash{}*margins{[}, x, y, tight{]}) & Set or retrieve autoscaling margins. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.matshow:matplotlib.pyplot.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matshow}}}}}(A{[}, fignum{]}) & Display an array as a matrix in a new figure window. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off:matplotlib.pyplot.minorticks_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_off}}}}}() & Remove minor ticks from the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_on:matplotlib.pyplot.minorticks_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_on}}}}}() & Display minor ticks on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.nipy_spectral:matplotlib.pyplot.nipy_spectral}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{nipy\_spectral}}}}}() & Set the colormap to "nipy\_spectral". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pause:matplotlib.pyplot.pause}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pause}}}}}(interval) & Pause for \sphinxstyleemphasis{interval} seconds. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}}(\textbackslash{}*args{[}, alpha, norm, cmap, vmin, ...{]}) & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}(\textbackslash{}*args{[}, alpha, norm, cmap, ...{]}) & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}}(x{[}, Fs, Fc, window, pad\_to, ...{]}) & Plot the phase spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib.pyplot.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pie}}}}}(x{[}, explode, labels, colors, autopct, ...{]}) & Plot a pie chart. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pink:matplotlib.pyplot.pink}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pink}}}}}() & Set the colormap to "pink". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plasma:matplotlib.pyplot.plasma}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plasma}}}}}() & Set the colormap to "plasma". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}(\textbackslash{}*args{[}, scalex, scaley, data{]}) & Plot y versus x as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}}(x, y{[}, fmt, tz, xdate, ydate, data{]}) & Plot data that contains dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:matplotlib.pyplot.plotfile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plotfile}}}}}(fname{[}, cols, plotfuncs, comments, ...{]}) & Plot the data in a file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.polar:matplotlib.pyplot.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polar}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Make a polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.prism:matplotlib.pyplot.prism}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{prism}}}}}() & Set the colormap to "prism". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}}(x{[}, NFFT, Fs, Fc, detrend, window, ...{]}) & Plot the power spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver}}}}}(\textbackslash{}*args{[}, data{]}) & Plot a 2D field of arrows. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:matplotlib.pyplot.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiverkey}}}}}(Q, X, Y, U, label, \textbackslash{}*\textbackslash{}*kw) & Add a key to a quiver plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rc:matplotlib.pyplot.rc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc}}}}}(group, \textbackslash{}*\textbackslash{}*kwargs) & Set the current rc params. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rc_context:matplotlib.pyplot.rc_context}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc\_context}}}}}({[}rc, fname{]}) & Return a context manager for managing rc settings. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults:matplotlib.pyplot.rcdefaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rcdefaults}}}}}() & Restore the rc params from Matplotlib's internal default style. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib.pyplot.rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgrids}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Get or set the radial gridlines on the current polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Save the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sca}}}}}(ax) & Set the current Axes instance to \sphinxstyleemphasis{ax}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}(x, y{[}, s, c, marker, cmap, norm, ...{]}) & A scatter plot of \sphinxstyleemphasis{y} vs \sphinxstyleemphasis{x} with varying marker size and/or color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sci:matplotlib.pyplot.sci}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sci}}}}}(im) & Set the current image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib.pyplot.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogx}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Make a plot with log scaling on the x axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib.pyplot.semilogy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogy}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Make a plot with log scaling on the y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cmap}}}}}(cmap) & Set the default colormap. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}}(obj, \textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Set a property on an artist object. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kw) & Display a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}}(x{[}, NFFT, Fs, Fc, detrend, window, ...{]}) & Plot a spectrogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.spring:matplotlib.pyplot.spring}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spring}}}}}() & Set the colormap to "spring". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.spy:matplotlib.pyplot.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spy}}}}}(Z{[}, precision, marker, markersize, ...{]}) & Plot the sparsity pattern of a 2D array. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stackplot:matplotlib.pyplot.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stackplot}}}}}(x, \textbackslash{}*args{[}, labels, colors, ...{]}) & Draw a stacked area plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stem:matplotlib.pyplot.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}}(\textbackslash{}*args{[}, linefmt, markerfmt, basefmt, ...{]}) & Create a stem plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.step:matplotlib.pyplot.step}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step}}}}}(x, y, \textbackslash{}*args{[}, where, data{]}) & Make a step plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot}}}}}(x, y, u, v{[}, density, linewidth, ...{]}) & Draw streamlines of a vector flow. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Add a subplot to the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid}}}}}(shape, loc{[}, rowspan, colspan, fig{]}) & Create an axis at specific location inside a regular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool:matplotlib.pyplot.subplot_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot\_tool}}}}}({[}targetfig{]}) & Launch a subplot tool window for a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots}}}}}({[}nrows, ncols, sharex, sharey, ...{]}) & Create a figure and a set of subplots. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib.pyplot.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots\_adjust}}}}}({[}left, bottom, right, top, ...{]}) & Tune the subplot layout. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.summer:matplotlib.pyplot.summer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{summer}}}}}() & Set the colormap to "summer". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:matplotlib.pyplot.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}}(t, \textbackslash{}*\textbackslash{}*kwargs) & Add a centered title to the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.switch_backend:matplotlib.pyplot.switch_backend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{switch\_backend}}}}}(newbackend) & Close all open figures and set the Matplotlib backend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.table:matplotlib.pyplot.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}}({[}cellText, cellColours, cellLoc, ...{]}) & Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}}(x, y, s{[}, fontdict, withdash{]}) & Add text to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib.pyplot.thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thetagrids}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Get or set the theta gridlines on the current polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tick_params:matplotlib.pyplot.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params}}}}}({[}axis{]}) & Change the appearance of ticks, tick labels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ticklabel_format:matplotlib.pyplot.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticklabel\_format}}}}}(\textbackslash{}*{[}, axis, style, ...{]}) & Change the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} used by default for linear axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}}({[}pad, h\_pad, w\_pad, rect{]}) & Automatically adjust subplot parameters to give specified padding. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}}(label{[}, fontdict, loc, pad{]}) & Set a title for the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Draw contours on an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Draw contours on an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tripcolor}}}}}(\textbackslash{}*args{[}, alpha, norm, cmap, vmin, ...{]}) & Create a pseudocolor plot of an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib.pyplot.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{triplot}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Draw a unstructured triangular grid as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib.pyplot.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twinx}}}}}({[}ax{]}) & Make and return a second axes that shares the \sphinxstyleemphasis{x}-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twiny:matplotlib.pyplot.twiny}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twiny}}}}}({[}ax{]}) & Make and return a second axes that shares the \sphinxstyleemphasis{y}-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.uninstall_repl_displayhook:matplotlib.pyplot.uninstall_repl_displayhook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uninstall\_repl\_displayhook}}}}}() & Uninstall the matplotlib display hook. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.violinplot:matplotlib.pyplot.violinplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violinplot}}}}}(dataset{[}, positions, vert, ...{]}) & Make a violin plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.viridis:matplotlib.pyplot.viridis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{viridis}}}}}() & Set the colormap to "viridis". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib.pyplot.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}}(x, ymin, ymax{[}, colors, linestyles, ...{]}) & Plot vertical lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.waitforbuttonpress:matplotlib.pyplot.waitforbuttonpress}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{waitforbuttonpress}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Blocking call to interact with the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.winter:matplotlib.pyplot.winter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{winter}}}}}() & Set the colormap to "winter". \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:matplotlib.pyplot.xcorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xcorr}}}}}(x, y{[}, normed, detrend, usevlines, ...{]}) & Plot the cross correlation between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:matplotlib.pyplot.xkcd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xkcd}}}}}({[}scale, length, randomness{]}) & Turn on \sphinxhref{https://xkcd.com/}{xkcd} sketch-style drawing mode.This will only have effect on things drawn after this function is called.. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}}(xlabel{[}, fontdict, labelpad{]}) & Set the label for the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlim:matplotlib.pyplot.xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Get or set the x limits of the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xscale:matplotlib.pyplot.xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}}(value, \textbackslash{}*\textbackslash{}*kwargs) & Set the x-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xticks:matplotlib.pyplot.xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}}({[}ticks, labels{]}) & Get or set the current tick locations and labels of the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}}(ylabel{[}, fontdict, labelpad{]}) & Set the label for the y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylim:matplotlib.pyplot.ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}}(\textbackslash{}*args, \textbackslash{}*\textbackslash{}*kwargs) & Get or set the y-limits of the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.yscale:matplotlib.pyplot.yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}}(value, \textbackslash{}*\textbackslash{}*kwargs) & Set the y-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.yticks:matplotlib.pyplot.yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}}({[}ticks, labels{]}) & Get or set the current tick locations and labels of the y-axis. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{matplotlib.pyplot.acorr} \label{\detokenize{api/_as_gen/matplotlib.pyplot.acorr:matplotlib-pyplot-acorr}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.acorr::doc}}\index{acorr() (in module matplotlib.pyplot)@\spxentry{acorr()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.acorr:matplotlib.pyplot.acorr}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{acorr}}}{\emph{x}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the autocorrelation of \sphinxstyleemphasis{x}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like{]} \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}callable, optional, default: \sphinxcode{\sphinxupquote{mlab.detrend\_none}}{]} \sphinxstyleemphasis{x} is detrended by the \sphinxstyleemphasis{detrend} callable. This must be a function \sphinxcode{\sphinxupquote{x = detrend(x)}} accepting and returning an \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html\#numpy.array}{\sphinxcode{\sphinxupquote{numpy.array}}}. Default is no normalization. \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxcode{\sphinxupquote{True}}, input vectors are normalised to unit length. \item[{\sphinxstylestrong{usevlines}}] \leavevmode{[}bool, optional, default: True{]} Determines the plot style. If \sphinxcode{\sphinxupquote{True}}, vertical lines are plotted from 0 to the acorr value using \sphinxcode{\sphinxupquote{Axes.vlines}}. Additionally, a horizontal line is plotted at y=0 using \sphinxcode{\sphinxupquote{Axes.axhline}}. If \sphinxcode{\sphinxupquote{False}}, markers are plotted at the acorr values using \sphinxcode{\sphinxupquote{Axes.plot}}. \item[{\sphinxstylestrong{maxlags}}] \leavevmode{[}int, optional, default: 10{]} Number of lags to show. If \sphinxcode{\sphinxupquote{None}}, will return all \sphinxcode{\sphinxupquote{2 * len(x) - 1}} lags. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lags}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The lag vector. \item[{\sphinxstylestrong{c}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The auto correlation vector. \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} added to the axes of the correlation: \begin{itemize} \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} if \sphinxstyleemphasis{usevlines} is True. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} if \sphinxstyleemphasis{usevlines} is False. \end{itemize} \item[{\sphinxstylestrong{b}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or None{]} Horizontal line at 0 if \sphinxstyleemphasis{usevlines} is True None \sphinxstyleemphasis{usevlines} is False. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{linestyle}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property, optional{]} The linestyle for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}str, optional, default: 'o'{]} The marker for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The cross correlation is performed with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html\#numpy.correlate}{\sphinxcode{\sphinxupquote{numpy.correlate()}}} with \sphinxcode{\sphinxupquote{mode = "full"}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.acorr}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.acorr:examples-using-matplotlib-pyplot-acorr}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.angle\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib-pyplot-angle-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum::doc}}\index{angle\_spectrum() (in module matplotlib.pyplot)@\spxentry{angle\_spectrum()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{angle\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the angle spectrum. Compute the angle spectrum (wrapped phase spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the angle spectrum in radians (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}} plots the unwrapped version of this function. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the angle spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.annotate} \label{\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib-pyplot-annotate}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.annotate::doc}}\index{annotate() (in module matplotlib.pyplot)@\spxentry{annotate()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{annotate}}}{\emph{s}, \emph{xy}, \emph{*args}, \emph{**kwargs}}{} Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. In the simplest form, the text is placed at \sphinxstyleemphasis{xy}. Optionally, the text can be displayed in another position \sphinxstyleemphasis{xytext}. An arrow pointing from the text to the annotated point \sphinxstyleemphasis{xy} can then be added by defining \sphinxstyleemphasis{arrowprops}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} The text of the annotation. \sphinxstyleemphasis{s} is a deprecated synonym for this parameter. \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The point \sphinxstyleemphasis{(x,y)} to annotate. \item[{\sphinxstylestrong{xytext}}] \leavevmode{[}(float, float), optional{]} The position \sphinxstyleemphasis{(x,y)} to place the text at. If \sphinxstyleemphasis{None}, defaults to \sphinxstyleemphasis{xy}. \item[{\sphinxstylestrong{xycoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xy} is given in. The following types of values are supported: \begin{itemize} \item {} One of the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'figure points' & Points from the lower left of the figure \\ \hline 'figure pixels' & Pixels from the lower left of the figure \\ \hline 'figure fraction' & Fraction of figure from lower left \\ \hline 'axes points' & Points from lower left corner of axes \\ \hline 'axes pixels' & Pixels from lower left corner of axes \\ \hline 'axes fraction' & Fraction of axes from lower left \\ \hline 'data' & Use the coordinate system of the object being annotated (default) \\ \hline 'polar' & \sphinxstyleemphasis{(theta,r)} if not native 'data' coordinates \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item {} An {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}: \sphinxstyleemphasis{xy} is interpreted as a fraction of the artists {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. E.g. \sphinxstyleemphasis{(0, 0)} would be the lower left corner of the bounding box and \sphinxstyleemphasis{(0.5, 1)} would be the center top of the bounding box. \item {} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} to transform \sphinxstyleemphasis{xy} to screen coordinates. \item {} A function with one of the following signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Bbox} \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Transform} \end{sphinxVerbatim} where \sphinxstyleemphasis{renderer} is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass. The result of the function is interpreted like the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} cases above. \item {} A tuple \sphinxstyleemphasis{(xcoords, ycoords)} specifying separate coordinate systems for \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \sphinxstyleemphasis{xcoords} and \sphinxstyleemphasis{ycoords} must each be of one of the above described types. \end{itemize} See {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}} for more details. Defaults to 'data'. \item[{\sphinxstylestrong{textcoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xytext} is given in. All \sphinxstyleemphasis{xycoords} values are valid as well as the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'offset points' & Offset (in points) from the \sphinxstyleemphasis{xy} value \\ \hline 'offset pixels' & Offset (in pixels) from the \sphinxstyleemphasis{xy} value \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to the value of \sphinxstyleemphasis{xycoords}, i.e. use the same coordinate system for annotation point and text position. \item[{\sphinxstylestrong{arrowprops}}] \leavevmode{[}dict, optional{]} The properties used to draw a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} arrow between the positions \sphinxstyleemphasis{xy} and \sphinxstyleemphasis{xytext}. If \sphinxstyleemphasis{arrowprops} does not contain the key 'arrowstyle' the allowed keys are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline width & The width of the arrow in points \\ \hline headwidth & The width of the base of the arrow head in points \\ \hline headlength & The length of the arrow head in points \\ \hline shrink & Fraction of total length to shrink from both ends \\ \hline ? & Any key to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} If \sphinxstyleemphasis{arrowprops} contains the key 'arrowstyle' the above keys are forbidden. The allowed values of \sphinxcode{\sphinxupquote{'arrowstyle'}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline \sphinxcode{\sphinxupquote{'-'}} & None \\ \hline \sphinxcode{\sphinxupquote{'-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'-{[}'}} & widthB=1.0,lengthB=0.2,angleB=None \\ \hline \sphinxcode{\sphinxupquote{'\textbar{}-\textbar{}'}} & widthA=1.0,widthB=1.0 \\ \hline \sphinxcode{\sphinxupquote{'-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'fancy'}} & head\_length=0.4,head\_width=0.4,tail\_width=0.4 \\ \hline \sphinxcode{\sphinxupquote{'simple'}} & head\_length=0.5,head\_width=0.5,tail\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'wedge'}} & tail\_width=0.3,shrink\_factor=0.5 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Valid keys for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline arrowstyle & the arrow style \\ \hline connectionstyle & the connection style \\ \hline relpos & default is (0.5, 0.5) \\ \hline patchA & default is bounding box of the text \\ \hline patchB & default is None \\ \hline shrinkA & default is 2 points \\ \hline shrinkB & default is 2 points \\ \hline mutation\_scale & default is text size (in points) \\ \hline mutation\_aspect & default is 1. \\ \hline ? & any key for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to None, i.e. no arrow is drawn. \item[{\sphinxstylestrong{annotation\_clip}}] \leavevmode{[}bool or None, optional{]} Whether to draw the annotation when the annotation point \sphinxstyleemphasis{xy} is outside the axes area. \begin{itemize} \item {} If \sphinxstyleemphasis{True}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes. \item {} If \sphinxstyleemphasis{False}, the annotation will always be drawn. \item {} If \sphinxstyleemphasis{None}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes and \sphinxstyleemphasis{xycoords} is 'data'. \end{itemize} Defaults to \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are passed to {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{annotation}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.annotate}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.annotate:examples-using-matplotlib-pyplot-annotate}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotate\_transform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_basic.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_polar.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.arrow} \label{\detokenize{api/_as_gen/matplotlib.pyplot.arrow:matplotlib-pyplot-arrow}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.arrow::doc}}\index{arrow() (in module matplotlib.pyplot)@\spxentry{arrow()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.arrow:matplotlib.pyplot.arrow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{arrow}}}{\emph{x}, \emph{y}, \emph{dx}, \emph{dy}, \emph{**kwargs}}{} Add an arrow to the axes. This draws an arrow from \sphinxcode{\sphinxupquote{(x, y)}} to \sphinxcode{\sphinxupquote{(x+dx, y+dy)}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The x and y coordinates of the arrow base. \item[{\sphinxstylestrong{dx, dy}}] \leavevmode{[}float{]} The length of the arrow along x and y direction. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arrow}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}}{]} The created {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}} object. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Optional kwargs (inherited from {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrow:matplotlib.patches.FancyArrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrow}}}}} patch) control the arrow construction and properties: \item[{\sphinxstylestrong{Constructor arguments}}] \leavevmode\begin{description} \item[{\sphinxstyleemphasis{width}: float (default: 0.001)}] \leavevmode width of full arrow tail \item[{\sphinxstyleemphasis{length\_includes\_head}: bool (default: False)}] \leavevmode True if head is to be counted in calculating the length. \item[{\sphinxstyleemphasis{head\_width}: float or None (default: 3*width)}] \leavevmode total width of the full arrow head \item[{\sphinxstyleemphasis{head\_length}: float or None (default: 1.5 * head\_width)}] \leavevmode length of arrow head \item[{\sphinxstyleemphasis{shape}: {[}'full', 'left', 'right'{]} (default: 'full')}] \leavevmode draw the left-half, right-half, or full arrow \item[{\sphinxstyleemphasis{overhang}: float (default: 0)}] \leavevmode fraction that the arrow is swept back (0 overhang means triangular shape). Can be negative or greater than one. \item[{\sphinxstyleemphasis{head\_starts\_at\_zero}: bool (default: False)}] \leavevmode if True, the head starts being drawn at coordinate 0 instead of ending at coordinate 0. \end{description} \item[{\sphinxstylestrong{Other valid kwargs (inherited from :class:{}`Patch{}`) are:}}] \leavevmode \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} The resulting arrow is affected by the axes aspect ratio and limits. This may produce an arrow whose head is not square with its stem. To create an arrow whose head is square with its stem, use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate()}}}}} for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{annotate}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{xy}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{,} \PYG{n}{xytext}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{arrowprops}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{arrowstyle}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}\PYGZgt{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.arrow}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.arrow:examples-using-matplotlib-pyplot-arrow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.autoscale} \label{\detokenize{api/_as_gen/matplotlib.pyplot.autoscale:matplotlib-pyplot-autoscale}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.autoscale::doc}}\index{autoscale() (in module matplotlib.pyplot)@\spxentry{autoscale()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.autoscale:matplotlib.pyplot.autoscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{enable=True}, \emph{axis='both'}, \emph{tight=None}}{} Autoscale the axis view to the data (toggle). Convenience method for simple axis view autoscaling. It turns autoscaling on or off, and then, if autoscaling for either axis is on, it performs the autoscaling on the specified axis or axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{enable}}] \leavevmode{[}bool or None, optional{]} True (default) turns autoscaling on, False turns it off. None leaves the autoscaling state unchanged. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} which axis to operate on; default is 'both' \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, optional{]} If True, set view limits to data limits; if False, let the locator and margins expand the view limits; if None, use tight scaling if the only artist is an image, otherwise treat \sphinxstyleemphasis{tight} as False. The \sphinxstyleemphasis{tight} setting is retained for future autoscaling until it is explicitly changed. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.autumn} \label{\detokenize{api/_as_gen/matplotlib.pyplot.autumn:matplotlib-pyplot-autumn}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.autumn::doc}}\index{autumn() (in module matplotlib.pyplot)@\spxentry{autumn()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.autumn:matplotlib.pyplot.autumn}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{autumn}}}{}{} Set the colormap to "autumn". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.axes} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib-pyplot-axes}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axes::doc}}\index{axes() (in module matplotlib.pyplot)@\spxentry{axes()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axes}}}{\emph{arg=None}, \emph{**kwargs}}{} Add an axes to the current figure and make it the current axes. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{n}{rect}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{polar}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arg}}] \leavevmode{[}\{ None, 4-tuple, Axes \}{]} The exact behavior of this function depends on the type: \begin{itemize} \item {} \sphinxstyleemphasis{None}: A new full window axes is added using \sphinxcode{\sphinxupquote{subplot(111, **kwargs)}} \item {} 4-tuple of floats \sphinxstyleemphasis{rect} = \sphinxcode{\sphinxupquote{{[}left, bottom, width, height{]}}}. A new axes is added with dimensions \sphinxstyleemphasis{rect} in normalized (0, 1) units using {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_axes}}}}} on the current figure. \item {} {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}: This is equivalent to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.sca}}}}}. It sets the current axes to \sphinxstyleemphasis{arg}. Note: This implicitly changes the current figure to the parent of \sphinxstyleemphasis{arg}. \begin{sphinxadmonition}{note}{Note:} The use of an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} as an argument is deprecated and will be removed in v3.0. Please use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.sca}}}}} instead. \end{sphinxadmonition} \end{itemize} \item[{\sphinxstylestrong{projection}}] \leavevmode{[}\{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str\}, optional{]} The projection type of the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \sphinxstyleemphasis{str} is the name of a costum projection, see {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections}}}}}. The default None results in a 'rectilinear' projection. \item[{\sphinxstylestrong{polar}}] \leavevmode{[}boolean, optional{]} If True, equivalent to projection='polar'. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} Share the x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} with sharex and/or sharey. The axis will have the same limits, ticks, and scale as the axis of the shared axes. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} A label for the returned axes. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} (or a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}){]} The returned axes class depends on the projection used. It is {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} if rectilinear projection are used and {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes}}}}} if polar projection are used. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode This method also takes the keyword arguments for the returned axes class. The keyword arguments for the rectilinear axes class {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} can be found in the following table but there might also be other keyword arguments if another projection is used, see the actual axes class. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} If the figure already has a axes with key (\sphinxstyleemphasis{args}, \sphinxstyleemphasis{kwargs}) then it will simply make that axes current and return it. This behavior is deprecated. Meanwhile, if you do not want this behavior (i.e., you want to force the creation of a new axes), you must use a unique set of args and kwargs. The axes \sphinxstyleemphasis{label} attribute has been exposed for this purpose: if you want two axes that are otherwise identical to be added to the figure, make sure you give them unique labels. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Creating a new full window axes} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creating a new axes with specified dimensions and some kwargs} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{width}\PYG{p}{,} \PYG{n}{height}\PYG{p}{)}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axes}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axes:examples-using-matplotlib-pyplot-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_make\_room\_for\_ylabel\_using\_axesgrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_lasso\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_check\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_radio\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \subparagraph{matplotlib.pyplot.axhline} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axhline:matplotlib-pyplot-axhline}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axhline::doc}}\index{axhline() (in module matplotlib.pyplot)@\spxentry{axhline()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axhline:matplotlib.pyplot.axhline}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axhline}}}{\emph{y=0}, \emph{xmin=0}, \emph{xmax=1}, \emph{**kwargs}}{} Add a horizontal line across the axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar, optional, default: 0{]} y position in data coordinates of the horizontal line. \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}scalar, optional, default: 0{]} Should be between 0 and 1, 0 being the far left of the plot, 1 the far right of the plot. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}scalar, optional, default: 1{]} Should be between 0 and 1, 0 being the far left of the plot, 1 the far right of the plot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Valid kwargs are {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, with the exception of 'transform': \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib.pyplot.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}}}] \leavevmode Add horizontal lines in data coordinates. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib.pyplot.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}}}] \leavevmode Add a horizontal span (rectangle) across the axis. \end{description} \subsubsection*{Examples} \begin{itemize} \item {} draw a thick red hline at 'y' = 0 that spans the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default hline at 'y' = 1 that spans the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{y}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default hline at 'y' = .5 that spans the middle half of the xrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axhline}\PYG{p}{(}\PYG{n}{y}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{xmin}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{xmax}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axhline}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axhline:examples-using-matplotlib-pyplot-axhline}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.axhspan} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib-pyplot-axhspan}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axhspan::doc}}\index{axhspan() (in module matplotlib.pyplot)@\spxentry{axhspan()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib.pyplot.axhspan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axhspan}}}{\emph{ymin}, \emph{ymax}, \emph{xmin=0}, \emph{xmax=1}, \emph{**kwargs}}{} Add a horizontal span (rectangle) across the axis. Draw a horizontal span (rectangle) from \sphinxstyleemphasis{ymin} to \sphinxstyleemphasis{ymax}. With the default values of \sphinxstyleemphasis{xmin} = 0 and \sphinxstyleemphasis{xmax} = 1, this always spans the xrange, regardless of the xlim settings, even if you change them, e.g., with the \sphinxcode{\sphinxupquote{set\_xlim()}} command. That is, the horizontal extent is in axes coords: 0=left, 0.5=middle, 1.0=right but the \sphinxstyleemphasis{y} location is in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}float{]} Lower limit of the horizontal span in data units. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}float{]} Upper limit of the horizontal span in data units. \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}float, optional, default: 0{]} Lower limit of the vertical span in axes (relative 0-1) units. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}float, optional, default: 1{]} Upper limit of the vertical span in axes (relative 0-1) units. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Polygon}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties.{]} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib.pyplot.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}}}] \leavevmode Add a vertical span across the axes. \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axhspan}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:examples-using-matplotlib-pyplot-axhspan}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.axis} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axis:matplotlib-pyplot-axis}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axis::doc}}\index{axis() (in module matplotlib.pyplot)@\spxentry{axis()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axis:matplotlib.pyplot.axis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axis}}}{\emph{*args}, \emph{**kwargs}}{} Convenience method to get or set some axis properties. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{]}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{n}{option}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float, optional{]} The axis limits to be set. Either none or all of the limits must be given. \item[{\sphinxstylestrong{option}}] \leavevmode{[}bool or str{]} If a bool, turns axis lines and labels on or off. If a string, possible values are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'on' & Turn on axis lines and labels. Same as \sphinxcode{\sphinxupquote{True}}. \\ \hline 'off' & Turn off axis lines and labels. Same as \sphinxcode{\sphinxupquote{False}}. \\ \hline 'equal' & Set equal scaling (i.e., make circles circular) by changing axis limits. \\ \hline 'scaled' & Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. \\ \hline 'tight' & Set limits just large enough to show all data. \\ \hline 'auto' & Automatic scaling (fill plot box with data). \\ \hline 'normal' & Same as 'auto'; deprecated. \\ \hline 'image' & 'scaled' with axis limits equal to data limits. \\ \hline 'square' & Square plot; similar to 'scaled', but initially forcing \sphinxcode{\sphinxupquote{xmax-xmin = ymax-ymin}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether observers are notified of the axis limit change. This option is passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float{]} The axis limits. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axis}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axis:examples-using-matplotlib-pyplot-axis}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_autowrap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo\_kw.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_alignment.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_formatstr.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.axvline} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axvline:matplotlib-pyplot-axvline}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axvline::doc}}\index{axvline() (in module matplotlib.pyplot)@\spxentry{axvline()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axvline:matplotlib.pyplot.axvline}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axvline}}}{\emph{x=0}, \emph{ymin=0}, \emph{ymax=1}, \emph{**kwargs}}{} Add a vertical line across the axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar, optional, default: 0{]} x position in data coordinates of the vertical line. \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}scalar, optional, default: 0{]} Should be between 0 and 1, 0 being the bottom of the plot, 1 the top of the plot. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}scalar, optional, default: 1{]} Should be between 0 and 1, 0 being the bottom of the plot, 1 the top of the plot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Valid kwargs are {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, with the exception of 'transform': \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib.pyplot.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}}}] \leavevmode Add vertical lines in data coordinates. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib.pyplot.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}}}] \leavevmode Add a vertical span (rectangle) across the axis. \end{description} \subsubsection*{Examples} \begin{itemize} \item {} draw a thick red vline at \sphinxstyleemphasis{x} = 0 that spans the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default vline at \sphinxstyleemphasis{x} = 1 that spans the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} \item {} draw a default vline at \sphinxstyleemphasis{x} = .5 that spans the middle half of the yrange: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvline}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{o}{.}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{ymin}\PYG{o}{=}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{n}{ymax}\PYG{o}{=}\PYG{l+m+mf}{0.75}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axvline}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axvline:examples-using-matplotlib-pyplot-axvline}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \subparagraph{matplotlib.pyplot.axvspan} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib-pyplot-axvspan}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.axvspan::doc}}\index{axvspan() (in module matplotlib.pyplot)@\spxentry{axvspan()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib.pyplot.axvspan}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{axvspan}}}{\emph{xmin}, \emph{xmax}, \emph{ymin=0}, \emph{ymax=1}, \emph{**kwargs}}{} Add a vertical span (rectangle) across the axes. Draw a vertical span (rectangle) from \sphinxcode{\sphinxupquote{xmin}} to \sphinxcode{\sphinxupquote{xmax}}. With the default values of \sphinxcode{\sphinxupquote{ymin}} = 0 and \sphinxcode{\sphinxupquote{ymax}} = 1. This always spans the yrange, regardless of the ylim settings, even if you change them, e.g., with the \sphinxcode{\sphinxupquote{set\_ylim()}} command. That is, the vertical extent is in axes coords: 0=bottom, 0.5=middle, 1.0=top but the x location is in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin}}] \leavevmode{[}scalar{]} Number indicating the first X-axis coordinate of the vertical span rectangle in data units. \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}scalar{]} Number indicating the second X-axis coordinate of the vertical span rectangle in data units. \item[{\sphinxstylestrong{ymin}}] \leavevmode{[}scalar, optional{]} Number indicating the first Y-axis coordinate of the vertical span rectangle in relative Y-axis units (0-1). Default to 0. \item[{\sphinxstylestrong{ymax}}] \leavevmode{[}scalar, optional{]} Number indicating the second Y-axis coordinate of the vertical span rectangle in relative Y-axis units (0-1). Default to 1. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rectangle}}] \leavevmode{[}matplotlib.patches.Polygon{]} Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax). \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Optional parameters are properties of the class matplotlib.patches.Polygon. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib.pyplot.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}}}] \leavevmode Add a horizontal span across the axes. \end{description} \subsubsection*{Examples} Draw a vertical, green, translucent rectangle from x = 1.25 to x = 1.55 that spans the yrange of the axes. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{axvspan}\PYG{p}{(}\PYG{l+m+mf}{1.25}\PYG{p}{,} \PYG{l+m+mf}{1.55}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.axvspan}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:examples-using-matplotlib-pyplot-axvspan}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.bar} \label{\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib-pyplot-bar}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.bar::doc}}\index{bar() (in module matplotlib.pyplot)@\spxentry{bar()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{bar}}}{\emph{x}, \emph{height}, \emph{width=0.8}, \emph{bottom=None}, \emph{*}, \emph{align='center'}, \emph{data=None}, \emph{**kwargs}}{} Make a bar plot. The bars are positioned at \sphinxstyleemphasis{x} with the given \sphinxstyleemphasis{align}ment. Their dimensions are given by \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}. The vertical baseline is \sphinxstyleemphasis{bottom} (default 0). Each of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{height}, \sphinxstyleemphasis{width}, and \sphinxstyleemphasis{bottom} may either be a scalar applying to all bars, or it may be a sequence of length N providing a separate value for each bar. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}sequence of scalars{]} The x coordinates of the bars. See also \sphinxstyleemphasis{align} for the alignment of the bars to the coordinates. \item[{\sphinxstylestrong{height}}] \leavevmode{[}scalar or sequence of scalars{]} The height(s) of the bars. \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar or array-like, optional{]} The width(s) of the bars (default: 0.8). \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}scalar or array-like, optional{]} The y coordinate(s) of the bars bases (default: 0). \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'edge'\}, optional, default: 'center'{]} Alignment of the bars to the \sphinxstyleemphasis{x} coordinates: \begin{itemize} \item {} 'center': Center the base on the \sphinxstyleemphasis{x} positions. \item {} 'edge': Align the left edges of the bars with the \sphinxstyleemphasis{x} positions. \end{itemize} To align the bars on the right edge pass a negative \sphinxstyleemphasis{width} and \sphinxcode{\sphinxupquote{align='edge'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.BarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BarContainer}}}}}{]} Container with all the bars and optionally errorbars. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar faces. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar edges. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}scalar or array-like, optional{]} Width of the bar edge(s). If 0, don't draw edges. \item[{\sphinxstylestrong{tick\_label}}] \leavevmode{[}string or array-like, optional{]} The tick labels of the bars. Default: None (Use default numeric labels.) \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like of shape(N,) or shape(2,N), optional{]} If not \sphinxstyleemphasis{None}, add horizontal / vertical errorbars to the bar tips. The values are +/- sizes relative to the data: \begin{itemize} \item {} scalar: symmetric +/- values for all bars \item {} shape(N,): symmetric +/- values for each bar \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. (Default) \end{itemize} See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}scalar or array-like, optional, default: 'black'{]} The line color of the errorbars. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional{]} The length of the error bar caps in points. Default: None, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{error\_kw}}] \leavevmode{[}dict, optional{]} Dictionary of kwargs to be passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} method. Values of \sphinxstyleemphasis{ecolor} or \sphinxstyleemphasis{capsize} defined here take precedence over the independent kwargs. \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxstyleemphasis{True}, set the y-axis to be log scale. \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'vertical', 'horizontal'\}, optional{]} \sphinxstyleemphasis{This is for internal use only.} Please use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}} for horizontal bar plots. Default: 'vertical'. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}}}] \leavevmode Plot a horizontal bar plot. \end{description} \subsubsection*{Notes} The optional arguments \sphinxstyleemphasis{color}, \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{linewidth}, \sphinxstyleemphasis{xerr}, and \sphinxstyleemphasis{yerr} can be either scalars or sequences of length equal to the number of bars. This enables you to use bar as the basis for stacked bar charts, or candlestick plots. Detail: \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr} are passed directly to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}, so they can also have shape 2xN for independent specification of lower and upper errors. Other optional kwargs: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.bar}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.bar:examples-using-matplotlib-pyplot-bar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_custom\_ticker1.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.barbs} \label{\detokenize{api/_as_gen/matplotlib.pyplot.barbs:matplotlib-pyplot-barbs}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.barbs::doc}}\index{barbs() (in module matplotlib.pyplot)@\spxentry{barbs()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.barbs:matplotlib.pyplot.barbs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{barbs}}}{\emph{*args}, \emph{data=None}, \emph{**kw}}{} Plot a 2-D field of barbs. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{barb}\PYG{p}{(}\PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \PYG{n}{barb}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}:}] \leavevmode The x and y coordinates of the barb locations (default is head of barb; see \sphinxstyleemphasis{pivot} kwarg) \item[{\sphinxstyleemphasis{U}, \sphinxstyleemphasis{V}:}] \leavevmode Give the x and y components of the barb shaft \item[{\sphinxstyleemphasis{C}:}] \leavevmode An optional array used to map colors to the barbs \end{description} \end{quote} All arguments may be 1-D or 2-D arrays or sequences. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are absent, they will be generated as a uniform grid. If \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V} are 2-D arrays but \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are 1-D, and if \sphinxcode{\sphinxupquote{len(X)}} and \sphinxcode{\sphinxupquote{len(Y)}} match the column and row dimensions of \sphinxstyleemphasis{U}, then \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} will be expanded with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid()}}}. \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V}, \sphinxstyleemphasis{C} may be masked arrays, but masked \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not supported at present. Keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{length}:}] \leavevmode Length of the barb in points; the other parts of the barb are scaled against this. Default is 7. \item[{\sphinxstyleemphasis{pivot}: {[} 'tip' \textbar{} 'middle' \textbar{} float {]}}] \leavevmode The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name \sphinxstyleemphasis{pivot}. Default is 'tip'. Can also be a number, which shifts the start of the barb that many points from the origin. \item[{\sphinxstyleemphasis{barbcolor}: {[} color \textbar{} color sequence {]}}] \leavevmode Specifies the color all parts of the barb except any flags. This parameter is analogous to the \sphinxstyleemphasis{edgecolor} parameter for polygons, which can be used instead. However this parameter will override facecolor. \item[{\sphinxstyleemphasis{flagcolor}: {[} color \textbar{} color sequence {]}}] \leavevmode Specifies the color of any flags on the barb. This parameter is analogous to the \sphinxstyleemphasis{facecolor} parameter for polygons, which can be used instead. However this parameter will override facecolor. If this is not set (and \sphinxstyleemphasis{C} has not either) then \sphinxstyleemphasis{flagcolor} will be set to match \sphinxstyleemphasis{barbcolor} so that the barb has a uniform color. If \sphinxstyleemphasis{C} has been set, \sphinxstyleemphasis{flagcolor} has no effect. \item[{\sphinxstyleemphasis{sizes}:}] \leavevmode A dictionary of coefficients specifying the ratio of a given feature to the length of the barb. Only those values one wishes to override need to be included. These features include: \begin{itemize} \item {} 'spacing' - space between features (flags, full/half barbs) \item {} 'height' - height (distance from shaft to top) of a flag or full barb \item {} 'width' - width of a flag, twice the width of a full barb \item {} 'emptybarb' - radius of the circle used for low magnitudes \end{itemize} \item[{\sphinxstyleemphasis{fill\_empty}:}] \leavevmode A flag on whether the empty barbs (circles) that are drawn should be filled with the flag color. If they are not filled, they will be drawn such that no color is applied to the center. Default is False \item[{\sphinxstyleemphasis{rounding}:}] \leavevmode A flag to indicate whether the vector magnitude should be rounded when allocating barb components. If True, the magnitude is rounded to the nearest multiple of the half-barb increment. If False, the magnitude is simply truncated to the next lowest multiple. Default is True \item[{\sphinxstyleemphasis{barb\_increments}:}] \leavevmode A dictionary of increments specifying values to associate with different parts of the barb. Only those values one wishes to override need to be included. \begin{itemize} \item {} 'half' - half barbs (Default is 5) \item {} 'full' - full barbs (Default is 10) \item {} 'flag' - flags (default is 50) \end{itemize} \item[{\sphinxstyleemphasis{flip\_barb}:}] \leavevmode Either a single boolean flag or an array of booleans. Single boolean indicates whether the lines and flags should point opposite to normal for all barbs. An array (which should be the same size as the other data arrays) indicates whether to flip for each individual barb. Normal behavior is for the barbs and lines to point right (comes from wind barbs having these features point towards low pressure in the Northern Hemisphere.) Default is False \end{description} \end{quote} Barbs are traditionally used in meteorology as a way to plot the speed and direction of wind observations, but can technically be used to plot any two dimensional vector quantity. As opposed to arrows, which give vector magnitude by the length of the arrow, the barbs give more quantitative information about the vector magnitude by putting slanted lines or a triangle for various increments in magnitude, as show schematically below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{:} \PYG{o}{/}\PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{/} \PYGZbs{} \PYGZbs{} \PYGZbs{}\PYGZbs{} \PYG{p}{:} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \end{sphinxVerbatim} The largest increment is given by a triangle (or "flag"). After those come full lines (barbs). The smallest increment is a half line. There is only, of course, ever at most 1 half line. If the magnitude is small and only needs a single half-line and no full lines or triangles, the half-line is offset from the end of the barb so that it can be easily distinguished from barbs with a single full line. The magnitude for the barb shown above would nominally be 65, using the standard increments of 50, 10, and 5. linewidths and edgecolors can be used to customize the barb. Additional {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} keyword arguments: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.barbs}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.barbs:examples-using-matplotlib-pyplot-barbs}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barb\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.barh} \label{\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib-pyplot-barh}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.barh::doc}}\index{barh() (in module matplotlib.pyplot)@\spxentry{barh()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{barh}}}{\emph{y}, \emph{width}, \emph{height=0.8}, \emph{left=None}, \emph{*}, \emph{align='center'}, \emph{**kwargs}}{} Make a horizontal bar plot. The bars are positioned at \sphinxstyleemphasis{y} with the given \sphinxstyleemphasis{align}ment. Their dimensions are given by \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}. The horizontal baseline is \sphinxstyleemphasis{left} (default 0). Each of \sphinxstyleemphasis{y}, \sphinxstyleemphasis{width}, \sphinxstyleemphasis{height}, and \sphinxstyleemphasis{left} may either be a scalar applying to all bars, or it may be a sequence of length N providing a separate value for each bar. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar or array-like{]} The y coordinates of the bars. See also \sphinxstyleemphasis{align} for the alignment of the bars to the coordinates. \item[{\sphinxstylestrong{width}}] \leavevmode{[}scalar or array-like{]} The width(s) of the bars. \item[{\sphinxstylestrong{height}}] \leavevmode{[}sequence of scalars, optional, default: 0.8{]} The heights of the bars. \item[{\sphinxstylestrong{left}}] \leavevmode{[}sequence of scalars{]} The x coordinates of the left sides of the bars (default: 0). \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'edge'\}, optional, default: 'center'{]} Alignment of the base to the \sphinxstyleemphasis{y} coordinates*: \begin{itemize} \item {} 'center': Center the bars on the \sphinxstyleemphasis{y} positions. \item {} 'edge': Align the bottom edges of the bars with the \sphinxstyleemphasis{y} positions. \end{itemize} To align the bars on the top edge pass a negative \sphinxstyleemphasis{height} and \sphinxcode{\sphinxupquote{align='edge'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.BarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BarContainer}}}}}{]} Container with all the bars and optionally errorbars. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar faces. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}scalar or array-like, optional{]} The colors of the bar edges. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}scalar or array-like, optional{]} Width of the bar edge(s). If 0, don't draw edges. \item[{\sphinxstylestrong{tick\_label}}] \leavevmode{[}string or array-like, optional{]} The tick labels of the bars. Default: None (Use default numeric labels.) \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like of shape(N,) or shape(2,N), optional{]} If not \sphinxcode{\sphinxupquote{None}}, add horizontal / vertical errorbars to the bar tips. The values are +/- sizes relative to the data: \begin{itemize} \item {} scalar: symmetric +/- values for all bars \item {} shape(N,): symmetric +/- values for each bar \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. (default) \end{itemize} See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}scalar or array-like, optional, default: 'black'{]} The line color of the errorbars. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional{]} The length of the error bar caps in points. Default: None, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{error\_kw}}] \leavevmode{[}dict, optional{]} Dictionary of kwargs to be passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.errorbar:matplotlib.axes.Axes.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} method. Values of \sphinxstyleemphasis{ecolor} or \sphinxstyleemphasis{capsize} defined here take precedence over the independent kwargs. \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxcode{\sphinxupquote{True}}, set the x-axis to be log scale. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}}}}}}] \leavevmode Plot a vertical bar plot. \end{description} \subsubsection*{Notes} The optional arguments \sphinxstyleemphasis{color}, \sphinxstyleemphasis{edgecolor}, \sphinxstyleemphasis{linewidth}, \sphinxstyleemphasis{xerr}, and \sphinxstyleemphasis{yerr} can be either scalars or sequences of length equal to the number of bars. This enables you to use bar as the basis for stacked bar charts, or candlestick plots. Detail: \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr} are passed directly to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}, so they can also have shape 2xN for independent specification of lower and upper errors. Other optional kwargs: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.bone} \label{\detokenize{api/_as_gen/matplotlib.pyplot.bone:matplotlib-pyplot-bone}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.bone::doc}}\index{bone() (in module matplotlib.pyplot)@\spxentry{bone()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.bone:matplotlib.pyplot.bone}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{bone}}}{}{} Set the colormap to "bone". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.box} \label{\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib-pyplot-box}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.box::doc}}\index{box() (in module matplotlib.pyplot)@\spxentry{box()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib.pyplot.box}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{box}}}{\emph{on=None}}{} Turn the axes box on or off on the current axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{on}}] \leavevmode{[}bool or None{]} The new {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} box state. If \sphinxcode{\sphinxupquote{None}}, toggle the state. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_frame\_on()}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_frame_on:matplotlib.axes.Axes.get_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_frame\_on()}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.pyplot.boxplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib-pyplot-boxplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.boxplot::doc}}\index{boxplot() (in module matplotlib.pyplot)@\spxentry{boxplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{boxplot}}}{\emph{x}, \emph{notch=None}, \emph{sym=None}, \emph{vert=None}, \emph{whis=None}, \emph{positions=None}, \emph{widths=None}, \emph{patch\_artist=None}, \emph{bootstrap=None}, \emph{usermedians=None}, \emph{conf\_intervals=None}, \emph{meanline=None}, \emph{showmeans=None}, \emph{showcaps=None}, \emph{showbox=None}, \emph{showfliers=None}, \emph{boxprops=None}, \emph{labels=None}, \emph{flierprops=None}, \emph{medianprops=None}, \emph{meanprops=None}, \emph{capprops=None}, \emph{whiskerprops=None}, \emph{manage\_ticks=True}, \emph{autorange=False}, \emph{zorder=None}, \emph{*}, \emph{data=None}}{} Make a box and whisker plot. Make a box and whisker plot for each column of \sphinxcode{\sphinxupquote{x}} or each vector in sequence \sphinxcode{\sphinxupquote{x}}. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}Array or a sequence of vectors.{]} The input data. \item[{\sphinxstylestrong{notch}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will produce a notched box plot. Otherwise, a rectangular boxplot is produced. The notches represent the confidence interval (CI) around the median. See the entry for the \sphinxcode{\sphinxupquote{bootstrap}} parameter for information regarding how the locations of the notches are computed. \begin{sphinxadmonition}{note}{Note:} In cases where the values of the CI are less than the lower quartile or greater than the upper quartile, the notches will extend beyond the box, giving it a distinctive "flipped" appearance. This is expected behavior and consistent with other statistical visualization packages. \end{sphinxadmonition} \item[{\sphinxstylestrong{sym}}] \leavevmode{[}str, optional{]} The default symbol for flier points. Enter an empty string ('') if you don't want to show fliers. If \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, then the fliers default to 'b+' If you want more control use the flierprops kwarg. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, optional (True){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (default), makes the boxes vertical. If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}}, everything is drawn horizontally. \item[{\sphinxstylestrong{whis}}] \leavevmode{[}float, sequence, or string (default = 1.5){]} As a float, determines the reach of the whiskers to the beyond the first and third quartiles. In other words, where IQR is the interquartile range (\sphinxcode{\sphinxupquote{Q3-Q1}}), the upper whisker will extend to last datum less than \sphinxcode{\sphinxupquote{Q3 + whis*IQR}}). Similarly, the lower whisker will extend to the first datum greater than \sphinxcode{\sphinxupquote{Q1 - whis*IQR}}. Beyond the whiskers, data are considered outliers and are plotted as individual points. Set this to an unreasonably high value to force the whiskers to show the min and max values. Alternatively, set this to an ascending sequence of percentile (e.g., {[}5, 95{]}) to set the whiskers at specific percentiles of the data. Finally, \sphinxcode{\sphinxupquote{whis}} can be the string \sphinxcode{\sphinxupquote{'range'}} to force the whiskers to the min and max of the data. \item[{\sphinxstylestrong{bootstrap}}] \leavevmode{[}int, optional{]} Specifies whether to bootstrap the confidence intervals around the median for notched boxplots. If \sphinxcode{\sphinxupquote{bootstrap}} is None, no bootstrapping is performed, and notches are calculated using a Gaussian-based asymptotic approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, 1967). Otherwise, bootstrap specifies the number of times to bootstrap the median to determine its 95\% confidence intervals. Values between 1000 and 10000 are recommended. \item[{\sphinxstylestrong{usermedians}}] \leavevmode{[}array-like, optional{]} An array or sequence whose first dimension (or length) is compatible with \sphinxcode{\sphinxupquote{x}}. This overrides the medians computed by matplotlib for each element of \sphinxcode{\sphinxupquote{usermedians}} that is not \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}. When an element of \sphinxcode{\sphinxupquote{usermedians}} is None, the median will be computed by matplotlib as normal. \item[{\sphinxstylestrong{conf\_intervals}}] \leavevmode{[}array-like, optional{]} Array or sequence whose first dimension (or length) is compatible with \sphinxcode{\sphinxupquote{x}} and whose second dimension is 2. When the an element of \sphinxcode{\sphinxupquote{conf\_intervals}} is not None, the notch locations computed by matplotlib are overridden (provided \sphinxcode{\sphinxupquote{notch}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}). When an element of \sphinxcode{\sphinxupquote{conf\_intervals}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, the notches are computed by the method specified by the other kwargs (e.g., \sphinxcode{\sphinxupquote{bootstrap}}). \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, optional{]} Sets the positions of the boxes. The ticks and limits are automatically set to match the positions. Defaults to \sphinxcode{\sphinxupquote{range(1, N+1)}} where N is the number of boxes to be drawn. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}scalar or array-like{]} Sets the width of each box either with a scalar or a sequence. The default is 0.5, or \sphinxcode{\sphinxupquote{0.15*(distance between extreme positions)}}, if that is smaller. \item[{\sphinxstylestrong{patch\_artist}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} produces boxes with the Line2D artist. Otherwise, boxes and drawn with Patch artists. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence, optional{]} Labels for each dataset. Length must be compatible with dimensions of \sphinxcode{\sphinxupquote{x}}. \item[{\sphinxstylestrong{manage\_ticks}}] \leavevmode{[}bool, optional (True){]} If True, the tick locations and labels will be adjusted to match the boxplot positions. \item[{\sphinxstylestrong{autorange}}] \leavevmode{[}bool, optional (False){]} When \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} and the data are distributed such that the 25th and 75th percentiles are equal, \sphinxcode{\sphinxupquote{whis}} is set to \sphinxcode{\sphinxupquote{'range'}} such that the whisker ends are at the minimum and maximum of the data. \item[{\sphinxstylestrong{meanline}}] \leavevmode{[}bool, optional (False){]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}} (and \sphinxcode{\sphinxupquote{showmeans}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}), will try to render the mean as a line spanning the full width of the box according to \sphinxcode{\sphinxupquote{meanprops}} (see below). Not recommended if \sphinxcode{\sphinxupquote{shownotches}} is also True. Otherwise, means will be shown as points. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}scalar, optional (None){]} Sets the zorder of the boxplot. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the boxplot to a list of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} instances created. That dictionary has the following keys (assuming vertical boxplots): \begin{itemize} \item {} \sphinxcode{\sphinxupquote{boxes}}: the main body of the boxplot showing the quartiles and the median's confidence intervals if enabled. \item {} \sphinxcode{\sphinxupquote{medians}}: horizontal lines at the median of each box. \item {} \sphinxcode{\sphinxupquote{whiskers}}: the vertical lines extending to the most extreme, non-outlier data points. \item {} \sphinxcode{\sphinxupquote{caps}}: the horizontal lines at the ends of the whiskers. \item {} \sphinxcode{\sphinxupquote{fliers}}: points representing data that extend beyond the whiskers (fliers). \item {} \sphinxcode{\sphinxupquote{means}}: points or lines representing the means. \end{itemize} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{showcaps}}] \leavevmode{[}bool, optional (True){]} Show the caps on the ends of whiskers. \item[{\sphinxstylestrong{showbox}}] \leavevmode{[}bool, optional (True){]} Show the central box. \item[{\sphinxstylestrong{showfliers}}] \leavevmode{[}bool, optional (True){]} Show the outliers beyond the caps. \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, optional (False){]} Show the arithmetic means. \item[{\sphinxstylestrong{capprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the caps. \item[{\sphinxstylestrong{boxprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the box. \item[{\sphinxstylestrong{whiskerprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the whiskers. \item[{\sphinxstylestrong{flierprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the fliers. \item[{\sphinxstylestrong{medianprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the median. \item[{\sphinxstylestrong{meanprops}}] \leavevmode{[}dict, optional (None){]} Specifies the style of the mean. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.boxplot}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:examples-using-matplotlib-pyplot-boxplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_boxplot\_demo\_pyplot.py} \end{itemize} \subparagraph{matplotlib.pyplot.broken\_barh} \label{\detokenize{api/_as_gen/matplotlib.pyplot.broken_barh:matplotlib-pyplot-broken-barh}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.broken_barh::doc}}\index{broken\_barh() (in module matplotlib.pyplot)@\spxentry{broken\_barh()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.broken_barh:matplotlib.pyplot.broken_barh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{broken\_barh}}}{\emph{xranges}, \emph{yrange}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a horizontal sequence of rectangles. A rectangle is drawn for each element of \sphinxstyleemphasis{xranges}. All rectangles have the same vertical position and size defined by \sphinxstyleemphasis{yrange}. This is a convenience function for instantiating a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}}, adding it to the axes and autoscaling the view. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xranges}}] \leavevmode{[}sequence of tuples (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xwidth}){]} The x-positions and extends of the rectangles. For each tuple (\sphinxstyleemphasis{xmin}, \sphinxstyleemphasis{xwidth}) a rectangle is drawn from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmin} + \sphinxstyleemphasis{xwidth}. \item[{\sphinxstylestrong{yranges}}] \leavevmode{[}(\sphinxstyleemphasis{ymin}, \sphinxstyleemphasis{ymax}){]} The y-position and extend for all the rectangles. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{collection}}] \leavevmode{[}A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.BrokenBarHCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BrokenBarHCollection}}}}} properties{]} Each \sphinxstyleemphasis{kwarg} can be either a single argument applying to all rectangles, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{facecolors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} or a sequence of arguments over which is cycled, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{facecolors}\PYG{o}{=}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} would create interleaving black and blue rectangles. Supported keywords: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.cla} \label{\detokenize{api/_as_gen/matplotlib.pyplot.cla:matplotlib-pyplot-cla}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.cla::doc}}\index{cla() (in module matplotlib.pyplot)@\spxentry{cla()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.cla:matplotlib.pyplot.cla}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{cla}}}{}{} Clear the current axes. \end{fulllineitems} \subparagraph{matplotlib.pyplot.clabel} \label{\detokenize{api/_as_gen/matplotlib.pyplot.clabel:matplotlib-pyplot-clabel}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.clabel::doc}}\index{clabel() (in module matplotlib.pyplot)@\spxentry{clabel()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.clabel:matplotlib.pyplot.clabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{clabel}}}{\emph{CS}, \emph{*args}, \emph{**kwargs}}{} Label a contour plot. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{clabel}\PYG{p}{(}\PYG{n}{cs}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{,}\PYG{p}{]} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Adds labels to line contours in \sphinxstyleemphasis{cs}, where \sphinxstyleemphasis{cs} is a {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}} object returned by \sphinxcode{\sphinxupquote{contour()}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cs}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}{]} The ContourSet to label. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}array-like, optional{]} A list of level values, that should be labeled. The list must be a subset of \sphinxcode{\sphinxupquote{cs.levels}}. If not given, all levels are labeled. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}string or float, optional{]} Size in points or relative size e.g., 'smaller', 'x-large'. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_size}}}}} for accepted string values. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color-spec, optional{]} The label colors: \begin{itemize} \item {} If \sphinxstyleemphasis{None}, the color of each label matches the color of the corresponding contour. \item {} If one string color, e.g., \sphinxstyleemphasis{colors} = 'r' or \sphinxstyleemphasis{colors} = 'red', all labels will be plotted in this color. \item {} If a tuple of matplotlib color args (string, float, rgb, etc), different labels will be plotted in different colors in the order specified. \end{itemize} \item[{\sphinxstylestrong{inline}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}} the underlying contour is removed where the label is placed. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{inline\_spacing}}] \leavevmode{[}float, optional{]} Space in pixels to leave on each side of label when placing inline. Defaults to 5. This spacing will be exact for labels at locations where the contour is straight, less so for labels on curved contours. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}string or dict, optional{]} A format string for the label. Default is '\%1.3f' Alternatively, this can be a dictionary matching contour levels with arbitrary strings to use for each contour level (i.e., fmt{[}level{]}=string), or it can be any callable, such as a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} instance, that returns a string when called with a numeric contour level. \item[{\sphinxstylestrong{manual}}] \leavevmode{[}bool or iterable, optional{]} If \sphinxcode{\sphinxupquote{True}}, contour labels will be placed manually using mouse clicks. Click the first button near a contour to add a label, click the second button (or potentially both mouse buttons at once) to finish adding labels. The third button can be used to remove the last label added, but only if labels are not inline. Alternatively, the keyboard can be used to select label locations (enter to end label placement, delete or backspace act like the third mouse button, and any other key will select a label location). \sphinxstyleemphasis{manual} can also be an iterable object of x,y tuples. Contour labels will be created as if mouse is clicked at each x,y positions. \item[{\sphinxstylestrong{rightside\_up}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, label rotations will always be plus or minus 90 degrees from level. Default is \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{use\_clabeltext}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ClabelText}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ClabelText}}}}} class (instead of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}) is used to create labels. \sphinxcode{\sphinxupquote{ClabelText}} recalculates rotation angles of texts during the drawing time, therefore this can be used if aspect of the axes changes. Default is \sphinxcode{\sphinxupquote{False}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{labels}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.clabel}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.clabel:examples-using-matplotlib-pyplot-clabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.clf} \label{\detokenize{api/_as_gen/matplotlib.pyplot.clf:matplotlib-pyplot-clf}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.clf::doc}}\index{clf() (in module matplotlib.pyplot)@\spxentry{clf()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.clf:matplotlib.pyplot.clf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{clf}}}{}{} Clear the current figure. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.clf}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.clf:examples-using-matplotlib-pyplot-clf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.clim} \label{\detokenize{api/_as_gen/matplotlib.pyplot.clim:matplotlib-pyplot-clim}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.clim::doc}}\index{clim() (in module matplotlib.pyplot)@\spxentry{clim()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.clim:matplotlib.pyplot.clim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{clim}}}{\emph{vmin=None}, \emph{vmax=None}}{} Set the color limits of the current image. If either \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is None, the image min/max respectively will be used for color scaling. If you want to set the clim of multiple images, use {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_clim}}}}} on every image, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{im} \PYG{o+ow}{in} \PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{get\PYGZus{}images}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{im}\PYG{o}{.}\PYG{n}{set\PYGZus{}clim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{matplotlib.pyplot.close} \label{\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib-pyplot-close}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.close::doc}}\index{close() (in module matplotlib.pyplot)@\spxentry{close()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{close}}}{\emph{fig=None}}{} Close a figure window. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}None or int or str or {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The figure to close. There are a number of ways to specify this: \begin{itemize} \item {} \sphinxstyleemphasis{None}: the current figure \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}: the given {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance \item {} \sphinxcode{\sphinxupquote{int}}: a figure number \item {} \sphinxcode{\sphinxupquote{str}}: a figure name \item {} 'all': all figures \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.close}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.close:examples-using-matplotlib-pyplot-close}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pipong.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multipage\_pdf.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multiprocess\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.cohere} \label{\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib-pyplot-cohere}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.cohere::doc}}\index{cohere() (in module matplotlib.pyplot)@\spxentry{cohere()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib.pyplot.cohere}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{cohere}}}{\emph{x}, \emph{y}, \emph{NFFT=256}, \emph{Fs=2}, \emph{Fc=0}, \emph{detrend=\textless{}function detrend\_none at 0x7ff96bc60a60\textgreater{}}, \emph{window=\textless{}function window\_hanning at 0x7ff96bc60400\textgreater{}}, \emph{noverlap=0}, \emph{pad\_to=None}, \emph{sides='default'}, \emph{scale\_by\_freq=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Coherence is the normalized cross spectral density: \begin{equation*} \begin{split}C_{xy} = \frac{|P_{xy}|^2}{P_{xx}P_{yy}}\end{split} \end{equation*}\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between blocks. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Cxy}}] \leavevmode{[}1-D array{]} The coherence vector. \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies for the elements in \sphinxstyleemphasis{Cxy}. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \end{fulllineitems} \subparagraph{matplotlib.pyplot.colorbar} \label{\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib-pyplot-colorbar}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.colorbar::doc}}\index{colorbar() (in module matplotlib.pyplot)@\spxentry{colorbar()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{colorbar}}}{\emph{mappable=None}, \emph{cax=None}, \emph{ax=None}, \emph{**kw}}{} Add a colorbar to a plot. Function signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} interface; all but the first are also method signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{colorbar}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{cax}\PYG{o}{=}\PYG{n}{cax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mappable}}] \leavevmode The {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.ScalarMappable}}}}} (i.e., \sphinxcode{\sphinxupquote{Image}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}, etc.) described by this colorbar. This argument is mandatory for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.colorbar}}}}} method but optional for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.colorbar}}}}} function, which sets the default to the current image. Note that one can create a \sphinxcode{\sphinxupquote{ScalarMappable}} "on-the-fly" to generate colorbars not attached to a previously drawn artist, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{ScalarMappable}\PYG{p}{(}\PYG{n}{norm}\PYG{o}{=}\PYG{n}{norm}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cmap}\PYG{p}{)}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{cax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object, optional{]} Axes into which the colorbar will be drawn. \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, list of Axes, optional{]} Parent axes from which space for a new colorbar axes will be stolen. If a list of axes is given they will all be resized to make room for the colorbar axes. \item[{\sphinxstylestrong{use\_gridspec}}] \leavevmode{[}bool, optional{]} If \sphinxstyleemphasis{cax} is \sphinxcode{\sphinxupquote{None}}, a new \sphinxstyleemphasis{cax} is created as an instance of Axes. If \sphinxstyleemphasis{ax} is an instance of Subplot and \sphinxstyleemphasis{use\_gridspec} is \sphinxcode{\sphinxupquote{True}}, \sphinxstyleemphasis{cax} is created as an instance of Subplot using the {\hyperref[\detokenize{api/gridspec_api:module-matplotlib.gridspec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gridspec}}}}} module. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{colorbar}}] \leavevmode{[}{\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}{]} See also its base class, {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}. Use {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label}}}}} to label the colorbar. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Additional keyword arguments are of two kinds: \begin{quote} axes properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to multiply the size of the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \sphinxstyleemphasis{anchor} & (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; the anchor point of the colorbar axes \\ \hline \sphinxstyleemphasis{panchor} & (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; the anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} colorbar properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{extend} & {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} If not 'neither', make pointed end(s) for out-of- range values. These are set for a given colormap using the colormap set\_under and set\_over methods. \\ \hline \sphinxstyleemphasis{extendfrac} & {[} \sphinxstyleemphasis{None} \textbar{} 'auto' \textbar{} length \textbar{} lengths {]} If set to \sphinxstyleemphasis{None}, both the minimum and maximum triangular colorbar extensions with have a length of 5\% of the interior colorbar length (this is the default setting). If set to 'auto', makes the triangular colorbar extensions the same lengths as the interior boxes (when \sphinxstyleemphasis{spacing} is set to 'uniform') or the same lengths as the respective adjacent interior boxes (when \sphinxstyleemphasis{spacing} is set to 'proportional'). If a scalar, indicates the length of both the minimum and maximum triangular colorbar extensions as a fraction of the interior colorbar length. A two-element sequence of fractions may also be given, indicating the lengths of the minimum and maximum colorbar extensions respectively as a fraction of the interior colorbar length. \\ \hline \sphinxstyleemphasis{extendrect} & bool If \sphinxstyleemphasis{False} the minimum and maximum colorbar extensions will be triangular (the default). If \sphinxstyleemphasis{True} the extensions will be rectangular. \\ \hline \sphinxstyleemphasis{spacing} & {[} 'uniform' \textbar{} 'proportional' {]} Uniform spacing gives each discrete color the same space; proportional makes the space proportional to the data interval. \\ \hline \sphinxstyleemphasis{ticks} & {[} None \textbar{} list of ticks \textbar{} Locator object {]} If None, ticks are determined automatically from the input. \\ \hline \sphinxstyleemphasis{format} & {[} None \textbar{} format string \textbar{} Formatter object {]} If None, the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} is used. If a format string is given, e.g., '\%.3f', that is used. An alternative {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} object may be given instead. \\ \hline \sphinxstyleemphasis{drawedges} & bool Whether to draw lines at color boundaries. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The following will probably be useful only in the context of indexed colors (that is, when the mappable has norm=NoNorm()), or other unusual circumstances. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{boundaries} & None or a sequence \\ \hline \sphinxstyleemphasis{values} & None or a sequence which must be of length 1 less than the sequence of \sphinxstyleemphasis{boundaries}. For each region delimited by adjacent entries in \sphinxstyleemphasis{boundaries}, the color mapped to the corresponding value in values will be used. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \end{quote} If \sphinxstyleemphasis{mappable} is a \sphinxcode{\sphinxupquote{ContourSet}}, its \sphinxstyleemphasis{extend} kwarg is included automatically. The \sphinxstyleemphasis{shrink} kwarg provides a simple way to scale the colorbar with respect to the axes. Note that if \sphinxstyleemphasis{cax} is specified, it determines the size of the colorbar and \sphinxstyleemphasis{shrink} and \sphinxstyleemphasis{aspect} kwargs are ignored. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In this case, do not use any of the axes properties kwargs. It is known that some vector graphics viewers (svg and pdf) renders white gaps between segments of the colorbar. This is due to bugs in the viewers, not Matplotlib. As a workaround, the colorbar can be rendered with overlapping segments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cbar} \PYG{o}{=} \PYG{n}{colorbar}\PYG{p}{(}\PYG{p}{)} \PYG{n}{cbar}\PYG{o}{.}\PYG{n}{solids}\PYG{o}{.}\PYG{n}{set\PYGZus{}edgecolor}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{face}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} However this has negative consequences in other circumstances, e.g. with semi-transparent images (alpha \textless{} 1) and colorbar extensions; therefore, this workaround is not used by default (see issue \#1188). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.colorbar}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:examples-using-matplotlib-pyplot-colorbar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colorbar\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_colorbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/images:sphx-glr-tutorials-introductory-images-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Image tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.connect} \label{\detokenize{api/_as_gen/matplotlib.pyplot.connect:matplotlib-pyplot-connect}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.connect::doc}}\index{connect() (in module matplotlib.pyplot)@\spxentry{connect()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.connect:matplotlib.pyplot.connect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{connect}}}{\emph{s}, \emph{func}}{} Connect event with string \sphinxstyleemphasis{s} to \sphinxstyleemphasis{func}. The signature of \sphinxstyleemphasis{func} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{func}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)} \end{sphinxVerbatim} where event is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.Event}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.Event}}}}}. The following events are recognized \begin{itemize} \item {} 'button\_press\_event' \item {} 'button\_release\_event' \item {} 'draw\_event' \item {} 'key\_press\_event' \item {} 'key\_release\_event' \item {} 'motion\_notify\_event' \item {} 'pick\_event' \item {} 'resize\_event' \item {} 'scroll\_event' \item {} 'figure\_enter\_event', \item {} 'figure\_leave\_event', \item {} 'axes\_enter\_event', \item {} 'axes\_leave\_event' \item {} 'close\_event' \end{itemize} For the location events (button and key press/release), if the mouse is over the axes, the variable \sphinxcode{\sphinxupquote{event.inaxes}} will be set to the {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} the event occurs is over, and additionally, the variables \sphinxcode{\sphinxupquote{event.xdata}} and \sphinxcode{\sphinxupquote{event.ydata}} will be defined. This is the mouse location in data coords. See {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.KeyEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{KeyEvent}}}}} and {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MouseEvent}}}}} for more info. Return value is a connection id that can be used with \sphinxcode{\sphinxupquote{mpl\_disconnect()}}. \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{on\PYGZus{}press}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{you pressed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{button}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{event}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)} \PYG{n}{cid} \PYG{o}{=} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}press}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.connect}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.connect:examples-using-matplotlib-pyplot-connect}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_coords\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_rectangle\_selector.py} \end{itemize} \subparagraph{matplotlib.pyplot.contour} \label{\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib-pyplot-contour}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.contour::doc}}\index{contour() (in module matplotlib.pyplot)@\spxentry{contour()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{contour}}}{\emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot contours. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{contour}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{Z}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array-like, optional{]} The coordinates of the values in \sphinxstyleemphasis{Z}. \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} must both be 2-D with the same shape as \sphinxstyleemphasis{Z} (e.g. created via \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid}}}), or they must both be 1-D such that \sphinxcode{\sphinxupquote{len(X) == M}} is the number of columns in \sphinxstyleemphasis{Z} and \sphinxcode{\sphinxupquote{len(Y) == N}} is the number of rows in \sphinxstyleemphasis{Z}. If not given, they are assumed to be integer indices, i.e. \sphinxcode{\sphinxupquote{X = range(M)}}, \sphinxcode{\sphinxupquote{Y = range(N)}}. \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like(N, M){]} The height values over which the contour is drawn. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}int or array-like, optional{]} Determines the number and positions of the contour lines / regions. If an int \sphinxstyleemphasis{n}, use \sphinxstyleemphasis{n} data intervals; i.e. draw \sphinxstyleemphasis{n+1} contour lines. The level heights are automatically chosen. If array-like, draw contour lines at the specified levels. The values must be in increasing order. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{corner\_mask}}] \leavevmode{[}bool, optional{]} Enable/disable corner masking, which only has an effect if \sphinxstyleemphasis{Z} is a masked array. If \sphinxcode{\sphinxupquote{False}}, any quad touching a masked point is masked out. If \sphinxcode{\sphinxupquote{True}}, only the triangular corners of quads nearest those points are always masked out, other triangular corners comprising three unmasked points are contoured as usual. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.corner\_mask"{]}}}}, which defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color string or sequence of colors, optional{]} The colors of the levels, i.e. the lines for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and the areas for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. The sequence is cycled for the levels in ascending order. If the sequence is shorter than the number of levels, it's repeated. As a shortcut, single color strings may be used in place of one-element lists, i.e. \sphinxcode{\sphinxupquote{'red'}} instead of \sphinxcode{\sphinxupquote{{[}'red'{]}}} to color all levels with the same color. This shortcut does only work for color strings, not for other ways of specifying colors. By default (value \sphinxstyleemphasis{None}), the colormap specified by \sphinxstyleemphasis{cmap} will be used. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. The colormap maps the level values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. If given, \sphinxstyleemphasis{colors} take precedence over \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} If a colormap is used, the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance scales the level values to the canonical colormap range {[}0, 1{]} for mapping to colors. If not given, the default linear scaling is used. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float, optional{]} If not \sphinxstyleemphasis{None}, either or both of these values will be supplied to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance, overriding the default color scaling based on \sphinxstyleemphasis{levels}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'upper', 'lower', 'image'\}, optional{]} Determines the orientation and exact position of \sphinxstyleemphasis{Z} by specifying the position of \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}}. This is only relevant, if \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not given. \begin{itemize} \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0, Y=0 in the lower left corner. \item {} 'lower': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0.5, Y=0.5 in the lower left corner. \item {} 'upper': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=N+0.5, Y=0.5 in the upper left corner. \item {} 'image': Use the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \end{itemize} \item[{\sphinxstylestrong{extent}}] \leavevmode{[}(x0, x1, y0, y1), optional{]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This argument is ignored if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \item[{\sphinxstylestrong{locator}}] \leavevmode{[}ticker.Locator subclass, optional{]} The locator is used to determine the contour levels if they are not given explicitly via \sphinxstyleemphasis{levels}. Defaults to {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}. \item[{\sphinxstylestrong{extend}}] \leavevmode{[}\{'neither', 'both', 'min', 'max'\}, optional, default: 'neither'{]} Determines the \sphinxcode{\sphinxupquote{contourf}}-coloring of values that are outside the \sphinxstyleemphasis{levels} range. If 'neither', values outside the \sphinxstyleemphasis{levels} range are not colored. If 'min', 'max' or 'both', color the values below, above or below and above the \sphinxstyleemphasis{levels} range. Values below \sphinxcode{\sphinxupquote{min(levels)}} and above \sphinxcode{\sphinxupquote{max(levels)}} are mapped to the under/over values of the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}. Note, that most colormaps do not have dedicated colors for these by default, so that the over and under values are the edge values of the colormap. You may want to set these values explicitly using {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_under}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_over}}}}}. \begin{sphinxadmonition}{note}{Note:} An exising {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} does not get notified if properties of its colormap are changed. Therefore, an explicit call \sphinxcode{\sphinxupquote{QuadContourSet.changed()}} is needed after modifying the colormap. The explicit call can be left out, if a colorbar is assigned to the {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} because it internally calls \sphinxcode{\sphinxupquote{QuadContourSet.changed()}}. \end{sphinxadmonition} Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{x}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{h} \PYG{o}{=} \PYG{n}{x} \PYG{o}{*} \PYG{n}{y} \PYG{n}{cs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{contourf}\PYG{p}{(}\PYG{n}{h}\PYG{p}{,} \PYG{n}{levels}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{]}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}808080}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}A0A0A0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}C0C0C0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{changed}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{xunits, yunits}}] \leavevmode{[}registered units, optional{]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \item[{\sphinxstylestrong{antialiased}}] \leavevmode{[}bool, optional{]} Enable antialiasing, overriding the defaults. For filled contours, the default is \sphinxstyleemphasis{True}. For line contours, it is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.antialiased"{]}}}}. \item[{\sphinxstylestrong{Nchunk}}] \leavevmode{[}int \textgreater{}= 0, optional{]} If 0, no subdivision of the domain. Specify a positive integer to divide the domain into subdomains of \sphinxstyleemphasis{nchunk} by \sphinxstyleemphasis{nchunk} quads. Chunking reduces the maximum length of polygons generated by the contouring algorithm which reduces the rendering workload passed on to the backend and also requires slightly less RAM. It can however introduce rendering artifacts at chunk boundaries depending on the backend, the \sphinxstyleemphasis{antialiased} flag and value of \sphinxstyleemphasis{alpha}. \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}float or sequence of float, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. The line width of the contour lines. If a number, all levels will be plotted with this linewidth. If a sequence, the levels in ascending order will be plotted with the linewidths in the order specified. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.linewidth"{]}}}}. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the default is 'solid' unless the lines are monochrome. In that case, negative contours will take their linestyle from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} setting. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. \item[{\sphinxstylestrong{hatches}}] \leavevmode{[}List{[}str{]}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. A list of cross hatch patterns to use on the filled areas. If None, no hatching will be added to the contour. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{enumerate} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.contour}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.contour:examples-using-matplotlib-pyplot-contour}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.contourf} \label{\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib-pyplot-contourf}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.contourf::doc}}\index{contourf() (in module matplotlib.pyplot)@\spxentry{contourf()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{contourf}}}{\emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot contours. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{contour}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{Z}\PYG{p}{,} \PYG{p}{[}\PYG{n}{levels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array-like, optional{]} The coordinates of the values in \sphinxstyleemphasis{Z}. \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} must both be 2-D with the same shape as \sphinxstyleemphasis{Z} (e.g. created via \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.meshgrid.html\#numpy.meshgrid}{\sphinxcode{\sphinxupquote{numpy.meshgrid}}}), or they must both be 1-D such that \sphinxcode{\sphinxupquote{len(X) == M}} is the number of columns in \sphinxstyleemphasis{Z} and \sphinxcode{\sphinxupquote{len(Y) == N}} is the number of rows in \sphinxstyleemphasis{Z}. If not given, they are assumed to be integer indices, i.e. \sphinxcode{\sphinxupquote{X = range(M)}}, \sphinxcode{\sphinxupquote{Y = range(N)}}. \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like(N, M){]} The height values over which the contour is drawn. \item[{\sphinxstylestrong{levels}}] \leavevmode{[}int or array-like, optional{]} Determines the number and positions of the contour lines / regions. If an int \sphinxstyleemphasis{n}, use \sphinxstyleemphasis{n} data intervals; i.e. draw \sphinxstyleemphasis{n+1} contour lines. The level heights are automatically chosen. If array-like, draw contour lines at the specified levels. The values must be in increasing order. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}{\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{corner\_mask}}] \leavevmode{[}bool, optional{]} Enable/disable corner masking, which only has an effect if \sphinxstyleemphasis{Z} is a masked array. If \sphinxcode{\sphinxupquote{False}}, any quad touching a masked point is masked out. If \sphinxcode{\sphinxupquote{True}}, only the triangular corners of quads nearest those points are always masked out, other triangular corners comprising three unmasked points are contoured as usual. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.corner\_mask"{]}}}}, which defaults to \sphinxcode{\sphinxupquote{True}}. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color string or sequence of colors, optional{]} The colors of the levels, i.e. the lines for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} and the areas for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. The sequence is cycled for the levels in ascending order. If the sequence is shorter than the number of levels, it's repeated. As a shortcut, single color strings may be used in place of one-element lists, i.e. \sphinxcode{\sphinxupquote{'red'}} instead of \sphinxcode{\sphinxupquote{{[}'red'{]}}} to color all levels with the same color. This shortcut does only work for color strings, not for other ways of specifying colors. By default (value \sphinxstyleemphasis{None}), the colormap specified by \sphinxstyleemphasis{cmap} will be used. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. The colormap maps the level values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. If given, \sphinxstyleemphasis{colors} take precedence over \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} If a colormap is used, the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance scales the level values to the canonical colormap range {[}0, 1{]} for mapping to colors. If not given, the default linear scaling is used. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float, optional{]} If not \sphinxstyleemphasis{None}, either or both of these values will be supplied to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance, overriding the default color scaling based on \sphinxstyleemphasis{levels}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'upper', 'lower', 'image'\}, optional{]} Determines the orientation and exact position of \sphinxstyleemphasis{Z} by specifying the position of \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}}. This is only relevant, if \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are not given. \begin{itemize} \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0, Y=0 in the lower left corner. \item {} 'lower': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=0.5, Y=0.5 in the lower left corner. \item {} 'upper': \sphinxcode{\sphinxupquote{Z{[}0, 0{]}}} is at X=N+0.5, Y=0.5 in the upper left corner. \item {} 'image': Use the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \end{itemize} \item[{\sphinxstylestrong{extent}}] \leavevmode{[}(x0, x1, y0, y1), optional{]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This argument is ignored if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \item[{\sphinxstylestrong{locator}}] \leavevmode{[}ticker.Locator subclass, optional{]} The locator is used to determine the contour levels if they are not given explicitly via \sphinxstyleemphasis{levels}. Defaults to {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}. \item[{\sphinxstylestrong{extend}}] \leavevmode{[}\{'neither', 'both', 'min', 'max'\}, optional, default: 'neither'{]} Determines the \sphinxcode{\sphinxupquote{contourf}}-coloring of values that are outside the \sphinxstyleemphasis{levels} range. If 'neither', values outside the \sphinxstyleemphasis{levels} range are not colored. If 'min', 'max' or 'both', color the values below, above or below and above the \sphinxstyleemphasis{levels} range. Values below \sphinxcode{\sphinxupquote{min(levels)}} and above \sphinxcode{\sphinxupquote{max(levels)}} are mapped to the under/over values of the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}. Note, that most colormaps do not have dedicated colors for these by default, so that the over and under values are the edge values of the colormap. You may want to set these values explicitly using {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_under}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap.set\_over}}}}}. \begin{sphinxadmonition}{note}{Note:} An exising {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} does not get notified if properties of its colormap are changed. Therefore, an explicit call \sphinxcode{\sphinxupquote{QuadContourSet.changed()}} is needed after modifying the colormap. The explicit call can be left out, if a colorbar is assigned to the {\hyperref[\detokenize{api/contour_api:matplotlib.contour.QuadContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadContourSet}}}}} because it internally calls \sphinxcode{\sphinxupquote{QuadContourSet.changed()}}. \end{sphinxadmonition} Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{x}\PYG{o}{.}\PYG{n}{reshape}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{n}{h} \PYG{o}{=} \PYG{n}{x} \PYG{o}{*} \PYG{n}{y} \PYG{n}{cs} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{contourf}\PYG{p}{(}\PYG{n}{h}\PYG{p}{,} \PYG{n}{levels}\PYG{o}{=}\PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{]}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}808080}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}A0A0A0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsh{}C0C0C0}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{extend}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{both}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}over}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{cmap}\PYG{o}{.}\PYG{n}{set\PYGZus{}under}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{cs}\PYG{o}{.}\PYG{n}{changed}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{xunits, yunits}}] \leavevmode{[}registered units, optional{]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \item[{\sphinxstylestrong{antialiased}}] \leavevmode{[}bool, optional{]} Enable antialiasing, overriding the defaults. For filled contours, the default is \sphinxstyleemphasis{True}. For line contours, it is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.antialiased"{]}}}}. \item[{\sphinxstylestrong{Nchunk}}] \leavevmode{[}int \textgreater{}= 0, optional{]} If 0, no subdivision of the domain. Specify a positive integer to divide the domain into subdomains of \sphinxstyleemphasis{nchunk} by \sphinxstyleemphasis{nchunk} quads. Chunking reduces the maximum length of polygons generated by the contouring algorithm which reduces the rendering workload passed on to the backend and also requires slightly less RAM. It can however introduce rendering artifacts at chunk boundaries depending on the backend, the \sphinxstyleemphasis{antialiased} flag and value of \sphinxstyleemphasis{alpha}. \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}float or sequence of float, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. The line width of the contour lines. If a number, all levels will be plotted with this linewidth. If a sequence, the levels in ascending order will be plotted with the linewidths in the order specified. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"lines.linewidth"{]}}}}. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{\sphinxstyleemphasis{None}, 'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the default is 'solid' unless the lines are monochrome. In that case, negative contours will take their linestyle from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} setting. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. \item[{\sphinxstylestrong{hatches}}] \leavevmode{[}List{[}str{]}, optional{]} \sphinxstyleemphasis{Only applies to} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}}. A list of cross hatch patterns to use on the filled areas. If None, no hatching will be added to the contour. Hatching is supported in the PostScript, PDF, SVG and Agg backends only. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} differs from the MATLAB version in that it does not draw the polygon edges. To draw edges, add line contours with calls to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}}. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{enumerate} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.contourf}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.contourf:examples-using-matplotlib-pyplot-contourf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.cool} \label{\detokenize{api/_as_gen/matplotlib.pyplot.cool:matplotlib-pyplot-cool}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.cool::doc}}\index{cool() (in module matplotlib.pyplot)@\spxentry{cool()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.cool:matplotlib.pyplot.cool}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{cool}}}{}{} Set the colormap to "cool". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.copper} \label{\detokenize{api/_as_gen/matplotlib.pyplot.copper:matplotlib-pyplot-copper}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.copper::doc}}\index{copper() (in module matplotlib.pyplot)@\spxentry{copper()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.copper:matplotlib.pyplot.copper}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{copper}}}{}{} Set the colormap to "copper". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.csd} \label{\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib-pyplot-csd}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.csd::doc}}\index{csd() (in module matplotlib.pyplot)@\spxentry{csd()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{csd}}}{\emph{x}, \emph{y}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{return\_line=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the cross-spectral density. The cross spectral density \(P_{xy}\) by Welch's average periodogram method. The vectors \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The product of the direct FFTs of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are averaged over each segment to compute \(P_{xy}\), with a scaling to correct for power loss due to windowing. If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT} or len(\sphinxstyleemphasis{y}) \textless{} \sphinxstyleemphasis{NFFT}, they will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1-D arrays or sequences{]} Arrays or sequences containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between segments. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{return\_line}}] \leavevmode{[}bool{]} Whether to include the line object plotted in the returned values. Default is False. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxy}}] \leavevmode{[}1-D array{]} The values for the cross spectrum \sphinxcode{\sphinxupquote{P\_\{xy\}}} before scaling (complex valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxy}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. Only returned if \sphinxstyleemphasis{return\_line} is True. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} is the equivalent to setting y=x. \end{description} \subsubsection*{Notes} For plotting, the power is plotted as \(10\log_{10}(P_{xy})\) for decibels, though \sphinxcode{\sphinxupquote{P\_\{xy\}}} itself is returned. \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.delaxes} \label{\detokenize{api/_as_gen/matplotlib.pyplot.delaxes:matplotlib-pyplot-delaxes}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.delaxes::doc}}\index{delaxes() (in module matplotlib.pyplot)@\spxentry{delaxes()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.delaxes:matplotlib.pyplot.delaxes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{delaxes}}}{\emph{ax=None}}{} Remove the \sphinxcode{\sphinxupquote{Axes}} \sphinxstyleemphasis{ax} (defaulting to the current axes) from its figure. A KeyError is raised if the axes doesn't exist. \end{fulllineitems} \subparagraph{matplotlib.pyplot.disconnect} \label{\detokenize{api/_as_gen/matplotlib.pyplot.disconnect:matplotlib-pyplot-disconnect}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.disconnect::doc}}\index{disconnect() (in module matplotlib.pyplot)@\spxentry{disconnect()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.disconnect:matplotlib.pyplot.disconnect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{cid}}{} Disconnect callback id cid \subsubsection*{Examples} Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cid} \PYG{o}{=} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{button\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{on\PYGZus{}press}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}...later} \PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}disconnect}\PYG{p}{(}\PYG{n}{cid}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.disconnect}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.disconnect:examples-using-matplotlib-pyplot-disconnect}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_coords\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.draw} \label{\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib-pyplot-draw}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.draw::doc}}\index{draw() (in module matplotlib.pyplot)@\spxentry{draw()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{draw}}}{}{} Redraw the current figure. This is used to update a figure that has been altered, but not automatically re-drawn. If interactive mode is on ({\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ion()}}}}}), this should be only rarely needed, but there may be ways to modify the state of a figure without marking it as \sphinxcode{\sphinxupquote{stale}}. Please report these cases as bugs. A more object-oriented alternative, given any {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance, \sphinxcode{\sphinxupquote{fig}}, that was created using a {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} function, is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{draw\PYGZus{}idle}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.draw}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.draw:examples-using-matplotlib-pyplot-draw}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_rotate\_axes3d\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_check\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_radio\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \subparagraph{matplotlib.pyplot.errorbar} \label{\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib-pyplot-errorbar}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.errorbar::doc}}\index{errorbar() (in module matplotlib.pyplot)@\spxentry{errorbar()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{errorbar}}}{\emph{x}, \emph{y}, \emph{yerr=None}, \emph{xerr=None}, \emph{fmt=''}, \emph{ecolor=None}, \emph{elinewidth=None}, \emph{capsize=None}, \emph{barsabove=False}, \emph{lolims=False}, \emph{uplims=False}, \emph{xlolims=False}, \emph{xuplims=False}, \emph{errorevery=1}, \emph{capthick=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot y versus x as lines and/or markers with attached errorbars. \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} define the data locations, \sphinxstyleemphasis{xerr}, \sphinxstyleemphasis{yerr} define the errorbar sizes. By default, this draws the data markers/lines as well the errorbars. Use fmt='none' to draw errorbars without any data markers. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}scalar or array-like{]} The data positions. \item[{\sphinxstylestrong{xerr, yerr}}] \leavevmode{[}scalar or array-like, shape(N,) or shape(2,N), optional{]} The errorbar sizes: \begin{itemize} \item {} scalar: Symmetric +/- values for all data points. \item {} shape(N,): Symmetric +/-values for each data point. \item {} \begin{description} \item[{shape(2,N): Separate - and + values for each bar. First row}] \leavevmode contains the lower errors, the second row contains the upper errors. \end{description} \item {} \sphinxstyleemphasis{None}: No errorbar. \end{itemize} Note that all error arrays should have \sphinxstyleemphasis{positive} values. See \DUrole{xref,std,std-doc}{/gallery/statistics/errorbar\_features} for an example on the usage of \sphinxcode{\sphinxupquote{xerr}} and \sphinxcode{\sphinxupquote{yerr}}. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}plot format string, optional, default: ''{]} The format for the data points / data lines. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} for details. Use 'none' (case insensitive) to plot errorbars without any data markers. \item[{\sphinxstylestrong{ecolor}}] \leavevmode{[}mpl color, optional, default: None{]} A matplotlib color arg which gives the color the errorbar lines. If None, use the color of the line connecting the markers. \item[{\sphinxstylestrong{elinewidth}}] \leavevmode{[}scalar, optional, default: None{]} The linewidth of the errorbar lines. If None, the linewidth of the current style is used. \item[{\sphinxstylestrong{capsize}}] \leavevmode{[}scalar, optional, default: None{]} The length of the error bar caps in points. If None, it will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"errorbar.capsize"{]}}}}. \item[{\sphinxstylestrong{capthick}}] \leavevmode{[}scalar, optional, default: None{]} An alias to the keyword argument \sphinxstyleemphasis{markeredgewidth} (a.k.a. \sphinxstyleemphasis{mew}). This setting is a more sensible name for the property that controls the thickness of the error bar cap in points. For backwards compatibility, if \sphinxstyleemphasis{mew} or \sphinxstyleemphasis{markeredgewidth} are given, then they will over-ride \sphinxstyleemphasis{capthick}. This may change in future releases. \item[{\sphinxstylestrong{barsabove}}] \leavevmode{[}bool, optional, default: False{]} If True, will plot the errorbars above the plot symbols. Default is below. \item[{\sphinxstylestrong{lolims, uplims, xlolims, xuplims}}] \leavevmode{[}bool, optional, default: None{]} These arguments can be used to indicate that a value gives only upper/lower limits. In that case a caret symbol is used to indicate this. \sphinxstyleemphasis{lims}-arguments may be of the same type as \sphinxstyleemphasis{xerr} and \sphinxstyleemphasis{yerr}. To use limits with inverted axes, \sphinxcode{\sphinxupquote{set\_xlim()}} or \sphinxcode{\sphinxupquote{set\_ylim()}} must be called before {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar()}}}}}. \item[{\sphinxstylestrong{errorevery}}] \leavevmode{[}positive integer, optional, default: 1{]} Subsamples the errorbars. e.g., if errorevery=5, errorbars for every 5-th datapoint will be plotted. The data plot itself still shows all data points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.ErrorbarContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ErrorbarContainer}}}}}{]} The container contains: \begin{itemize} \item {} plotline: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance of x, y plot markers and/or line. \item {} caplines: A tuple of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instances of the error bar caps. \item {} barlinecols: A tuple of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} with the horizontal and vertical error ranges. \end{itemize} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to the plot command for the markers. For example, this code makes big red squares with thick green edges: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x}\PYG{p}{,}\PYG{n}{y}\PYG{p}{,}\PYG{n}{yerr} \PYG{o}{=} \PYG{n}{rand}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{l+m+mi}{10}\PYG{p}{)} \PYG{n}{errorbar}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{yerr}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{s}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{mfc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{mec}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ms}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{n}{mew}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{mfc}, \sphinxstyleemphasis{mec}, \sphinxstyleemphasis{ms} and \sphinxstyleemphasis{mew} are aliases for the longer property names, \sphinxstyleemphasis{markerfacecolor}, \sphinxstyleemphasis{markeredgecolor}, \sphinxstyleemphasis{markersize} and \sphinxstyleemphasis{markeredgewidth}. Valid kwargs for the marker properties are \sphinxcode{\sphinxupquote{Lines2D}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'xerr', 'y', 'yerr'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.errorbar}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:examples-using-matplotlib-pyplot-errorbar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_limits\_simple.py} \end{itemize} \subparagraph{matplotlib.pyplot.eventplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.eventplot:matplotlib-pyplot-eventplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.eventplot::doc}}\index{eventplot() (in module matplotlib.pyplot)@\spxentry{eventplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.eventplot:matplotlib.pyplot.eventplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{eventplot}}}{\emph{positions}, \emph{orientation='horizontal'}, \emph{lineoffsets=1}, \emph{linelengths=1}, \emph{linewidths=None}, \emph{colors=None}, \emph{linestyles='solid'}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot identical parallel lines at the given positions. \sphinxstyleemphasis{positions} should be a 1D or 2D array-like object, with each row corresponding to a row or column of lines. This type of plot is commonly used in neuroscience for representing neural events, where it is usually called a spike raster, dot raster, or raster plot. However, it is useful in any situation where you wish to show the timing or position of multiple sets of discrete events, such as the arrival times of people to a business on each day of the month or the date of hurricanes each year of the last century. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{positions}}] \leavevmode{[}1D or 2D array-like object{]} Each value is an event. If \sphinxstyleemphasis{positions} is a 2D array-like, each row corresponds to a row or a column of lines (depending on the \sphinxstyleemphasis{orientation} parameter). \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'horizontal', 'vertical'\}, optional{]} Controls the direction of the event collections: \begin{itemize} \item {} 'horizontal' : the lines are arranged horizontally in rows, and are vertical. \item {} 'vertical' : the lines are arranged vertically in columns, and are horizontal. \end{itemize} \item[{\sphinxstylestrong{lineoffsets}}] \leavevmode{[}scalar or sequence of scalars, optional, default: 1{]} The offset of the center of the lines from the origin, in the direction orthogonal to \sphinxstyleemphasis{orientation}. \item[{\sphinxstylestrong{linelengths}}] \leavevmode{[}scalar or sequence of scalars, optional, default: 1{]} The total height of the lines (i.e. the lines stretches from \sphinxcode{\sphinxupquote{lineoffset - linelength/2}} to \sphinxcode{\sphinxupquote{lineoffset + linelength/2}}). \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar, scalar sequence or None, optional, default: None{]} The line width(s) of the event lines, in points. If it is None, defaults to its rcParams setting. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color, sequence of colors or None, optional, default: None{]} The color(s) of the event lines. If it is None, defaults to its rcParams setting. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}str or tuple or a sequence of such values, optional{]} Default is 'solid'. Valid strings are {[}'solid', 'dashed', 'dashdot', 'dotted', '-', '--', '-.', ':'{]}. Dash tuples should be of the form: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} where \sphinxstyleemphasis{onoffseq} is an even length tuple of on and off ink in points. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}optional{]} Other keyword arguments are line collection properties. See {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} for a list of the valid properties. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{list}}] \leavevmode{[}A list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EventCollection}}}}} objects.{]} Contains the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.EventCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EventCollection}}}}} that were added. \end{description} \end{description}\end{quote} \subsubsection*{Notes} For \sphinxstyleemphasis{linelengths}, \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{colors}, and \sphinxstyleemphasis{linestyles}, if only a single value is given, that value is applied to all lines. If an array-like is given, it must have the same length as \sphinxstyleemphasis{positions}, and each value will be applied to the corresponding row of the array. \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{eventplot_demo}.pdf} \end{figure} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'linelengths', 'lineoffsets', 'linestyles', 'linewidths', 'positions'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.figimage} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figimage:matplotlib-pyplot-figimage}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.figimage::doc}}\index{figimage() (in module matplotlib.pyplot)@\spxentry{figimage()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.figimage:matplotlib.pyplot.figimage}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{figimage}}}{\emph{*args}, \emph{**kwargs}}{} Add a non-resampled image to the figure. The image is attached to the lower or upper left corner depending on \sphinxstyleemphasis{origin}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode The image data. This is an array of one of the following shapes: \begin{itemize} \item {} MxN: luminance (grayscale) values \item {} MxNx3: RGB values \item {} MxNx4: RGBA values \end{itemize} \item[{\sphinxstylestrong{xo, yo}}] \leavevmode{[}int{]} The \sphinxstyleemphasis{x}/\sphinxstyleemphasis{y} image offset in pixels. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}None or float{]} The alpha blending value. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}}{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance to map the luminance to the interval {[}0, 1{]}. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}}{]} The colormap to use. Default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar{]} If \sphinxstyleemphasis{norm} is not given, these values set the data limits for the colormap. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}{]} Indicates where the {[}0, 0{]} index of the array is in the upper left or lower left corner of the axes. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}}. \item[{\sphinxstylestrong{resize}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, resize the figure to match the given image size. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/image_api:matplotlib.image.FigureImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.image.FigureImage}}}}}}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} kwargs passed on to {\hyperref[\detokenize{api/image_api:matplotlib.image.FigureImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureImage}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} figimage complements the axes image ({\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}}) which will be resampled to fit the current axes. If you want a resampled image to fill the entire figure, you can define an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} with extent {[}0,0,1,1{]}. Examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{f} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{n}{nx} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{f}\PYG{o}{.}\PYG{n}{get\PYGZus{}figwidth}\PYG{p}{(}\PYG{p}{)} \PYG{o}{*} \PYG{n}{f}\PYG{o}{.}\PYG{n}{dpi}\PYG{p}{)} \PYG{n}{ny} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n}{f}\PYG{o}{.}\PYG{n}{get\PYGZus{}figheight}\PYG{p}{(}\PYG{p}{)} \PYG{o}{*} \PYG{n}{f}\PYG{o}{.}\PYG{n}{dpi}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{random}\PYG{p}{(}\PYG{p}{(}\PYG{n}{ny}\PYG{p}{,} \PYG{n}{nx}\PYG{p}{)}\PYG{p}{)} \PYG{n}{f}\PYG{o}{.}\PYG{n}{figimage}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.figimage}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figimage:examples-using-matplotlib-pyplot-figimage}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_figimage\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.figlegend} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figlegend:matplotlib-pyplot-figlegend}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.figlegend::doc}}\index{figlegend() (in module matplotlib.pyplot)@\spxentry{figlegend()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.figlegend:matplotlib.pyplot.figlegend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{figlegend}}}{\emph{*args}, \emph{**kwargs}}{} Place a legend on the figure. To make a legend from existing artists on every axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figlegend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} To make a legend for a list of lines and labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figlegend}\PYG{p}{(} \PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} These can also be specified by keyword: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{figlegend}\PYG{p}{(} \PYG{n}{handles}\PYG{o}{=}\PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{handles}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of Artists (lines, patches) to be added to the legend. Use this together with \sphinxstyleemphasis{labels}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. The length of handles and labels should be the same in this case. If they are not, they are truncated to the smaller length. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence of strings, optional{]} A list of labels to show next to the artists. Use this together with \sphinxstyleemphasis{handles}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} instance}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str or pair of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.loc"{]}}}} ('best' for axes, 'upper right' for figures){]} The location of the legend. The strings \sphinxcode{\sphinxupquote{'upper left', 'upper right', 'lower left', 'lower right'}} place the legend at the corresponding corner of the axes/figure. The strings \sphinxcode{\sphinxupquote{'upper center', 'lower center', 'center left', 'center right'}} place the legend at the center of the corresponding edge of the axes/figure. The string \sphinxcode{\sphinxupquote{'center'}} places the legend at the center of the axes/figure. The string \sphinxcode{\sphinxupquote{'best'}} places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case \sphinxstyleemphasis{bbox\_to\_anchor} will be ignored). For back-compatibility, \sphinxcode{\sphinxupquote{'center right'}} (but no other location) can also be spelled \sphinxcode{\sphinxupquote{'right'}}, and each "string" locations can also be given as a numeric value: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Location String &\sphinxstyletheadfamily Location Code \\ \hline 'best' & 0 \\ \hline 'upper right' & 1 \\ \hline 'upper left' & 2 \\ \hline 'lower left' & 3 \\ \hline 'lower right' & 4 \\ \hline 'right' & 5 \\ \hline 'center left' & 6 \\ \hline 'center right' & 7 \\ \hline 'lower center' & 8 \\ \hline 'upper center' & 9 \\ \hline 'center' & 10 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}, 2-tuple, or 4-tuple of floats{]} Box that is used to position the legend in conjunction with \sphinxstyleemphasis{loc}. Defaults to \sphinxcode{\sphinxupquote{axes.bbox}} (if called as a method to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}) or \sphinxcode{\sphinxupquote{figure.bbox}} (if {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}). This argument allows arbitrary placement of the legend. Bbox coordinates are interpreted in the coordinate system given by \sphinxcode{\sphinxupquote{bbox\_transform}}, with the default transform Axes or Figure coordinates, depending on which \sphinxcode{\sphinxupquote{legend}} is called. If a 4-tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} is given, then it specifies the bbox \sphinxcode{\sphinxupquote{(x, y, width, height)}} that the legend is placed in. To put the legend in the best location in the bottom right quadrant of the axes (or figure): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{best}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} A 2-tuple \sphinxcode{\sphinxupquote{(x, y)}} places the corner of the legend specified by \sphinxstyleemphasis{loc} at x, y. For example, to put the legend's upper right-hand corner in the center of the axes (or figure) the following keywords can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{ncol}}] \leavevmode{[}integer{]} The number of columns that the legend has. Default is 1. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}None or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} or dict{]} The font properties of the legend. If None (default), the current {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} will be used. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int or float or \{'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only used if \sphinxcode{\sphinxupquote{prop}} is not specified. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} (line). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.numpoints"{]}}}}. \item[{\sphinxstylestrong{scatterpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} (scatter plot). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.scatterpoints"{]}}}}. \item[{\sphinxstylestrong{scatteryoffsets}}] \leavevmode{[}iterable of floats{]} The vertical offset (relative to the font size) for the markers created for a scatter plot legend entry. 0.0 is at the base the legend text, and 1.0 is at the top. To draw all markers at the same height, set to \sphinxcode{\sphinxupquote{{[}0.5{]}}}. Default is \sphinxcode{\sphinxupquote{{[}0.375, 0.5, 0.3125{]}}}. \item[{\sphinxstylestrong{markerscale}}] \leavevmode{[}None or int or float{]} The relative size of legend markers compared with the originally drawn ones. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.markerscale"{]}}}}. \item[{\sphinxstylestrong{markerfirst}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, legend marker is placed to the left of the legend label. If \sphinxstyleemphasis{False}, legend marker is placed to the right of the legend label. Default is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}None or bool{]} Control whether the legend should be drawn on a patch (frame). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.frameon"{]}}}}. \item[{\sphinxstylestrong{fancybox}}] \leavevmode{[}None or bool{]} Control whether round edges should be enabled around the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} which makes up the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fancybox"{]}}}}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}None or bool{]} Control whether to draw a shadow behind the legend. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.shadow"{]}}}}. \item[{\sphinxstylestrong{framealpha}}] \leavevmode{[}None or float{]} Control the alpha transparency of the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.framealpha"{]}}}}. If shadow is activated and \sphinxstyleemphasis{framealpha} is \sphinxcode{\sphinxupquote{None}}, the default value is ignored. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.facecolor"{]}}}}. If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background patch edge color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.edgecolor"{]}}}} If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.edgecolor"{]}}}}. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"expand", None\}{]} If \sphinxcode{\sphinxupquote{mode}} is set to \sphinxcode{\sphinxupquote{"expand"}} the legend will be horizontally expanded to fill the axes area (or \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} if defines the legend's size). \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transform for the bounding box (\sphinxcode{\sphinxupquote{bbox\_to\_anchor}}). For a value of \sphinxcode{\sphinxupquote{None}} (default) the Axes' \sphinxcode{\sphinxupquote{transAxes}} transform will be used. \item[{\sphinxstylestrong{title}}] \leavevmode{[}str or None{]} The legend's title. Default is no title (\sphinxcode{\sphinxupquote{None}}). \item[{\sphinxstylestrong{title\_fontsize: str or None}}] \leavevmode The fontsize of the legend's title. Default is the default fontsize. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float or None{]} The fractional whitespace inside the legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderpad"{]}}}}. \item[{\sphinxstylestrong{labelspacing}}] \leavevmode{[}float or None{]} The vertical space between the legend entries. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.labelspacing"{]}}}}. \item[{\sphinxstylestrong{handlelength}}] \leavevmode{[}float or None{]} The length of the legend handles. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handlelength"{]}}}}. \item[{\sphinxstylestrong{handletextpad}}] \leavevmode{[}float or None{]} The pad between the legend handle and text. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handletextpad"{]}}}}. \item[{\sphinxstylestrong{borderaxespad}}] \leavevmode{[}float or None{]} The pad between the axes and legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderaxespad"{]}}}}. \item[{\sphinxstylestrong{columnspacing}}] \leavevmode{[}float or None{]} The spacing between columns. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.columnspacing"{]}}}}. \item[{\sphinxstylestrong{handler\_map}}] \leavevmode{[}dict or None{]} The custom dictionary mapping instances or types to a legend handler. This \sphinxcode{\sphinxupquote{handler\_map}} updates the default handler map found at {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend.get\_legend\_handler\_map()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Not all kinds of artist are supported by the legend command. See {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for details. \end{fulllineitems} \subparagraph{matplotlib.pyplot.fignum\_exists} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists:matplotlib-pyplot-fignum-exists}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists::doc}}\index{fignum\_exists() (in module matplotlib.pyplot)@\spxentry{fignum\_exists()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists:matplotlib.pyplot.fignum_exists}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{fignum\_exists}}}{\emph{num}}{} Return whether the figure with the given id exists. \end{fulllineitems} \subparagraph{matplotlib.pyplot.figtext} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figtext:matplotlib-pyplot-figtext}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.figtext::doc}}\index{figtext() (in module matplotlib.pyplot)@\spxentry{figtext()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.figtext:matplotlib.pyplot.figtext}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{figtext}}}{\emph{x}, \emph{y}, \emph{s}, \emph{*args}, \emph{**kwargs}}{} Add text to figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} The position to place the text. By default, this is in figure coordinates, floats in {[}0, 1{]}. The coordinate system can be changed using the \sphinxstyleemphasis{transform} keyword. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text string. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dictionary, optional, default: None{]} A dictionary to override the default text properties. If fontdict is None, the defaults are determined by your rc parameters. A property in \sphinxstyleemphasis{kwargs} override the same property in fontdict. \item[{\sphinxstylestrong{withdash}}] \leavevmode{[}boolean, optional, default: False{]} Creates a {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} instance instead of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} Other miscellaneous text parameters. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backgroundcolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox}}}}} & dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontfamily}}}}} or family & \{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontproperties}}}}} or font\_properties & {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} or size & \{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstretch}}}}} or stretch & \{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstyle}}}}} or style & \{'normal', 'italic', 'oblique'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontvariant}}}}} or variant & \{'normal', 'small-caps'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontweight}}}}} or weight & \{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontalalignment}}}}} or ha & \{'center', 'right', 'left'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linespacing}}}}} & float (multiple of font size) \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{multialignment}}}}} or ma & \{'left', 'right', 'center'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation}}}}} & \{angle in degrees, 'vertical', 'horizontal'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation\_mode}}}}} & \{None, 'default', 'anchor'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_usetex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{usetex}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalalignment}}}}} or va & \{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_wrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wrap}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x}}}}} & float \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.text}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.text}}}}}}] \leavevmode \end{description} \end{fulllineitems} \subparagraph{matplotlib.pyplot.figure} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib-pyplot-figure}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.figure::doc}}\index{figure() (in module matplotlib.pyplot)@\spxentry{figure()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{figure}}}{\emph{num=None}, \emph{figsize=None}, \emph{dpi=None}, \emph{facecolor=None}, \emph{edgecolor=None}, \emph{frameon=True}, \emph{FigureClass=\textless{}class 'matplotlib.figure.Figure'\textgreater{}}, \emph{clear=False}, \emph{**kwargs}}{} Create a new figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{num}}] \leavevmode{[}integer or string, optional, default: None{]} If not provided, a new figure will be created, and the figure number will be incremented. The figure objects holds this number in a \sphinxcode{\sphinxupquote{number}} attribute. If num is provided, and a figure with this id already exists, make it active, and returns a reference to it. If this figure does not exists, create it and returns it. If num is a string, the window title will be set to this figure's \sphinxcode{\sphinxupquote{num}}. \item[{\sphinxstylestrong{figsize}}] \leavevmode{[}(float, float), optional, default: None{]} width, height in inches. If not provided, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.figsize"{]}}}} = \sphinxcode{\sphinxupquote{{[}6.4, 4.8{]}}}. \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}integer, optional, default: None{]} resolution of the figure. If not provided, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.dpi"{]}}}} = \sphinxcode{\sphinxupquote{100}}. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}color spec{]} the background color. If not provided, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.facecolor"{]}}}} = \sphinxcode{\sphinxupquote{'w'}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}color spec{]} the border color. If not provided, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.edgecolor"{]}}}} = \sphinxcode{\sphinxupquote{'w'}}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional, default: True{]} If False, suppress drawing the figure frame. \item[{\sphinxstylestrong{FigureClass}}] \leavevmode{[}subclass of {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} Optionally use a custom {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance. \item[{\sphinxstylestrong{clear}}] \leavevmode{[}bool, optional, default: False{]} If True and the figure already exists, then it is cleared. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance returned will also be passed to new\_figure\_manager in the backends, which allows to hook custom {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} classes into the pyplot interface. Additional kwargs will be passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} init function. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If you are creating many figures, make sure you explicitly call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.close()}}}}} on the figures you are not using, because this will enable pyplot to properly clean up the memory. {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rcParams}}}}} defines the default values, which can be modified in the matplotlibrc file. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.figure}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.figure:examples-using-matplotlib-pyplot-figure}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_limits\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_eventcollection\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_markevery\_prop\_cycle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barcode\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_figimage\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_layer\_images.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_align\_labels\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_custom\_figure\_class.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_constrained\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_geo\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_multicolumn.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_nested.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_multiple\_figs\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_bar\_of\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_autowrap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_rotation\_mode.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_dfrac\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fancyarrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_asarray.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_rainbow\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_stix\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_baseline\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_polar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_customize\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_x.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_two\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_1\_subplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_axes\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_mplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_edge\_colorbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_fixed\_size\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_imagegrid\_aspect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_make\_room\_for\_ylabel\_using\_axesgrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_parasite\_simple2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axesgrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axesgrid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axisline\_style.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_parasite\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_ticklabel\_alignment.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_ticklabel\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_direction01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_direction03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisartist1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_anatomy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_firefox.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_mandelbrot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_xkcd.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/double_pendulum_sgskip:sphx-glr-gallery-animation-double-pendulum-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The double pendulum problem}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/dynamic_image:sphx-glr-gallery-animation-dynamic-image-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated image using a precomputed list of images}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-gallery-animation-frame-grabbing-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Frame grabbing}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/rain:sphx-glr-gallery-animation-rain-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Rain simulation}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/random_walk:sphx-glr-gallery-animation-random-walk-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated 3D random walk}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/unchained:sphx-glr-gallery-animation-unchained-py}]{\sphinxcrossref{\DUrole{std,std-ref}{MATPLOTLIB UNCHAINED}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_close\_event.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_agg\_buffer\_to\_array.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_agg\_filter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_hyperlinks\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_logos2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multipage\_pdf.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_patheffect\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_svg\_filter\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_svg\_filter\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_2dcollections3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_3d\_bars.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_bars3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d\_3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contourf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contourf3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_hist3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_lines3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_lorenz\_attractor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_mixed\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_offset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_pathpatch3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_polys3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_quiver3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_rotate\_axes3d\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_scatter3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_subplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_radial.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_text3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_tricontour3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_tricontourf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_trisurf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_trisurf3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_numpy\_logo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_torus.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d\_animation\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_create\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_mri\_with\_eeg.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_links.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_rankine.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_skewt.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spine\_placement\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-formatters.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-locators.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_ellipse\_with\_units.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_histogram\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_toolmanager\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec06.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_cursor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_menu.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/images:sphx-glr-tutorials-introductory-images-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Image tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Artist tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/imshow_extent:sphx-glr-tutorials-intermediate-imshow-extent-py}]{\sphinxcrossref{\DUrole{std,std-ref}{origin and extent in imshow}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-tutorials-advanced-patheffects-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path effects guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colors:sphx-glr-tutorials-colors-colors-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Specifying Colors}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_intro:sphx-glr-tutorials-text-text-intro-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text in Matplotlib Plots}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_props:sphx-glr-tutorials-text-text-props-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text properties and layout}}}} \end{itemize} \subparagraph{matplotlib.pyplot.fill} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fill:matplotlib-pyplot-fill}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill::doc}}\index{fill() (in module matplotlib.pyplot)@\spxentry{fill()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill:matplotlib.pyplot.fill}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{fill}}}{\emph{*args}, \emph{data=None}, \emph{**kwargs}}{} Plot filled polygons. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*args}}] \leavevmode{[}sequence of x, y, {[}color{]}{]} Each polygon is defined by the lists of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} positions of its nodes, optionally followed by a \sphinxstyleemphasis{color} specifier. See {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors}}}}} for supported color specifiers. The standard color cycle is used for polygons without a color specifier. You can plot multiple polygons by providing multiple \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{{[}color{]}} groups. For example, each of the following is legal: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a polygon with default color} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a blue polygon} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} two polygons} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} a blue and a red polygon} \end{sphinxVerbatim} \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{fill}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{signal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{time}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{signal}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{:} \PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}}}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between()}}}}} if you would like to fill the region between two curves. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.fill}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fill:examples-using-matplotlib-pyplot-fill}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_fill\_spiral.py} \end{itemize} \subparagraph{matplotlib.pyplot.fill\_between} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib-pyplot-fill-between}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_between::doc}}\index{fill\_between() (in module matplotlib.pyplot)@\spxentry{fill\_between()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{fill\_between}}}{\emph{x}, \emph{y1}, \emph{y2=0}, \emph{where=None}, \emph{interpolate=False}, \emph{step=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Fill the area between two horizontal curves. The curves are defined by the points (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y1}) and (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y2}). This creates one or multiple polygons describing the filled area. You may exclude some horizontal sections from filling using \sphinxstyleemphasis{where}. By default, the edges connect the given points directly. Use \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{x}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array (length N){]} The x coordinates of the nodes defining the curves. \item[{\sphinxstylestrong{y1}}] \leavevmode{[}array (length N) or scalar{]} The y coordinates of the nodes defining the first curve. \item[{\sphinxstylestrong{y2}}] \leavevmode{[}array (length N) or scalar, optional, default: 0{]} The y coordinates of the nodes defining the second curve. \item[{\sphinxstylestrong{where}}] \leavevmode{[}array of bool (length N), optional, default: None{]} Define \sphinxstyleemphasis{where} to exclude some horizontal regions from being filled. The filled regions are defined by the coordinates \sphinxcode{\sphinxupquote{x{[}where{]}}}. More precisely, fill between \sphinxcode{\sphinxupquote{x{[}i{]}}} and \sphinxcode{\sphinxupquote{x{[}i+1{]}}} if \sphinxcode{\sphinxupquote{where{[}i{]} and where{[}i+1{]}}}. Note that this definition implies that an isolated \sphinxstyleemphasis{True} value between two \sphinxstyleemphasis{False} values in \sphinxstyleemphasis{where} will not result in filling. Both sides of the \sphinxstyleemphasis{True} position remain unfilled due to the adjacent \sphinxstyleemphasis{False} values. \item[{\sphinxstylestrong{interpolate}}] \leavevmode{[}bool, optional{]} This option is only relevant if \sphinxstyleemphasis{where} is used and the two curves are crossing each other. Semantically, \sphinxstyleemphasis{where} is often used for \sphinxstyleemphasis{y1} \textgreater{} \sphinxstyleemphasis{y2} or similar. By default, the nodes of the polygon defining the filled region will only be placed at the positions in the \sphinxstyleemphasis{x} array. Such a polygon cannot describe the above semantics close to the intersection. The x-sections containing the intersection are simply clipped. Setting \sphinxstyleemphasis{interpolate} to \sphinxstyleemphasis{True} will calculate the actual intersection point and extend the filled region up to this point. \item[{\sphinxstylestrong{step}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional{]} Define \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{x}. The value determines where the step will occur: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} containing the plotted polygons. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}. They control the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx:matplotlib.pyplot.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx}}}}}}] \leavevmode Fill between two sets of x-values. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'where', 'x', 'y1', 'y2'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.fill\_between}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:examples-using-matplotlib-pyplot-fill-between}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \subparagraph{matplotlib.pyplot.fill\_betweenx} \label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx:matplotlib-pyplot-fill-betweenx}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx::doc}}\index{fill\_betweenx() (in module matplotlib.pyplot)@\spxentry{fill\_betweenx()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx:matplotlib.pyplot.fill_betweenx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{fill\_betweenx}}}{\emph{y}, \emph{x1}, \emph{x2=0}, \emph{where=None}, \emph{step=None}, \emph{interpolate=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Fill the area between two vertical curves. The curves are defined by the points (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y}) and (\sphinxstyleemphasis{x2}, \sphinxstyleemphasis{y}). This creates one or multiple polygons describing the filled area. You may exclude some vertical sections from filling using \sphinxstyleemphasis{where}. By default, the edges connect the given points directly. Use \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{y}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}array (length N){]} The y coordinates of the nodes defining the curves. \item[{\sphinxstylestrong{x1}}] \leavevmode{[}array (length N) or scalar{]} The x coordinates of the nodes defining the first curve. \item[{\sphinxstylestrong{x2}}] \leavevmode{[}array (length N) or scalar, optional, default: 0{]} The x coordinates of the nodes defining the second curve. \item[{\sphinxstylestrong{where}}] \leavevmode{[}array of bool (length N), optional, default: None{]} Define \sphinxstyleemphasis{where} to exclude some vertical regions from being filled. The filled regions are defined by the coordinates \sphinxcode{\sphinxupquote{y{[}where{]}}}. More precisely, fill between \sphinxcode{\sphinxupquote{y{[}i{]}}} and \sphinxcode{\sphinxupquote{y{[}i+1{]}}} if \sphinxcode{\sphinxupquote{where{[}i{]} and where{[}i+1{]}}}. Note that this definition implies that an isolated \sphinxstyleemphasis{True} value between two \sphinxstyleemphasis{False} values in \sphinxstyleemphasis{where} will not result in filling. Both sides of the \sphinxstyleemphasis{True} position remain unfilled due to the adjacent \sphinxstyleemphasis{False} values. \item[{\sphinxstylestrong{interpolate}}] \leavevmode{[}bool, optional{]} This option is only relevant if \sphinxstyleemphasis{where} is used and the two curves are crossing each other. Semantically, \sphinxstyleemphasis{where} is often used for \sphinxstyleemphasis{x1} \textgreater{} \sphinxstyleemphasis{x2} or similar. By default, the nodes of the polygon defining the filled region will only be placed at the positions in the \sphinxstyleemphasis{y} array. Such a polygon cannot describe the above semantics close to the intersection. The y-sections containing the intersection are simply clipped. Setting \sphinxstyleemphasis{interpolate} to \sphinxstyleemphasis{True} will calculate the actual intersection point and extend the filled region up to this point. \item[{\sphinxstylestrong{step}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional{]} Define \sphinxstyleemphasis{step} if the filling should be a step function, i.e. constant in between \sphinxstyleemphasis{y}. The value determines where the step will occur: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} containing the plotted polygons. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}. They control the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Polygon:matplotlib.patches.Polygon}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Polygon}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}}}] \leavevmode Fill between two sets of y-values. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'where', 'x1', 'x2', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.findobj} \label{\detokenize{api/_as_gen/matplotlib.pyplot.findobj:matplotlib-pyplot-findobj}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.findobj::doc}}\index{findobj() (in module matplotlib.pyplot)@\spxentry{findobj()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.findobj:matplotlib.pyplot.findobj}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{findobj}}}{\emph{o=None}, \emph{match=None}, \emph{include\_self=True}}{} Find artist objects. Recursively find all {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} instances contained in the artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{match}}] \leavevmode A filter criterion for the matches. This can be \begin{itemize} \item {} \sphinxstyleemphasis{None}: Return all objects contained in artist. \item {} A function with signature \sphinxcode{\sphinxupquote{def match(artist: Artist) -\textgreater{} bool}}. The result will only contain artists for which the function returns \sphinxstyleemphasis{True}. \item {} A class instance: e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}. The result will only contain artists of this class or its subclasses (\sphinxcode{\sphinxupquote{isinstance}} check). \end{itemize} \item[{\sphinxstylestrong{include\_self}}] \leavevmode{[}bool{]} Include \sphinxstyleemphasis{self} in the list to be checked for a match. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.flag} \label{\detokenize{api/_as_gen/matplotlib.pyplot.flag:matplotlib-pyplot-flag}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.flag::doc}}\index{flag() (in module matplotlib.pyplot)@\spxentry{flag()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.flag:matplotlib.pyplot.flag}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{flag}}}{}{} Set the colormap to "flag". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.gca} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gca:matplotlib-pyplot-gca}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.gca::doc}}\index{gca() (in module matplotlib.pyplot)@\spxentry{gca()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.gca:matplotlib.pyplot.gca}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{gca}}}{\emph{**kwargs}}{} Get the current {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance on the current figure matching the given keyword args, or create one. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure.gca}}}}}}] \leavevmode The figure's gca method. \end{description} \subsubsection*{Examples} To get the current polar axes on the current figure: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} If the current axes doesn't exist, or isn't a polar one, the appropriate axes will be created and then returned. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.gca}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gca:examples-using-matplotlib-pyplot-gca}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_multiple\_figs\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_rainbow\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_alignment.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation\_relative\_to\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_set\_and\_get.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_hinton\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.gcf} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib-pyplot-gcf}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.gcf::doc}}\index{gcf() (in module matplotlib.pyplot)@\spxentry{gcf()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib.pyplot.gcf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{gcf}}}{}{} Get the current figure. If no current figure exists, a new one is created using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.gcf}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gcf:examples-using-matplotlib-pyplot-gcf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.gci} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gci:matplotlib-pyplot-gci}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.gci::doc}}\index{gci() (in module matplotlib.pyplot)@\spxentry{gci()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.gci:matplotlib.pyplot.gci}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{gci}}}{}{} Get the current colorable artist. Specifically, returns the current {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} instance (image or patch collection), or \sphinxstyleemphasis{None} if no images or patch collections have been defined. The commands {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figimage:matplotlib.pyplot.figimage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figimage()}}}}} create \sphinxcode{\sphinxupquote{Image}} instances, and the commands {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter()}}}}} create {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} instances. The current image is an attribute of the current axes, or the nearest earlier axes in the current figure that contains an image. \subsubsection*{Notes} Historically, the only colorable artists were images; hence the name \sphinxcode{\sphinxupquote{gci}} (get current image). \end{fulllineitems} \subparagraph{matplotlib.pyplot.get\_current\_fig\_manager} \label{\detokenize{api/_as_gen/matplotlib.pyplot.get_current_fig_manager:matplotlib-pyplot-get-current-fig-manager}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_current_fig_manager::doc}}\index{get\_current\_fig\_manager() (in module matplotlib.pyplot)@\spxentry{get\_current\_fig\_manager()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_current_fig_manager:matplotlib.pyplot.get_current_fig_manager}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{get\_current\_fig\_manager}}}{}{} Return the figure manager of the current figure. The figure manager is a container for the actual backend-depended window that displays the figure on screen. If if no current figure exists, a new one is created an its figure manager is returned. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{manager}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureManagerBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureManagerBase}}}}} or backend-dependent subclass thereof{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.get\_current\_fig\_manager}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.get_current_fig_manager:examples-using-matplotlib-pyplot-get-current-fig-manager}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_agg\_buffer.py} \end{itemize} \subparagraph{matplotlib.pyplot.get\_figlabels} \label{\detokenize{api/_as_gen/matplotlib.pyplot.get_figlabels:matplotlib-pyplot-get-figlabels}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_figlabels::doc}}\index{get\_figlabels() (in module matplotlib.pyplot)@\spxentry{get\_figlabels()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_figlabels:matplotlib.pyplot.get_figlabels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{get\_figlabels}}}{}{} Return a list of existing figure labels. \end{fulllineitems} \subparagraph{matplotlib.pyplot.get\_fignums} \label{\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums:matplotlib-pyplot-get-fignums}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums::doc}}\index{get\_fignums() (in module matplotlib.pyplot)@\spxentry{get\_fignums()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums:matplotlib.pyplot.get_fignums}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{get\_fignums}}}{}{} Return a list of existing figure numbers. \end{fulllineitems} \subparagraph{matplotlib.pyplot.get\_plot\_commands} \label{\detokenize{api/_as_gen/matplotlib.pyplot.get_plot_commands:matplotlib-pyplot-get-plot-commands}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_plot_commands::doc}}\index{get\_plot\_commands() (in module matplotlib.pyplot)@\spxentry{get\_plot\_commands()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.get_plot_commands:matplotlib.pyplot.get_plot_commands}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{get\_plot\_commands}}}{}{} Get a sorted list of all of the plotting commands. \end{fulllineitems} \subparagraph{matplotlib.pyplot.ginput} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ginput:matplotlib-pyplot-ginput}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ginput::doc}}\index{ginput() (in module matplotlib.pyplot)@\spxentry{ginput()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ginput:matplotlib.pyplot.ginput}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ginput}}}{\emph{*args}, \emph{**kwargs}}{} Blocking call to interact with a figure. Wait until the user clicks \sphinxstyleemphasis{n} times on the figure, and return the coordinates of each click in a list. There are three possible interactions: \begin{itemize} \item {} Add a point. \item {} Remove the most recently added point. \item {} Stop the interaction and return the points added so far. \end{itemize} The actions are assigned to mouse buttons via the arguments \sphinxstyleemphasis{mouse\_add}, \sphinxstyleemphasis{mouse\_pop} and \sphinxstyleemphasis{mouse\_stop}. Mouse buttons are defined by the numbers: \begin{itemize} \item {} 1: left mouse button \item {} 2: middle mouse button \item {} 3: right mouse button \item {} None: no mouse button \end{itemize} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{n}}] \leavevmode{[}int, optional, default: 1{]} Number of mouse clicks to accumulate. If negative, accumulate clicks until the input is terminated manually. \item[{\sphinxstylestrong{timeout}}] \leavevmode{[}scalar, optional, default: 30{]} Number of seconds to wait before timing out. If zero or negative will never timeout. \item[{\sphinxstylestrong{show\_clicks}}] \leavevmode{[}bool, optional, default: False{]} If True, show a red cross at the location of each click. \item[{\sphinxstylestrong{mouse\_add}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 1 (left click){]} Mouse button used to add points. \item[{\sphinxstylestrong{mouse\_pop}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 3 (right click){]} Mouse button used to remove the most recently added point. \item[{\sphinxstylestrong{mouse\_stop}}] \leavevmode{[}\{1, 2, 3, None\}, optional, default: 2 (middle click){]} Mouse button used to stop input. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}list of tuples{]} A list of the clicked (x, y) coordinates. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The keyboard can also be used to select points in case your mouse does not have one or more of the buttons. The delete and backspace keys act like right clicking (i.e., remove last point), the enter key terminates input and any other key (not already used by the window manager) selects a point. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.ginput}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ginput:examples-using-matplotlib-pyplot-ginput}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.gray} \label{\detokenize{api/_as_gen/matplotlib.pyplot.gray:matplotlib-pyplot-gray}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.gray::doc}}\index{gray() (in module matplotlib.pyplot)@\spxentry{gray()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.gray:matplotlib.pyplot.gray}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{gray}}}{}{} Set the colormap to "gray". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.grid} \label{\detokenize{api/_as_gen/matplotlib.pyplot.grid:matplotlib-pyplot-grid}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.grid::doc}}\index{grid() (in module matplotlib.pyplot)@\spxentry{grid()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.grid:matplotlib.pyplot.grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{grid}}}{\emph{b=None}, \emph{which='major'}, \emph{axis='both'}, \emph{**kwargs}}{} Configure the grid lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool or None, optional{]} Whether to show the grid lines. If any \sphinxstyleemphasis{kwargs} are supplied, it is assumed you want the grid on and \sphinxstyleemphasis{b} will be set to True. If \sphinxstyleemphasis{b} is \sphinxstyleemphasis{None} and there are no \sphinxstyleemphasis{kwargs}, this toggles the visibility of the lines. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}, optional{]} The grid lines to apply the changes on. \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} The axis to apply the changes on. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties{]} Define the line properties of the grid, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{grid}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \end{sphinxVerbatim} Valid \sphinxstyleemphasis{kwargs} are \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \subsubsection*{Notes} The axis is drawn as a unit, so the effective zorder for drawing the grid is determined by the zorder of each axis, not by the zorder of the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects comprising the grid. Therefore, to set grid zorder, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_axisbelow}}}}} or, for more control, call the {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.set_zorder:matplotlib.axis.Axis.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_zorder}}}}} method of each axis. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.grid}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.grid:examples-using-matplotlib-pyplot-grid}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_geo\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_skewt.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.hexbin} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hexbin:matplotlib-pyplot-hexbin}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hexbin::doc}}\index{hexbin() (in module matplotlib.pyplot)@\spxentry{hexbin()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hexbin:matplotlib.pyplot.hexbin}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hexbin}}}{\emph{x}, \emph{y}, \emph{C=None}, \emph{gridsize=100}, \emph{bins=None}, \emph{xscale='linear'}, \emph{yscale='linear'}, \emph{extent=None}, \emph{cmap=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{alpha=None}, \emph{linewidths=None}, \emph{edgecolors='face'}, \emph{reduce\_C\_function=\textless{}function mean at 0x7ff96ffe86a8\textgreater{}}, \emph{mincnt=None}, \emph{marginals=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Make a hexagonal binning plot. Make a hexagonal binning plot of \sphinxstyleemphasis{x} versus \sphinxstyleemphasis{y}, where \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are 1-D sequences of the same length, \sphinxstyleemphasis{N}. If \sphinxstyleemphasis{C} is \sphinxstyleemphasis{None} (the default), this is a histogram of the number of occurrences of the observations at (x{[}i{]},y{[}i{]}). If \sphinxstyleemphasis{C} is specified, it specifies values at the coordinate (x{[}i{]}, y{[}i{]}). These values are accumulated for each hexagonal bin and then reduced according to \sphinxstyleemphasis{reduce\_C\_function}, which defaults to \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html\#numpy.mean}{\sphinxcode{\sphinxupquote{numpy.mean}}}. (If \sphinxstyleemphasis{C} is specified, it must also be a 1-D sequence of the same length as \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}.) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array or masked array{]} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array or masked array, optional, default is \sphinxstyleemphasis{None}{]} \item[{\sphinxstylestrong{gridsize}}] \leavevmode{[}int or (int, int), optional, default is 100{]} The number of hexagons in the \sphinxstyleemphasis{x}-direction, default is 100. The corresponding number of hexagons in the \sphinxstyleemphasis{y}-direction is chosen such that the hexagons are approximately regular. Alternatively, gridsize can be a tuple with two elements specifying the number of hexagons in the \sphinxstyleemphasis{x}-direction and the \sphinxstyleemphasis{y}-direction. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}'log' or int or sequence, optional, default is \sphinxstyleemphasis{None}{]} If \sphinxstyleemphasis{None}, no binning is applied; the color of each hexagon directly corresponds to its count value. If 'log', use a logarithmic scale for the color map. Internally, \(log_{10}(i+1)\) is used to determine the hexagon color. If an integer, divide the counts in the specified number of bins, and color the hexagons accordingly. If a sequence of values, the values of the lower bound of the bins to be used. \item[{\sphinxstylestrong{xscale}}] \leavevmode{[}\{'linear', 'log'\}, optional, default is 'linear'{]} Use a linear or log10 scale on the horizontal axis. \item[{\sphinxstylestrong{yscale}}] \leavevmode{[}\{'linear', 'log'\}, optional, default is 'linear'{]} Use a linear or log10 scale on the vertical axis. \item[{\sphinxstylestrong{mincnt}}] \leavevmode{[}int \textgreater{} 0, optional, default is \sphinxstyleemphasis{None}{]} If not \sphinxstyleemphasis{None}, only display cells with more than \sphinxstyleemphasis{mincnt} number of points in the cell \item[{\sphinxstylestrong{marginals}}] \leavevmode{[}bool, optional, default is \sphinxstyleemphasis{False}{]} if marginals is \sphinxstyleemphasis{True}, plot the marginal density as colormapped rectangles along the bottom of the x-axis and left of the y-axis \item[{\sphinxstylestrong{extent}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} The limits of the bins. The default assigns the limits based on \sphinxstyleemphasis{gridsize}, \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{xscale} and \sphinxstyleemphasis{yscale}. If \sphinxstyleemphasis{xscale} or \sphinxstyleemphasis{yscale} is set to 'log', the limits are expected to be the exponent for a power of 10. E.g. for x-limits of 1 and 50 in 'linear' scale and y-limits of 10 and 1000 in 'log' scale, enter (1, 50, 1, 3). Order of scalars is (left, right, bottom, top). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{polycollection}] \leavevmode A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} instance; use {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection.get_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection.get\_array}}}}} on this to get the counts in each hexagon. If \sphinxstyleemphasis{marginals} is \sphinxstyleemphasis{True}, horizontal bar and vertical bar (both PolyCollections) will be attached to the return collection as attributes \sphinxstyleemphasis{hbar} and \sphinxstyleemphasis{vbar}. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}object, optional, default is \sphinxstyleemphasis{None}{]} a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance. If \sphinxstyleemphasis{None}, defaults to rc \sphinxcode{\sphinxupquote{image.cmap}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}object, optional, default is \sphinxstyleemphasis{None}{]} {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance is used to scale luminance data to 0,1. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are used in conjunction with \sphinxstyleemphasis{norm} to normalize luminance data. If \sphinxstyleemphasis{None}, the min and max of the color array \sphinxstyleemphasis{C} are used. Note if you pass a norm instance your settings for \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} will be ignored. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar between 0 and 1, optional, default is \sphinxstyleemphasis{None}{]} the alpha value for the patches \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar, optional, default is \sphinxstyleemphasis{None}{]} If \sphinxstyleemphasis{None}, defaults to 1.0. \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'face', 'none', \sphinxstyleemphasis{None}\} or color, optional{]} If 'face' (the default), draws the edges in the same color as the fill color. If 'none', no edge is drawn; this can sometimes lead to unsightly unpainted pixels between the hexagons. If \sphinxstyleemphasis{None}, draws outlines in the default color. If a matplotlib color arg, draws outlines in the specified color. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The standard descriptions of all the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} parameters: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.hist} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib-pyplot-hist}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hist::doc}}\index{hist() (in module matplotlib.pyplot)@\spxentry{hist()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hist}}}{\emph{x}, \emph{bins=None}, \emph{range=None}, \emph{density=None}, \emph{weights=None}, \emph{cumulative=False}, \emph{bottom=None}, \emph{histtype='bar'}, \emph{align='mid'}, \emph{orientation='vertical'}, \emph{rwidth=None}, \emph{log=False}, \emph{color=None}, \emph{label=None}, \emph{stacked=False}, \emph{normed=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a histogram. Compute and draw the histogram of \sphinxstyleemphasis{x}. The return value is a tuple (\sphinxstyleemphasis{n}, \sphinxstyleemphasis{bins}, \sphinxstyleemphasis{patches}) or ({[}\sphinxstyleemphasis{n0}, \sphinxstyleemphasis{n1}, ...{]}, \sphinxstyleemphasis{bins}, {[}\sphinxstyleemphasis{patches0}, \sphinxstyleemphasis{patches1},...{]}) if the input contains multiple data. See the documentation of the \sphinxstyleemphasis{weights} parameter to draw a histogram of already-binned data. Multiple data can be provided via \sphinxstyleemphasis{x} as a list of datasets of potentially different length ({[}\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{x1}, ...{]}), or as a 2-D ndarray in which each column is a dataset. Note that the ndarray form is transposed relative to the list form. Masked arrays are not supported at present. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}(n,) array or sequence of (n,) arrays{]} Input values, this takes either a single array or a sequence of arrays which are not required to be of the same length. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}int or sequence or str, optional{]} If an integer is given, \sphinxcode{\sphinxupquote{bins + 1}} bin edges are calculated and returned, consistent with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html\#numpy.histogram}{\sphinxcode{\sphinxupquote{numpy.histogram}}}. If \sphinxcode{\sphinxupquote{bins}} is a sequence, gives bin edges, including left edge of first bin and right edge of last bin. In this case, \sphinxcode{\sphinxupquote{bins}} is returned unmodified. All but the last (righthand-most) bin is half-open. In other words, if \sphinxcode{\sphinxupquote{bins}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{]} \end{sphinxVerbatim} then the first bin is \sphinxcode{\sphinxupquote{{[}1, 2)}} (including 1, but excluding 2) and the second \sphinxcode{\sphinxupquote{{[}2, 3)}}. The last bin, however, is \sphinxcode{\sphinxupquote{{[}3, 4{]}}}, which \sphinxstyleemphasis{includes} 4. Unequally spaced bins are supported if \sphinxstyleemphasis{bins} is a sequence. With Numpy 1.11 or newer, you can alternatively provide a string describing a binning strategy, such as 'auto', 'sturges', 'fd', 'doane', 'scott', 'rice' or 'sqrt', see \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html\#numpy.histogram}{\sphinxcode{\sphinxupquote{numpy.histogram}}}. The default is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"hist.bins"{]}}}}. \item[{\sphinxstylestrong{range}}] \leavevmode{[}tuple or None, optional{]} The lower and upper range of the bins. Lower and upper outliers are ignored. If not provided, \sphinxstyleemphasis{range} is \sphinxcode{\sphinxupquote{(x.min(), x.max())}}. Range has no effect if \sphinxstyleemphasis{bins} is a sequence. If \sphinxstyleemphasis{bins} is a sequence or \sphinxstyleemphasis{range} is specified, autoscaling is based on the specified bin range instead of the range of x. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{density}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, the first element of the return tuple will be the counts normalized to form a probability density, i.e., the area (or integral) under the histogram will sum to 1. This is achieved by dividing the count by the number of observations times the bin width and not dividing by the total number of observations. If \sphinxstyleemphasis{stacked} is also \sphinxcode{\sphinxupquote{True}}, the sum of the histograms is normalized to 1. Default is \sphinxcode{\sphinxupquote{None}} for both \sphinxstyleemphasis{normed} and \sphinxstyleemphasis{density}. If either is set, then that value will be used. If neither are set, then the args will be treated as \sphinxcode{\sphinxupquote{False}}. If both \sphinxstyleemphasis{density} and \sphinxstyleemphasis{normed} are set an error is raised. \item[{\sphinxstylestrong{weights}}] \leavevmode{[}(n, ) array\_like or None, optional{]} An array of weights, of the same shape as \sphinxstyleemphasis{x}. Each value in \sphinxstyleemphasis{x} only contributes its associated weight towards the bin count (instead of 1). If \sphinxstyleemphasis{normed} or \sphinxstyleemphasis{density} is \sphinxcode{\sphinxupquote{True}}, the weights are normalized, so that the integral of the density over the range remains 1. Default is \sphinxcode{\sphinxupquote{None}}. This parameter can be used to draw a histogram of data that has already been binned, e.g. using \sphinxcode{\sphinxupquote{np.histogram}} (by treating each bin as a single point with a weight equal to its count) \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{counts}\PYG{p}{,} \PYG{n}{bins} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{histogram}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{hist}\PYG{p}{(}\PYG{n}{bins}\PYG{p}{[}\PYG{p}{:}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{bins}\PYG{p}{,} \PYG{n}{weights}\PYG{o}{=}\PYG{n}{counts}\PYG{p}{)} \end{sphinxVerbatim} (or you may alternatively use {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar()}}}}}). \item[{\sphinxstylestrong{cumulative}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, then a histogram is computed where each bin gives the counts in that bin plus all bins for smaller values. The last bin gives the total number of datapoints. If \sphinxstyleemphasis{normed} or \sphinxstyleemphasis{density} is also \sphinxcode{\sphinxupquote{True}} then the histogram is normalized such that the last bin equals 1. If \sphinxstyleemphasis{cumulative} evaluates to less than 0 (e.g., -1), the direction of accumulation is reversed. In this case, if \sphinxstyleemphasis{normed} and/or \sphinxstyleemphasis{density} is also \sphinxcode{\sphinxupquote{True}}, then the histogram is normalized such that the first bin equals 1. Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}array\_like, scalar, or None{]} Location of the bottom baseline of each bin. If a scalar, the base line for each bin is shifted by the same amount. If an array, each bin is shifted independently and the length of bottom must match the number of bins. If None, defaults to 0. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{histtype}}] \leavevmode{[}\{'bar', 'barstacked', 'step', 'stepfilled'\}, optional{]} The type of histogram to draw. \begin{itemize} \item {} 'bar' is a traditional bar-type histogram. If multiple data are given the bars are arranged side by side. \item {} 'barstacked' is a bar-type histogram where multiple data are stacked on top of each other. \item {} 'step' generates a lineplot that is by default unfilled. \item {} 'stepfilled' generates a lineplot that is by default filled. \end{itemize} Default is 'bar' \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'left', 'mid', 'right'\}, optional{]} Controls how the histogram is plotted. \begin{itemize} \item {} 'left': bars are centered on the left bin edges. \item {} 'mid': bars are centered between the bin edges. \item {} 'right': bars are centered on the right bin edges. \end{itemize} Default is 'mid' \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'horizontal', 'vertical'\}, optional{]} If 'horizontal', {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}} will be used for bar-type histograms and the \sphinxstyleemphasis{bottom} kwarg will be the left edges. \item[{\sphinxstylestrong{rwidth}}] \leavevmode{[}scalar or None, optional{]} The relative width of the bars as a fraction of the bin width. If \sphinxcode{\sphinxupquote{None}}, automatically compute the width. Ignored if \sphinxstyleemphasis{histtype} is 'step' or 'stepfilled'. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{log}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, the histogram axis will be set to a log scale. If \sphinxstyleemphasis{log} is \sphinxcode{\sphinxupquote{True}} and \sphinxstyleemphasis{x} is a 1D array, empty bins will be filtered out and only the non-empty \sphinxcode{\sphinxupquote{(n, bins, patches)}} will be returned. Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or array\_like of colors or None, optional{]} Color spec or sequence of color specs, one per dataset. Default (\sphinxcode{\sphinxupquote{None}}) uses the standard line color sequence. Default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str or None, optional{]} String, or sequence of strings to match multiple datasets. Bar charts yield multiple patches per dataset, but only the first gets the label, so that the legend command will work as expected. default is \sphinxcode{\sphinxupquote{None}} \item[{\sphinxstylestrong{stacked}}] \leavevmode{[}bool, optional{]} If \sphinxcode{\sphinxupquote{True}}, multiple data are stacked on top of each other If \sphinxcode{\sphinxupquote{False}} multiple data are arranged side by side if histtype is 'bar' or on top of each other if histtype is 'step' Default is \sphinxcode{\sphinxupquote{False}} \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional{]} Deprecated; use the density keyword argument instead. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{n}}] \leavevmode{[}array or list of arrays{]} The values of the histogram bins. See \sphinxstyleemphasis{density} and \sphinxstyleemphasis{weights} for a description of the possible semantics. If input \sphinxstyleemphasis{x} is an array, then this is an array of length \sphinxstyleemphasis{nbins}. If input is a sequence of arrays \sphinxcode{\sphinxupquote{{[}data1, data2,..{]}}}, then this is a list of arrays with the values of the histograms for each of the arrays in the same order. The dtype of the array \sphinxstyleemphasis{n} (or of its element arrays) will always be float even if no weighting or normalization is used. \item[{\sphinxstylestrong{bins}}] \leavevmode{[}array{]} The edges of the bins. Length nbins + 1 (nbins left edges and right edge of last bin). Always a single array even when multiple data sets are passed in. \item[{\sphinxstylestrong{patches}}] \leavevmode{[}list or list of lists{]} Silent list of individual patches used to create the histogram or list of such list if multiple input datasets. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} properties{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:matplotlib.pyplot.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist2d}}}}}}] \leavevmode 2D histograms \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'weights', 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.hist}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hist:examples-using-matplotlib-pyplot-hist}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_histogram\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/images:sphx-glr-tutorials-introductory-images-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Image tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.hist2d} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:matplotlib-pyplot-hist2d}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hist2d::doc}}\index{hist2d() (in module matplotlib.pyplot)@\spxentry{hist2d()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:matplotlib.pyplot.hist2d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hist2d}}}{\emph{x}, \emph{y}, \emph{bins=10}, \emph{range=None}, \emph{density=False}, \emph{weights=None}, \emph{cmin=None}, \emph{cmax=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Make a 2D histogram plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array\_like, shape (n, ){]} Input values \item[{\sphinxstylestrong{bins}}] \leavevmode{[}None or int or {[}int, int{]} or array\_like or {[}array, array{]}{]} The bin specification: \begin{itemize} \item {} If int, the number of bins for the two dimensions (nx=ny=bins). \item {} If \sphinxcode{\sphinxupquote{{[}int, int{]}}}, the number of bins in each dimension (nx, ny = bins). \item {} If array\_like, the bin edges for the two dimensions (x\_edges=y\_edges=bins). \item {} If \sphinxcode{\sphinxupquote{{[}array, array{]}}}, the bin edges in each dimension (x\_edges, y\_edges = bins). \end{itemize} The default value is 10. \item[{\sphinxstylestrong{range}}] \leavevmode{[}array\_like shape(2, 2), optional, default: None{]} The leftmost and rightmost edges of the bins along each dimension (if not specified explicitly in the bins parameters): \sphinxcode{\sphinxupquote{{[}{[}xmin, xmax{]}, {[}ymin, ymax{]}{]}}}. All values outside of this range will be considered outliers and not tallied in the histogram. \item[{\sphinxstylestrong{density}}] \leavevmode{[}bool, optional, default: False{]} Normalize histogram. \sphinxstyleemphasis{normed} is a deprecated synonym for this parameter. \item[{\sphinxstylestrong{weights}}] \leavevmode{[}array\_like, shape (n, ), optional, default: None{]} An array of values w\_i weighing each sample (x\_i, y\_i). \item[{\sphinxstylestrong{cmin}}] \leavevmode{[}scalar, optional, default: None{]} All bins that has count less than cmin will not be displayed and these count values in the return value count histogram will also be set to nan upon return \item[{\sphinxstylestrong{cmax}}] \leavevmode{[}scalar, optional, default: None{]} All bins that has count more than cmax will not be displayed (set to none before passing to imshow) and these count values in the return value count histogram will also be set to nan upon return \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{h}}] \leavevmode{[}2D array{]} The bi-dimensional histogram of samples x and y. Values in x are histogrammed along the first dimension and values in y are histogrammed along the second dimension. \item[{\sphinxstylestrong{xedges}}] \leavevmode{[}1D array{]} The bin edges along the x axis. \item[{\sphinxstylestrong{yedges}}] \leavevmode{[}1D array{]} The bin edges along the y axis. \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}Colormap or str, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Colormap}}}}} instance. If not set, use rc settings. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize, optional{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize}}}}} instance is used to scale luminance data to \sphinxcode{\sphinxupquote{{[}0, 1{]}}}. If not set, defaults to {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize()}}}}}. \item[{\sphinxstylestrong{vmin/vmax}}] \leavevmode{[}None or scalar, optional{]} Arguments passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}\sphinxcode{\sphinxupquote{0 \textless{}= scalar \textless{}= 1}} or \sphinxcode{\sphinxupquote{None}}, optional{]} The alpha blending value. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist}}}}}}] \leavevmode 1D histogram plotting \end{description} \subsubsection*{Notes} \begin{itemize} \item {} Currently \sphinxcode{\sphinxupquote{hist2d}} calculates it's own axis limits, and any limits previously set are ignored. \item {} Rendering the histogram with a logarithmic color scale is accomplished by passing a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LogNorm:matplotlib.colors.LogNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.LogNorm}}}}} instance to the \sphinxstyleemphasis{norm} keyword argument. Likewise, power-law normalization (similar in effect to gamma correction) can be accomplished with {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.PowerNorm:matplotlib.colors.PowerNorm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.PowerNorm}}}}}. \end{itemize} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'weights', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.hist2d}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:examples-using-matplotlib-pyplot-hist2d}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_power\_norm.py} \end{itemize} \subparagraph{matplotlib.pyplot.hlines} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib-pyplot-hlines}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hlines::doc}}\index{hlines() (in module matplotlib.pyplot)@\spxentry{hlines()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib.pyplot.hlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hlines}}}{\emph{y}, \emph{xmin}, \emph{xmax}, \emph{colors='k'}, \emph{linestyles='solid'}, \emph{label=''}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot horizontal lines at each \sphinxstyleemphasis{y} from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmax}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}scalar or sequence of scalar{]} y-indexes where to plot the lines. \item[{\sphinxstylestrong{xmin, xmax}}] \leavevmode{[}scalar or 1D array\_like{]} Respective beginning and end of each line. If scalars are provided, all lines will have same length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like of colors, optional, default: 'k'{]} \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \item[{\sphinxstylestrong{label}}] \leavevmode{[}string, optional, default: ''{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} properties.{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib.pyplot.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}}}] \leavevmode vertical lines \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhline:matplotlib.pyplot.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline}}}}}}] \leavevmode horizontal line across the axes \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'xmax', 'xmin', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.hot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hot:matplotlib-pyplot-hot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hot::doc}}\index{hot() (in module matplotlib.pyplot)@\spxentry{hot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hot:matplotlib.pyplot.hot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hot}}}{}{} Set the colormap to "hot". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.hsv} \label{\detokenize{api/_as_gen/matplotlib.pyplot.hsv:matplotlib-pyplot-hsv}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.hsv::doc}}\index{hsv() (in module matplotlib.pyplot)@\spxentry{hsv()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.hsv:matplotlib.pyplot.hsv}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{hsv}}}{}{} Set the colormap to "hsv". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.imread} \label{\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib-pyplot-imread}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.imread::doc}}\index{imread() (in module matplotlib.pyplot)@\spxentry{imread()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib.pyplot.imread}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{imread}}}{\emph{fname}, \emph{format=None}}{} Read an image from a file into an array. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or file-like{]} The image file to read. This can be a filename, a URL or a Python file-like object opened in read-binary mode. \item[{\sphinxstylestrong{format}}] \leavevmode{[}str, optional{]} The image file format assumed for reading the data. If not given, the format is deduced from the filename. If nothing can be deduced, PNG is tried. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{imagedata}}] \leavevmode{[}\sphinxcode{\sphinxupquote{numpy.array}}{]} The image data. The returned array has shape \begin{itemize} \item {} (M, N) for grayscale images. \item {} (M, N, 3) for RGB images. \item {} (M, N, 4) for RGBA images. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Matplotlib can only read PNGs natively. Further image formats are supported via the optional dependency on Pillow. Note, URL strings are not compatible with Pillow. Check the \sphinxhref{http://pillow.readthedocs.io/en/latest/}{Pillow documentation} for more information. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.imread}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.imread:examples-using-matplotlib-pyplot-imread}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_watermark\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_annotation\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_ribbon\_box.py} \end{itemize} \subparagraph{matplotlib.pyplot.imsave} \label{\detokenize{api/_as_gen/matplotlib.pyplot.imsave:matplotlib-pyplot-imsave}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.imsave::doc}}\index{imsave() (in module matplotlib.pyplot)@\spxentry{imsave()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.imsave:matplotlib.pyplot.imsave}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{imsave}}}{\emph{fname}, \emph{arr}, \emph{**kwargs}}{} Save an array as an image file. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or PathLike file-like{]} A path or a Python file-like object to store the image in. If \sphinxstyleemphasis{format} is not set, then the output format is inferred from the extension of \sphinxstyleemphasis{fname}, if any, and from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.format"{]}}}} otherwise. If \sphinxstyleemphasis{format} is set, it determines the output format. \item[{\sphinxstylestrong{arr}}] \leavevmode{[}array-like{]} The image data. The shape can be one of MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA). \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} set the color scaling for the image by fixing the values that map to the colormap color limits. If either \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} is None, that limit is determined from the \sphinxstyleemphasis{arr} min/max value. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps scalar data to colors. It is ignored for RGB(A) data. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}} ('viridis'). \item[{\sphinxstylestrong{format}}] \leavevmode{[}str, optional{]} The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this is unset is documented under \sphinxstyleemphasis{fname}. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Indicates whether the \sphinxcode{\sphinxupquote{(0, 0)}} index of the array is in the upper left or lower left corner of the axes. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} ('upper'). \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}int{]} The DPI to store in the metadata of the file. This does not affect the resolution of the output image. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.imshow} \label{\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib-pyplot-imshow}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.imshow::doc}}\index{imshow() (in module matplotlib.pyplot)@\spxentry{imshow()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{imshow}}}{\emph{X}, \emph{cmap=None}, \emph{norm=None}, \emph{aspect=None}, \emph{interpolation=None}, \emph{alpha=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{origin=None}, \emph{extent=None}, \emph{shape=\textless{}deprecated parameter\textgreater{}}, \emph{filternorm=1}, \emph{filterrad=4.0}, \emph{imlim=\textless{}deprecated parameter\textgreater{}}, \emph{resample=None}, \emph{url=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Display an image, i.e. data on a 2D regular raster. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X}}] \leavevmode{[}array-like or PIL image{]} The image data. Supported array shapes are: \begin{itemize} \item {} (M, N): an image with scalar data. The data is visualized using a colormap. \item {} (M, N, 3): an image with RGB values (0-1 float or 0-255 int). \item {} (M, N, 4): an image with RGBA values (0-1 float or 0-255 int), i.e. including transparency. \end{itemize} The first two dimensions (M, N) define the rows and columns of the image. Out-of-range RGB(A) values are clipped. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} The Colormap instance or registered colormap name used to map scalar data to colors. This parameter is ignored for RGB(A) data. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The \sphinxcode{\sphinxupquote{Normalize}} instance used to scale scalar data to the {[}0, 1{]} range before mapping to colors using \sphinxstyleemphasis{cmap}. By default, a linear scaling mapping the lowest value to 0 and the highest to 1 is used. This parameter is ignored for RGB(A) data. \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}\{'equal', 'auto'\} or float, optional{]} Controls the aspect ratio of the axes. The aspect is of particular relevance for images since it may distort the image, i.e. pixel will not be square. This parameter is a shortcut for explicitly calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}}. See there for further details. \begin{itemize} \item {} 'equal': Ensures an aspect ratio of 1. Pixels will be square (unless pixel sizes are explicitly made non-square in data coordinates using \sphinxstyleemphasis{extent}). \item {} 'auto': The axes is kept fixed and the aspect is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. \end{itemize} If not given, use \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.aspect"{]}}}} (default: 'equal'). \item[{\sphinxstylestrong{interpolation}}] \leavevmode{[}str, optional{]} The interpolation method used. If \sphinxstyleemphasis{None} \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.interpolation"{]}}}} is used, which defaults to 'nearest'. Supported values are 'none', 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', 'lanczos'. If \sphinxstyleemphasis{interpolation} is 'none', then no interpolation is performed on the Agg, ps, pdf and svg backends. Other backends will fall back to 'nearest'. Note that most SVG renders perform interpolation at rendering and that the default interpolation method they implement may differ. See \DUrole{xref,std,std-doc}{/gallery/images\_contours\_and\_fields/interpolation\_methods} for an overview of the supported interpolation methods. Some interpolation methods require an additional radius parameter, which can be set by \sphinxstyleemphasis{filterrad}. Additionally, the antigrain image resize filter is controlled by the parameter \sphinxstyleemphasis{filternorm}. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional{]} The alpha blending value, between 0 (transparent) and 1 (opaque). This parameter is ignored for RGBA input data. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional{]} When using scalar data and no explicit \sphinxstyleemphasis{norm}, \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} define the data range that the colormap covers. By default, the colormap covers the complete value range of the supplied data. \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} are ignored if the \sphinxstyleemphasis{norm} parameter is used. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Place the {[}0,0{]} index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} is used, defaulting to 'upper'. Note that the vertical axes points upward for 'lower' but downward for 'upper'. \item[{\sphinxstylestrong{extent}}] \leavevmode{[}scalars (left, right, bottom, top), optional{]} The bounding box in data coordinates that the image will fill. The image is stretched individually along x and y to fill the box. The default extent is determined by the following conditions. Pixels have unit size in data coordinates. Their centers are on integer coordinates, and their center coordinates range from 0 to columns-1 horizontally and from 0 to rows-1 vertically. Note that the direction of the vertical axis and thus the default values for top and bottom depend on \sphinxstyleemphasis{origin}: \begin{itemize} \item {} For \sphinxcode{\sphinxupquote{origin == 'upper'}} the default is \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, numrows-0.5, -0.5)}}. \item {} For \sphinxcode{\sphinxupquote{origin == 'lower'}} the default is \sphinxcode{\sphinxupquote{(-0.5, numcols-0.5, -0.5, numrows-0.5)}}. \end{itemize} See the example {\hyperref[\detokenize{tutorials/intermediate/imshow_extent::doc}]{\sphinxcrossref{\DUrole{doc}{origin and extent in imshow}}}} for a more detailed description. \item[{\sphinxstylestrong{filternorm}}] \leavevmode{[}bool, optional, default: True{]} A parameter for the antigrain image resize filter (see the antigrain documentation). If \sphinxstyleemphasis{filternorm} is set, the filter normalizes integer values and corrects the rounding errors. It doesn't do anything with the source floating point values, it corrects only integers according to the rule of 1.0 which means that any sum of pixel weights must be equal to 1.0. So, the filter function must produce a graph of the proper shape. \item[{\sphinxstylestrong{filterrad}}] \leavevmode{[}float \textgreater{} 0, optional, default: 4.0{]} The filter radius for filters that have a radius parameter, i.e. when interpolation is one of: 'sinc', 'lanczos' or 'blackman'. \item[{\sphinxstylestrong{resample}}] \leavevmode{[}bool, optional{]} When \sphinxstyleemphasis{True}, use a full resampling method. When \sphinxstyleemphasis{False}, only resample when the output image is larger than the input image. \item[{\sphinxstylestrong{url}}] \leavevmode{[}str, optional{]} Set the url of the created {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}. See {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.set\_url}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} properties{]} These parameters are passed on to the constructor of the {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} artist. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.matshow:matplotlib.pyplot.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matshow}}}}}}] \leavevmode Plot a matrix or an array as an image. \end{description} \subsubsection*{Notes} Unless \sphinxstyleemphasis{extent} is used, pixel centers will be located at integer coordinates. In other words: the origin will coincide with the center of pixel (0, 0). There are two common representations for RGB images with an alpha channel: \begin{itemize} \item {} Straight (unassociated) alpha: R, G, and B channels represent the color of the pixel, disregarding its opacity. \item {} Premultiplied (associated) alpha: R, G, and B channels represent the color of the pixel, adjusted for its opacity by multiplication. \end{itemize} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} expects RGB images adopting the straight (unassociated) alpha representation. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.imshow}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.imshow:examples-using-matplotlib-pyplot-imshow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_affine\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barcode\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_interpolation\_methods.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_layer\_images.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_shading\_example.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colorbar\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/dynamic_image:sphx-glr-gallery-animation-dynamic-image-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated image using a precomputed list of images}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_hyperlinks\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/images:sphx-glr-tutorials-introductory-images-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Image tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.inferno} \label{\detokenize{api/_as_gen/matplotlib.pyplot.inferno:matplotlib-pyplot-inferno}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.inferno::doc}}\index{inferno() (in module matplotlib.pyplot)@\spxentry{inferno()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.inferno:matplotlib.pyplot.inferno}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{inferno}}}{}{} Set the colormap to "inferno". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.install\_repl\_displayhook} \label{\detokenize{api/_as_gen/matplotlib.pyplot.install_repl_displayhook:matplotlib-pyplot-install-repl-displayhook}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.install_repl_displayhook::doc}}\index{install\_repl\_displayhook() (in module matplotlib.pyplot)@\spxentry{install\_repl\_displayhook()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.install_repl_displayhook:matplotlib.pyplot.install_repl_displayhook}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{install\_repl\_displayhook}}}{}{} Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl. This works both with IPython and with vanilla python shells. \end{fulllineitems} \subparagraph{matplotlib.pyplot.ioff} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib-pyplot-ioff}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ioff::doc}}\index{ioff() (in module matplotlib.pyplot)@\spxentry{ioff()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib.pyplot.ioff}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ioff}}}{}{} Turn the interactive mode off. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.ioff}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ioff:examples-using-matplotlib-pyplot-ioff}} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.ion} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib-pyplot-ion}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ion::doc}}\index{ion() (in module matplotlib.pyplot)@\spxentry{ion()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ion}}}{}{} Turn the interactive mode on. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.ion}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ion:examples-using-matplotlib-pyplot-ion}} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.isinteractive} \label{\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive:matplotlib-pyplot-isinteractive}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive::doc}}\index{isinteractive() (in module matplotlib.pyplot)@\spxentry{isinteractive()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive:matplotlib.pyplot.isinteractive}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{isinteractive}}}{}{} Return the status of interactive mode. \end{fulllineitems} \subparagraph{matplotlib.pyplot.jet} \label{\detokenize{api/_as_gen/matplotlib.pyplot.jet:matplotlib-pyplot-jet}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.jet::doc}}\index{jet() (in module matplotlib.pyplot)@\spxentry{jet()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.jet:matplotlib.pyplot.jet}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{jet}}}{}{} Set the colormap to "jet". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.legend} \label{\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib-pyplot-legend}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.legend::doc}}\index{legend() (in module matplotlib.pyplot)@\spxentry{legend()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{legend}}}{\emph{*args}, \emph{**kwargs}}{} Place a legend on the axes. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \PYG{n}{legend}\PYG{p}{(}\PYG{n}{labels}\PYG{p}{)} \PYG{n}{legend}\PYG{p}{(}\PYG{n}{handles}\PYG{p}{,} \PYG{n}{labels}\PYG{p}{)} \end{sphinxVerbatim} The call signatures correspond to three different ways how to use this method. \sphinxstylestrong{1. Automatic detection of elements to be shown in the legend} The elements to be added to the legend are automatically determined, when you do not pass in any extra arguments. In this case, the labels are taken from the artist. You can specify them either at artist creation or by calling the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label()}}}}} method on the artist: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Inline label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{line}\PYG{o}{.}\PYG{n}{set\PYGZus{}label}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Label via method}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Specific lines can be excluded from the automatic legend element selection by defining a label starting with an underscore. This is default for all artists, so calling \sphinxcode{\sphinxupquote{Axes.legend}} without any arguments and without setting the labels manually will result in no legend being drawn. \sphinxstylestrong{2. Labeling existing plot elements} To make a legend for lines which already exist on the axes (via plot for instance), simply call this function with an iterable of strings, one for each legend item. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{legend}\PYG{p}{(}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A simple line}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Note: This way of using is discouraged, because the relation between plot elements and labels is only implicit by their order and can easily be mixed up. \sphinxstylestrong{3. Explicitly defining the elements in the legend} For full control of which artists have a legend entry, it is possible to pass an iterable of legend artists followed by an iterable of legend labels respectively: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{legend}\PYG{p}{(}\PYG{p}{(}\PYG{n}{line1}\PYG{p}{,} \PYG{n}{line2}\PYG{p}{,} \PYG{n}{line3}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label3}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{handles}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of Artists (lines, patches) to be added to the legend. Use this together with \sphinxstyleemphasis{labels}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. The length of handles and labels should be the same in this case. If they are not, they are truncated to the smaller length. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}sequence of strings, optional{]} A list of labels to show next to the artists. Use this together with \sphinxstyleemphasis{handles}, if you need full control on what is shown in the legend and the automatic mechanism described above is not sufficient. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend}}}}} instance}] \leavevmode \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str or pair of floats, default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.loc"{]}}}} ('best' for axes, 'upper right' for figures){]} The location of the legend. The strings \sphinxcode{\sphinxupquote{'upper left', 'upper right', 'lower left', 'lower right'}} place the legend at the corresponding corner of the axes/figure. The strings \sphinxcode{\sphinxupquote{'upper center', 'lower center', 'center left', 'center right'}} place the legend at the center of the corresponding edge of the axes/figure. The string \sphinxcode{\sphinxupquote{'center'}} places the legend at the center of the axes/figure. The string \sphinxcode{\sphinxupquote{'best'}} places the legend at the location, among the nine locations defined so far, with the minimum overlap with other drawn artists. This option can be quite slow for plots with large amounts of data; your plotting speed may benefit from providing a specific location. The location can also be a 2-tuple giving the coordinates of the lower-left corner of the legend in axes coordinates (in which case \sphinxstyleemphasis{bbox\_to\_anchor} will be ignored). For back-compatibility, \sphinxcode{\sphinxupquote{'center right'}} (but no other location) can also be spelled \sphinxcode{\sphinxupquote{'right'}}, and each "string" locations can also be given as a numeric value: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Location String &\sphinxstyletheadfamily Location Code \\ \hline 'best' & 0 \\ \hline 'upper right' & 1 \\ \hline 'upper left' & 2 \\ \hline 'lower left' & 3 \\ \hline 'lower right' & 4 \\ \hline 'right' & 5 \\ \hline 'center left' & 6 \\ \hline 'center right' & 7 \\ \hline 'lower center' & 8 \\ \hline 'upper center' & 9 \\ \hline 'center' & 10 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}}, 2-tuple, or 4-tuple of floats{]} Box that is used to position the legend in conjunction with \sphinxstyleemphasis{loc}. Defaults to \sphinxcode{\sphinxupquote{axes.bbox}} (if called as a method to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.legend}}}}}) or \sphinxcode{\sphinxupquote{figure.bbox}} (if {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.legend}}}}}). This argument allows arbitrary placement of the legend. Bbox coordinates are interpreted in the coordinate system given by \sphinxcode{\sphinxupquote{bbox\_transform}}, with the default transform Axes or Figure coordinates, depending on which \sphinxcode{\sphinxupquote{legend}} is called. If a 4-tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} is given, then it specifies the bbox \sphinxcode{\sphinxupquote{(x, y, width, height)}} that the legend is placed in. To put the legend in the best location in the bottom right quadrant of the axes (or figure): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{best}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} A 2-tuple \sphinxcode{\sphinxupquote{(x, y)}} places the corner of the legend specified by \sphinxstyleemphasis{loc} at x, y. For example, to put the legend's upper right-hand corner in the center of the axes (or figure) the following keywords can be used: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} \item[{\sphinxstylestrong{ncol}}] \leavevmode{[}integer{]} The number of columns that the legend has. Default is 1. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}None or {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} or dict{]} The font properties of the legend. If None (default), the current {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}} will be used. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int or float or \{'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} Controls the font size of the legend. If the value is numeric the size will be the absolute font size in points. String values are relative to the current default font size. This argument is only used if \sphinxcode{\sphinxupquote{prop}} is not specified. \item[{\sphinxstylestrong{numpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} (line). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.numpoints"{]}}}}. \item[{\sphinxstylestrong{scatterpoints}}] \leavevmode{[}None or int{]} The number of marker points in the legend when creating a legend entry for a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} (scatter plot). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.scatterpoints"{]}}}}. \item[{\sphinxstylestrong{scatteryoffsets}}] \leavevmode{[}iterable of floats{]} The vertical offset (relative to the font size) for the markers created for a scatter plot legend entry. 0.0 is at the base the legend text, and 1.0 is at the top. To draw all markers at the same height, set to \sphinxcode{\sphinxupquote{{[}0.5{]}}}. Default is \sphinxcode{\sphinxupquote{{[}0.375, 0.5, 0.3125{]}}}. \item[{\sphinxstylestrong{markerscale}}] \leavevmode{[}None or int or float{]} The relative size of legend markers compared with the originally drawn ones. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.markerscale"{]}}}}. \item[{\sphinxstylestrong{markerfirst}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, legend marker is placed to the left of the legend label. If \sphinxstyleemphasis{False}, legend marker is placed to the right of the legend label. Default is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}None or bool{]} Control whether the legend should be drawn on a patch (frame). Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.frameon"{]}}}}. \item[{\sphinxstylestrong{fancybox}}] \leavevmode{[}None or bool{]} Control whether round edges should be enabled around the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyBboxPatch}}}}} which makes up the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.fancybox"{]}}}}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}None or bool{]} Control whether to draw a shadow behind the legend. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.shadow"{]}}}}. \item[{\sphinxstylestrong{framealpha}}] \leavevmode{[}None or float{]} Control the alpha transparency of the legend's background. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.framealpha"{]}}}}. If shadow is activated and \sphinxstyleemphasis{framealpha} is \sphinxcode{\sphinxupquote{None}}, the default value is ignored. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.facecolor"{]}}}}. If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}None or "inherit" or a color spec{]} Control the legend's background patch edge color. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.edgecolor"{]}}}} If \sphinxcode{\sphinxupquote{"inherit"}}, it will take \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.edgecolor"{]}}}}. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"expand", None\}{]} If \sphinxcode{\sphinxupquote{mode}} is set to \sphinxcode{\sphinxupquote{"expand"}} the legend will be horizontally expanded to fill the axes area (or \sphinxcode{\sphinxupquote{bbox\_to\_anchor}} if defines the legend's size). \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}None or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transform for the bounding box (\sphinxcode{\sphinxupquote{bbox\_to\_anchor}}). For a value of \sphinxcode{\sphinxupquote{None}} (default) the Axes' \sphinxcode{\sphinxupquote{transAxes}} transform will be used. \item[{\sphinxstylestrong{title}}] \leavevmode{[}str or None{]} The legend's title. Default is no title (\sphinxcode{\sphinxupquote{None}}). \item[{\sphinxstylestrong{title\_fontsize: str or None}}] \leavevmode The fontsize of the legend's title. Default is the default fontsize. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float or None{]} The fractional whitespace inside the legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderpad"{]}}}}. \item[{\sphinxstylestrong{labelspacing}}] \leavevmode{[}float or None{]} The vertical space between the legend entries. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.labelspacing"{]}}}}. \item[{\sphinxstylestrong{handlelength}}] \leavevmode{[}float or None{]} The length of the legend handles. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handlelength"{]}}}}. \item[{\sphinxstylestrong{handletextpad}}] \leavevmode{[}float or None{]} The pad between the legend handle and text. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.handletextpad"{]}}}}. \item[{\sphinxstylestrong{borderaxespad}}] \leavevmode{[}float or None{]} The pad between the axes and legend border. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.borderaxespad"{]}}}}. \item[{\sphinxstylestrong{columnspacing}}] \leavevmode{[}float or None{]} The spacing between columns. Measured in font-size units. Default is \sphinxcode{\sphinxupquote{None}}, which will take the value from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"legend.columnspacing"{]}}}}. \item[{\sphinxstylestrong{handler\_map}}] \leavevmode{[}dict or None{]} The custom dictionary mapping instances or types to a legend handler. This \sphinxcode{\sphinxupquote{handler\_map}} updates the default handler map found at {\hyperref[\detokenize{api/legend_api:matplotlib.legend.Legend.get_legend_handler_map}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.legend.Legend.get\_legend\_handler\_map()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Not all kinds of artist are supported by the legend command. See {\hyperref[\detokenize{tutorials/intermediate/legend_guide::doc}]{\sphinxcrossref{\DUrole{doc}{Legend guide}}}} for details. \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{legend_00_00}.pdf} \end{figure} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.legend}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.legend:examples-using-matplotlib-pyplot-legend}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_limits\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_masked\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_step\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_parasite\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_histogram\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend01.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.locator\_params} \label{\detokenize{api/_as_gen/matplotlib.pyplot.locator_params:matplotlib-pyplot-locator-params}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.locator_params::doc}}\index{locator\_params() (in module matplotlib.pyplot)@\spxentry{locator\_params()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.locator_params:matplotlib.pyplot.locator_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{locator\_params}}}{\emph{axis='both'}, \emph{tight=None}, \emph{**kwargs}}{} Control behavior of major tick locators. Because the locator is involved in autoscaling, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}} is called automatically after the parameters are changed. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'both', 'x', 'y'\}, optional{]} The axis on which to operate. \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, optional{]} Parameter passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view}}}}}. Default is None, for no change. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Remaining keyword arguments are passed to directly to the \sphinxcode{\sphinxupquote{set\_params()}} method of the locator. Supported keywords depend on the type of the locator. See for example {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.set_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_params}}}}} for the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticker.MaxNLocator}}}}} used by default for linear axes. \end{description} \end{description}\end{quote} \subsubsection*{Examples} When plotting small subplots, one might want to reduce the maximum number of ticks and use tight bounds, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{locator\PYGZus{}params}\PYG{p}{(}\PYG{n}{tight}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{nbins}\PYG{o}{=}\PYG{l+m+mi}{4}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{matplotlib.pyplot.loglog} \label{\detokenize{api/_as_gen/matplotlib.pyplot.loglog:matplotlib-pyplot-loglog}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.loglog::doc}}\index{loglog() (in module matplotlib.pyplot)@\spxentry{loglog()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.loglog:matplotlib.pyplot.loglog}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{loglog}}}{\emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on both the x and y axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{loglog}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{loglog}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes both the x-axis and the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basex/y}, \sphinxstyleemphasis{subsx/y} and \sphinxstyleemphasis{nonposx/y} control the x/y-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basex, basey}}] \leavevmode{[}scalar, optional, default 10{]} Base of the x/y logarithm. \item[{\sphinxstylestrong{subsx, subsy}}] \leavevmode{[}sequence, optional{]} The location of the minor x/y ticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} / {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}} for details. \item[{\sphinxstylestrong{nonposx, nonposy}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in x or y can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.magma} \label{\detokenize{api/_as_gen/matplotlib.pyplot.magma:matplotlib-pyplot-magma}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.magma::doc}}\index{magma() (in module matplotlib.pyplot)@\spxentry{magma()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.magma:matplotlib.pyplot.magma}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{magma}}}{}{} Set the colormap to "magma". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.magnitude\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib-pyplot-magnitude-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum::doc}}\index{magnitude\_spectrum() (in module matplotlib.pyplot)@\spxentry{magnitude\_spectrum()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{magnitude\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the magnitude spectrum. Compute the magnitude spectrum of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{scale}}] \leavevmode{[}\{'default', 'linear', 'dB'\}{]} The scaling of the values in the \sphinxstyleemphasis{spec}. 'linear' is no scaling. 'dB' returns the values in dB scale, i.e., the dB amplitude (20 * log10). 'default' is 'linear'. \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the magnitude spectrum before scaling (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} plots the power spectral density.{}`. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the angles of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}} plots the phase (unwrapped angle) of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the magnitude spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.margins} \label{\detokenize{api/_as_gen/matplotlib.pyplot.margins:matplotlib-pyplot-margins}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.margins::doc}}\index{margins() (in module matplotlib.pyplot)@\spxentry{margins()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.margins:matplotlib.pyplot.margins}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{margins}}}{\emph{*margins}, \emph{x=None}, \emph{y=None}, \emph{tight=True}}{} Set or retrieve autoscaling margins. The padding added to each limit of the axes is the \sphinxstyleemphasis{margin} times the data interval. All input parameters must be floats within the range {[}0, 1{]}. Passing both positional and keyword arguments is invalid and will raise a TypeError. If no arguments (positional or otherwise) are provided, the current margins will remain in place and simply be returned. Specifying any margin changes only the autoscaling; for example, if \sphinxstyleemphasis{xmargin} is not None, then \sphinxstyleemphasis{xmargin} times the X data interval will be added to each end of that interval before it is used in autoscaling. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*margins}}] \leavevmode{[}float, optional{]} If a single positional argument is provided, it specifies both margins of the x-axis and y-axis limits. If two positional arguments are provided, they will be interpreted as \sphinxstyleemphasis{xmargin}, \sphinxstyleemphasis{ymargin}. If setting the margin on a single axis is desired, use the keyword arguments described below. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float, optional{]} Specific margin values for the x-axis and y-axis, respectively. These cannot be used with positional arguments, but can be used individually to alter on e.g., only the y-axis. \item[{\sphinxstylestrong{tight}}] \leavevmode{[}bool or None, default is True{]} The \sphinxstyleemphasis{tight} parameter is passed to \sphinxcode{\sphinxupquote{autoscale\_view()}}, which is executed after a margin is changed; the default here is \sphinxstyleemphasis{True}, on the assumption that when margins are specified, no additional padding to match tick marks is usually desired. Set \sphinxstyleemphasis{tight} to \sphinxstyleemphasis{None} will preserve the previous setting. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmargin, ymargin}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} If a previously used Axes method such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}} has set \sphinxcode{\sphinxupquote{use\_sticky\_edges}} to \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, only the limits not set by the "sticky artists" will be modified. To force all of the margins to be set, set \sphinxcode{\sphinxupquote{use\_sticky\_edges}} to \sphinxhref{https://docs.python.org/3/library/constants.html\#False}{\sphinxcode{\sphinxupquote{False}}} before calling {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.margins:matplotlib.pyplot.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{margins()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.margins}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.margins:examples-using-matplotlib-pyplot-margins}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_ticklabels\_rotation.py} \end{itemize} \subparagraph{matplotlib.pyplot.matshow} \label{\detokenize{api/_as_gen/matplotlib.pyplot.matshow:matplotlib-pyplot-matshow}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.matshow::doc}}\index{matshow() (in module matplotlib.pyplot)@\spxentry{matshow()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.matshow:matplotlib.pyplot.matshow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{matshow}}}{\emph{A}, \emph{fignum=None}, \emph{**kwargs}}{} Display an array as a matrix in a new figure window. The origin is set at the upper left hand corner and rows (first dimension of the array) are displayed horizontally. The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure. Tick labels for the xaxis are placed on top. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{A}}] \leavevmode{[}array-like(M, N){]} The matrix to be displayed. \item[{\sphinxstylestrong{fignum}}] \leavevmode{[}None or int or False{]} If \sphinxstyleemphasis{None}, create a new figure window with automatic numbering. If a nonzero integer, draw into the figure with the given number (create it if it does not exist). If 0, use the current axes (or create one if it does not exist). \begin{sphinxadmonition}{note}{Note:} Because of how {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.matshow:matplotlib.axes.Axes.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.matshow}}}}} tries to set the figure aspect ratio to be the one of the array, strange things may happen if you reuse an existing figure. \end{sphinxadmonition} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{image}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} arguments{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.matshow}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.matshow:examples-using-matplotlib-pyplot-matshow}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_matshow.py} \end{itemize} \subparagraph{matplotlib.pyplot.minorticks\_off} \label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off:matplotlib-pyplot-minorticks-off}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off::doc}}\index{minorticks\_off() (in module matplotlib.pyplot)@\spxentry{minorticks\_off()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off:matplotlib.pyplot.minorticks_off}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{minorticks\_off}}}{}{} Remove minor ticks from the axes. \end{fulllineitems} \subparagraph{matplotlib.pyplot.minorticks\_on} \label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_on:matplotlib-pyplot-minorticks-on}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_on::doc}}\index{minorticks\_on() (in module matplotlib.pyplot)@\spxentry{minorticks\_on()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_on:matplotlib.pyplot.minorticks_on}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{minorticks\_on}}}{}{} Display minor ticks on the axes. Displaying minor ticks may reduce performance; you may turn them off using {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off:matplotlib.pyplot.minorticks_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_off()}}}}} if drawing speed is a problem. \end{fulllineitems} \subparagraph{matplotlib.pyplot.nipy\_spectral} \label{\detokenize{api/_as_gen/matplotlib.pyplot.nipy_spectral:matplotlib-pyplot-nipy-spectral}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.nipy_spectral::doc}}\index{nipy\_spectral() (in module matplotlib.pyplot)@\spxentry{nipy\_spectral()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.nipy_spectral:matplotlib.pyplot.nipy_spectral}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{nipy\_spectral}}}{}{} Set the colormap to "nipy\_spectral". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.pause} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pause:matplotlib-pyplot-pause}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.pause::doc}}\index{pause() (in module matplotlib.pyplot)@\spxentry{pause()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pause:matplotlib.pyplot.pause}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{pause}}}{\emph{interval}}{} Pause for \sphinxstyleemphasis{interval} seconds. If there is an active figure, it will be updated and displayed before the pause, and the GUI event loop (if any) will run during the pause. This can be used for crude animation. For more complex animation, see {\hyperref[\detokenize{api/animation_api:module-matplotlib.animation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation}}}}}. \subsubsection*{Notes} This function is experimental; its behavior may be changed or extended in a future release. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.pause}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pause:examples-using-matplotlib-pyplot-pause}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_animation\_animation\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_rotate\_axes3d\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d\_animation\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.pcolor} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib-pyplot-pcolor}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolor::doc}}\index{pcolor() (in module matplotlib.pyplot)@\spxentry{pcolor()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{pcolor}}}{\emph{*args}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{data=None}, \emph{**kwargs}}{} Create a pseudocolor plot with a non-regular rectangular grid. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pcolor}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} can be used to specify the corners of the quadrilaterals. \begin{sphinxadmonition}{hint}{Hint:} \sphinxcode{\sphinxupquote{pcolor()}} can be very slow for large arrays. In most cases you should use the similar but much faster {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} instead. See there for a discussion of the differences. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array\_like{]} A scalar 2-D array. The values will be color-mapped. \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array\_like, optional{]} The coordinates of the quadrilateral corners. The quadrilateral for \sphinxcode{\sphinxupquote{C{[}i,j{]}}} has corners at: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{o}{\textbar{}} \PYG{n}{C}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,}\PYG{n}{j}\PYG{p}{]} \PYG{o}{\textbar{}} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} Note that the column index corresponds to the x-coordinate, and the row index corresponds to y. For details, see the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:axes-pcolor-grid-orientation}]{\sphinxcrossref{\DUrole{std,std-ref}{Notes}}}} section below. The dimensions of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} should be one greater than those of \sphinxstyleemphasis{C}. Alternatively, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may have equal dimensions, in which case the last row and column of \sphinxstyleemphasis{C} will be ignored. If \sphinxstyleemphasis{X} and/or \sphinxstyleemphasis{Y} are 1-D arrays or column vectors they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps the \sphinxstyleemphasis{C} values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The Normalize instance scales the data values to the canonical colormap range {[}0, 1{]} for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} The colorbar range. If \sphinxstyleemphasis{None}, suitable min/max values are automatically chosen by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance (defaults to the respective min/max values of \sphinxstyleemphasis{C} in case of the default linear scaling). \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'none', None, 'face', color, color sequence\}, optional{]} The color of the edges. Defaults to 'none'. Possible values: \begin{itemize} \item {} 'none' or '': No edge. \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.edgecolor"{]}}}} will be used. Note that currently \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.force\_edgecolor"{]}}}} has to be True for this to work. \item {} 'face': Use the adjacent face color. \item {} An mpl color or sequence of colors will set the edge color. \end{itemize} The singular form \sphinxstyleemphasis{edgecolor} works as an alias. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value of the face color, between 0 (transparent) and 1 (opaque). Note: The edgecolor is currently not affected by this. \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool, optional, default: False{]} Whether to snap the mesh to pixel boundaries. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{collection}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.Collection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{antialiaseds}}] \leavevmode{[}bool, optional, default: False{]} The default \sphinxstyleemphasis{antialiaseds} is False if the default \sphinxstyleemphasis{edgecolors}="none" is used. This eliminates artificial lines at patch boundaries, and works regardless of the value of alpha. If \sphinxstyleemphasis{edgecolors} is not "none", then the default \sphinxstyleemphasis{antialiaseds} is taken from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.antialiased"{]}}}}, which defaults to True. Stroking the edges may be preferred if \sphinxstyleemphasis{alpha} is 1, but will cause artifacts otherwise. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additionally, the following arguments are allowed. They are passed along to the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} constructor: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}}] \leavevmode for an explanation of the differences between pcolor and pcolormesh. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}}] \leavevmode If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are each equidistant, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} can be a faster alternative. \end{description} \subsubsection*{Notes} \sphinxstylestrong{Masked arrays} \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may be masked arrays. If either \sphinxcode{\sphinxupquote{C{[}i, j{]}}}, or one of the vertices surrounding \sphinxcode{\sphinxupquote{C{[}i,j{]}}} (\sphinxstyleemphasis{X} or \sphinxstyleemphasis{Y} at \sphinxcode{\sphinxupquote{{[}i, j{]}, {[}i+1, j{]}, {[}i, j+1{]}, {[}i+1, j+1{]}}}) is masked, nothing is plotted. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:axes-pcolor-grid-orientation}} \sphinxstylestrong{Grid orientation} The grid orientation follows the standard matrix convention: An array \sphinxstyleemphasis{C} with shape (nrows, ncolumns) is plotted with the column number as \sphinxstyleemphasis{X} and the row number as \sphinxstyleemphasis{Y}. \sphinxstylestrong{Handling of pcolor() end-cases} \sphinxcode{\sphinxupquote{pcolor()}} displays all columns of \sphinxstyleemphasis{C} if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are not specified, or if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} have one more column than \sphinxstyleemphasis{C}. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} have the same number of columns as \sphinxstyleemphasis{C} then the last column of \sphinxstyleemphasis{C} is dropped. Similarly for the rows. Note: This behavior is different from MATLAB's \sphinxcode{\sphinxupquote{pcolor()}}, which always discards the last row and column of \sphinxstyleemphasis{C}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.pcolor}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:examples-using-matplotlib-pyplot-pcolor}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \subparagraph{matplotlib.pyplot.pcolormesh} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib-pyplot-pcolormesh}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh::doc}}\index{pcolormesh() (in module matplotlib.pyplot)@\spxentry{pcolormesh()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{pcolormesh}}}{\emph{*args}, \emph{alpha=None}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{shading='flat'}, \emph{antialiased=False}, \emph{data=None}, \emph{**kwargs}}{} Create a pseudocolor plot with a non-regular rectangular grid. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pcolor}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,}\PYG{p}{]} \PYG{n}{C}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} can be used to specify the corners of the quadrilaterals. \begin{sphinxadmonition}{note}{Note:} \sphinxcode{\sphinxupquote{pcolormesh()}} is similar to \sphinxcode{\sphinxupquote{pcolor()}}. It's much faster and preferred in most cases. For a detailed discussion on the differences see {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:differences-pcolor-pcolormesh}]{\sphinxcrossref{\DUrole{std,std-ref}{Differences between pcolor() and pcolormesh()}}}}. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{C}}] \leavevmode{[}array\_like{]} A scalar 2-D array. The values will be color-mapped. \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}array\_like, optional{]} The coordinates of the quadrilateral corners. The quadrilateral for \sphinxcode{\sphinxupquote{C{[}i,j{]}}} has corners at: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{o}{\textbar{}} \PYG{n}{C}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,}\PYG{n}{j}\PYG{p}{]} \PYG{o}{\textbar{}} \PYG{o}{+}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{+} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{p}{]}\PYG{p}{)} \PYG{p}{(}\PYG{n}{X}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{[}\PYG{n}{i}\PYG{p}{,} \PYG{n}{j}\PYG{o}{+}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)}\PYG{p}{,} \end{sphinxVerbatim} Note that the column index corresponds to the x-coordinate, and the row index corresponds to y. For details, see the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:axes-pcolormesh-grid-orientation}]{\sphinxcrossref{\DUrole{std,std-ref}{Notes}}}} section below. The dimensions of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} should be one greater than those of \sphinxstyleemphasis{C}. Alternatively, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} and \sphinxstyleemphasis{C} may have equal dimensions, in which case the last row and column of \sphinxstyleemphasis{C} will be ignored. If \sphinxstyleemphasis{X} and/or \sphinxstyleemphasis{Y} are 1-D arrays or column vectors they will be expanded as needed into the appropriate 2-D arrays, making a rectangular grid. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}str or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional{]} A Colormap instance or registered colormap name. The colormap maps the \sphinxstyleemphasis{C} values to colors. Defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.cmap"{]}}}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional{]} The Normalize instance scales the data values to the canonical colormap range {[}0, 1{]} for mapping to colors. By default, the data range is mapped to the colorbar range using linear scaling. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} The colorbar range. If \sphinxstyleemphasis{None}, suitable min/max values are automatically chosen by the {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance (defaults to the respective min/max values of \sphinxstyleemphasis{C} in case of the default linear scaling). \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'none', None, 'face', color, color sequence\}, optional{]} The color of the edges. Defaults to 'none'. Possible values: \begin{itemize} \item {} 'none' or '': No edge. \item {} \sphinxstyleemphasis{None}: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.edgecolor"{]}}}} will be used. Note that currently \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"patch.force\_edgecolor"{]}}}} has to be True for this to work. \item {} 'face': Use the adjacent face color. \item {} An mpl color or sequence of colors will set the edge color. \end{itemize} The singular form \sphinxstyleemphasis{edgecolor} works as an alias. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{shading}}] \leavevmode{[}\{'flat', 'gouraud'\}, optional{]} The fill style, Possible values: \begin{itemize} \item {} 'flat': A solid color is used for each quad. The color of the quad (i, j), (i+1, j), (i, j+1), (i+1, j+1) is given by \sphinxcode{\sphinxupquote{C{[}i,j{]}}}. \item {} 'gouraud': Each quad will be Gouraud shaded: The color of the corners (i', j') are given by \sphinxcode{\sphinxupquote{C{[}i',j'{]}}}. The color values of the area in between is interpolated from the corner values. When Gouraud shading is used, \sphinxstyleemphasis{edgecolors} is ignored. \end{itemize} \item[{\sphinxstylestrong{snap}}] \leavevmode{[}bool, optional, default: False{]} Whether to snap the mesh to pixel boundaries. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mesh}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.QuadMesh}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additionally, the following arguments are allowed. They are passed along to the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}} constructor: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}}}] \leavevmode An alternative implementation with slightly different features. For a detailed discussion on the differences see {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:differences-pcolor-pcolormesh}]{\sphinxcrossref{\DUrole{std,std-ref}{Differences between pcolor() and pcolormesh()}}}}. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}}] \leavevmode If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are each equidistant, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} can be a faster alternative. \end{description} \subsubsection*{Notes} \sphinxstylestrong{Masked arrays} \sphinxstyleemphasis{C} may be a masked array. If \sphinxcode{\sphinxupquote{C{[}i, j{]}}} is masked, the corresponding quadrilateral will be transparent. Masking of \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} is not supported. Use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} if you need this functionality. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:axes-pcolormesh-grid-orientation}} \sphinxstylestrong{Grid orientation} The grid orientation follows the standard matrix convention: An array \sphinxstyleemphasis{C} with shape (nrows, ncolumns) is plotted with the column number as \sphinxstyleemphasis{X} and the row number as \sphinxstyleemphasis{Y}. \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:differences-pcolor-pcolormesh}} \sphinxstylestrong{Differences between pcolor() and pcolormesh()} Both methods are used to create a pseudocolor plot of a 2-D array using quadrilaterals. The main difference lies in the created object and internal data handling: While {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} returns a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} returns a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.QuadMesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{QuadMesh}}}}}. The latter is more specialized for the given purpose and thus is faster. It should almost always be preferred. There is also a slight difference in the handling of masked arrays. Both {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} support masked arrays for \sphinxstyleemphasis{C}. However, only {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} supports masked arrays for \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y}. The reason lies in the internal handling of the masked values. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} leaves out the respective polygons from the PolyCollection. {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} sets the facecolor of the masked elements to transparent. You can see the difference when using edgecolors. While all edges are drawn irrespective of masking in a QuadMesh, the edge between two adjacent masked quadrilaterals in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} is not drawn as the corresponding polygons do not exist in the PolyCollection. Another difference is the support of Gouraud shading in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolormesh:matplotlib.axes.Axes.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}}, which is not available with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.pcolormesh}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:examples-using-matplotlib-pyplot-pcolormesh}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quadmesh\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.phase\_spectrum} \label{\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib-pyplot-phase-spectrum}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum::doc}}\index{phase\_spectrum() (in module matplotlib.pyplot)@\spxentry{phase\_spectrum()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{phase\_spectrum}}}{\emph{x}, \emph{Fs=None}, \emph{Fc=None}, \emph{window=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the phase spectrum. Compute the phase spectrum (unwrapped angle spectrum) of \sphinxstyleemphasis{x}. Data is padded to a length of \sphinxstyleemphasis{pad\_to} and the windowing function \sphinxstyleemphasis{window} is applied to the signal. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to the length of the input signal (i.e. no padding). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}1-D array{]} The values for the phase spectrum in radians (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}} plots the magnitudes of the corresponding frequencies. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}} plots the wrapped version of this function. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} can plot the phase spectrum of segments within the signal in a colormap. \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.pie} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib-pyplot-pie}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.pie::doc}}\index{pie() (in module matplotlib.pyplot)@\spxentry{pie()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib.pyplot.pie}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{pie}}}{\emph{x}, \emph{explode=None}, \emph{labels=None}, \emph{colors=None}, \emph{autopct=None}, \emph{pctdistance=0.6}, \emph{shadow=False}, \emph{labeldistance=1.1}, \emph{startangle=None}, \emph{radius=None}, \emph{counterclock=True}, \emph{wedgeprops=None}, \emph{textprops=None}, \emph{center=(0}, \emph{0)}, \emph{frame=False}, \emph{rotatelabels=False}, \emph{*}, \emph{data=None}}{} Plot a pie chart. Make a pie chart of array \sphinxstyleemphasis{x}. The fractional area of each wedge is given by \sphinxcode{\sphinxupquote{x/sum(x)}}. If \sphinxcode{\sphinxupquote{sum(x) \textless{} 1}}, then the values of \sphinxstyleemphasis{x} give the fractional area directly and the array will not be normalized. The resulting pie will have an empty wedge of size \sphinxcode{\sphinxupquote{1 - sum(x)}}. The wedges are plotted counterclockwise, by default starting from the x-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like{]} The wedge sizes. \item[{\sphinxstylestrong{explode}}] \leavevmode{[}array-like, optional, default: None{]} If not \sphinxstyleemphasis{None}, is a \sphinxcode{\sphinxupquote{len(x)}} array which specifies the fraction of the radius with which to offset each wedge. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list, optional, default: None{]} A sequence of strings providing the labels for each wedge \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array-like, optional, default: None{]} A sequence of matplotlib color args through which the pie chart will cycle. If \sphinxstyleemphasis{None}, will use the colors in the currently active cycle. \item[{\sphinxstylestrong{autopct}}] \leavevmode{[}None (default), string, or function, optional{]} If not \sphinxstyleemphasis{None}, is a string or function used to label the wedges with their numeric value. The label will be placed inside the wedge. If it is a format string, the label will be \sphinxcode{\sphinxupquote{fmt\%pct}}. If it is a function, it will be called. \item[{\sphinxstylestrong{pctdistance}}] \leavevmode{[}float, optional, default: 0.6{]} The ratio between the center of each pie slice and the start of the text generated by \sphinxstyleemphasis{autopct}. Ignored if \sphinxstyleemphasis{autopct} is \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{shadow}}] \leavevmode{[}bool, optional, default: False{]} Draw a shadow beneath the pie. \item[{\sphinxstylestrong{labeldistance}}] \leavevmode{[}float or None, optional, default: 1.1{]} The radial distance at which the pie labels are drawn. If set to \sphinxcode{\sphinxupquote{None}}, label are not drawn, but are stored for use in \sphinxcode{\sphinxupquote{legend()}} \item[{\sphinxstylestrong{startangle}}] \leavevmode{[}float, optional, default: None{]} If not \sphinxstyleemphasis{None}, rotates the start of the pie chart by \sphinxstyleemphasis{angle} degrees counterclockwise from the x-axis. \item[{\sphinxstylestrong{radius}}] \leavevmode{[}float, optional, default: None{]} The radius of the pie, if \sphinxstyleemphasis{radius} is \sphinxstyleemphasis{None} it will be set to 1. \item[{\sphinxstylestrong{counterclock}}] \leavevmode{[}bool, optional, default: True{]} Specify fractions direction, clockwise or counterclockwise. \item[{\sphinxstylestrong{wedgeprops}}] \leavevmode{[}dict, optional, default: None{]} Dict of arguments passed to the wedge objects making the pie. For example, you can pass in \sphinxcode{\sphinxupquote{wedgeprops = \{'linewidth': 3\}}} to set the width of the wedge border lines equal to 3. For more details, look at the doc/arguments of the wedge object. By default \sphinxcode{\sphinxupquote{clip\_on=False}}. \item[{\sphinxstylestrong{textprops}}] \leavevmode{[}dict, optional, default: None{]} Dict of arguments to pass to the text objects. \item[{\sphinxstylestrong{center}}] \leavevmode{[}list of float, optional, default: (0, 0){]} Center position of the chart. Takes value (0, 0) or is a sequence of 2 scalars. \item[{\sphinxstylestrong{frame}}] \leavevmode{[}bool, optional, default: False{]} Plot axes frame with the chart if true. \item[{\sphinxstylestrong{rotatelabels}}] \leavevmode{[}bool, optional, default: False{]} Rotate each label to the angle of the corresponding slice if true. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patches}}] \leavevmode{[}list{]} A sequence of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Wedge:matplotlib.patches.Wedge}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Wedge}}}}} instances \item[{\sphinxstylestrong{texts}}] \leavevmode{[}list{]} A list of the label {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instances. \item[{\sphinxstylestrong{autotexts}}] \leavevmode{[}list{]} A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the numeric labels. This will only be returned if the parameter \sphinxstyleemphasis{autopct} is not \sphinxstyleemphasis{None}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. This method sets the aspect ratio of the axis to "equal". The axes aspect ratio can be controlled with \sphinxcode{\sphinxupquote{Axes.set\_aspect}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'explode', 'labels', 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.pie}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pie:examples-using-matplotlib-pyplot-pie}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \subparagraph{matplotlib.pyplot.pink} \label{\detokenize{api/_as_gen/matplotlib.pyplot.pink:matplotlib-pyplot-pink}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.pink::doc}}\index{pink() (in module matplotlib.pyplot)@\spxentry{pink()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.pink:matplotlib.pyplot.pink}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{pink}}}{}{} Set the colormap to "pink". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.plasma} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plasma:matplotlib-pyplot-plasma}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.plasma::doc}}\index{plasma() (in module matplotlib.pyplot)@\spxentry{plasma()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.plasma:matplotlib.pyplot.plasma}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{plasma}}}{}{} Set the colormap to "plasma". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.plot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib-pyplot-plot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.plot::doc}}\index{plot() (in module matplotlib.pyplot)@\spxentry{plot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{plot}}}{\emph{*args}, \emph{scalex=True}, \emph{scaley=True}, \emph{data=None}, \emph{**kwargs}}{} Plot y versus x as lines and/or markers. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} The coordinates of the points or line nodes are given by \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}. The optional parameter \sphinxstyleemphasis{fmt} is a convenient way for defining basic formatting like color, marker and linestyle. It's a shortcut string notation described in the \sphinxstyleemphasis{Notes} section below. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot x and y using default line style and color} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot x and y using blue circle markers} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot y using x as index array 0..N\PYGZhy{}1} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r+}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ditto, but with red plusses} \end{sphinxVerbatim} You can use {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties as keyword arguments for more control on the appearance. Line properties and \sphinxstyleemphasis{fmt} can be mixed. The following two calls yield identical results: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{marker}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dashed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{markersize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} When conflicting with \sphinxstyleemphasis{fmt}, keyword arguments take precedence. \sphinxstylestrong{Plotting labelled data} There's a convenient way for plotting objects with labelled data (i.e. data that can be accessed by index \sphinxcode{\sphinxupquote{obj{[}'y'{]}}}). Instead of giving the data in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, you can provide the object in the \sphinxstyleemphasis{data} parameter and just give the labels for \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{xlabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ylabel}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{obj}\PYG{p}{)} \end{sphinxVerbatim} All indexable objects are supported. This could e.g. be a \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}}, a \sphinxcode{\sphinxupquote{pandas.DataFame}} or a structured numpy array. \sphinxstylestrong{Plotting multiple sets of data} There are various ways to plot multiple sets of data. \begin{itemize} \item {} The most straight forward way is just to call {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} multiple times. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bo}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} Alternatively, if your data is already a 2d array, you can pass it directly to \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}. A separate data set will be drawn for every column. Example: an array \sphinxcode{\sphinxupquote{a}} where the first column represents the \sphinxstyleemphasis{x} values and the other columns are the \sphinxstyleemphasis{y} columns: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{a}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{a}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \item {} The third way is to specify multiple sets of \sphinxstyleemphasis{{[}x{]}}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{{[}fmt{]}} groups: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g\PYGZca{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{g\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} In this case, any additional keyword argument applies to all datasets. Also this syntax cannot be combined with the \sphinxstyleemphasis{data} parameter. \end{itemize} By default, each line is assigned a different style specified by a 'style cycle'. The \sphinxstyleemphasis{fmt} and line property parameters are only necessary if you want explicit deviations from these defaults. Alternatively, you can also change the style cycle using the 'axes.prop\_cycle' rcParam. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like or scalar{]} The horizontal / vertical coordinates of the data points. \sphinxstyleemphasis{x} values are optional and default to \sphinxcode{\sphinxupquote{range(len(y))}}. Commonly, these parameters are 1D arrays. They can also be scalars, or two-dimensional (in that case, the columns represent separate data sets). These arguments cannot be passed as keywords. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} A format string, e.g. 'ro' for red circles. See the \sphinxstyleemphasis{Notes} section for a full description of the format strings. Format strings are just an abbreviation for quickly setting basic line properties. All of these and more can also be controlled by keyword arguments. This argument cannot be passed as keyword. \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \begin{sphinxadmonition}{note}{Note:} Technically there's a slight ambiguity in calls where the second label is a valid \sphinxstyleemphasis{fmt}. \sphinxcode{\sphinxupquote{plot('n', 'o', data=obj)}} could be \sphinxcode{\sphinxupquote{plt(x, y)}} or \sphinxcode{\sphinxupquote{plt(y, fmt)}}. In such cases, the former interpretation is chosen, but a warning is issued. You may suppress the warning by adding an empty format string \sphinxcode{\sphinxupquote{plot('n', 'o', '{'}, data=obj)}}. \end{sphinxadmonition} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scalex, scaley}}] \leavevmode{[}bool, optional, default: True{]} These parameters determined if the view limits are adapted to the data limits. The values are passed on to \sphinxcode{\sphinxupquote{autoscale\_view}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties, optional{]} \sphinxstyleemphasis{kwargs} are used to specify properties like a line label (for auto legends), linewidth, antialiasing, marker face color. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{go\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line 1}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{9}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{rs}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line 2}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} If you make multiple lines with one plot command, the kwargs apply to all those lines. Here is a list of available {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}}] \leavevmode XY scatter plot with markers of varying size and/or color ( sometimes also called bubble chart). \end{description} \subsubsection*{Notes} \sphinxstylestrong{Format Strings} A format string consists of a part for color, marker and line: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fmt} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{[marker][line][color]}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} Each of them is optional. If not provided, the value from the style cycle is used. Exception: If \sphinxcode{\sphinxupquote{line}} is given, but no \sphinxcode{\sphinxupquote{marker}}, the data will be a line without markers. Other combinations such as \sphinxcode{\sphinxupquote{{[}color{]}{[}marker{]}{[}line{]}}} are also supported, but note that their parsing may be ambiguous. \sphinxstylestrong{Markers} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'.'}} & point marker \\ \hline \sphinxcode{\sphinxupquote{','}} & pixel marker \\ \hline \sphinxcode{\sphinxupquote{'o'}} & circle marker \\ \hline \sphinxcode{\sphinxupquote{'v'}} & triangle\_down marker \\ \hline \sphinxcode{\sphinxupquote{'\textasciicircum{}'}} & triangle\_up marker \\ \hline \sphinxcode{\sphinxupquote{'\textless{}'}} & triangle\_left marker \\ \hline \sphinxcode{\sphinxupquote{'\textgreater{}'}} & triangle\_right marker \\ \hline \sphinxcode{\sphinxupquote{'1'}} & tri\_down marker \\ \hline \sphinxcode{\sphinxupquote{'2'}} & tri\_up marker \\ \hline \sphinxcode{\sphinxupquote{'3'}} & tri\_left marker \\ \hline \sphinxcode{\sphinxupquote{'4'}} & tri\_right marker \\ \hline \sphinxcode{\sphinxupquote{'s'}} & square marker \\ \hline \sphinxcode{\sphinxupquote{'p'}} & pentagon marker \\ \hline \sphinxcode{\sphinxupquote{'*'}} & star marker \\ \hline \sphinxcode{\sphinxupquote{'h'}} & hexagon1 marker \\ \hline \sphinxcode{\sphinxupquote{'H'}} & hexagon2 marker \\ \hline \sphinxcode{\sphinxupquote{'+'}} & plus marker \\ \hline \sphinxcode{\sphinxupquote{'x'}} & x marker \\ \hline \sphinxcode{\sphinxupquote{'D'}} & diamond marker \\ \hline \sphinxcode{\sphinxupquote{'d'}} & thin\_diamond marker \\ \hline \sphinxcode{\sphinxupquote{'\textbar{}'}} & vline marker \\ \hline \sphinxcode{\sphinxupquote{'\_'}} & hline marker \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \sphinxstylestrong{Line Styles} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily description \\ \hline \sphinxcode{\sphinxupquote{'-'}} & solid line style \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} & dashed line style \\ \hline \sphinxcode{\sphinxupquote{'-.'}} & dash-dot line style \\ \hline \sphinxcode{\sphinxupquote{':'}} & dotted line style \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Example format strings: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} blue markers with default shape} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{or}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} red circles} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}g}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} green solid line} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} dashed line with default color} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZca{}k:}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} black triangle\PYGZus{}up markers connected by a dotted line} \end{sphinxVerbatim} \sphinxstylestrong{Colors} The supported color abbreviations are the single letter codes \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily character &\sphinxstyletheadfamily color \\ \hline \sphinxcode{\sphinxupquote{'b'}} & blue \\ \hline \sphinxcode{\sphinxupquote{'g'}} & green \\ \hline \sphinxcode{\sphinxupquote{'r'}} & red \\ \hline \sphinxcode{\sphinxupquote{'c'}} & cyan \\ \hline \sphinxcode{\sphinxupquote{'m'}} & magenta \\ \hline \sphinxcode{\sphinxupquote{'y'}} & yellow \\ \hline \sphinxcode{\sphinxupquote{'k'}} & black \\ \hline \sphinxcode{\sphinxupquote{'w'}} & white \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} and the \sphinxcode{\sphinxupquote{'CN'}} colors that index into the default property cycle. If the color is the only part of the format string, you can additionally use any {\hyperref[\detokenize{api/colors_api:module-matplotlib.colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors}}}}} spec, e.g. full names (\sphinxcode{\sphinxupquote{'green'}}) or hex strings (\sphinxcode{\sphinxupquote{'\#008000'}}). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.plot}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plot:examples-using-matplotlib-pyplot-plot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_joinstyle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_masked\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_simple\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_step\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_multiple\_figs\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_shared\_axis\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation\_relative\_to\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_titles\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_formatstr.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_three.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_two\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_by\_yvalue.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_marker\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_plot\_solarizedlight2.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-gallery-animation-frame-grabbing-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Frame grabbing}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_agg\_buffer.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_coords\_report.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multipage\_pdf.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_print\_stdout\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_set\_and\_get.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_ticklabels\_rotation.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_toolmanager\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_rectangle\_selector.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/customizing:sphx-glr-tutorials-introductory-customizing-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Matplotlib with style sheets and rcParams}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-tutorials-advanced-patheffects-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path effects guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.plot\_date} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib-pyplot-plot-date}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.plot_date::doc}}\index{plot\_date() (in module matplotlib.pyplot)@\spxentry{plot\_date()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{plot\_date}}}{\emph{x}, \emph{y}, \emph{fmt='o'}, \emph{tz=None}, \emph{xdate=True}, \emph{ydate=False}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot data that contains dates. Similar to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}, this plots \sphinxstyleemphasis{y} vs. \sphinxstyleemphasis{x} as lines or markers. However, the axis labels are formatted as dates depending on \sphinxstyleemphasis{xdate} and \sphinxstyleemphasis{ydate}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like{]} The coordinates of the data points. If \sphinxstyleemphasis{xdate} or \sphinxstyleemphasis{ydate} is \sphinxstyleemphasis{True}, the respective values \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} are interpreted as {\hyperref[\detokenize{api/dates_api:date-format}]{\sphinxcrossref{\DUrole{std,std-ref}{Matplotlib dates}}}}. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} The plot format string. For details, see the corresponding parameter in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \item[{\sphinxstylestrong{tz}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} timezone string \textbar{} \sphinxcode{\sphinxupquote{tzinfo}} instance{]}{]} The time zone to use in labeling dates. If \sphinxstyleemphasis{None}, defaults to rcParam \sphinxcode{\sphinxupquote{timezone}}. \item[{\sphinxstylestrong{xdate}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxstyleemphasis{True}, the \sphinxstyleemphasis{x}-axis will be interpreted as Matplotlib dates. \item[{\sphinxstylestrong{ydate}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxstyleemphasis{True}, the \sphinxstyleemphasis{y}-axis will be interpreted as Matplotlib dates. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}}}] \leavevmode Helper functions on dates. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.date2num}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.date2num}}}}}}] \leavevmode Convert dates to num. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.num2date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.num2date}}}}}}] \leavevmode Convert num to dates. \item[{{\hyperref[\detokenize{api/dates_api:matplotlib.dates.drange}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates.drange}}}}}}] \leavevmode Create an equally spaced sequence of dates. \end{description} \subsubsection*{Notes} If you are using custom date tickers and formatters, it may be necessary to set the formatters/locators after the call to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}}. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}} will set the default tick locator to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateLocator}}}}} (if the tick locator is not already set to a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateLocator}}}}} instance) and the default tick formatter to {\hyperref[\detokenize{api/dates_api:matplotlib.dates.AutoDateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoDateFormatter}}}}} (if the tick formatter is not already set to a {\hyperref[\detokenize{api/dates_api:matplotlib.dates.DateFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DateFormatter}}}}} instance). \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.plot\_date}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:examples-using-matplotlib-pyplot-plot-date}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_demo\_rrule.py} \end{itemize} \subparagraph{matplotlib.pyplot.plotfile} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:matplotlib-pyplot-plotfile}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.plotfile::doc}}\index{plotfile() (in module matplotlib.pyplot)@\spxentry{plotfile()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:matplotlib.pyplot.plotfile}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{plotfile}}}{\emph{fname}, \emph{cols=(0}, \emph{)}, \emph{plotfuncs=None}, \emph{comments='\#'}, \emph{skiprows=0}, \emph{checkrows=5}, \emph{delimiter='}, \emph{'}, \emph{names=None}, \emph{subplots=True}, \emph{newfig=True}, \emph{**kwargs}}{} Plot the data in a file. \sphinxstyleemphasis{cols} is a sequence of column identifiers to plot. An identifier is either an int or a string. If it is an int, it indicates the column number. If it is a string, it indicates the column header. matplotlib will make column headers lower case, replace spaces with underscores, and remove all illegal characters; so \sphinxcode{\sphinxupquote{'Adj Close*'}} will have name \sphinxcode{\sphinxupquote{'adj\_close'}}. \begin{itemize} \item {} If len(\sphinxstyleemphasis{cols}) == 1, only that column will be plotted on the \sphinxstyleemphasis{y} axis. \item {} If len(\sphinxstyleemphasis{cols}) \textgreater{} 1, the first element will be an identifier for data for the \sphinxstyleemphasis{x} axis and the remaining elements will be the column indexes for multiple subplots if \sphinxstyleemphasis{subplots} is \sphinxstyleemphasis{True} (the default), or for lines in a single subplot if \sphinxstyleemphasis{subplots} is \sphinxstyleemphasis{False}. \end{itemize} \sphinxstyleemphasis{plotfuncs}, if not \sphinxstyleemphasis{None}, is a dictionary mapping identifier to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} plotting function as a string. Default is 'plot', other choices are 'semilogy', 'fill', 'bar', etc. You must use the same type of identifier in the \sphinxstyleemphasis{cols} vector as you use in the \sphinxstyleemphasis{plotfuncs} dictionary, e.g., integer column numbers in both or column names in both. If \sphinxstyleemphasis{subplots} is \sphinxstyleemphasis{False}, then including any function such as 'semilogy' that changes the axis scaling will set the scaling for all columns. \begin{itemize} \item {} \sphinxstyleemphasis{comments}: the character used to indicate the start of a comment in the file, or \sphinxstyleemphasis{None} to switch off the removal of comments \item {} \sphinxstyleemphasis{skiprows}: is the number of rows from the top to skip \item {} \sphinxstyleemphasis{checkrows}: is the number of rows to check to validate the column data type. When set to zero all rows are validated. \item {} \sphinxstyleemphasis{delimiter}: is the character(s) separating row items \item {} \sphinxstyleemphasis{names}: if not None, is a list of header names. In this case, no header will be read from the file \end{itemize} If \sphinxstyleemphasis{newfig} is \sphinxstyleemphasis{True}, the plot always will be made in a new figure; if \sphinxstyleemphasis{False}, it will be made in the current figure if one exists, else in a new figure. kwargs are passed on to plotting functions. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} plot the 2nd and 4th column against the 1st in two subplots} \PYG{n}{plotfile}\PYG{p}{(}\PYG{n}{fname}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} plot using column names; specify an alternate plot type for volume} \PYG{n}{plotfile}\PYG{p}{(}\PYG{n}{fname}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{volume}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{adj\PYGZus{}close}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{,} \PYG{n}{plotfuncs}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{volume}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{semilogy}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} Note: plotfile is intended as a convenience for quickly plotting data from flat files; it is not intended as an alternative interface to general plotting with pyplot or matplotlib. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.plotfile}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:examples-using-matplotlib-pyplot-plotfile}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_plotfile\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.polar} \label{\detokenize{api/_as_gen/matplotlib.pyplot.polar:matplotlib-pyplot-polar}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.polar::doc}}\index{polar() (in module matplotlib.pyplot)@\spxentry{polar()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.polar:matplotlib.pyplot.polar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{polar}}}{\emph{*args}, \emph{**kwargs}}{} Make a polar plot. call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{polar}\PYG{p}{(}\PYG{n}{theta}\PYG{p}{,} \PYG{n}{r}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Multiple \sphinxstyleemphasis{theta}, \sphinxstyleemphasis{r} arguments are supported, with format strings, as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.polar}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.polar:examples-using-matplotlib-pyplot-polar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \subparagraph{matplotlib.pyplot.prism} \label{\detokenize{api/_as_gen/matplotlib.pyplot.prism:matplotlib-pyplot-prism}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.prism::doc}}\index{prism() (in module matplotlib.pyplot)@\spxentry{prism()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.prism:matplotlib.pyplot.prism}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{prism}}}{}{} Set the colormap to "prism". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.psd} \label{\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib-pyplot-psd}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.psd::doc}}\index{psd() (in module matplotlib.pyplot)@\spxentry{psd()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{psd}}}{\emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{return\_line=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the power spectral density. The power spectral density \(P_{xx}\) by Welch's average periodogram method. The vector \sphinxstyleemphasis{x} is divided into \sphinxstyleemphasis{NFFT} length segments. Each segment is detrended by function \sphinxstyleemphasis{detrend} and windowed by function \sphinxstyleemphasis{window}. \sphinxstyleemphasis{noverlap} gives the length of the overlap between segments. The \(|\mathrm{fft}(i)|^2\) of each segment \(i\) are averaged to compute \(P_{xx}\), with a scaling to correct for power loss due to windowing. If len(\sphinxstyleemphasis{x}) \textless{} \sphinxstyleemphasis{NFFT}, it will be zero padded to \sphinxstyleemphasis{NFFT}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between segments. The default value is 0 (no overlap). \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{return\_line}}] \leavevmode{[}bool{]} Whether to include the line object plotted in the returned values. Default is False. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Pxx}}] \leavevmode{[}1-D array{]} The values for the power spectrum \sphinxcode{\sphinxupquote{P\_\{xx\}}} before scaling (real valued). \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the elements in \sphinxstyleemphasis{Pxx}. \item[{\sphinxstylestrong{line}}] \leavevmode{[}a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} instance{]} The line created by this function. Only returned if \sphinxstyleemphasis{return\_line} is True. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyword arguments control the {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram()}}}}} differs in the default overlap; in not returning the mean of the segment periodograms; in returning the times of the segments; and in plotting a colormap instead of a line. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}} plots the magnitude spectrum. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd()}}}}} plots the spectral density between two signals. \end{description} \subsubsection*{Notes} For plotting, the power is plotted as \(10\log_{10}(P_{xx})\) for decibels, though \sphinxstyleemphasis{Pxx} itself is returned. \subsubsection*{References} Bendat \& Piersol -- Random Data: Analysis and Measurement Procedures, John Wiley \& Sons (1986) \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.psd}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.psd:examples-using-matplotlib-pyplot-psd}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.quiver} \label{\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib-pyplot-quiver}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.quiver::doc}}\index{quiver() (in module matplotlib.pyplot)@\spxentry{quiver()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{quiver}}}{\emph{*args}, \emph{data=None}, \emph{**kw}}{} Plot a 2D field of arrows. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{quiver}\PYG{p}{(}\PYG{p}{[}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{]}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{p}{[}\PYG{n}{C}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Where \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} define the arrow locations, \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} define the arrow directions, and \sphinxstyleemphasis{C} optionally sets the color. \sphinxstylestrong{Arrow size} The default settings auto-scales the length of the arrows to a reasonable size. To change this behavior see the \sphinxstyleemphasis{scale} and \sphinxstyleemphasis{scale\_units} parameters. \sphinxstylestrong{Arrow shape} The defaults give a slightly swept-back arrow; to make the head a triangle, make \sphinxstyleemphasis{headaxislength} the same as \sphinxstyleemphasis{headlength}. To make the arrow more pointed, reduce \sphinxstyleemphasis{headwidth} or increase \sphinxstyleemphasis{headlength} and \sphinxstyleemphasis{headaxislength}. To make the head smaller relative to the shaft, scale down all the head parameters. You will probably do best to leave minshaft alone. \sphinxstylestrong{Arrow outline} \sphinxstyleemphasis{linewidths} and \sphinxstyleemphasis{edgecolors} can be used to customize the arrow outlines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y}}] \leavevmode{[}1D or 2D array-like, optional{]} The x and y coordinates of the arrow locations. If not given, they will be generated as a uniform integer meshgrid based on the dimensions of \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V}. If \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are 1D but \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} are 2D, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} are expanded to 2D using \sphinxcode{\sphinxupquote{X, Y = np.meshgrid(X, Y)}}. In this case \sphinxcode{\sphinxupquote{len(X)}} and \sphinxcode{\sphinxupquote{len(Y)}} must match the column and row dimensions of \sphinxstyleemphasis{U} and \sphinxstyleemphasis{V}. \item[{\sphinxstylestrong{U, V}}] \leavevmode{[}1D or 2D array-like{]} The x and y direction components of the arrow vectors. \item[{\sphinxstylestrong{C}}] \leavevmode{[}1D or 2D array-like, optional{]} Numeric data that defines the arrow colors by colormapping via \sphinxstyleemphasis{norm} and \sphinxstyleemphasis{cmap}. This does not support explicit colors. If you want to set colors directly, use \sphinxstyleemphasis{color} instead. \item[{\sphinxstylestrong{units}}] \leavevmode{[}\{'width', 'height', 'dots', 'inches', 'x', 'y' 'xy'\}, default: 'width'{]} The arrow dimensions (except for \sphinxstyleemphasis{length}) are measured in multiples of this unit. The following values are supported: \begin{itemize} \item {} 'width', 'height': The width or height of the axis. \item {} 'dots', 'inches': Pixels or inches based on the figure dpi. \item {} 'x', 'y', 'xy': \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} or \(\sqrt{X^2 + Y^2}\) in data units. \end{itemize} The arrows scale differently depending on the units. For 'x' or 'y', the arrows get larger as one zooms in; for other units, the arrow size is independent of the zoom state. For 'width or 'height', the arrow size increases with the width and height of the axes, respectively, when the window is resized; for 'dots' or 'inches', resizing does not change the arrows. \item[{\sphinxstylestrong{angles}}] \leavevmode{[}\{'uv', 'xy'\} or array-like, optional, default: 'uv'{]} Method for determining the angle of the arrows. \begin{itemize} \item {} 'uv': The arrow axis aspect ratio is 1 so that if \sphinxstyleemphasis{U} == \sphinxstyleemphasis{V} the orientation of the arrow on the plot is 45 degrees counter-clockwise from the horizontal axis (positive to the right). Use this if the arrows symbolize a quantity that is not based on \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} data coordinates. \item {} 'xy': Arrows point from (x,y) to (x+u, y+v). Use this for plotting a gradient field, for example. \item {} Alternatively, arbitrary angles may be specified explicitly as an array of values in degrees, counter-clockwise from the horizontal axis. In this case \sphinxstyleemphasis{U}, \sphinxstyleemphasis{V} is only used to determine the length of the arrows. \end{itemize} Note: inverting a data axis will correspondingly invert the arrows only with \sphinxcode{\sphinxupquote{angles='xy'}}. \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} Number of data units per arrow length unit, e.g., m/s per plot width; a smaller scale parameter makes the arrow longer. Default is \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{None}, a simple autoscaling algorithm is used, based on the average vector length and the number of vectors. The arrow length unit is given by the \sphinxstyleemphasis{scale\_units} parameter. \item[{\sphinxstylestrong{scale\_units}}] \leavevmode{[}\{'width', 'height', 'dots', 'inches', 'x', 'y', 'xy'\}, optional{]} If the \sphinxstyleemphasis{scale} kwarg is \sphinxstyleemphasis{None}, the arrow length unit. Default is \sphinxstyleemphasis{None}. e.g. \sphinxstyleemphasis{scale\_units} is 'inches', \sphinxstyleemphasis{scale} is 2.0, and \sphinxcode{\sphinxupquote{(u,v) = (1,0)}}, then the vector will be 0.5 inches long. If \sphinxstyleemphasis{scale\_units} is 'width' or 'height', then the vector will be half the width/height of the axes. If \sphinxstyleemphasis{scale\_units} is 'x' then the vector will be 0.5 x-axis units. To plot vectors in the x-y plane, with u and v having the same units as x and y, use \sphinxcode{\sphinxupquote{angles='xy', scale\_units='xy', scale=1}}. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float, optional{]} Shaft width in arrow units; default depends on choice of units, above, and number of vectors; a typical starting value is about 0.005 times the width of the plot. \item[{\sphinxstylestrong{headwidth}}] \leavevmode{[}float, optional, default: 3{]} Head width as multiple of shaft width. \item[{\sphinxstylestrong{headlength}}] \leavevmode{[}float, optional, default: 5{]} Head length as multiple of shaft width. \item[{\sphinxstylestrong{headaxislength}}] \leavevmode{[}float, optional, default: 4.5{]} Head length at shaft intersection. \item[{\sphinxstylestrong{minshaft}}] \leavevmode{[}float, optional, default: 1{]} Length below which arrow scales, in units of head length. Do not set this to less than 1, or small arrows will look terrible! \item[{\sphinxstylestrong{minlength}}] \leavevmode{[}float, optional, default: 1{]} Minimum length as a multiple of shaft width; if an arrow length is less than this, plot a dot (hexagon) of this diameter instead. \item[{\sphinxstylestrong{pivot}}] \leavevmode{[}\{'tail', 'mid', 'middle', 'tip'\}, optional, default: 'tail'{]} The part of the arrow that is anchored to the \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} grid. The arrow rotates about this point. 'mid' is a synonym for 'middle'. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color or color sequence, optional{]} Explicit color(s) for the arrows. If \sphinxstyleemphasis{C} has been set, \sphinxstyleemphasis{color} has no effect. This is a synonym for the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} \sphinxstyleemphasis{facecolor} parameter. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} properties, optional{]} All other keyword arguments are passed on to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa or antialiaseds & bool or sequence of bools \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{array}}}}} & ndarray \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & a length 2 sequence of floats; may be overridden in methods that have \sphinxcode{\sphinxupquote{vmin}} and \sphinxcode{\sphinxupquote{vmax}} kwargs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cmap}}}}} & colormap or registered colormap name \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color or sequence of rgba tuples \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec or edgecolors & color or sequence of colors or 'face' \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or facecolors or fc & color or sequence of colors \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or dashes or linestyles or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or linewidths or lw & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_norm}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{norm}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offset_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offset\_position}}}}} & \{'screen', 'data'\} \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_offsets}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{offsets}}}}} & float or sequence of floats \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection.set_urls}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{urls}}}}} & List{[}str{]} or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:matplotlib.pyplot.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiverkey}}}}}}] \leavevmode Add a key to a quiver plot. \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.quiver}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.quiver:examples-using-matplotlib-pyplot-quiver}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.quiverkey} \label{\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:matplotlib-pyplot-quiverkey}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey::doc}}\index{quiverkey() (in module matplotlib.pyplot)@\spxentry{quiverkey()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:matplotlib.pyplot.quiverkey}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{quiverkey}}}{\emph{Q}, \emph{X}, \emph{Y}, \emph{U}, \emph{label}, \emph{**kw}}{} Add a key to a quiver plot. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{quiverkey}\PYG{p}{(}\PYG{n}{Q}\PYG{p}{,} \PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{label}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{Q}:}] \leavevmode The Quiver instance returned by a call to quiver. \item[{\sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}:}] \leavevmode The location of the key; additional explanation follows. \item[{\sphinxstyleemphasis{U}:}] \leavevmode The length of the key \item[{\sphinxstyleemphasis{label}:}] \leavevmode A string with the length and units of the key \end{description} \end{quote} Keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{angle} = 0}] \leavevmode The angle of the key arrow. Measured in degrees anti-clockwise from the x-axis. \item[{\sphinxstyleemphasis{coordinates} = {[} 'axes' \textbar{} 'figure' \textbar{} 'data' \textbar{} 'inches' {]}}] \leavevmode Coordinate system and units for \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}: 'axes' and 'figure' are normalized coordinate systems with 0,0 in the lower left and 1,1 in the upper right; 'data' are the axes data coordinates (used for the locations of the vectors in the quiver plot itself); 'inches' is position in the figure in inches, with 0,0 at the lower left corner. \item[{\sphinxstyleemphasis{color}:}] \leavevmode overrides face and edge colors from \sphinxstyleemphasis{Q}. \item[{\sphinxstyleemphasis{labelpos} = {[} 'N' \textbar{} 'S' \textbar{} 'E' \textbar{} 'W' {]}}] \leavevmode Position the label above, below, to the right, to the left of the arrow, respectively. \item[{\sphinxstyleemphasis{labelsep}:}] \leavevmode Distance in inches between the arrow and the label. Default is 0.1 \item[{\sphinxstyleemphasis{labelcolor}:}] \leavevmode defaults to default {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} color. \item[{\sphinxstyleemphasis{fontproperties}:}] \leavevmode A dictionary with keyword arguments accepted by the {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}} initializer: \sphinxstyleemphasis{family}, \sphinxstyleemphasis{style}, \sphinxstyleemphasis{variant}, \sphinxstyleemphasis{size}, \sphinxstyleemphasis{weight} \end{description} \end{quote} Any additional keyword arguments are used to override vector properties taken from \sphinxstyleemphasis{Q}. The positioning of the key depends on \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y}, \sphinxstyleemphasis{coordinates}, and \sphinxstyleemphasis{labelpos}. If \sphinxstyleemphasis{labelpos} is 'N' or 'S', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} give the position of the middle of the key arrow. If \sphinxstyleemphasis{labelpos} is 'E', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} positions the head, and if \sphinxstyleemphasis{labelpos} is 'W', \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} positions the tail; in either of these two cases, \sphinxstyleemphasis{X}, \sphinxstyleemphasis{Y} is somewhere in the middle of the arrow+label key object. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.quiverkey}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:examples-using-matplotlib-pyplot-quiverkey}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.rc} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rc:matplotlib-pyplot-rc}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.rc::doc}}\index{rc() (in module matplotlib.pyplot)@\spxentry{rc()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.rc:matplotlib.pyplot.rc}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{rc}}}{\emph{group}, \emph{**kwargs}}{} Set the current rc params. \sphinxstyleemphasis{group} is the grouping for the rc, e.g., for \sphinxcode{\sphinxupquote{lines.linewidth}} the group is \sphinxcode{\sphinxupquote{lines}}, for \sphinxcode{\sphinxupquote{axes.facecolor}}, the group is \sphinxcode{\sphinxupquote{axes}}, and so on. Group may also be a list or tuple of group names, e.g., (\sphinxstyleemphasis{xtick}, \sphinxstyleemphasis{ytick}). \sphinxstyleemphasis{kwargs} is a dictionary attribute name/value pairs, e.g.,: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} sets the current rc params and is equivalent to: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+m+mi}{2} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines.color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} The following aliases are available to save typing for interactive users: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Alias &\sphinxstyletheadfamily Property \\ \hline 'lw' & 'linewidth' \\ \hline 'ls' & 'linestyle' \\ \hline 'c' & 'color' \\ \hline 'fc' & 'facecolor' \\ \hline 'ec' & 'edgecolor' \\ \hline 'mew' & 'markeredgewidth' \\ \hline 'aa' & 'antialiased' \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Thus you could abbreviate the above rc command as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lines}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Note you can use python's kwargs dictionary facility to store dictionaries of default parameters. e.g., you can customize the font rc as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{font} \PYG{o}{=} \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{family}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{monospace}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{weight}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{bold}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{size}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{larger}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}} \PYG{n}{rc}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{font}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{font}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} pass in the font dict as kwargs} \end{sphinxVerbatim} This enables you to easily switch between several configurations. Use \sphinxcode{\sphinxupquote{matplotlib.style.use('default')}} or {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcdefaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rcdefaults()}}}}} to restore the default rc params after changes. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.rc}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rc:examples-using-matplotlib-pyplot-rc}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycler.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multipage\_pdf.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/color_cycle:sphx-glr-tutorials-intermediate-color-cycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Styling with cycler}}}} \end{itemize} \subparagraph{matplotlib.pyplot.rc\_context} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rc_context:matplotlib-pyplot-rc-context}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.rc_context::doc}}\index{rc\_context() (in module matplotlib.pyplot)@\spxentry{rc\_context()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.rc_context:matplotlib.pyplot.rc_context}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{rc\_context}}}{\emph{rc=None}, \emph{fname=None}}{} Return a context manager for managing rc settings. This allows one to do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{screen.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{a}\PYG{p}{)} \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{print.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{b}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{c}\PYG{p}{)} \end{sphinxVerbatim} The 'a' vs 'x' and 'c' vs 'x' plots would have settings from 'screen.rc', while the 'b' vs 'x' plot would have settings from 'print.rc'. A dictionary can also be passed to the context manager: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{rc}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{text.usetex}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{True}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{n}{fname}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{screen.rc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{a}\PYG{p}{)} \end{sphinxVerbatim} The 'rc' dictionary takes precedence over the settings loaded from 'fname'. Passing a dictionary only is also valid. For example a common usage is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{mpl}\PYG{o}{.}\PYG{n}{rc\PYGZus{}context}\PYG{p}{(}\PYG{n}{rc}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{interactive}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k+kc}{False}\PYG{p}{\PYGZcb{}}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{,} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{savefig}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{close}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.rc\_context}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rc_context:examples-using-matplotlib-pyplot-rc-context}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_baseline\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_logos2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_auto\_ticks.py} \end{itemize} \subparagraph{matplotlib.pyplot.rcdefaults} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults:matplotlib-pyplot-rcdefaults}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults::doc}}\index{rcdefaults() (in module matplotlib.pyplot)@\spxentry{rcdefaults()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults:matplotlib.pyplot.rcdefaults}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{rcdefaults}}}{}{} Restore the rc params from Matplotlib's internal default style. Style-blacklisted rc params (defined in \sphinxcode{\sphinxupquote{matplotlib.style.core.STYLE\_BLACKLIST}}) are not updated. \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{rc\_file\_defaults}}}] \leavevmode Restore the rc params from the rc file originally loaded by Matplotlib. \item[{{\hyperref[\detokenize{api/style_api:matplotlib.style.use}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.style.use}}}}}}] \leavevmode Use a specific style file. Call \sphinxcode{\sphinxupquote{style.use('default')}} to restore the default style. \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.rcdefaults}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults:examples-using-matplotlib-pyplot-rcdefaults}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \subparagraph{matplotlib.pyplot.rgrids} \label{\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib-pyplot-rgrids}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.rgrids::doc}}\index{rgrids() (in module matplotlib.pyplot)@\spxentry{rgrids()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib.pyplot.rgrids}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{rgrids}}}{\emph{*args}, \emph{**kwargs}}{} Get or set the radial gridlines on the current polar plot. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{rgrids}\PYG{p}{(}\PYG{p}{)} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{rgrids}\PYG{p}{(}\PYG{n}{radii}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{angle}\PYG{o}{=}\PYG{l+m+mf}{22.5}\PYG{p}{,} \PYG{n}{fmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} When called with no arguments, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib.pyplot.rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgrids}}}}} simply returns the tuple (\sphinxstyleemphasis{lines}, \sphinxstyleemphasis{labels}). When called with arguments, the labels will appear at the specified radial distances and angle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{radii}}] \leavevmode{[}tuple with floats{]} The radii for the radial gridlines \item[{\sphinxstylestrong{labels}}] \leavevmode{[}tuple with strings or None{]} The labels to use at each radial gridline. The {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.ScalarFormatter}}}}} will be used if None. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}float{]} The angular position of the radius labels in degrees. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str or None{]} Format string used in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FormatStrFormatter}}}}}. For example '\%f'. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines, labels}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lines.Line2D}}}}}, list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.Text}}}}}{]} \sphinxstyleemphasis{lines} are the radial gridlines and \sphinxstyleemphasis{labels} are the tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode \sphinxstyleemphasis{kwargs} are optional {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties for the labels. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib.pyplot.thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.thetagrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes.set\_rgrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gridlines}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabels}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} set the locations of the radial gridlines} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{rgrids}\PYG{p}{(} \PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)} \PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the locations and labels of the radial gridlines} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{rgrids}\PYG{p}{(} \PYG{p}{(}\PYG{l+m+mf}{0.25}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{1.0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Tom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Dick}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Harry}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{matplotlib.pyplot.savefig} \label{\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib-pyplot-savefig}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.savefig::doc}}\index{savefig() (in module matplotlib.pyplot)@\spxentry{savefig()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{savefig}}}{\emph{*args}, \emph{**kwargs}}{} Save the current figure. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{savefig}\PYG{p}{(}\PYG{n}{fname}\PYG{p}{,} \PYG{n}{dpi}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{orientation}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{portrait}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{papertype}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n+nb}{format}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{transparent}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}inches}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{pad\PYGZus{}inches}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{metadata}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \end{sphinxVerbatim} The output formats available depend on the backend being used. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fname}}] \leavevmode{[}str or PathLike or file-like object{]} A path, or a Python file-like object, or possibly some backend-dependent object such as {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backends.backend\_pdf.PdfPages}}}}}. If \sphinxstyleemphasis{format} is not set, then the output format is inferred from the extension of \sphinxstyleemphasis{fname}, if any, and from \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.format"{]}}}} otherwise. If \sphinxstyleemphasis{format} is set, it determines the output format. Hence, if \sphinxstyleemphasis{fname} is not a path or has no extension, remember to specify \sphinxstyleemphasis{format} to ensure that the correct backend is used. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} scalar \textgreater{} 0 \textbar{} 'figure' {]}{]} The resolution in dots per inch. If \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.dpi"{]}}}}. If 'figure', uses the figure's dpi value. \item[{\sphinxstylestrong{quality}}] \leavevmode{[}{[} \sphinxstyleemphasis{None} \textbar{} 1 \textless{}= scalar \textless{}= 100 {]}{]} The image quality, on a scale from 1 (worst) to 95 (best). Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. If \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.jpeg\_quality"{]}}}} (95 by default). Values above 95 should be avoided; 100 completely disables the JPEG quantization stage. \item[{\sphinxstylestrong{optimize}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, indicates that the JPEG encoder should make an extra pass over the image in order to select optimal encoder settings. Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. Is \sphinxstyleemphasis{False} by default. \item[{\sphinxstylestrong{progressive}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, indicates that this image should be stored as a progressive JPEG file. Applicable only if \sphinxstyleemphasis{format} is jpg or jpeg, ignored otherwise. Is \sphinxstyleemphasis{False} by default. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}color spec or None, optional{]} The facecolor of the figure; if \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.facecolor"{]}}}}. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}color spec or None, optional{]} The edgecolor of the figure; if \sphinxstyleemphasis{None}, defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"savefig.edgecolor"{]}}}} \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}\{'landscape', 'portrait'\}{]} Currently only supported by the postscript backend. \item[{\sphinxstylestrong{papertype}}] \leavevmode{[}str{]} One of 'letter', 'legal', 'executive', 'ledger', 'a0' through 'a10', 'b0' through 'b10'. Only supported for postscript output. \item[{\sphinxstylestrong{format}}] \leavevmode{[}str{]} The file format, e.g. 'png', 'pdf', 'svg', ... The behavior when this is unset is documented under \sphinxstyleemphasis{fname}. \item[{\sphinxstylestrong{transparent}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, the axes patches will all be transparent; the figure patch will also be transparent unless facecolor and/or edgecolor are specified via kwargs. This is useful, for example, for displaying a plot on top of a colored background on a web page. The transparency of these patches will be restored to their original values upon exit of this function. \item[{\sphinxstylestrong{bbox\_inches}}] \leavevmode{[}str or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} Bbox in inches. Only the given portion of the figure is saved. If 'tight', try to figure out the tight bbox of the figure. If None, use savefig.bbox \item[{\sphinxstylestrong{pad\_inches}}] \leavevmode{[}scalar, optional{]} Amount of padding around the figure when bbox\_inches is 'tight'. If None, use savefig.pad\_inches \item[{\sphinxstylestrong{bbox\_extra\_artists}}] \leavevmode{[}list of {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, optional{]} A list of extra artists that will be considered when the tight bbox is calculated. \item[{\sphinxstylestrong{metadata}}] \leavevmode{[}dict, optional{]} Key/value pairs to store in the image metadata. The supported keys and defaults depend on the image format and backend: \begin{itemize} \item {} 'png' with Agg backend: See the parameter \sphinxcode{\sphinxupquote{metadata}} of {\hyperref[\detokenize{api/backend_agg_api:matplotlib.backends.backend_agg.FigureCanvasAgg.print_png}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{print\_png}}}}}. \item {} 'pdf' with pdf backend: See the parameter \sphinxcode{\sphinxupquote{metadata}} of {\hyperref[\detokenize{api/backend_pdf_api:matplotlib.backends.backend_pdf.PdfPages}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PdfPages}}}}}. \item {} 'eps' and 'ps' with PS backend: Only 'Creator' is supported. \end{itemize} \item[{\sphinxstylestrong{pil\_kwargs}}] \leavevmode{[}dict, optional{]} Additional keyword arguments that are passed to \sphinxcode{\sphinxupquote{PIL.Image.save}} when saving the figure. Only applicable for formats that are saved using Pillow, i.e. JPEG, TIFF, and (if the keyword is set to a non-None value) PNG. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.savefig}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.savefig:examples-using-matplotlib-pyplot-savefig}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_print\_stdout\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_rasterization\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_svg\_filter\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_svg\_filter\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_histogram\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_tooltip\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \subparagraph{matplotlib.pyplot.sca} \label{\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib-pyplot-sca}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.sca::doc}}\index{sca() (in module matplotlib.pyplot)@\spxentry{sca()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{sca}}}{\emph{ax}}{} Set the current Axes instance to \sphinxstyleemphasis{ax}. The current Figure is updated to the parent of \sphinxstyleemphasis{ax}. \end{fulllineitems} \subparagraph{matplotlib.pyplot.scatter} \label{\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib-pyplot-scatter}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.scatter::doc}}\index{scatter() (in module matplotlib.pyplot)@\spxentry{scatter()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{scatter}}}{\emph{x}, \emph{y}, \emph{s=None}, \emph{c=None}, \emph{marker=None}, \emph{cmap=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{alpha=None}, \emph{linewidths=None}, \emph{verts=None}, \emph{edgecolors=None}, \emph{*}, \emph{plotnonfinite=False}, \emph{data=None}, \emph{**kwargs}}{} A scatter plot of \sphinxstyleemphasis{y} vs \sphinxstyleemphasis{x} with varying marker size and/or color. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array\_like, shape (n, ){]} The data positions. \item[{\sphinxstylestrong{s}}] \leavevmode{[}scalar or array\_like, shape (n, ), optional{]} The marker size in points**2. Default is \sphinxcode{\sphinxupquote{rcParams{[}'lines.markersize'{]} ** 2}}. \item[{\sphinxstylestrong{c}}] \leavevmode{[}color, sequence, or sequence of color, optional{]} The marker color. Possible values: \begin{itemize} \item {} A single color format string. \item {} A sequence of color specifications of length n. \item {} A sequence of n numbers to be mapped to colors using \sphinxstyleemphasis{cmap} and \sphinxstyleemphasis{norm}. \item {} A 2-D array in which the rows are RGB or RGBA. \end{itemize} Note that \sphinxstyleemphasis{c} should not be a single numeric RGB or RGBA sequence because that is indistinguishable from an array of values to be colormapped. If you want to specify the same RGB or RGBA value for all points, use a 2-D array with a single row. Otherwise, value- matching will have precedence in case of a size matching with \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. Defaults to \sphinxcode{\sphinxupquote{None}}. In that case the marker color is determined by the value of \sphinxcode{\sphinxupquote{color}}, \sphinxcode{\sphinxupquote{facecolor}} or \sphinxcode{\sphinxupquote{facecolors}}. In case those are not specified or \sphinxcode{\sphinxupquote{None}}, the marker color is determined by the next color of the \sphinxcode{\sphinxupquote{Axes}}' current "shape and fill" color cycle. This cycle defaults to \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.prop\_cycle"{]}}}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.markers.MarkerStyle:matplotlib.markers.MarkerStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MarkerStyle}}}}}, optional{]} The marker style. \sphinxstyleemphasis{marker} can be either an instance of the class or the text shorthand for a particular marker. Defaults to \sphinxcode{\sphinxupquote{None}}, in which case it takes the value of \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"scatter.marker"{]}}}} = 'o'. See {\hyperref[\detokenize{api/markers_api:module-matplotlib.markers}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markers}}}}} for more information about marker styles. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}, optional, default: None{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or registered colormap name. \sphinxstyleemphasis{cmap} is only used if \sphinxstyleemphasis{c} is an array of floats. If \sphinxcode{\sphinxupquote{None}}, defaults to rc \sphinxcode{\sphinxupquote{image.cmap}}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}, optional, default: None{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance is used to scale luminance data to 0, 1. \sphinxstyleemphasis{norm} is only used if \sphinxstyleemphasis{c} is an array of floats. If \sphinxstyleemphasis{None}, use the default {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colors.Normalize}}}}}. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are used in conjunction with \sphinxstyleemphasis{norm} to normalize luminance data. If None, the respective min and max of the color array is used. \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are ignored if you pass a \sphinxstyleemphasis{norm} instance. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}scalar, optional, default: None{]} The alpha blending value, between 0 (transparent) and 1 (opaque). \item[{\sphinxstylestrong{linewidths}}] \leavevmode{[}scalar or array\_like, optional, default: None{]} The linewidth of the marker edges. Note: The default \sphinxstyleemphasis{edgecolors} is 'face'. You may want to change this as well. If \sphinxstyleemphasis{None}, defaults to rcParams \sphinxcode{\sphinxupquote{lines.linewidth}}. \item[{\sphinxstylestrong{edgecolors}}] \leavevmode{[}\{'face', 'none', \sphinxstyleemphasis{None}\} or color or sequence of color, optional.{]} The edge color of the marker. Possible values: \begin{itemize} \item {} 'face': The edge color will always be the same as the face color. \item {} 'none': No patch boundary will be drawn. \item {} A Matplotlib color or sequence of color. \end{itemize} Defaults to \sphinxcode{\sphinxupquote{None}}, in which case it takes the value of \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"scatter.edgecolors"{]}}}} = 'face'. For non-filled markers, the \sphinxstyleemphasis{edgecolors} kwarg is ignored and forced to 'face' internally. \item[{\sphinxstylestrong{plotnonfinite}}] \leavevmode{[}boolean, optional, default: False{]} Set to plot points with nonfinite \sphinxstyleemphasis{c}, in conjunction with {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_bad}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_bad}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{paths}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.Collection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Collection}}}}} properties{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}}] \leavevmode To plot scatter plots when markers are identical in size and color. \end{description} \subsubsection*{Notes} \begin{itemize} \item {} The {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} function will be faster for scatterplots where markers don't vary in size or color. \item {} Any or all of \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{s}, and \sphinxstyleemphasis{c} may be masked arrays, in which case all masks will be combined and only unmasked points will be plotted. \item {} Fundamentally, scatter works with 1-D arrays; \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, \sphinxstyleemphasis{s}, and \sphinxstyleemphasis{c} may be input as 2-D arrays, but within scatter they will be flattened. The exception is \sphinxstyleemphasis{c}, which will be flattened only if its size matches the size of \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \end{itemize} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'c', 'color', 'edgecolors', 'facecolor', 'facecolors', 'linewidths', 's', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.scatter}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.scatter:examples-using-matplotlib-pyplot-scatter}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_piecharts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_star\_poly.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_hyperlinks\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.sci} \label{\detokenize{api/_as_gen/matplotlib.pyplot.sci:matplotlib-pyplot-sci}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.sci::doc}}\index{sci() (in module matplotlib.pyplot)@\spxentry{sci()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.sci:matplotlib.pyplot.sci}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{sci}}}{\emph{im}}{} Set the current image. This image will be the target of colormap functions like {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.viridis:matplotlib.pyplot.viridis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{viridis}}}}}, and other functions such as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clim:matplotlib.pyplot.clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}}. The current image is an attribute of the current axes. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.sci}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.sci:examples-using-matplotlib-pyplot-sci}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \subparagraph{matplotlib.pyplot.semilogx} \label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib-pyplot-semilogx}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogx::doc}}\index{semilogx() (in module matplotlib.pyplot)@\spxentry{semilogx()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib.pyplot.semilogx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{semilogx}}}{\emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on the x axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{semilogx}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{semilogx}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes the x-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basex}, \sphinxstyleemphasis{subsx} and \sphinxstyleemphasis{nonposx} control the x-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basex}}] \leavevmode{[}scalar, optional, default 10{]} Base of the x logarithm. \item[{\sphinxstylestrong{subsx}}] \leavevmode{[}array\_like, optional{]} The location of the minor xticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_xscale}}}}} for details. \item[{\sphinxstylestrong{nonposx}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in x can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.semilogy} \label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib-pyplot-semilogy}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogy::doc}}\index{semilogy() (in module matplotlib.pyplot)@\spxentry{semilogy()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib.pyplot.semilogy}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{semilogy}}}{\emph{*args}, \emph{**kwargs}}{} Make a plot with log scaling on the y axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{semilogy}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{semilogy}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{n}{x2}\PYG{p}{]}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which additionally changes the y-axis to log scaling. All of the concepts and parameters of plot can be used here as well. The additional parameters \sphinxstyleemphasis{basey}, \sphinxstyleemphasis{subsy} and \sphinxstyleemphasis{nonposy} control the y-axis properties. They are just forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{basey}}] \leavevmode{[}scalar, optional, default 10{]} Base of the y logarithm. \item[{\sphinxstylestrong{subsy}}] \leavevmode{[}array\_like, optional{]} The location of the minor yticks. If \sphinxstyleemphasis{None}, reasonable locations are automatically chosen depending on the number of decades in the plot. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_yscale}}}}} for details. \item[{\sphinxstylestrong{nonposy}}] \leavevmode{[}\{'mask', 'clip'\}, optional, default 'mask'{]} Non-positive values in y can be masked as invalid, or clipped to a very small positive number. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All parameters supported by {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.set\_cmap} \label{\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib-pyplot-set-cmap}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap::doc}}\index{set\_cmap() (in module matplotlib.pyplot)@\spxentry{set\_cmap()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{set\_cmap}}}{\emph{cmap}}{} Set the default colormap. Applies to the current image if any. See help(colormaps) for more information. \sphinxstyleemphasis{cmap} must be a {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance, or the name of a registered colormap. See {\hyperref[\detokenize{api/cm_api:matplotlib.cm.register_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.register\_cmap()}}}}} and {\hyperref[\detokenize{api/cm_api:matplotlib.cm.get_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.cm.get\_cmap()}}}}}. \end{fulllineitems} \subparagraph{matplotlib.pyplot.setp} \label{\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib-pyplot-setp}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.setp::doc}}\index{setp() (in module matplotlib.pyplot)@\spxentry{setp()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{setp}}}{\emph{obj}, \emph{*args}, \emph{**kwargs}}{} Set a property on an artist object. matplotlib supports the use of {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} ("set property") and \sphinxcode{\sphinxupquote{getp()}} to set and get object properties, as well as to do introspection on the object. For example, to set the linestyle of a line to be dashed, you can do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{line}\PYG{p}{,} \PYG{o}{=} \PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} If you want to know the valid types of arguments, you can provide the name of the property you want to set without a value: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linestyle}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+go}{ linestyle: [ \PYGZsq{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}.\PYGZsq{} \textbar{} \PYGZsq{}:\PYGZsq{} \textbar{} \PYGZsq{}steps\PYGZsq{} \textbar{} \PYGZsq{}None\PYGZsq{} ]} \end{sphinxVerbatim} If you want to see all the properties that can be set, and their possible values, you can do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{g+go}{ ... long output listing omitted} \end{sphinxVerbatim} You may specify another output file to {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}} if \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.stdout}{\sphinxcode{\sphinxupquote{sys.stdout}}} is not acceptable for some reason using the \sphinxcode{\sphinxupquote{file}} keyword-only argument: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{with} \PYG{n}{fopen}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{output.log}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{f}\PYG{p}{:} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} } \PYG{n}{setp}\PYG{p}{(}\PYG{n}{line}\PYG{p}{,} \PYG{n}{file}\PYG{o}{=}\PYG{n}{f}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} operates on a single instance or a iterable of instances. If you are in query mode introspecting the possible values, only the first instance in the sequence is used. When actually setting values, all the instances will be set. e.g., suppose you have a list of two lines, the following will make both lines thicker and red: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{x} \PYG{o}{=} \PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mf}{1.0}\PYG{p}{,}\PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{y1} \PYG{o}{=} \PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{y2} \PYG{o}{=} \PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{o}{*}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{x}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{lines} \PYG{o}{=} \PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp()}}}}} works with the MATLAB style string/value pairs or with python kwargs. For example, the following are equivalent: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{linewidth}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{color}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} MATLAB style} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{setp}\PYG{p}{(}\PYG{n}{lines}\PYG{p}{,} \PYG{n}{linewidth}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} python style} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.setp}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.setp:examples-using-matplotlib-pyplot-setp}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_masked\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_shared\_axis\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_vs\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_patheffect\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_set\_and\_get.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_topographic\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_evans\_test.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/lifecycle:sphx-glr-tutorials-introductory-lifecycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The Lifecycle of a Plot}}}} \end{itemize} \subparagraph{matplotlib.pyplot.show} \label{\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib-pyplot-show}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.show::doc}}\index{show() (in module matplotlib.pyplot)@\spxentry{show()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{show}}}{\emph{*args}, \emph{**kw}}{} Display a figure. When running in ipython with its pylab mode, display all figures and return to the ipython prompt. In non-interactive mode, display all figures and block until the figures have been closed; in interactive mode it has no effect unless figures were created prior to a change from non-interactive to interactive mode (not recommended). In that case it displays the figures but does not block. A single experimental keyword argument, \sphinxstyleemphasis{block}, may be set to True or False to override the blocking behavior described above. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.show}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.show:examples-using-matplotlib-pyplot-show}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_broken\_barh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_categorical\_variables.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_cohere.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_csd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_limits\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_subsample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_eventcollection\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_eventplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill\_between\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill\_betweenx\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_filled\_step.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_gradient\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_joinstyle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_line\_demo\_dash\_control.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_linestyles.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_marker\_fillstyle\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_marker\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_markevery\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_markevery\_prop\_cycle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_masked\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_multicolored\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_custom\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_piecharts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_star\_poly.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_simple\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_span\_regions.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_spectrum\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_stackplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_stem\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_step\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_vline\_hline\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_affine\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barb\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barcode\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_demo\_bboximage.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_figimage\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_nonuniform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_zcoord.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_interpolation\_methods.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_layer\_images.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_matshow.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quadmesh\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_shading\_example.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_specgram\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_spy\_demos.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tripcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_watermark\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_align\_labels\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_props.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axhspan\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axis\_equal\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_broken\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_colorbar\_placement.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_custom\_figure\_class.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_constrained\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_fahrenheit\_celsius\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_figure\_title.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_ganged\_plots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_geo\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_and\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_multicolumn.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_nested.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_multiple\_figs\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_secondary\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_shared\_axis\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot\_toolbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_two\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_zoom\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_color.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_vs\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_bxp.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_confidence\_ellipse.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_customized\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar\_limits.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbars\_and\_boxes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hexbin\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_cumulative.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_histtypes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_multihist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_multiple\_histograms\_side\_by\_side.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_violinplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_bar\_of\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_accented\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_annotation\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_autowrap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_custom\_legends.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_dashpointlabel.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_date.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_date\_index\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_annotation\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_rotation\_mode.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_dfrac\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_engineering\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fancyarrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fancytextbox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_figlegend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_family\_rc\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_file.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_table.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo\_kw.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_line\_with\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_asarray.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_examples.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_rainbow\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_stix\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_tex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_alignment.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation\_relative\_to\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_titles\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_unicode\_minus.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_baseline\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_watermark\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotate\_transform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_basic.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_polar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_auto\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_boxplot\_demo\_pyplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_dollar\_ticks.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_customize\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_axes\_labels\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_fig\_x.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_formatstr.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_three.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_two\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_commands.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_1\_subplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fancy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fill\_between.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_axes\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_mplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_by\_yvalue.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycler.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colorbar\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colormap\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_arrow\_guide.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_compound\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_marker\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_path\_patch.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_quad\_bezier.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_bmh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_dark\_background.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_fivethirtyeight.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_ggplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_grayscale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_plot\_solarizedlight2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_style\_sheets\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_anchored\_direction\_arrows.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_with\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_with\_inset\_locator.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_edge\_colorbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_fixed\_size\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_imagegrid\_aspect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_make\_room\_for\_ylabel\_using\_axesgrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_parasite\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_parasite\_simple2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_scatter\_hist\_locatable\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axesgrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axesgrid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axisline4.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_axis\_direction\_demo\_step04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axisline\_style.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_parasite\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_parasite\_axes2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_ticklabel\_alignment.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_ticklabel\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_direction01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_direction03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisartist1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axisline3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_anatomy.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_bachelors\_degrees\_by\_gender.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_firefox.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_integral.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_mandelbrot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_xkcd.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/animate_decay:sphx-glr-gallery-animation-animate-decay-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Decay}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/animated_histogram:sphx-glr-gallery-animation-animated-histogram-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated histogram}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/bayes_update:sphx-glr-gallery-animation-bayes-update-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The Bayes update}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/double_pendulum_sgskip:sphx-glr-gallery-animation-double-pendulum-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The double pendulum problem}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/dynamic_image:sphx-glr-gallery-animation-dynamic-image-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated image using a precomputed list of images}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/rain:sphx-glr-gallery-animation-rain-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Rain simulation}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/random_walk:sphx-glr-gallery-animation-random-walk-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated 3D random walk}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/simple_anim:sphx-glr-gallery-animation-simple-anim-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated line plot}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/strip_chart:sphx-glr-gallery-animation-strip-chart-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Oscilloscope}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/unchained:sphx-glr-gallery-animation-unchained-py}]{\sphinxcrossref{\DUrole{std,std-ref}{MATPLOTLIB UNCHAINED}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_close\_event.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_coords\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_data\_browser.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_figure\_axes\_enter\_leave.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_image\_slices\_viewer.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_keypress\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_lasso\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_legend\_picking.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_looking\_glass.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_path\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_poly\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pong\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_resample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_timers.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_viewlims.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_zoom\_window.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_contour.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_agg\_buffer\_to\_array.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_bbox\_intersect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_coords\_report.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_cursor\_demo\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_agg\_filter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_ribbon\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_fill\_spiral.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_histogram\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_keyword\_plotting.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_load\_converter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_logos2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multiprocess\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_patheffect\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_plotfile\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_pythonic\_matplotlib.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_set\_and\_get.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_2dcollections3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_3d\_bars.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_bars3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contour3d\_3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contourf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_contourf3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_custom\_shaded\_3d\_surface.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_hist3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_lines3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_lorenz\_attractor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_mixed\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_offset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_pathpatch3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_polys3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_quiver3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_scatter3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_subplot3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_3.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_surface3d\_radial.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_text3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_tricontour3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_tricontourf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_trisurf3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_trisurf3d\_2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_numpy\_logo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_voxels\_torus.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d\_zero\_stride.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_common\_date\_problems.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_create\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_fill\_between\_alpha.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_placing\_text\_boxes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_share\_axis\_lims\_views.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_aspect\_loglog.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_power\_norm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_advanced\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_hinton\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_leftventricle\_bulleye.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_mri\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_mri\_with\_eeg.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_radar\_chart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_links.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_rankine.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_skewt.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_topographic\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_auto\_ticks.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_centered\_ticklabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_colorbar\_tick\_labelling\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_custom\_ticker1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_concise\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_demo\_convert.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_demo\_rrule.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_index\_formatter2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_major\_minor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_multiple\_yaxis\_with\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_scalarformatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spine\_placement\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines\_bounds.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines\_dropped.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-formatters.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-locators.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_label\_right.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_labels\_from\_values.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_xlabel\_top.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_ticklabels\_rotation.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_annotate\_with\_units.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_artist\_tests.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_bar\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_bar\_unit\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_ellipse\_with\_units.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_evans\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_radian\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_units\_sample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_units\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_pylab\_with\_gtk\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_toolmanager\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_explain.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_text\_arrow.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_bounds.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_custom.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_diverging.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_lognorm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_power.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_symlognorm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connect\_simple01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connectionstyle\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_custom\_boxstyle01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_custom\_boxstyle02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec06.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_annotate01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_check\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_cursor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_lasso\_selector\_demo\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_menu.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_multicursor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_polygon\_selector\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_radio\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_rectangle\_selector.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_span\_selector.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/sample_plots:sphx-glr-tutorials-introductory-sample-plots-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Sample plots in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/lifecycle:sphx-glr-tutorials-introductory-lifecycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The Lifecycle of a Plot}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/customizing:sphx-glr-tutorials-introductory-customizing-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Matplotlib with style sheets and rcParams}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Artist tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/color_cycle:sphx-glr-tutorials-intermediate-color-cycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Styling with cycler}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/path_tutorial:sphx-glr-tutorials-advanced-path-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-tutorials-advanced-patheffects-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path effects guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating Colormaps in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormaps:sphx-glr-tutorials-colors-colormaps-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Choosing Colormaps in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_intro:sphx-glr-tutorials-text-text-intro-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text in Matplotlib Plots}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_props:sphx-glr-tutorials-text-text-props-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text properties and layout}}}} \end{itemize} \subparagraph{matplotlib.pyplot.specgram} \label{\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib-pyplot-specgram}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.specgram::doc}}\index{specgram() (in module matplotlib.pyplot)@\spxentry{specgram()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{specgram}}}{\emph{x}, \emph{NFFT=None}, \emph{Fs=None}, \emph{Fc=None}, \emph{detrend=None}, \emph{window=None}, \emph{noverlap=None}, \emph{cmap=None}, \emph{xextent=None}, \emph{pad\_to=None}, \emph{sides=None}, \emph{scale\_by\_freq=None}, \emph{mode=None}, \emph{scale=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot a spectrogram. Compute and plot a spectrogram of data in \sphinxstyleemphasis{x}. Data are split into \sphinxstyleemphasis{NFFT} length segments and the spectrum of each section is computed. The windowing function \sphinxstyleemphasis{window} is applied to each segment, and the amount of overlap of each segment is specified with \sphinxstyleemphasis{noverlap}. The spectrogram is plotted as a colormap (using imshow). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1-D array or sequence{]} Array or sequence containing the data. \item[{\sphinxstylestrong{Fs}}] \leavevmode{[}scalar{]} The sampling frequency (samples per time unit). It is used to calculate the Fourier frequencies, freqs, in cycles per time unit. The default value is 2. \item[{\sphinxstylestrong{window}}] \leavevmode{[}callable or ndarray{]} A function or a vector of length \sphinxstyleemphasis{NFFT}. To create window vectors see \sphinxcode{\sphinxupquote{window\_hanning}}, \sphinxcode{\sphinxupquote{window\_none}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.blackman.html\#numpy.blackman}{\sphinxcode{\sphinxupquote{numpy.blackman}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html\#numpy.hamming}{\sphinxcode{\sphinxupquote{numpy.hamming}}}, \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.bartlett.html\#numpy.bartlett}{\sphinxcode{\sphinxupquote{numpy.bartlett}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/signal.html\#module-scipy.signal}{\sphinxcode{\sphinxupquote{scipy.signal}}}, \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.get\_window.html\#scipy.signal.get\_window}{\sphinxcode{\sphinxupquote{scipy.signal.get\_window}}}, etc. The default is \sphinxcode{\sphinxupquote{window\_hanning}}. If a function is passed as the argument, it must take a data segment as an argument and return the windowed version of the segment. \item[{\sphinxstylestrong{sides}}] \leavevmode{[}\{'default', 'onesided', 'twosided'\}{]} Specifies which sides of the spectrum to return. Default gives the default behavior, which returns one-sided for real data and both for complex data. 'onesided' forces the return of a one-sided spectrum, while 'twosided' forces two-sided. \item[{\sphinxstylestrong{pad\_to}}] \leavevmode{[}int{]} The number of points to which the data segment is padded when performing the FFT. This can be different from \sphinxstyleemphasis{NFFT}, which specifies the number of data points used. While not increasing the actual resolution of the spectrum (the minimum distance between resolvable peaks), this can give more points in the plot, allowing for more detail. This corresponds to the \sphinxstyleemphasis{n} parameter in the call to fft(). The default is None, which sets \sphinxstyleemphasis{pad\_to} equal to \sphinxstyleemphasis{NFFT} \item[{\sphinxstylestrong{NFFT}}] \leavevmode{[}int{]} The number of data points used in each block for the FFT. A power 2 is most efficient. The default value is 256. This should \sphinxstyleemphasis{NOT} be used to get zero padding, or the scaling of the result will be incorrect. Use \sphinxstyleemphasis{pad\_to} for this instead. \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}\{'none', 'mean', 'linear'\} or callable, default 'none'{]} The function applied to each segment before fft-ing, designed to remove the mean or linear trend. Unlike in MATLAB, where the \sphinxstyleemphasis{detrend} parameter is a vector, in Matplotlib is it a function. The {\hyperref[\detokenize{api/mlab_api:module-matplotlib.mlab}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mlab}}}}} module defines {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}, {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}, and {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}, but you can use a custom function as well. You can also use a string to choose one of the functions: 'none' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_none}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_none}}}}}. 'mean' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_mean}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_mean}}}}}. 'linear' calls {\hyperref[\detokenize{api/mlab_api:matplotlib.mlab.detrend_linear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{detrend\_linear}}}}}. \item[{\sphinxstylestrong{scale\_by\_freq}}] \leavevmode{[}bool, optional{]} Specifies whether the resulting density values should be scaled by the scaling frequency, which gives density in units of Hz\textasciicircum{}-1. This allows for integration over the returned frequency values. The default is True for MATLAB compatibility. \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{'default', 'psd', 'magnitude', 'angle', 'phase'\}{]} What sort of spectrum to use. Default is 'psd', which takes the power spectral density. 'magnitude' returns the magnitude spectrum. 'angle' returns the phase spectrum without unwrapping. 'phase' returns the phase spectrum with unwrapping. \item[{\sphinxstylestrong{noverlap}}] \leavevmode{[}int{]} The number of points of overlap between blocks. The default value is 128. \item[{\sphinxstylestrong{scale}}] \leavevmode{[}\{'default', 'linear', 'dB'\}{]} The scaling of the values in the \sphinxstyleemphasis{spec}. 'linear' is no scaling. 'dB' returns the values in dB scale. When \sphinxstyleemphasis{mode} is 'psd', this is dB power (10 * log10). Otherwise this is dB amplitude (20 * log10). 'default' is 'dB' if \sphinxstyleemphasis{mode} is 'psd' or 'magnitude' and 'linear' otherwise. This must be 'linear' if \sphinxstyleemphasis{mode} is 'angle' or 'phase'. \item[{\sphinxstylestrong{Fc}}] \leavevmode{[}int{]} The center frequency of \sphinxstyleemphasis{x} (defaults to 0), which offsets the x extents of the plot to reflect the frequency range used when a signal is acquired and then filtered and downsampled to baseband. \item[{\sphinxstylestrong{cmap}}] \leavevmode A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap}}}}} instance; if \sphinxstyleemphasis{None}, use default determined by rc \item[{\sphinxstylestrong{xextent}}] \leavevmode{[}\sphinxstyleemphasis{None} or (xmin, xmax){]} The image extent along the x-axis. The default sets \sphinxstyleemphasis{xmin} to the left border of the first bin (\sphinxstyleemphasis{spectrum} column) and \sphinxstyleemphasis{xmax} to the right border of the last bin. Note that for \sphinxstyleemphasis{noverlap\textgreater{}0} the width of the bins is smaller than those of the segments. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are passed on to imshow which makes the specgram image. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spectrum}}] \leavevmode{[}2-D array{]} Columns are the periodograms of successive segments. \item[{\sphinxstylestrong{freqs}}] \leavevmode{[}1-D array{]} The frequencies corresponding to the rows in \sphinxstyleemphasis{spectrum}. \item[{\sphinxstylestrong{t}}] \leavevmode{[}1-D array{]} The times corresponding to midpoints of segments (i.e., the columns in \sphinxstyleemphasis{spectrum}). \item[{\sphinxstylestrong{im}}] \leavevmode{[}instance of class {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}{]} The image created by imshow containing the spectrogram \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd()}}}}} differs in the default overlap; in returning the mean of the segment periodograms; in not returning times; and in generating a line plot instead of colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'magnitude'. Plots a line instead of a colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'angle'. Plots a line instead of a colormap. \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum()}}}}}}] \leavevmode A single spectrum, similar to having a single segment when \sphinxstyleemphasis{mode} is 'phase'. Plots a line instead of a colormap. \end{description} \subsubsection*{Notes} The parameters \sphinxstyleemphasis{detrend} and \sphinxstyleemphasis{scale\_by\_freq} do only apply when \sphinxstyleemphasis{mode} is set to 'psd'. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.specgram}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.specgram:examples-using-matplotlib-pyplot-specgram}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_specgram\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.spring} \label{\detokenize{api/_as_gen/matplotlib.pyplot.spring:matplotlib-pyplot-spring}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.spring::doc}}\index{spring() (in module matplotlib.pyplot)@\spxentry{spring()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.spring:matplotlib.pyplot.spring}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{spring}}}{}{} Set the colormap to "spring". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.spy} \label{\detokenize{api/_as_gen/matplotlib.pyplot.spy:matplotlib-pyplot-spy}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.spy::doc}}\index{spy() (in module matplotlib.pyplot)@\spxentry{spy()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.spy:matplotlib.pyplot.spy}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{spy}}}{\emph{Z}, \emph{precision=0}, \emph{marker=None}, \emph{markersize=None}, \emph{aspect='equal'}, \emph{origin='upper'}, \emph{**kwargs}}{} Plot the sparsity pattern of a 2D array. This visualizes the non-zero values of the array. Two plotting styles are available: image and marker. Both are available for full arrays, but only the marker style works for \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} instances. \sphinxstylestrong{Image style} If \sphinxstyleemphasis{marker} and \sphinxstyleemphasis{markersize} are \sphinxstyleemphasis{None}, {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} is used. Any extra remaining kwargs are passed to this method. \sphinxstylestrong{Marker style} If \sphinxstyleemphasis{Z} is a \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} or \sphinxstyleemphasis{marker} or \sphinxstyleemphasis{markersize} are \sphinxstyleemphasis{None}, a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} object will be returned with the value of marker determining the marker type, and any remaining kwargs passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{Z}}] \leavevmode{[}array-like (M, N){]} The array to be plotted. \item[{\sphinxstylestrong{precision}}] \leavevmode{[}float or 'present', optional, default: 0{]} If \sphinxstyleemphasis{precision} is 0, any non-zero value will be plotted. Otherwise, values of \(|Z| > precision\) will be plotted. For \sphinxhref{https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.spmatrix.html\#scipy.sparse.spmatrix}{\sphinxcode{\sphinxupquote{scipy.sparse.spmatrix}}} instances, you can also pass 'present'. In this case any value present in the array will be plotted, even if it is identically zero. \item[{\sphinxstylestrong{origin}}] \leavevmode{[}\{'upper', 'lower'\}, optional{]} Place the {[}0,0{]} index of the array in the upper left or lower left corner of the axes. The convention 'upper' is typically used for matrices and images. If not given, \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.origin"{]}}}} is used, defaulting to 'upper'. \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}\{'equal', 'auto', None\} or float, optional{]} Controls the aspect ratio of the axes. The aspect is of particular relevance for images since it may distort the image, i.e. pixel will not be square. This parameter is a shortcut for explicitly calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.set\_aspect}}}}}. See there for further details. \begin{itemize} \item {} 'equal': Ensures an aspect ratio of 1. Pixels will be square. \item {} 'auto': The axes is kept fixed and the aspect is adjusted so that the data fit in the axes. In general, this will result in non-square pixels. \item {} \sphinxstyleemphasis{None}: Use \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"image.aspect"{]}}}} (default: 'equal'). \end{itemize} Default: 'equal' \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ret}}] \leavevmode{[}{\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} The return type depends on the plotting style (see above). \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode The supported additional parameters depend on the plotting style. For the image style, you can pass the following additional parameters of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.imshow:matplotlib.axes.Axes.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}}: \begin{itemize} \item {} \sphinxstyleemphasis{cmap} \item {} \sphinxstyleemphasis{alpha} \item {} \sphinxstyleemphasis{url} \item {} any {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} properties (passed on to the {\hyperref[\detokenize{api/image_api:matplotlib.image.AxesImage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesImage}}}}}) \end{itemize} For the marker style, you can pass any {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property except for \sphinxstyleemphasis{linestyle}: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dash_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dash\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_dashes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{dashes}}}}} & sequence of floats (on/off ink in points) or (None, None) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_drawstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{drawstyle}}}}} or ds & \{'default', 'steps', 'steps-pre', 'steps-mid', 'steps-post'\}, default: 'default' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_fillstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fillstyle}}}}} & \{'full', 'left', 'right', 'bottom', 'top', 'none'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_marker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{marker}}}}} & marker style \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgecolor}}}}} or mec & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markeredgewidth}}}}} or mew & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecolor}}}}} or mfc & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markerfacecoloralt}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markerfacecoloralt}}}}} or mfcalt & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markersize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markersize}}}}} or ms & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markevery}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{markevery}}}}} & None or int or (int, int) or slice or List{[}int{]} or float or (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & float or callable{[}{[}Artist, Event{]}, Tuple{[}bool, dict{]}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_pickradius}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pickradius}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_solid_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{solid\_joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_xdata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xdata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_ydata}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ydata}}}}} & 1D array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.spy}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.spy:examples-using-matplotlib-pyplot-spy}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_spy\_demos.py} \end{itemize} \subparagraph{matplotlib.pyplot.stackplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.stackplot:matplotlib-pyplot-stackplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.stackplot::doc}}\index{stackplot() (in module matplotlib.pyplot)@\spxentry{stackplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.stackplot:matplotlib.pyplot.stackplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{stackplot}}}{\emph{x}, \emph{*args}, \emph{labels=()}, \emph{colors=None}, \emph{baseline='zero'}, \emph{data=None}, \emph{**kwargs}}{} Draw a stacked area plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}1d array of dimension N{]} \item[{\sphinxstylestrong{y}}] \leavevmode{[}2d array (dimension MxN), or sequence of 1d arrays (each dimension 1xN){]} The data is assumed to be unstacked. Each of the following calls is legal: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{stackplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} where y is MxN} \PYG{n}{stackplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{n}{y3}\PYG{p}{,} \PYG{n}{y4}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} where y1, y2, y3, y4, are all 1xNm} \end{sphinxVerbatim} \item[{\sphinxstylestrong{baseline}}] \leavevmode{[}\{'zero', 'sym', 'wiggle', 'weighted\_wiggle'\}{]} Method used to calculate the baseline: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{'zero'}}: Constant zero baseline, i.e. a simple stacked plot. \item {} \sphinxcode{\sphinxupquote{'sym'}}: Symmetric around zero and is sometimes called 'ThemeRiver'. \item {} \sphinxcode{\sphinxupquote{'wiggle'}}: Minimizes the sum of the squared slopes. \item {} \sphinxcode{\sphinxupquote{'weighted\_wiggle'}}: Does the same but weights to account for size of each layer. It is also called 'Streamgraph'-layout. More details can be found at \sphinxurl{http://leebyron.com/streamgraph/}. \end{itemize} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}Length N sequence of strings{]} Labels to assign to each data series. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}Length N sequence of colors{]} A list or tuple of colors. These will be cycled through and used to colour the stacked areas. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other keyword arguments are passed to \sphinxcode{\sphinxupquote{Axes.fill\_between()}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{list}}] \leavevmode{[}list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}}{]} A list of {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolyCollection}}}}} instances, one for each element in the stacked area plot. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.stem} \label{\detokenize{api/_as_gen/matplotlib.pyplot.stem:matplotlib-pyplot-stem}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.stem::doc}}\index{stem() (in module matplotlib.pyplot)@\spxentry{stem()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.stem:matplotlib.pyplot.stem}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{stem}}}{\emph{*args}, \emph{linefmt=None}, \emph{markerfmt=None}, \emph{basefmt=None}, \emph{bottom=0}, \emph{label=None}, \emph{use\_line\_collection=False}, \emph{data=None}}{} Create a stem plot. A stem plot plots vertical lines at each \sphinxstyleemphasis{x} location from the baseline to \sphinxstyleemphasis{y}, and places a marker there. Call signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{stem}\PYG{p}{(}\PYG{p}{[}\PYG{n}{x}\PYG{p}{,}\PYG{p}{]} \PYG{n}{y}\PYG{p}{,} \PYG{n}{linefmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{markerfmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{basefmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)} \end{sphinxVerbatim} The x-positions are optional. The formats may be provided either as positional or as keyword-arguments. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like, optional{]} The x-positions of the stems. Default: (0, 1, ..., len(y) - 1). \item[{\sphinxstylestrong{y}}] \leavevmode{[}array-like{]} The y-values of the stem heads. \item[{\sphinxstylestrong{linefmt}}] \leavevmode{[}str, optional{]} A string defining the properties of the vertical lines. Usually, this will be a color or a color and a linestyle: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Character &\sphinxstyletheadfamily Line Style \\ \hline \sphinxcode{\sphinxupquote{'-'}} & solid line \\ \hline \sphinxcode{\sphinxupquote{'-{-}'}} & dashed line \\ \hline \sphinxcode{\sphinxupquote{'-.'}} & dash-dot line \\ \hline \sphinxcode{\sphinxupquote{':'}} & dotted line \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Default: 'C0-', i.e. solid line with the first color of the color cycle. Note: While it is technically possible to specify valid formats other than color or color and linestyle (e.g. 'rx' or '-.'), this is beyond the intention of the method and will most likely not result in a reasonable reasonable plot. \item[{\sphinxstylestrong{markerfmt}}] \leavevmode{[}str, optional{]} A string defining the properties of the markers at the stem heads. Default: 'C0o', i.e. filled circles with the first color of the color cycle. \item[{\sphinxstylestrong{basefmt}}] \leavevmode{[}str, optional{]} A format string defining the properties of the baseline. Default: 'C3-' ('C2-' in classic mode). \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}float, optional, default: 0{]} The y-position of the baseline. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str, optional, default: None{]} The label to use for the stems in legends. \item[{\sphinxstylestrong{use\_line\_collection}}] \leavevmode{[}bool, optional, default: False{]} If \sphinxcode{\sphinxupquote{True}}, store and plot the stem lines as a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} instead of individual lines. This significantly increases performance, and will become the default option in Matplotlib 3.3. If \sphinxcode{\sphinxupquote{False}}, defaults to the old behavior of using a list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{container}}] \leavevmode{[}{\hyperref[\detokenize{api/container_api:matplotlib.container.StemContainer}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StemContainer}}}}}{]} The container may be treated like a tuple (\sphinxstyleemphasis{markerline}, \sphinxstyleemphasis{stemlines}, \sphinxstyleemphasis{baseline}) \end{description} \end{description}\end{quote} \subsubsection*{Notes} \sphinxstrong{See also:} The MATLAB function \sphinxhref{http://www.mathworks.com/help/techdoc/ref/stem.html}{stem} which inspired this method. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All positional and all keyword arguments. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.stem}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.stem:examples-using-matplotlib-pyplot-stem}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_stem\_plot.py} \end{itemize} \subparagraph{matplotlib.pyplot.step} \label{\detokenize{api/_as_gen/matplotlib.pyplot.step:matplotlib-pyplot-step}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.step::doc}}\index{step() (in module matplotlib.pyplot)@\spxentry{step()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.step:matplotlib.pyplot.step}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{step}}}{\emph{x}, \emph{y}, \emph{*args}, \emph{where='pre'}, \emph{data=None}, \emph{**kwargs}}{} Make a step plot. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{step}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{where}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pre}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{step}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt}\PYG{p}{]}\PYG{p}{,} \PYG{n}{x2}\PYG{p}{,} \PYG{n}{y2}\PYG{p}{,} \PYG{p}{[}\PYG{n}{fmt2}\PYG{p}{]}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{p}{,} \PYG{n}{where}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{pre}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} This is just a thin wrapper around {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} which changes some formatting options. Most of the concepts and parameters of plot can be used here as well. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array\_like{]} 1-D sequence of x positions. It is assumed, but not checked, that it is uniformly increasing. \item[{\sphinxstylestrong{y}}] \leavevmode{[}array\_like{]} 1-D sequence of y levels. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str, optional{]} A format string, e.g. 'g' for a green line. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} for a more detailed description. Note: While full format strings are accepted, it is recommended to only specify the color. Line styles are currently ignored (use the keyword argument \sphinxstyleemphasis{linestyle} instead). Markers are accepted and plotted on the given positions, however, this is a rarely needed feature for step plots. \item[{\sphinxstylestrong{data}}] \leavevmode{[}indexable object, optional{]} An object with labelled data. If given, provide the label names to plot in \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \item[{\sphinxstylestrong{where}}] \leavevmode{[}\{'pre', 'post', 'mid'\}, optional, default 'pre'{]} Define where the steps should be placed: \begin{itemize} \item {} 'pre': The y value is continued constantly to the left from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{(x{[}i-1{]}, x{[}i{]}{]}}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'post': The y value is continued constantly to the right from every \sphinxstyleemphasis{x} position, i.e. the interval \sphinxcode{\sphinxupquote{{[}x{[}i{]}, x{[}i+1{]})}} has the value \sphinxcode{\sphinxupquote{y{[}i{]}}}. \item {} 'mid': Steps occur half-way between the \sphinxstyleemphasis{x} positions. \end{itemize} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{lines}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} objects representing the plotted data. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional parameters are the same as those for {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.step}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.step:examples-using-matplotlib-pyplot-step}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_step\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.streamplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib-pyplot-streamplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.streamplot::doc}}\index{streamplot() (in module matplotlib.pyplot)@\spxentry{streamplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{streamplot}}}{\emph{x}, \emph{y}, \emph{u}, \emph{v}, \emph{density=1}, \emph{linewidth=None}, \emph{color=None}, \emph{cmap=None}, \emph{norm=None}, \emph{arrowsize=1}, \emph{arrowstyle='-\textbar{}\textgreater{}'}, \emph{minlength=0.1}, \emph{transform=None}, \emph{zorder=None}, \emph{start\_points=None}, \emph{maxlength=4.0}, \emph{integration\_direction='both'}, \emph{*}, \emph{data=None}}{} Draw streamlines of a vector flow. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1d arrays{]} An evenly spaced grid. \item[{\sphinxstylestrong{u, v}}] \leavevmode{[}2d arrays{]} \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}-velocities. Number of rows should match length of \sphinxstyleemphasis{y}, and the number of columns should match \sphinxstyleemphasis{x}. \item[{\sphinxstylestrong{density}}] \leavevmode{[}float or 2-tuple{]} Controls the closeness of streamlines. When \sphinxcode{\sphinxupquote{density = 1}}, the domain is divided into a 30x30 grid---\sphinxstyleemphasis{density} linearly scales this grid. Each cell in the grid can have, at most, one traversing streamline. For different densities in each direction, use {[}density\_x, density\_y{]}. \item[{\sphinxstylestrong{linewidth}}] \leavevmode{[}numeric or 2d array{]} Vary linewidth when given a 2d array with the same shape as velocities. \item[{\sphinxstylestrong{color}}] \leavevmode{[}matplotlib color code, or 2d array{]} Streamline color. When given an array with the same shape as velocities, \sphinxstyleemphasis{color} values are converted to colors using \sphinxstyleemphasis{cmap}. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}}{]} Colormap used to plot streamlines and arrows. Only necessary when using an array input for \sphinxstyleemphasis{color}. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}}{]} Normalize object used to scale luminance data to 0, 1. If \sphinxcode{\sphinxupquote{None}}, stretch (min, max) to (0, 1). Only necessary when \sphinxstyleemphasis{color} is an array. \item[{\sphinxstylestrong{arrowsize}}] \leavevmode{[}float{]} Factor scale arrow size. \item[{\sphinxstylestrong{arrowstyle}}] \leavevmode{[}str{]} Arrow style specification. See {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}}. \item[{\sphinxstylestrong{minlength}}] \leavevmode{[}float{]} Minimum length of streamline in axes coordinates. \item[{\sphinxstylestrong{start\_points}}] \leavevmode{[}Nx2 array{]} Coordinates of starting points for the streamlines. In data coordinates, the same as the \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} arrays. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}int{]} Any number. \item[{\sphinxstylestrong{maxlength}}] \leavevmode{[}float{]} Maximum length of streamline in axes coordinates. \item[{\sphinxstylestrong{integration\_direction}}] \leavevmode{[}{[}'forward' \textbar{} 'backward' \textbar{} 'both'{]}{]} Integrate the streamline in forward, backward or both directions. default is \sphinxcode{\sphinxupquote{'both'}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{stream\_container}}] \leavevmode{[}StreamplotSet{]} Container object with attributes \begin{itemize} \item {} lines: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} of streamlines \item {} arrows: collection of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} objects representing arrows half-way along stream lines. \end{itemize} This container will probably change in the future to allow changes to the colormap, alpha, etc. for both lines and arrows, but these changes should be backward compatible. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'start\_points', 'u', 'v', 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.streamplot}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:examples-using-matplotlib-pyplot-streamplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \subparagraph{matplotlib.pyplot.subplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib-pyplot-subplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot::doc}}\index{subplot() (in module matplotlib.pyplot)@\spxentry{subplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{subplot}}}{\emph{*args}, \emph{**kwargs}}{} Add a subplot to the current figure. Wrapper of {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}} with a difference in behavior explained in the notes section. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{subplot}\PYG{p}{(}\PYG{n}{nrows}\PYG{p}{,} \PYG{n}{ncols}\PYG{p}{,} \PYG{n}{index}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{subplot}\PYG{p}{(}\PYG{n}{pos}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{subplot}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{*args}}] \leavevmode Either a 3-digit integer or three separate integers describing the position of the subplot. If the three integers are \sphinxstyleemphasis{nrows}, \sphinxstyleemphasis{ncols}, and \sphinxstyleemphasis{index} in order, the subplot will take the \sphinxstyleemphasis{index} position on a grid with \sphinxstyleemphasis{nrows} rows and \sphinxstyleemphasis{ncols} columns. \sphinxstyleemphasis{index} starts at 1 in the upper left corner and increases to the right. \sphinxstyleemphasis{pos} is a three digit integer, where the first digit is the number of rows, the second the number of columns, and the third the index of the subplot. i.e. fig.add\_subplot(235) is the same as fig.add\_subplot(2, 3, 5). Note that all integers must be less than 10 for this form to work. \item[{\sphinxstylestrong{projection}}] \leavevmode{[}\{None, 'aitoff', 'hammer', 'lambert', 'mollweide', 'polar', 'rectilinear', str\}, optional{]} The projection type of the subplot ({\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}). \sphinxstyleemphasis{str} is the name of a costum projection, see {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections}}}}}. The default None results in a 'rectilinear' projection. \item[{\sphinxstylestrong{polar}}] \leavevmode{[}boolean, optional{]} If True, equivalent to projection='polar'. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} Share the x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} with sharex and/or sharey. The axis will have the same limits, ticks, and scale as the axis of the shared axes. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} A label for the returned axes. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}an {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.SubplotBase:matplotlib.axes.SubplotBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.SubplotBase}}}}} subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} (or a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}){]} The axes of the subplot. The returned axes base class depends on the projection used. It is {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} if rectilinear projection are used and {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes}}}}} if polar projection are used. The returned axes is then a subplot subclass of the base class. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode This method also takes the keyword arguments for the returned axes base class. The keyword arguments for the rectilinear base class {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} can be found in the following table but there might also be other keyword arguments if another projection is used. \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplots}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots}}}}}}] \leavevmode \end{description} \subsubsection*{Notes} Creating a subplot will delete any pre-existing subplot that overlaps with it beyond sharing a boundary: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{c+c1}{\PYGZsh{} plot a line, implicitly creating a subplot(111)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} now create a subplot which represents the top plot of a grid} \PYG{c+c1}{\PYGZsh{} with 2 rows and 1 column. Since this subplot will overlap the} \PYG{c+c1}{\PYGZsh{} first, the plot (and its axes) previously created, will be removed} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{211}\PYG{p}{)} \end{sphinxVerbatim} If you do not want this behavior, use the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}} method or the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}} function instead. If the figure already has a subplot with key (\sphinxstyleemphasis{args}, \sphinxstyleemphasis{kwargs}) then it will simply make that subplot current and return it. This behavior is deprecated. Meanwhile, if you do not want this behavior (i.e., you want to force the creation of a new subplot), you must use a unique set of args and kwargs. The axes \sphinxstyleemphasis{label} attribute has been exposed for this purpose: if you want two subplots that are otherwise identical to be added to the figure, make sure you give them unique labels. In rare circumstances, {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot}}}}} may be called with a single argument, a subplot axes instance already created in the present figure but not in the figure's list of axes. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{221}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} equivalent but more general} \PYG{n}{ax1}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a subplot with no frame} \PYG{n}{ax2}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{222}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a polar subplot} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{223}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{polar}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add a red subplot that shares the x\PYGZhy{}axis with ax1} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{224}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} delete ax2 from the figure} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{delaxes}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} add ax2 to the figure again} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplot}\PYG{p}{(}\PYG{n}{ax2}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.subplot}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot:examples-using-matplotlib-pyplot-subplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_star\_poly.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_geo\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_multiple\_figs\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_shared\_axis\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_polar\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_text\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo\_kw.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_two\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_fancybox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_colorbar.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/unchained:sphx-glr-gallery-animation-unchained-py}]{\sphinxcrossref{\DUrole{std,std-ref}{MATPLOTLIB UNCHAINED}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_custom\_projection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_customize\_rc.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_agg\_filter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_patheffect\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_share\_axis\_lims\_views.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-locators.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend01.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/legend_guide:sphx-glr-tutorials-intermediate-legend-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Legend guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.subplot2grid} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib-pyplot-subplot2grid}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid::doc}}\index{subplot2grid() (in module matplotlib.pyplot)@\spxentry{subplot2grid()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{subplot2grid}}}{\emph{shape}, \emph{loc}, \emph{rowspan=1}, \emph{colspan=1}, \emph{fig=None}, \emph{**kwargs}}{} Create an axis at specific location inside a regular grid. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{shape}}] \leavevmode{[}sequence of 2 ints{]} Shape of grid in which to place axis. First entry is number of rows, second entry is number of columns. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}sequence of 2 ints{]} Location to place axis within grid. First entry is row number, second entry is column number. \item[{\sphinxstylestrong{rowspan}}] \leavevmode{[}int{]} Number of rows for the axis to span to the right. \item[{\sphinxstylestrong{colspan}}] \leavevmode{[}int{]} Number of columns for the axis to span downwards. \item[{\sphinxstylestrong{fig}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Figure}}, optional{]} Figure to place axis in. Defaults to current figure. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional keyword arguments are handed to \sphinxcode{\sphinxupquote{add\_subplot}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The following call \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{subplot2grid}\PYG{p}{(}\PYG{n}{shape}\PYG{p}{,} \PYG{n}{loc}\PYG{p}{,} \PYG{n}{rowspan}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{colspan}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \end{sphinxVerbatim} is identical to \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{gridspec}\PYG{o}{=}\PYG{n}{GridSpec}\PYG{p}{(}\PYG{n}{shape}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{p}{,} \PYG{n}{shape}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{n}{subplotspec}\PYG{o}{=}\PYG{n}{gridspec}\PYG{o}{.}\PYG{n}{new\PYGZus{}subplotspec}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{,} \PYG{n}{rowspan}\PYG{p}{,} \PYG{n}{colspan}\PYG{p}{)} \PYG{n}{subplot}\PYG{p}{(}\PYG{n}{subplotspec}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.subplot2grid}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:examples-using-matplotlib-pyplot-subplot2grid}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_demo\_gridspec01.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.subplot\_tool} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool:matplotlib-pyplot-subplot-tool}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool::doc}}\index{subplot\_tool() (in module matplotlib.pyplot)@\spxentry{subplot\_tool()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool:matplotlib.pyplot.subplot_tool}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{subplot\_tool}}}{\emph{targetfig=None}}{} Launch a subplot tool window for a figure. A {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.SubplotTool}}}}} instance is returned. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.subplot\_tool}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool:examples-using-matplotlib-pyplot-subplot-tool}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot\_toolbar.py} \end{itemize} \subparagraph{matplotlib.pyplot.subplots} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib-pyplot-subplots}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots::doc}}\index{subplots() (in module matplotlib.pyplot)@\spxentry{subplots()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{subplots}}}{\emph{nrows=1}, \emph{ncols=1}, \emph{sharex=False}, \emph{sharey=False}, \emph{squeeze=True}, \emph{subplot\_kw=None}, \emph{gridspec\_kw=None}, \emph{**fig\_kw}}{} Create a figure and a set of subplots. This utility wrapper makes it convenient to create common layouts of subplots, including the enclosing figure object, in a single call. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows, ncols}}] \leavevmode{[}int, optional, default: 1{]} Number of rows/columns of the subplot grid. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}bool or \{'none', 'all', 'row', 'col'\}, default: False{]} Controls sharing of properties among x (\sphinxcode{\sphinxupquote{sharex}}) or y (\sphinxcode{\sphinxupquote{sharey}}) axes: \begin{itemize} \item {} True or 'all': x- or y-axis will be shared among all subplots. \item {} False or 'none': each subplot x- or y-axis will be independent. \item {} 'row': each subplot row will share an x- or y-axis. \item {} 'col': each subplot column will share an x- or y-axis. \end{itemize} When subplots have a shared x-axis along a column, only the x tick labels of the bottom subplot are created. Similarly, when subplots have a shared y-axis along a row, only the y tick labels of the first column subplot are created. To later turn other subplots' ticklabels on, use {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params}}}}}. \item[{\sphinxstylestrong{squeeze}}] \leavevmode{[}bool, optional, default: True{]}\begin{itemize} \item {} If True, extra dimensions are squeezed out from the returned array of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}: \begin{itemize} \item {} if only one subplot is constructed (nrows=ncols=1), the resulting single Axes object is returned as a scalar. \item {} for Nx1 or 1xM subplots, the returned object is a 1D numpy object array of Axes objects. \item {} for NxM, subplots with N\textgreater{}1 and M\textgreater{}1 are returned as a 2D array. \end{itemize} \item {} If False, no squeezing at all is done: the returned Axes object is always a 2D array containing Axes instances, even if it ends up being 1x1. \end{itemize} \item[{\sphinxstylestrong{num}}] \leavevmode{[}integer or string, optional, default: None{]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.figure}}}}} keyword that sets the figure number or label. \item[{\sphinxstylestrong{subplot\_kw}}] \leavevmode{[}dict, optional{]} Dict with keywords passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_subplot}}}}} call used to create each subplot. \item[{\sphinxstylestrong{gridspec\_kw}}] \leavevmode{[}dict, optional{]} Dict with keywords passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.GridSpec:matplotlib.gridspec.GridSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridSpec}}}}} constructor used to create the grid the subplots are placed on. \item[{\sphinxstylestrong{**fig\_kw}}] \leavevmode All additional keyword arguments are passed to the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.figure}}}}} call. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes.Axes}}}}} object or array of Axes objects.{]} \sphinxstyleemphasis{ax} can be either a single {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object or an array of Axes objects if more than one subplot was created. The dimensions of the resulting array can be controlled with the squeeze keyword, see above. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.figure}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.subplot}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.axes}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.add_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.add\_subplot}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} First create some toy data:} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{400}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates just a figure and only one subplot} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Simple plot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates two subplots and unpacks the output array immediately} \PYG{n}{f}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sharing Y axis}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates four polar axes, and accesses them through the returned array} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{subplot\PYGZus{}kw}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{polar}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)}\PYG{p}{)} \PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share a X axis with each column of subplots} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{col}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share a Y axis with each row of subplots} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{row}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Share both X and Y axes with all subplots} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{all}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Note that this is the same as} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{sharey}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Creates figure number 10 with a single subplot} \PYG{c+c1}{\PYGZsh{} and clears it if it already exists.} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{num}\PYG{o}{=}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{clear}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.subplots}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots:examples-using-matplotlib-pyplot-subplots}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barchart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_barh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_broken\_barh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_categorical\_variables.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_cohere.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_csd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_errorbar\_subsample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_eventplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill\_between\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_fill\_betweenx\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_filled\_step.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_gradient\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_joinstyle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_line\_demo\_dash\_control.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_linestyles.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_marker\_fillstyle\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_marker\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_markevery\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_multicolored\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_custom\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_piecharts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_with\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_simple\_plot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_span\_regions.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_spectrum\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_stackplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_timeline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_vline\_hline\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_affine\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_barb\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_corner\_mask.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contour\_label\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_hatching.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_contourf\_log.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_demo\_bboximage.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_clip\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_masked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_nonuniform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_transparency\_blend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_zcoord.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_interpolation\_methods.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_multi\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_pcolormesh\_levels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quadmesh\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_quiver\_simple\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_shading\_example.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_specgram\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_spy\_demos.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tripcolor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_watermark\_image.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_margins.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_props.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axis\_equal\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_broken\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_colorbar\_placement.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_constrained\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_fahrenheit\_celsius\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_figure\_title.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_ganged\_plots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_and\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_secondary\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot\_toolbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_two\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_zoom\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_barchart\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_color.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_boxplot\_vs\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_bxp.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_confidence\_ellipse.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_customized\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbar\_limits.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_errorbars\_and\_boxes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hexbin\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_hist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_cumulative.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_histtypes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_histogram\_multihist.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_multiple\_histograms\_side\_by\_side.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_violinplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_features.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_nested\_pie.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pie\_and\_polar\_charts\_pie\_and\_donut\_labels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_accented\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_annotation\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_custom\_legends.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_dashpointlabel.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_date.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_date\_index\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_demo\_annotation\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_engineering\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_figlegend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_family\_rc\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_file.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_font\_table.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_legend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_line\_with\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_mathtext\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_tex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_unicode\_minus.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_watermark\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_align\_ylabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotate\_transform.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_annotation\_basic.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_auto\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_boxplot\_demo\_pyplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_dollar\_ticks.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_98\_4\_fill\_between.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_by\_yvalue.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycle\_default.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_color\_cycler.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colorbar\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_colormap\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_custom\_cmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_color\_named\_colors.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_arrow\_guide.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_collections.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_compound\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_dolphin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_donut.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_hatch\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_line\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_patch\_collection.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_path\_patch.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_quad\_bezier.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_bmh.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_dark\_background.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_fivethirtyeight.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_ggplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_grayscale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_style\_sheets\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_anchored\_direction\_arrows.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_with\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_with\_inset\_locator.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_scatter\_hist\_locatable\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_bachelors\_degrees\_by\_gender.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_integral.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/animate_decay:sphx-glr-gallery-animation-animate-decay-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Decay}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/animated_histogram:sphx-glr-gallery-animation-animated-histogram-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated histogram}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_animation\_animation\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/bayes_update:sphx-glr-gallery-animation-bayes-update-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The Bayes update}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/simple_anim:sphx-glr-gallery-animation-simple-anim-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Animated line plot}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/strip_chart:sphx-glr-gallery-animation-strip-chart-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Oscilloscope}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_coords\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_data\_browser.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_figure\_axes\_enter\_leave.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_image\_slices\_viewer.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_keypress\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_legend\_picking.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_looking\_glass.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_path\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pick\_event\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_poly\_editor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_pong\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_resample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_timers.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_viewlims.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_zoom\_window.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_3D.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_contour.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_histogram.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_frontpage\_membrane.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_agg\_buffer\_to\_array.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_bbox\_intersect.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_coords\_report.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_cursor\_demo\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_ribbon\_box.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_histogram\_path.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_keyword\_plotting.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_load\_converter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multiprocess\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_pythonic\_matplotlib.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_rasterization\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_custom\_shaded\_3d\_surface.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d\_zero\_stride.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_common\_date\_problems.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_create\_subplots.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_fill\_between\_alpha.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_recipes\_placing\_text\_boxes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_aspect\_loglog.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_bar.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_log\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_power\_norm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_advanced\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_leftventricle\_bulleye.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_mri\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_radar\_chart.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_topographic\_hillshading.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_auto\_ticks.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_centered\_ticklabels.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_colorbar\_tick\_labelling\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_custom\_ticker1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_concise\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_demo\_convert.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_demo\_rrule.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_date\_index\_formatter2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_major\_minor\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_multiple\_yaxis\_with\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_scalarformatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines\_bounds.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines\_dropped.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_label\_right.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_labels\_from\_values.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick\_xlabel\_top.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_annotate\_with\_units.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_artist\_tests.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_bar\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_bar\_unit\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_evans\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_radian\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_units\_sample.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_units\_units\_scatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_pylab\_with\_gtk\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_tooltip\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_explain.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple04.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_simple\_coord03.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_annotate\_text\_arrow.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_bounds.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_custom.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_diverging.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_lognorm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_power.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_colormap\_normalizations\_symlognorm.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connect\_simple01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_connectionstyle\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_custom\_boxstyle01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_custom\_boxstyle02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_annotate01.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_simple\_legend02.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_check\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_lasso\_selector\_demo\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_multicursor.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_polygon\_selector\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_radio\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_rectangle\_selector.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_span\_selector.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/sample_plots:sphx-glr-tutorials-introductory-sample-plots-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Sample plots in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/lifecycle:sphx-glr-tutorials-introductory-lifecycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{The Lifecycle of a Plot}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/artists:sphx-glr-tutorials-intermediate-artists-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Artist tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/color_cycle:sphx-glr-tutorials-intermediate-color-cycle-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Styling with cycler}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/gridspec:sphx-glr-tutorials-intermediate-gridspec-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customizing Figure Layouts Using GridSpec and Other Functions}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/constrainedlayout_guide:sphx-glr-tutorials-intermediate-constrainedlayout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Constrained Layout Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/path_tutorial:sphx-glr-tutorials-advanced-path-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/transforms_tutorial:sphx-glr-tutorials-advanced-transforms-tutorial-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Transformations Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colors:sphx-glr-tutorials-colors-colors-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Specifying Colors}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colorbar_only:sphx-glr-tutorials-colors-colorbar-only-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Customized Colorbars Tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormap-manipulation:sphx-glr-tutorials-colors-colormap-manipulation-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Creating Colormaps in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormapnorms:sphx-glr-tutorials-colors-colormapnorms-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Colormap Normalization}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/colors/colormaps:sphx-glr-tutorials-colors-colormaps-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Choosing Colormaps in Matplotlib}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/text/text_intro:sphx-glr-tutorials-text-text-intro-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Text in Matplotlib Plots}}}} \end{itemize} \subparagraph{matplotlib.pyplot.subplots\_adjust} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib-pyplot-subplots-adjust}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust::doc}}\index{subplots\_adjust() (in module matplotlib.pyplot)@\spxentry{subplots\_adjust()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib.pyplot.subplots_adjust}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{subplots\_adjust}}}{\emph{left=None}, \emph{bottom=None}, \emph{right=None}, \emph{top=None}, \emph{wspace=None}, \emph{hspace=None}}{} Tune the subplot layout. The parameter meanings (and suggested defaults) are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{left} \PYG{o}{=} \PYG{l+m+mf}{0.125} \PYG{c+c1}{\PYGZsh{} the left side of the subplots of the figure} \PYG{n}{right} \PYG{o}{=} \PYG{l+m+mf}{0.9} \PYG{c+c1}{\PYGZsh{} the right side of the subplots of the figure} \PYG{n}{bottom} \PYG{o}{=} \PYG{l+m+mf}{0.1} \PYG{c+c1}{\PYGZsh{} the bottom of the subplots of the figure} \PYG{n}{top} \PYG{o}{=} \PYG{l+m+mf}{0.9} \PYG{c+c1}{\PYGZsh{} the top of the subplots of the figure} \PYG{n}{wspace} \PYG{o}{=} \PYG{l+m+mf}{0.2} \PYG{c+c1}{\PYGZsh{} the amount of width reserved for space between subplots,} \PYG{c+c1}{\PYGZsh{} expressed as a fraction of the average axis width} \PYG{n}{hspace} \PYG{o}{=} \PYG{l+m+mf}{0.2} \PYG{c+c1}{\PYGZsh{} the amount of height reserved for space between subplots,} \PYG{c+c1}{\PYGZsh{} expressed as a fraction of the average axis height} \end{sphinxVerbatim} The actual defaults are controlled by the rc file \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.subplots\_adjust}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:examples-using-matplotlib-pyplot-subplots-adjust}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplots\_adjust.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_statistics\_customized\_violin.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_parasite\_axes2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_demo\_agg\_filter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_spines.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_tick-locators.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_ticklabels\_rotation.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_check\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_radio\_buttons.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_slider\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_widgets\_textbox.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.summer} \label{\detokenize{api/_as_gen/matplotlib.pyplot.summer:matplotlib-pyplot-summer}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.summer::doc}}\index{summer() (in module matplotlib.pyplot)@\spxentry{summer()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.summer:matplotlib.pyplot.summer}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{summer}}}{}{} Set the colormap to "summer". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.suptitle} \label{\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:matplotlib-pyplot-suptitle}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.suptitle::doc}}\index{suptitle() (in module matplotlib.pyplot)@\spxentry{suptitle()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:matplotlib.pyplot.suptitle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{suptitle}}}{\emph{t}, \emph{**kwargs}}{} Add a centered title to the figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}str{]} The title text. \item[{\sphinxstylestrong{x}}] \leavevmode{[}float, default 0.5{]} The x location of the text in figure coordinates. \item[{\sphinxstylestrong{y}}] \leavevmode{[}float, default 0.98{]} The y location of the text in figure coordinates. \item[{\sphinxstylestrong{horizontalalignment, ha}}] \leavevmode{[}\{'center', 'left', right'\}, default: 'center'{]} The horizontal alignment of the text relative to (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \item[{\sphinxstylestrong{verticalalignment, va}}] \leavevmode{[}\{'top', 'center', 'bottom', 'baseline'\}, default: 'top'{]} The vertical alignment of the text relative to (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}). \item[{\sphinxstylestrong{fontsize, size}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titlesize"{]}}}}{]} The font size of the text. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_size}}}}} for possible values. \item[{\sphinxstylestrong{fontweight, weight}}] \leavevmode{[}default: \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titleweight"{]}}}}{]} The font weight of the text. See {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text.set\_weight}}}}} for possible values. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{text}] \leavevmode The {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance of the title. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontproperties}}] \leavevmode{[}None or dict, optional{]} A dict of font properties. If \sphinxstyleemphasis{fontproperties} is given the default values for font size and weight are taken from the \sphinxcode{\sphinxupquote{FontProperties}} defaults. \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titlesize"{]}}}} and \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"figure.titleweight"{]}}}} are ignored in this case. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} properties. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{suptitle}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{This is the figure title}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.suptitle}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:examples-using-matplotlib-pyplot-suptitle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_gridspec\_nested.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.switch\_backend} \label{\detokenize{api/_as_gen/matplotlib.pyplot.switch_backend:matplotlib-pyplot-switch-backend}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.switch_backend::doc}}\index{switch\_backend() (in module matplotlib.pyplot)@\spxentry{switch\_backend()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.switch_backend:matplotlib.pyplot.switch_backend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{switch\_backend}}}{\emph{newbackend}}{} Close all open figures and set the Matplotlib backend. The argument is case-insensitive. Switching to an interactive backend is possible only if no event loop for another interactive backend has started. Switching to and from non-interactive backends is always possible. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{newbackend}}] \leavevmode{[}str{]} The name of the backend to use. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{matplotlib.pyplot.table} \label{\detokenize{api/_as_gen/matplotlib.pyplot.table:matplotlib-pyplot-table}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.table::doc}}\index{table() (in module matplotlib.pyplot)@\spxentry{table()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.table:matplotlib.pyplot.table}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{table}}}{\emph{cellText=None}, \emph{cellColours=None}, \emph{cellLoc='right'}, \emph{colWidths=None}, \emph{rowLabels=None}, \emph{rowColours=None}, \emph{rowLoc='left'}, \emph{colLabels=None}, \emph{colColours=None}, \emph{colLoc='center'}, \emph{loc='bottom'}, \emph{bbox=None}, \emph{edges='closed'}, \emph{**kwargs}}{} Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. At least one of \sphinxstyleemphasis{cellText} or \sphinxstyleemphasis{cellColours} must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements. The table can optionally have row and column headers, which are configured using \sphinxstyleemphasis{rowLabels}, \sphinxstyleemphasis{rowColours}, \sphinxstyleemphasis{rowLoc} and \sphinxstyleemphasis{colLabels}, \sphinxstyleemphasis{colColours}, \sphinxstyleemphasis{colLoc} respectively. For finer grained control over tables, use the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} class and add it to the axes with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib.axes.Axes.add_table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_table}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cellText}}] \leavevmode{[}2D list of str, optional{]} The texts to place into the table cells. \sphinxstyleemphasis{Note}: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries. \item[{\sphinxstylestrong{cellColours}}] \leavevmode{[}2D list of matplotlib color specs, optional{]} The background colors of the cells. \item[{\sphinxstylestrong{cellLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, default: 'right'{]} The alignment of the text within the cells. \item[{\sphinxstylestrong{colWidths}}] \leavevmode{[}list of float, optional{]} The column widths in units of the axes. If not given, all columns will have a width of \sphinxstyleemphasis{1 / ncols}. \item[{\sphinxstylestrong{rowLabels}}] \leavevmode{[}list of str, optional{]} The text of the row header cells. \item[{\sphinxstylestrong{rowColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the row header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the row header cells. \item[{\sphinxstylestrong{colLabels}}] \leavevmode{[}list of str, optional{]} The text of the column header cells. \item[{\sphinxstylestrong{colColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the column header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the column header cells. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str, optional{]} The position of the cell with respect to \sphinxstyleemphasis{ax}. This must be one of the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{codes}}}}}. \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} A bounding box to draw the table into. If this is not \sphinxstyleemphasis{None}, this overrides \sphinxstyleemphasis{loc}. \item[{\sphinxstylestrong{edges}}] \leavevmode{[}substring of 'BRTL' or \{'open', 'closed', 'horizontal', 'vertical'\}{]} The cell edges to be drawn with a line. See also {\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible\_edges}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{table}}] \leavevmode{[}{\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}}{]} The created table. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} properties. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.table}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.table:examples-using-matplotlib-pyplot-table}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.text} \label{\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib-pyplot-text}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.text::doc}}\index{text() (in module matplotlib.pyplot)@\spxentry{text()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{text}}}{\emph{x}, \emph{y}, \emph{s}, \emph{fontdict=None}, \emph{withdash=\textless{}deprecated parameter\textgreater{}}, \emph{**kwargs}}{} Add text to the axes. Add the text \sphinxstyleemphasis{s} to the axes at location \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}scalars{]} The position to place the text. By default, this is in data coordinates. The coordinate system can be changed using the \sphinxstyleemphasis{transform} parameter. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dictionary, optional, default: None{]} A dictionary to override the default text properties. If fontdict is None, the defaults are determined by your rc parameters. \item[{\sphinxstylestrong{withdash}}] \leavevmode{[}boolean, optional, default: False{]} Creates a {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} instance instead of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The created {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties.{]} Other miscellaneous text parameters. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Individual keyword arguments can be used to override any given parameter: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} The default transform specifies that text is in data coords, alternatively, you can specify text in axis coords (0,0 is lower-left and 1,1 is upper-right). The example below places text in the center of the axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} You can put a rectangular box around the text instance (e.g., to set a background color) by using the keyword \sphinxcode{\sphinxupquote{bbox}}. \sphinxcode{\sphinxupquote{bbox}} is a dictionary of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} properties. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.text}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.text:examples-using-matplotlib-pyplot-text}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_autowrap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fancytextbox\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_fonts\_demo\_kw.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation\_relative\_to\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_text\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_close\_event.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_transoffset.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_anscombe.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/advanced/patheffects_guide:sphx-glr-tutorials-advanced-patheffects-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Path effects guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.thetagrids} \label{\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib-pyplot-thetagrids}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids::doc}}\index{thetagrids() (in module matplotlib.pyplot)@\spxentry{thetagrids()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib.pyplot.thetagrids}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{thetagrids}}}{\emph{*args}, \emph{**kwargs}}{} Get or set the theta gridlines on the current polar plot. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{thetagrids}\PYG{p}{(}\PYG{p}{)} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{thetagrids}\PYG{p}{(}\PYG{n}{angles}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{fmt}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} When called with no arguments, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib.pyplot.thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thetagrids}}}}} simply returns the tuple (\sphinxstyleemphasis{lines}, \sphinxstyleemphasis{labels}). When called with arguments, the labels will appear at the specified angles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{angles}}] \leavevmode{[}tuple with floats, degrees{]} The angles of the theta gridlines. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}tuple with strings or None{]} The labels to use at each radial gridline. The {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.ThetaFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.ThetaFormatter}}}}} will be used if None. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str or None{]} Format string used in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FormatStrFormatter}}}}}. For example '\%f'. Note that the angle in radians will be used. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines, labels}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lines.Line2D}}}}}, list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.Text}}}}}{]} \sphinxstyleemphasis{lines} are the theta gridlines and \sphinxstyleemphasis{labels} are the tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode \sphinxstyleemphasis{kwargs} are optional {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties for the labels. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib.pyplot.rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.rgrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.PolarAxes.set\_thetagrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gridlines}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabels}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} set the locations of the angular gridlines} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{thetagrids}\PYG{p}{(} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{45}\PYG{p}{,}\PYG{l+m+mi}{360}\PYG{p}{,}\PYG{l+m+mi}{90}\PYG{p}{)} \PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the locations and labels of the angular gridlines} \PYG{n}{lines}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{thetagrids}\PYG{p}{(} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{45}\PYG{p}{,}\PYG{l+m+mi}{360}\PYG{p}{,}\PYG{l+m+mi}{90}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{NE}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{NW}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{SW}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{SE}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{matplotlib.pyplot.tick\_params} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tick_params:matplotlib-pyplot-tick-params}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.tick_params::doc}}\index{tick\_params() (in module matplotlib.pyplot)@\spxentry{tick\_params()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.tick_params:matplotlib.pyplot.tick_params}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{tick\_params}}}{\emph{axis='both'}, \emph{**kwargs}}{} Change the appearance of ticks, tick labels, and gridlines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'x', 'y', 'both'\}, optional{]} Which axis to apply the parameters to. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}\{'x', 'y', 'both'\}{]} Axis on which to operate; default is 'both'. \item[{\sphinxstylestrong{reset}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{True}, set all parameters to defaults before processing other keyword arguments. Default is \sphinxstyleemphasis{False}. \item[{\sphinxstylestrong{which}}] \leavevmode{[}\{'major', 'minor', 'both'\}{]} Default is 'major'; apply arguments to \sphinxstyleemphasis{which} ticks. \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{'in', 'out', 'inout'\}{]} Puts ticks inside the axes, outside the axes, or both. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float{]} Tick length in points. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} Tick width in points. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} Tick color; accepts any mpl color spec. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Distance in points between tick and label. \item[{\sphinxstylestrong{labelsize}}] \leavevmode{[}float or str{]} Tick label font size in points or as a string (e.g., 'large'). \item[{\sphinxstylestrong{labelcolor}}] \leavevmode{[}color{]} Tick label color; mpl color spec. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}color{]} Changes the tick color and the label color to the same value: mpl color spec. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}float{]} Tick and label zorder. \item[{\sphinxstylestrong{bottom, top, left, right}}] \leavevmode{[}bool{]} Whether to draw the respective ticks. \item[{\sphinxstylestrong{labelbottom, labeltop, labelleft, labelright}}] \leavevmode{[}bool{]} Whether to draw the respective tick labels. \item[{\sphinxstylestrong{labelrotation}}] \leavevmode{[}float{]} Tick label rotation \item[{\sphinxstylestrong{grid\_color}}] \leavevmode{[}color{]} Changes the gridline color to the given mpl color spec. \item[{\sphinxstylestrong{grid\_alpha}}] \leavevmode{[}float{]} Transparency of gridlines: 0 (transparent) to 1 (opaque). \item[{\sphinxstylestrong{grid\_linewidth}}] \leavevmode{[}float{]} Width of gridlines in points. \item[{\sphinxstylestrong{grid\_linestyle}}] \leavevmode{[}string{]} Any valid {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} line style spec. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Usage \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{tick\PYGZus{}params}\PYG{p}{(}\PYG{n}{direction}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{out}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{length}\PYG{o}{=}\PYG{l+m+mi}{6}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{grid\PYGZus{}color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{grid\PYGZus{}alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} This will make all major ticks be red, pointing out of the box, and with dimensions 6 points by 2 points. Tick labels will also be red. Gridlines will be red and translucent. \end{fulllineitems} \subparagraph{matplotlib.pyplot.ticklabel\_format} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ticklabel_format:matplotlib-pyplot-ticklabel-format}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ticklabel_format::doc}}\index{ticklabel\_format() (in module matplotlib.pyplot)@\spxentry{ticklabel\_format()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ticklabel_format:matplotlib.pyplot.ticklabel_format}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ticklabel\_format}}}{\emph{*}, \emph{axis='both'}, \emph{style=''}, \emph{scilimits=None}, \emph{useOffset=None}, \emph{useLocale=None}, \emph{useMathText=None}}{} Change the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} used by default for linear axes. Optional keyword arguments: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Keyword &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{axis} & {[} 'x' \textbar{} 'y' \textbar{} 'both' {]} \\ \hline \sphinxstyleemphasis{style} & {[} 'sci' (or 'scientific') \textbar{} 'plain' {]} plain turns off scientific notation \\ \hline \sphinxstyleemphasis{scilimits} & (m, n), pair of integers; if \sphinxstyleemphasis{style} is 'sci', scientific notation will be used for numbers outside the range 10$^{\text{m}}$ to 10$^{\text{n}}$. Use (0,0) to include all numbers. Use (m,m) where m \textless{}\textgreater{} 0 to fix the order of magnitude to 10$^{\text{m}}$. \\ \hline \sphinxstyleemphasis{useOffset} & {[} bool \textbar{} offset {]}; if True, the offset will be calculated as needed; if False, no offset will be used; if a numeric offset is specified, it will be used. \\ \hline \sphinxstyleemphasis{useLocale} & If True, format the number according to the current locale. This affects things such as the character used for the decimal separator. If False, use C-style (English) formatting. The default setting is controlled by the axes.formatter.use\_locale rcparam. \\ \hline \sphinxstyleemphasis{useMathText} & If True, render the offset and scientific notation in mathtext \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Only the major ticks are affected. If the method is called when the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} is not the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} being used, an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#AttributeError}{\sphinxcode{\sphinxupquote{AttributeError}}} will be raised. \end{fulllineitems} \subparagraph{matplotlib.pyplot.tight\_layout} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib-pyplot-tight-layout}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout::doc}}\index{tight\_layout() (in module matplotlib.pyplot)@\spxentry{tight\_layout()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{tight\_layout}}}{\emph{pad=1.08}, \emph{h\_pad=None}, \emph{w\_pad=None}, \emph{rect=None}}{} Automatically adjust subplot parameters to give specified padding. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Padding between the figure edge and the edges of subplots, as a fraction of the font size. \item[{\sphinxstylestrong{h\_pad, w\_pad}}] \leavevmode{[}float, optional{]} Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to \sphinxstyleemphasis{pad}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}tuple (left, bottom, right, top), optional{]} A rectangle (left, bottom, right, top) in the normalized figure coordinate that the whole subplots area (including labels) will fit into. Default is (0, 0, 1, 1). \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.tight\_layout}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:examples-using-matplotlib-pyplot-tight-layout}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_linestyles.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_image\_annotated\_heatmap.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_interpolation\_methods.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_plot\_streamplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_demo\_tight\_layout.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_engineering\_formatter.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_figlegend\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_artist\_reference.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_wire3d\_zero\_stride.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_mri\_with\_eeg.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/intermediate/tight_layout_guide:sphx-glr-tutorials-intermediate-tight-layout-guide-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Tight Layout guide}}}} \end{itemize} \subparagraph{matplotlib.pyplot.title} \label{\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib-pyplot-title}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.title::doc}}\index{title() (in module matplotlib.pyplot)@\spxentry{title()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{title}}}{\emph{label}, \emph{fontdict=None}, \emph{loc='center'}, \emph{pad=None}, \emph{**kwargs}}{} Set a title for the axes. Set one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text to use for the title \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} A dictionary controlling the appearance of the title text, the default \sphinxcode{\sphinxupquote{fontdict}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontweight}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titleweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{verticalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{baseline}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{loc}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{'center', 'left', 'right'\}, str, optional{]} Which title to set, defaults to 'center' \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} The offset of the title from the top of the axes, in points. Default is \sphinxcode{\sphinxupquote{None}} to use rcParams{[}'axes.titlepad'{]}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The matplotlib text instance representing the title \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} Other keyword arguments are text properties, see {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} for a list of valid text properties. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.title}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.title:examples-using-matplotlib-pyplot-title}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_markevery\_prop\_cycle.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_masked\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_psd\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_geo\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_titles\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_plot\_solarizedlight2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_contour\_manual.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_multipage\_pdf.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_set\_and\_get.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_zorder\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_specialty\_plots\_sankey\_basics.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_user\_interfaces\_svg\_histogram\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.tricontour} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib-pyplot-tricontour}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontour::doc}}\index{tricontour() (in module matplotlib.pyplot)@\spxentry{tricontour()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{tricontour}}}{\emph{*args}, \emph{**kwargs}}{} Draw contours on an unstructured triangular grid. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. The triangulation can be specified in one of two ways; either \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{triangulation} is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object will be created. See that class' docstring for an explanation of these cases. The remaining arguments may be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. The level values are chosen automatically. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \end{sphinxVerbatim} contour up to \sphinxstyleemphasis{N+1} automatically chosen contour levels (\sphinxstyleemphasis{N} intervals). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} draw contour lines at the values specified in sequence \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontourf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} fill the (len(\sphinxstyleemphasis{V})-1) regions between the values in \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Use keyword args to control colors, linewidth, origin, cmap ... see below for more details. \sphinxcode{\sphinxupquote{tricontour(...)}} returns a \sphinxcode{\sphinxupquote{TriContourSet}} object. Optional keyword arguments: \begin{quote} \sphinxstyleemphasis{colors}: {[} \sphinxstyleemphasis{None} \textbar{} string \textbar{} (mpl\_colors) {]} If \sphinxstyleemphasis{None}, the colormap specified by cmap will be used. If a string, like 'r' or 'red', all levels will be plotted in this color. If a tuple of matplotlib color args (string, float, rgb, etc), different levels will be plotted in different colors in the order specified. \sphinxstyleemphasis{alpha}: float The alpha blending value \sphinxstyleemphasis{cmap}: {[} \sphinxstyleemphasis{None} \textbar{} Colormap {]} A cm {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{cmap} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, a default Colormap is used. \sphinxstyleemphasis{norm}: {[} \sphinxstyleemphasis{None} \textbar{} Normalize {]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance for scaling data values to colors. If \sphinxstyleemphasis{norm} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, the default linear scaling is used. \sphinxstyleemphasis{levels} {[}level0, level1, ..., leveln{]} A list of floating point numbers indicating the level curves to draw, in increasing order; e.g., to draw just the zero contour pass \sphinxcode{\sphinxupquote{levels={[}0{]}}} \sphinxstyleemphasis{origin}: {[} \sphinxstyleemphasis{None} \textbar{} 'upper' \textbar{} 'lower' \textbar{} 'image' {]} If \sphinxstyleemphasis{None}, the first value of \sphinxstyleemphasis{Z} will correspond to the lower left corner, location (0,0). If 'image', the rc value for \sphinxcode{\sphinxupquote{image.origin}} will be used. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{extent}: {[} \sphinxstyleemphasis{None} \textbar{} (x0,x1,y0,y1) {]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.imshow()}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{locator}: {[} \sphinxstyleemphasis{None} \textbar{} ticker.Locator subclass {]} If \sphinxstyleemphasis{locator} is None, the default {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} is used. The locator is used to determine the contour levels if they are not given explicitly via the \sphinxstyleemphasis{V} argument. \sphinxstyleemphasis{extend}: {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} Unless this is 'neither', contour levels are automatically added to one or both ends of the range so that all data are included. These added ranges are then mapped to the special colormap values which default to the ends of the colormap range, but can be set via {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_under()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_over()}}}}} methods. \sphinxstyleemphasis{xunits}, \sphinxstyleemphasis{yunits}: {[} \sphinxstyleemphasis{None} \textbar{} registered units {]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \end{quote} tricontour-only keyword arguments: \begin{quote} \sphinxstyleemphasis{linewidths}: {[} \sphinxstyleemphasis{None} \textbar{} number \textbar{} tuple of numbers {]} If \sphinxstyleemphasis{linewidths} is \sphinxstyleemphasis{None}, defaults to rc:\sphinxcode{\sphinxupquote{lines.linewidth}}. If a number, all levels will be plotted with this linewidth. If a tuple, different levels will be plotted with different linewidths in the order specified \sphinxstyleemphasis{linestyles}: {[} \sphinxstyleemphasis{None} \textbar{} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]} If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the 'solid' is used. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. If contour is using a monochrome colormap and the contour level is less than 0, then the linestyle specified in \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} will be used. \end{quote} tricontourf-only keyword arguments: \begin{quote} \sphinxstyleemphasis{antialiased}: bool enable antialiasing \end{quote} Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.tricontour}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:examples-using-matplotlib-pyplot-tricontour}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.tricontourf} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib-pyplot-tricontourf}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf::doc}}\index{tricontourf() (in module matplotlib.pyplot)@\spxentry{tricontourf()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{tricontourf}}}{\emph{*args}, \emph{**kwargs}}{} Draw contours on an unstructured triangular grid. {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} draw contour lines and filled contours, respectively. Except as noted, function signatures and return values are the same for both versions. The triangulation can be specified in one of two ways; either \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{triangulation} is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object will be created. See that class' docstring for an explanation of these cases. The remaining arguments may be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. The level values are chosen automatically. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \end{sphinxVerbatim} contour up to \sphinxstyleemphasis{N+1} automatically chosen contour levels (\sphinxstyleemphasis{N} intervals). \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} draw contour lines at the values specified in sequence \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontourf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{,} \PYG{n}{V}\PYG{p}{)} \end{sphinxVerbatim} fill the (len(\sphinxstyleemphasis{V})-1) regions between the values in \sphinxstyleemphasis{V}, which must be in increasing order. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tricontour}\PYG{p}{(}\PYG{n}{Z}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} Use keyword args to control colors, linewidth, origin, cmap ... see below for more details. \sphinxcode{\sphinxupquote{tricontour(...)}} returns a \sphinxcode{\sphinxupquote{TriContourSet}} object. Optional keyword arguments: \begin{quote} \sphinxstyleemphasis{colors}: {[} \sphinxstyleemphasis{None} \textbar{} string \textbar{} (mpl\_colors) {]} If \sphinxstyleemphasis{None}, the colormap specified by cmap will be used. If a string, like 'r' or 'red', all levels will be plotted in this color. If a tuple of matplotlib color args (string, float, rgb, etc), different levels will be plotted in different colors in the order specified. \sphinxstyleemphasis{alpha}: float The alpha blending value \sphinxstyleemphasis{cmap}: {[} \sphinxstyleemphasis{None} \textbar{} Colormap {]} A cm {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance or \sphinxstyleemphasis{None}. If \sphinxstyleemphasis{cmap} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, a default Colormap is used. \sphinxstyleemphasis{norm}: {[} \sphinxstyleemphasis{None} \textbar{} Normalize {]} A {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Normalize}}}}} instance for scaling data values to colors. If \sphinxstyleemphasis{norm} is \sphinxstyleemphasis{None} and \sphinxstyleemphasis{colors} is \sphinxstyleemphasis{None}, the default linear scaling is used. \sphinxstyleemphasis{levels} {[}level0, level1, ..., leveln{]} A list of floating point numbers indicating the level curves to draw, in increasing order; e.g., to draw just the zero contour pass \sphinxcode{\sphinxupquote{levels={[}0{]}}} \sphinxstyleemphasis{origin}: {[} \sphinxstyleemphasis{None} \textbar{} 'upper' \textbar{} 'lower' \textbar{} 'image' {]} If \sphinxstyleemphasis{None}, the first value of \sphinxstyleemphasis{Z} will correspond to the lower left corner, location (0,0). If 'image', the rc value for \sphinxcode{\sphinxupquote{image.origin}} will be used. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{extent}: {[} \sphinxstyleemphasis{None} \textbar{} (x0,x1,y0,y1) {]} If \sphinxstyleemphasis{origin} is not \sphinxstyleemphasis{None}, then \sphinxstyleemphasis{extent} is interpreted as in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.imshow()}}}}}: it gives the outer pixel boundaries. In this case, the position of Z{[}0,0{]} is the center of the pixel, not a corner. If \sphinxstyleemphasis{origin} is \sphinxstyleemphasis{None}, then (\sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}) is the position of Z{[}0,0{]}, and (\sphinxstyleemphasis{x1}, \sphinxstyleemphasis{y1}) is the position of Z{[}-1,-1{]}. This keyword is not active if \sphinxstyleemphasis{X} and \sphinxstyleemphasis{Y} are specified in the call to contour. \sphinxstyleemphasis{locator}: {[} \sphinxstyleemphasis{None} \textbar{} ticker.Locator subclass {]} If \sphinxstyleemphasis{locator} is None, the default {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} is used. The locator is used to determine the contour levels if they are not given explicitly via the \sphinxstyleemphasis{V} argument. \sphinxstyleemphasis{extend}: {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} Unless this is 'neither', contour levels are automatically added to one or both ends of the range so that all data are included. These added ranges are then mapped to the special colormap values which default to the ends of the colormap range, but can be set via {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_under}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_under()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap.set_over}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.colors.Colormap.set\_over()}}}}} methods. \sphinxstyleemphasis{xunits}, \sphinxstyleemphasis{yunits}: {[} \sphinxstyleemphasis{None} \textbar{} registered units {]} Override axis units by specifying an instance of a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.units.ConversionInterface}}}}}. \end{quote} tricontour-only keyword arguments: \begin{quote} \sphinxstyleemphasis{linewidths}: {[} \sphinxstyleemphasis{None} \textbar{} number \textbar{} tuple of numbers {]} If \sphinxstyleemphasis{linewidths} is \sphinxstyleemphasis{None}, defaults to rc:\sphinxcode{\sphinxupquote{lines.linewidth}}. If a number, all levels will be plotted with this linewidth. If a tuple, different levels will be plotted with different linewidths in the order specified \sphinxstyleemphasis{linestyles}: {[} \sphinxstyleemphasis{None} \textbar{} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]} If \sphinxstyleemphasis{linestyles} is \sphinxstyleemphasis{None}, the 'solid' is used. \sphinxstyleemphasis{linestyles} can also be an iterable of the above strings specifying a set of linestyles to be used. If this iterable is shorter than the number of contour levels it will be repeated as necessary. If contour is using a monochrome colormap and the contour level is less than 0, then the linestyle specified in \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"contour.negative\_linestyle"{]}}}} will be used. \end{quote} tricontourf-only keyword arguments: \begin{quote} \sphinxstyleemphasis{antialiased}: bool enable antialiasing \end{quote} Note: {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} fills intervals that are closed at the top; that is, for boundaries \sphinxstyleemphasis{z1} and \sphinxstyleemphasis{z2}, the filled region is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{z1} \PYG{o}{\PYGZlt{}} \PYG{n}{Z} \PYG{o}{\PYGZlt{}}\PYG{o}{=} \PYG{n}{z2} \end{sphinxVerbatim} except for the lowest interval, which is closed on both sides (i.e. it includes the lowest value). \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.tricontourf}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:examples-using-matplotlib-pyplot-tricontourf}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_irregulardatagrid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_user.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.tripcolor} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib-pyplot-tripcolor}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor::doc}}\index{tripcolor() (in module matplotlib.pyplot)@\spxentry{tripcolor()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{tripcolor}}}{\emph{*args}, \emph{alpha=1.0}, \emph{norm=None}, \emph{cmap=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{shading='flat'}, \emph{facecolors=None}, \emph{**kwargs}}{} Create a pseudocolor plot of an unstructured triangular grid. The triangulation can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{tripcolor}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The next argument must be \sphinxstyleemphasis{C}, the array of color values, either one per point in the triangulation if color values are defined at points, or one per triangle in the triangulation if color values are defined at triangles. If there are the same number of points and triangles in the triangulation it is assumed that color values are defined at points; to force the use of color values at triangles use the kwarg \sphinxcode{\sphinxupquote{facecolors=C}} instead of just \sphinxcode{\sphinxupquote{C}}. \sphinxstyleemphasis{shading} may be 'flat' (the default) or 'gouraud'. If \sphinxstyleemphasis{shading} is 'flat' and C values are defined at points, the color values used for each triangle are from the mean C of the triangle's three points. If \sphinxstyleemphasis{shading} is 'gouraud' then color values must be defined at points. The remaining kwargs are the same as for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.pcolor:matplotlib.axes.Axes.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor()}}}}}. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.tripcolor}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:examples-using-matplotlib-pyplot-tripcolor}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tripcolor\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.triplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib-pyplot-triplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.triplot::doc}}\index{triplot() (in module matplotlib.pyplot)@\spxentry{triplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib.pyplot.triplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{triplot}}}{\emph{*args}, \emph{**kwargs}}{} Draw a unstructured triangular grid as lines and/or markers. The triangulation to plot can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation}}}}} object, or \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{triplot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{n}{mask}\PYG{o}{=}\PYG{n}{mask}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The remaining args and kwargs are the same as for {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}. Return a list of 2 {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} containing respectively: \begin{itemize} \item {} the lines plotted for triangles edges \item {} the markers plotted for triangles nodes \end{itemize} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.triplot}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.triplot:examples-using-matplotlib-pyplot-triplot}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_tricontour\_smooth\_delaunay.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_trigradient\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triinterp\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_images\_contours\_and\_fields\_triplot\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_trifinder\_event\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.twinx} \label{\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib-pyplot-twinx}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.twinx::doc}}\index{twinx() (in module matplotlib.pyplot)@\spxentry{twinx()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib.pyplot.twinx}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{twinx}}}{\emph{ax=None}}{} Make and return a second axes that shares the \sphinxstyleemphasis{x}-axis. The new axes will overlay \sphinxstyleemphasis{ax} (or the current axes if \sphinxstyleemphasis{ax} is \sphinxstyleemphasis{None}), and its ticks will be on the right. \subsubsection*{Examples} \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/two\_scales} \end{fulllineitems} \subparagraph{matplotlib.pyplot.twiny} \label{\detokenize{api/_as_gen/matplotlib.pyplot.twiny:matplotlib-pyplot-twiny}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.twiny::doc}}\index{twiny() (in module matplotlib.pyplot)@\spxentry{twiny()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.twiny:matplotlib.pyplot.twiny}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{twiny}}}{\emph{ax=None}}{} Make and return a second axes that shares the \sphinxstyleemphasis{y}-axis. The new axes will overlay \sphinxstyleemphasis{ax} (or the current axes if \sphinxstyleemphasis{ax} is \sphinxstyleemphasis{None}), and its ticks will be on the top. \subsubsection*{Examples} \DUrole{xref,std,std-doc}{/gallery/subplots\_axes\_and\_figures/two\_scales} \end{fulllineitems} \subparagraph{matplotlib.pyplot.uninstall\_repl\_displayhook} \label{\detokenize{api/_as_gen/matplotlib.pyplot.uninstall_repl_displayhook:matplotlib-pyplot-uninstall-repl-displayhook}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.uninstall_repl_displayhook::doc}}\index{uninstall\_repl\_displayhook() (in module matplotlib.pyplot)@\spxentry{uninstall\_repl\_displayhook()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.uninstall_repl_displayhook:matplotlib.pyplot.uninstall_repl_displayhook}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{uninstall\_repl\_displayhook}}}{}{} Uninstall the matplotlib display hook. \end{fulllineitems} \subparagraph{matplotlib.pyplot.violinplot} \label{\detokenize{api/_as_gen/matplotlib.pyplot.violinplot:matplotlib-pyplot-violinplot}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.violinplot::doc}}\index{violinplot() (in module matplotlib.pyplot)@\spxentry{violinplot()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.violinplot:matplotlib.pyplot.violinplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{violinplot}}}{\emph{dataset}, \emph{positions=None}, \emph{vert=True}, \emph{widths=0.5}, \emph{showmeans=False}, \emph{showextrema=True}, \emph{showmedians=False}, \emph{points=100}, \emph{bw\_method=None}, \emph{*}, \emph{data=None}}{} Make a violin plot. Make a violin plot for each column of \sphinxstyleemphasis{dataset} or each vector in sequence \sphinxstyleemphasis{dataset}. Each filled area extends to represent the entire data range, with optional lines at the mean, the median, the minimum, and the maximum. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dataset}}] \leavevmode{[}Array or a sequence of vectors.{]} The input data. \item[{\sphinxstylestrong{positions}}] \leavevmode{[}array-like, default = {[}1, 2, ..., n{]}{]} Sets the positions of the violins. The ticks and limits are automatically set to match the positions. \item[{\sphinxstylestrong{vert}}] \leavevmode{[}bool, default = True.{]} If true, creates a vertical violin plot. Otherwise, creates a horizontal violin plot. \item[{\sphinxstylestrong{widths}}] \leavevmode{[}array-like, default = 0.5{]} Either a scalar or a vector that sets the maximal width of each violin. The default is 0.5, which uses about half of the available horizontal space. \item[{\sphinxstylestrong{showmeans}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the means. \item[{\sphinxstylestrong{showextrema}}] \leavevmode{[}bool, default = True{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the extrema. \item[{\sphinxstylestrong{showmedians}}] \leavevmode{[}bool, default = False{]} If \sphinxhref{https://docs.python.org/3/library/constants.html\#True}{\sphinxcode{\sphinxupquote{True}}}, will toggle rendering of the medians. \item[{\sphinxstylestrong{points}}] \leavevmode{[}scalar, default = 100{]} Defines the number of points to evaluate each of the gaussian kernel density estimations at. \item[{\sphinxstylestrong{bw\_method}}] \leavevmode{[}str, scalar or callable, optional{]} The method used to calculate the estimator bandwidth. This can be 'scott', 'silverman', a scalar constant or a callable. If a scalar, this will be used directly as \sphinxcode{\sphinxupquote{kde.factor}}. If a callable, it should take a \sphinxcode{\sphinxupquote{GaussianKDE}} instance as its only parameter and return a scalar. If None (default), 'scott' is used. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{result}}] \leavevmode{[}dict{]} A dictionary mapping each component of the violinplot to a list of the corresponding collection instances created. The dictionary has the following keys: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{bodies}}: A list of the {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PolyCollection}}}}} instances containing the filled area of each violin. \item {} \sphinxcode{\sphinxupquote{cmeans}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the mean values of each of the violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmins}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the bottom of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmaxes}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the top of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cbars}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the centers of each violin's distribution. \item {} \sphinxcode{\sphinxupquote{cmedians}}: A {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} instance created to identify the median values of each of the violin's distribution. \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'dataset'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.viridis} \label{\detokenize{api/_as_gen/matplotlib.pyplot.viridis:matplotlib-pyplot-viridis}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.viridis::doc}}\index{viridis() (in module matplotlib.pyplot)@\spxentry{viridis()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.viridis:matplotlib.pyplot.viridis}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{viridis}}}{}{} Set the colormap to "viridis". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.vlines} \label{\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib-pyplot-vlines}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.vlines::doc}}\index{vlines() (in module matplotlib.pyplot)@\spxentry{vlines()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib.pyplot.vlines}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{vlines}}}{\emph{x}, \emph{ymin}, \emph{ymax}, \emph{colors='k'}, \emph{linestyles='solid'}, \emph{label=''}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot vertical lines. Plot vertical lines at each \sphinxstyleemphasis{x} from \sphinxstyleemphasis{ymin} to \sphinxstyleemphasis{ymax}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}scalar or 1D array\_like{]} x-indexes where to plot the lines. \item[{\sphinxstylestrong{ymin, ymax}}] \leavevmode{[}scalar or 1D array\_like{]} Respective beginning and end of each line. If scalars are provided, all lines will have same length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}array\_like of colors, optional, default: 'k'{]} \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}\{'solid', 'dashed', 'dashdot', 'dotted'\}, optional{]} \item[{\sphinxstylestrong{label}}] \leavevmode{[}string, optional, default: ''{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}}{]} \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} properties.{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib.pyplot.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}}}] \leavevmode horizontal lines \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvline:matplotlib.pyplot.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvline}}}}}}] \leavevmode vertical line across the axes \end{description} \subsubsection*{Notes} \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'colors', 'x', 'ymax', 'ymin'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{matplotlib.pyplot.waitforbuttonpress} \label{\detokenize{api/_as_gen/matplotlib.pyplot.waitforbuttonpress:matplotlib-pyplot-waitforbuttonpress}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.waitforbuttonpress::doc}}\index{waitforbuttonpress() (in module matplotlib.pyplot)@\spxentry{waitforbuttonpress()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.waitforbuttonpress:matplotlib.pyplot.waitforbuttonpress}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{waitforbuttonpress}}}{\emph{*args}, \emph{**kwargs}}{} Blocking call to interact with the figure. This will return True is a key was pressed, False if a mouse button was pressed and None if \sphinxstyleemphasis{timeout} was reached without either being pressed. If \sphinxstyleemphasis{timeout} is negative, does not timeout. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.waitforbuttonpress}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.waitforbuttonpress:examples-using-matplotlib-pyplot-waitforbuttonpress}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_event\_handling\_ginput\_manual\_clabel\_sgskip.py} \end{itemize} \subparagraph{matplotlib.pyplot.winter} \label{\detokenize{api/_as_gen/matplotlib.pyplot.winter:matplotlib-pyplot-winter}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.winter::doc}}\index{winter() (in module matplotlib.pyplot)@\spxentry{winter()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.winter:matplotlib.pyplot.winter}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{winter}}}{}{} Set the colormap to "winter". This changes the default colormap as well as the colormap of the current image if there is one. See \sphinxcode{\sphinxupquote{help(colormaps)}} for more information. \end{fulllineitems} \subparagraph{matplotlib.pyplot.xcorr} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:matplotlib-pyplot-xcorr}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xcorr::doc}}\index{xcorr() (in module matplotlib.pyplot)@\spxentry{xcorr()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:matplotlib.pyplot.xcorr}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xcorr}}}{\emph{x}, \emph{y}, \emph{normed=True}, \emph{detrend=\textless{}function detrend\_none at 0x7ff96bc60a60\textgreater{}}, \emph{usevlines=True}, \emph{maxlags=10}, \emph{*}, \emph{data=None}, \emph{**kwargs}}{} Plot the cross correlation between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. The correlation with lag k is defined as \(\sum_n x[n+k] \cdot y^*[n]\), where \(y^*\) is the complex conjugate of \(y\). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array-like of length n{]} \item[{\sphinxstylestrong{y}}] \leavevmode{[}array-like of length n{]} \item[{\sphinxstylestrong{detrend}}] \leavevmode{[}callable, optional, default: \sphinxcode{\sphinxupquote{mlab.detrend\_none}}{]} \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} are detrended by the \sphinxstyleemphasis{detrend} callable. This must be a function \sphinxcode{\sphinxupquote{x = detrend(x)}} accepting and returning an \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html\#numpy.array}{\sphinxcode{\sphinxupquote{numpy.array}}}. Default is no normalization. \item[{\sphinxstylestrong{normed}}] \leavevmode{[}bool, optional, default: True{]} If \sphinxcode{\sphinxupquote{True}}, input vectors are normalised to unit length. \item[{\sphinxstylestrong{usevlines}}] \leavevmode{[}bool, optional, default: True{]} Determines the plot style. If \sphinxcode{\sphinxupquote{True}}, vertical lines are plotted from 0 to the xcorr value using \sphinxcode{\sphinxupquote{Axes.vlines}}. Additionally, a horizontal line is plotted at y=0 using \sphinxcode{\sphinxupquote{Axes.axhline}}. If \sphinxcode{\sphinxupquote{False}}, markers are plotted at the xcorr values using \sphinxcode{\sphinxupquote{Axes.plot}}. \item[{\sphinxstylestrong{maxlags}}] \leavevmode{[}int, optional, default: 10{]} Number of lags to show. If None, will return all \sphinxcode{\sphinxupquote{2 * len(x) - 1}} lags. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lags}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The lag vector. \item[{\sphinxstylestrong{c}}] \leavevmode{[}array (length \sphinxcode{\sphinxupquote{2*maxlags+1}}){]} The auto correlation vector. \item[{\sphinxstylestrong{line}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}{]} {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} added to the axes of the correlation: \begin{itemize} \item {} {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} if \sphinxstyleemphasis{usevlines} is True. \item {} {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} if \sphinxstyleemphasis{usevlines} is False. \end{itemize} \item[{\sphinxstylestrong{b}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} or None{]} Horizontal line at 0 if \sphinxstyleemphasis{usevlines} is True None \sphinxstyleemphasis{usevlines} is False. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{linestyle}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} property, optional{]} The linestyle for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}str, optional, default: 'o'{]} The marker for plotting the data points. Only used if \sphinxstyleemphasis{usevlines} is \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The cross correlation is performed with \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.correlate.html\#numpy.correlate}{\sphinxcode{\sphinxupquote{numpy.correlate()}}} with \sphinxcode{\sphinxupquote{mode = "full"}}. \begin{sphinxadmonition}{note}{Note:} In addition to the above described arguments, this function can take a \sphinxstylestrong{data} keyword argument. If such a \sphinxstylestrong{data} argument is given, the following arguments are replaced by \sphinxstylestrong{data{[}\textless{}arg\textgreater{}{]}}: \begin{itemize} \item {} All arguments with the following names: 'x', 'y'. \end{itemize} Objects passed as \sphinxstylestrong{data} must support item access (\sphinxcode{\sphinxupquote{data{[}\textless{}arg\textgreater{}{]}}}) and membership test (\sphinxcode{\sphinxupquote{\textless{}arg\textgreater{} in data}}). \end{sphinxadmonition} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xcorr}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:examples-using-matplotlib-pyplot-xcorr}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_xcorr\_acorr\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.xkcd} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:matplotlib-pyplot-xkcd}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xkcd::doc}}\index{xkcd() (in module matplotlib.pyplot)@\spxentry{xkcd()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:matplotlib.pyplot.xkcd}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xkcd}}}{\emph{scale=1}, \emph{length=100}, \emph{randomness=2}}{} Turn on \sphinxhref{https://xkcd.com/}{xkcd} sketch-style drawing mode. This will only have effect on things drawn after this function is called. For best results, the "Humor Sans" font should be installed: it is not included with matplotlib. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}float, optional{]} The amplitude of the wiggle perpendicular to the source line. \item[{\sphinxstylestrong{length}}] \leavevmode{[}float, optional{]} The length of the wiggle along the line. \item[{\sphinxstylestrong{randomness}}] \leavevmode{[}float, optional{]} The scale factor by which the length is shrunken or expanded. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This function works by a number of rcParams, so it will probably override others you have set before. If you want the effects of this function to be temporary, it can be used as a context manager, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{with} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{xkcd}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} This figure will be in XKCD\PYGZhy{}style} \PYG{n}{fig1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} ...} \PYG{c+c1}{\PYGZsh{} This figure will be in regular style} \PYG{n}{fig2} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{figure}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xkcd}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:examples-using-matplotlib-pyplot-xkcd}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_showcase\_xkcd.py} \end{itemize} \subparagraph{matplotlib.pyplot.xlabel} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib-pyplot-xlabel}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xlabel::doc}}\index{xlabel() (in module matplotlib.pyplot)@\spxentry{xlabel()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xlabel}}}{\emph{xlabel}, \emph{fontdict=None}, \emph{labelpad=None}, \emph{**kwargs}}{} Set the label for the x-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xlabel}}] \leavevmode{[}str{]} The label text. \item[{\sphinxstylestrong{labelpad}}] \leavevmode{[}scalar, optional, default: None{]} Spacing in points from the axes bounding box including ticks and tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties control the appearance of the label. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}}}] \leavevmode for information on how override and the optional args work \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xlabel}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:examples-using-matplotlib-pyplot-xlabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_plot\_solarizedlight2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_plotfile\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_fonts.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_texsystem.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.xlim} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xlim:matplotlib-pyplot-xlim}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xlim::doc}}\index{xlim() (in module matplotlib.pyplot)@\spxentry{xlim()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xlim:matplotlib.pyplot.xlim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xlim}}}{\emph{*args}, \emph{**kwargs}}{} Get or set the x limits of the current axes. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{left}\PYG{p}{,} \PYG{n}{right} \PYG{o}{=} \PYG{n}{xlim}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} return the current xlim} \PYG{n}{xlim}\PYG{p}{(}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the xlim to left, right} \PYG{n}{xlim}\PYG{p}{(}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the xlim to left, right} \end{sphinxVerbatim} If you do not specify args, you can pass \sphinxstyleemphasis{left} or \sphinxstyleemphasis{right} as kwargs, i.e.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xlim}\PYG{p}{(}\PYG{n}{right}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} adjust the right leaving left unchanged} \PYG{n}{xlim}\PYG{p}{(}\PYG{n}{left}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} adjust the left leaving right unchanged} \end{sphinxVerbatim} Setting limits turns autoscaling off for the x-axis. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{left, right}] \leavevmode A tuple of the new x-axis limits. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Calling this function with no arguments (e.g. \sphinxcode{\sphinxupquote{xlim()}}) is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xlim:matplotlib.axes.Axes.get_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xlim}}}}} on the current axes. Calling this function with arguments is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} on the current axes. All arguments are passed though. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xlim}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xlim:examples-using-matplotlib-pyplot-xlim}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_shared\_axis\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_rotation\_relative\_to\_line.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-gallery-animation-frame-grabbing-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Frame grabbing}}}} \end{itemize} \subparagraph{matplotlib.pyplot.xscale} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xscale:matplotlib-pyplot-xscale}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xscale::doc}}\index{xscale() (in module matplotlib.pyplot)@\spxentry{xscale()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xscale:matplotlib.pyplot.xscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xscale}}}{\emph{value}, \emph{**kwargs}}{} Set the x-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xscale}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xscale:examples-using-matplotlib-pyplot-xscale}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \subparagraph{matplotlib.pyplot.xticks} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xticks:matplotlib-pyplot-xticks}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.xticks::doc}}\index{xticks() (in module matplotlib.pyplot)@\spxentry{xticks()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.xticks:matplotlib.pyplot.xticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{xticks}}}{\emph{ticks=None}, \emph{labels=None}, \emph{**kwargs}}{} Get or set the current tick locations and labels of the x-axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{locs}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{xticks}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Get locations and labels} \PYG{n}{xticks}\PYG{p}{(}\PYG{n}{ticks}\PYG{p}{,} \PYG{p}{[}\PYG{n}{labels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set locations and labels} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}array\_like{]} A list of positions at which ticks should be placed. You can pass an empty list to disable xticks. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}array\_like, optional{]} A list of explicit labels to place at the given \sphinxstyleemphasis{locs}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties can be used to control the appearance of the labels. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{locs}] \leavevmode An array of label locations. \item[{labels}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} objects. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Calling this function with no arguments (e.g. \sphinxcode{\sphinxupquote{xticks()}}) is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticks:matplotlib.axes.Axes.get_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xticks}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_xticklabels:matplotlib.axes.Axes.get_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_xticklabels}}}}} on the current axes. Calling this function with arguments is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xticks}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xticklabels}}}}} on the current axes. \subsubsection*{Examples} Get the current locations and labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{locs}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{xticks}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Set label locations: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{step}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Set text labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Tom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Dick}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Harry}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sally}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Set text labels and properties: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{,} \PYG{n}{calendar}\PYG{o}{.}\PYG{n}{month\PYGZus{}name}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{l+m+mi}{13}\PYG{p}{]}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{20}\PYG{p}{)} \end{sphinxVerbatim} Disable xticks: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{xticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.xticks}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.xticks:examples-using-matplotlib-pyplot-xticks}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_secondary\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_custom\_ticker1.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_ticks\_and\_spines\_ticklabels\_rotation.py} \end{itemize} \subparagraph{matplotlib.pyplot.ylabel} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib-pyplot-ylabel}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ylabel::doc}}\index{ylabel() (in module matplotlib.pyplot)@\spxentry{ylabel()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ylabel}}}{\emph{ylabel}, \emph{fontdict=None}, \emph{labelpad=None}, \emph{**kwargs}}{} Set the label for the y-axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ylabel}}] \leavevmode{[}str{]} The label text. \item[{\sphinxstylestrong{labelpad}}] \leavevmode{[}scalar, optional, default: None{]} Spacing in points from the axes bounding box including ticks and tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties control the appearance of the label. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}}}] \leavevmode for information on how override and the optional args work \end{description} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.ylabel}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:examples-using-matplotlib-pyplot-ylabel}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_nan\_test.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_scatter\_symbol.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_invert\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_subplot.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_multiline.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_text\_fontdict.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_mathtext.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_simple.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_text.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_style\_sheets\_plot\_solarizedlight2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_plotfile\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_custom\_scale.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_pgf\_preamble\_sgskip.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/usage:sphx-glr-tutorials-introductory-usage-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Usage Guide}}}} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.ylim} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ylim:matplotlib-pyplot-ylim}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.ylim::doc}}\index{ylim() (in module matplotlib.pyplot)@\spxentry{ylim()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.ylim:matplotlib.pyplot.ylim}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{ylim}}}{\emph{*args}, \emph{**kwargs}}{} Get or set the y-limits of the current axes. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top} \PYG{o}{=} \PYG{n}{ylim}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} return the current ylim} \PYG{n}{ylim}\PYG{p}{(}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the ylim to bottom, top} \PYG{n}{ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} set the ylim to bottom, top} \end{sphinxVerbatim} If you do not specify args, you can alternatively pass \sphinxstyleemphasis{bottom} or \sphinxstyleemphasis{top} as kwargs, i.e.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ylim}\PYG{p}{(}\PYG{n}{top}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} adjust the top leaving bottom unchanged} \PYG{n}{ylim}\PYG{p}{(}\PYG{n}{bottom}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} adjust the bottom leaving top unchanged} \end{sphinxVerbatim} Setting limits turns autoscaling off for the y-axis. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{bottom, top}] \leavevmode A tuple of the new y-axis limits. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Calling this function with no arguments (e.g. \sphinxcode{\sphinxupquote{ylim()}}) is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_ylim:matplotlib.axes.Axes.get_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_ylim}}}}} on the current axes. Calling this function with arguments is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}} on the current axes. All arguments are passed though. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.ylim}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.ylim:examples-using-matplotlib-pyplot-ylim}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_fonteffects.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_shapes\_and\_collections\_ellipse\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{gallery/animation/frame_grabbing_sgskip:sphx-glr-gallery-animation-frame-grabbing-sgskip-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Frame grabbing}}}} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_findobj\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.yscale} \label{\detokenize{api/_as_gen/matplotlib.pyplot.yscale:matplotlib-pyplot-yscale}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.yscale::doc}}\index{yscale() (in module matplotlib.pyplot)@\spxentry{yscale()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.yscale:matplotlib.pyplot.yscale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{yscale}}}{\emph{value}, \emph{**kwargs}}{} Set the y-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.yscale}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.yscale:examples-using-matplotlib-pyplot-yscale}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_pyplot\_scales.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_scales\_symlog\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/introductory/pyplot:sphx-glr-tutorials-introductory-pyplot-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Pyplot tutorial}}}} \end{itemize} \subparagraph{matplotlib.pyplot.yticks} \label{\detokenize{api/_as_gen/matplotlib.pyplot.yticks:matplotlib-pyplot-yticks}}\label{\detokenize{api/_as_gen/matplotlib.pyplot.yticks::doc}}\index{yticks() (in module matplotlib.pyplot)@\spxentry{yticks()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/matplotlib.pyplot.yticks:matplotlib.pyplot.yticks}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{yticks}}}{\emph{ticks=None}, \emph{labels=None}, \emph{**kwargs}}{} Get or set the current tick locations and labels of the y-axis. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{locs}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{yticks}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Get locations and labels} \PYG{n}{yticks}\PYG{p}{(}\PYG{n}{ticks}\PYG{p}{,} \PYG{p}{[}\PYG{n}{labels}\PYG{p}{]}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Set locations and labels} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ticks}}] \leavevmode{[}array\_like{]} A list of positions at which ticks should be placed. You can pass an empty list to disable yticks. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}array\_like, optional{]} A list of explicit labels to place at the given \sphinxstyleemphasis{locs}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties can be used to control the appearance of the labels. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{locs}] \leavevmode An array of label locations. \item[{labels}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} objects. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Calling this function with no arguments (e.g. \sphinxcode{\sphinxupquote{yticks()}}) is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks:matplotlib.axes.Axes.get_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_yticks}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels:matplotlib.axes.Axes.get_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_yticklabels}}}}} on the current axes. Calling this function with arguments is the pyplot equivalent of calling {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_yticks}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_yticklabels}}}}} on the current axes. \subsubsection*{Examples} Get the current locations and labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{locs}\PYG{p}{,} \PYG{n}{labels} \PYG{o}{=} \PYG{n}{yticks}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Set label locations: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{yticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{step}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Set text labels: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{yticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{5}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Tom}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Dick}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Harry}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sally}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Sue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Set text labels and properties: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{yticks}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{,} \PYG{n}{calendar}\PYG{o}{.}\PYG{n}{month\PYGZus{}name}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{:}\PYG{l+m+mi}{13}\PYG{p}{]}\PYG{p}{,} \PYG{n}{rotation}\PYG{o}{=}\PYG{l+m+mi}{45}\PYG{p}{)} \end{sphinxVerbatim} Disable yticks: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{yticks}\PYG{p}{(}\PYG{p}{[}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{matplotlib.pyplot.yticks}}} \label{\detokenize{api/_as_gen/matplotlib.pyplot.yticks:examples-using-matplotlib-pyplot-yticks}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_lines\_bars\_and\_markers\_bar\_stacked.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_arrow\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_text\_labels\_and\_annotations\_usetex\_demo.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_misc\_table\_demo.py} \end{itemize} \index{plotting() (in module matplotlib.pyplot)@\spxentry{plotting()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/pyplot_summary:matplotlib.pyplot.plotting}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{plotting}}}{}{}~ \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Function &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Function &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.acorr:matplotlib.pyplot.acorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{acorr}}}}} & Plot the autocorrelation of \sphinxstyleemphasis{x}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.angle_spectrum:matplotlib.pyplot.angle_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{angle\_spectrum}}}}} & Plot the angle spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.annotate:matplotlib.pyplot.annotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{annotate}}}}} & Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.arrow:matplotlib.pyplot.arrow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{arrow}}}}} & Add an arrow to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.autoscale:matplotlib.pyplot.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale}}}}} & Autoscale the axis view to the data (toggle). \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axes:matplotlib.pyplot.axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes}}}}} & Add an axes to the current figure and make it the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhline:matplotlib.pyplot.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline}}}}} & Add a horizontal line across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axhspan:matplotlib.pyplot.axhspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhspan}}}}} & Add a horizontal span (rectangle) across the axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axis:matplotlib.pyplot.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} & Convenience method to get or set some axis properties. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvline:matplotlib.pyplot.axvline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvline}}}}} & Add a vertical line across the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.axvspan:matplotlib.pyplot.axvspan}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axvspan}}}}} & Add a vertical span (rectangle) across the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.bar:matplotlib.pyplot.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bar}}}}} & Make a bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barbs:matplotlib.pyplot.barbs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barbs}}}}} & Plot a 2-D field of barbs. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.barh:matplotlib.pyplot.barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{barh}}}}} & Make a horizontal bar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.box:matplotlib.pyplot.box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{box}}}}} & Turn the axes box on or off on the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.boxplot:matplotlib.pyplot.boxplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{boxplot}}}}} & Make a box and whisker plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.broken_barh:matplotlib.pyplot.broken_barh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{broken\_barh}}}}} & Plot a horizontal sequence of rectangles. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cla:matplotlib.pyplot.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cla}}}}} & Clear the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clabel:matplotlib.pyplot.clabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clabel}}}}} & Label a contour plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clf:matplotlib.pyplot.clf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clf}}}}} & Clear the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.clim:matplotlib.pyplot.clim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clim}}}}} & Set the color limits of the current image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.close:matplotlib.pyplot.close}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{close}}}}} & Close a figure window. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.cohere:matplotlib.pyplot.cohere}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cohere}}}}} & Plot the coherence between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar}}}}} & Add a colorbar to a plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contour:matplotlib.pyplot.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contour}}}}} & Plot contours. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.contourf:matplotlib.pyplot.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contourf}}}}} & Plot contours. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.csd:matplotlib.pyplot.csd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{csd}}}}} & Plot the cross-spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.delaxes:matplotlib.pyplot.delaxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{delaxes}}}}} & Remove the \sphinxcode{\sphinxupquote{Axes}} \sphinxstyleemphasis{ax} (defaulting to the current axes) from its figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.draw:matplotlib.pyplot.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}} & Redraw the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.errorbar:matplotlib.pyplot.errorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{errorbar}}}}} & Plot y versus x as lines and/or markers with attached errorbars. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.eventplot:matplotlib.pyplot.eventplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{eventplot}}}}} & Plot identical parallel lines at the given positions. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figimage:matplotlib.pyplot.figimage}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figimage}}}}} & Add a non-resampled image to the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figlegend:matplotlib.pyplot.figlegend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figlegend}}}}} & Place a legend on the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fignum_exists:matplotlib.pyplot.fignum_exists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fignum\_exists}}}}} & Return whether the figure with the given id exists. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figtext:matplotlib.pyplot.figtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figtext}}}}} & Add text to figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.figure:matplotlib.pyplot.figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & Create a new figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill:matplotlib.pyplot.fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & Plot filled polygons. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_between:matplotlib.pyplot.fill_between}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_between}}}}} & Fill the area between two horizontal curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.fill_betweenx:matplotlib.pyplot.fill_betweenx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill\_betweenx}}}}} & Fill the area between two vertical curves. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.findobj:matplotlib.pyplot.findobj}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{findobj}}}}} & Find artist objects. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gca:matplotlib.pyplot.gca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gca}}}}} & Get the current {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance on the current figure matching the given keyword args, or create one. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gcf:matplotlib.pyplot.gcf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gcf}}}}} & Get the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.gci:matplotlib.pyplot.gci}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gci}}}}} & Get the current colorable artist. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_figlabels:matplotlib.pyplot.get_figlabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_figlabels}}}}} & Return a list of existing figure labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.get_fignums:matplotlib.pyplot.get_fignums}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fignums}}}}} & Return a list of existing figure numbers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.grid:matplotlib.pyplot.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{grid}}}}} & Configure the grid lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hexbin:matplotlib.pyplot.hexbin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hexbin}}}}} & Make a hexagonal binning plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist:matplotlib.pyplot.hist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist}}}}} & Plot a histogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hist2d:matplotlib.pyplot.hist2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hist2d}}}}} & Make a 2D histogram plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.hlines:matplotlib.pyplot.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}} & Plot horizontal lines at each \sphinxstyleemphasis{y} from \sphinxstyleemphasis{xmin} to \sphinxstyleemphasis{xmax}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imread:matplotlib.pyplot.imread}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imread}}}}} & Read an image from a file into an array. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imsave:matplotlib.pyplot.imsave}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imsave}}}}} & Save an array as an image file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.imshow:matplotlib.pyplot.imshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow}}}}} & Display an image, i.e. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.install_repl_displayhook:matplotlib.pyplot.install_repl_displayhook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{install\_repl\_displayhook}}}}} & Install a repl display hook so that any stale figure are automatically redrawn when control is returned to the repl. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ioff:matplotlib.pyplot.ioff}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ioff}}}}} & Turn the interactive mode off. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ion:matplotlib.pyplot.ion}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ion}}}}} & Turn the interactive mode on. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.isinteractive:matplotlib.pyplot.isinteractive}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{isinteractive}}}}} & Return the status of interactive mode. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.legend:matplotlib.pyplot.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend}}}}} & Place a legend on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.locator_params:matplotlib.pyplot.locator_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{locator\_params}}}}} & Control behavior of major tick locators. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.loglog:matplotlib.pyplot.loglog}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{loglog}}}}} & Make a plot with log scaling on both the x and y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.magnitude_spectrum:matplotlib.pyplot.magnitude_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{magnitude\_spectrum}}}}} & Plot the magnitude spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.margins:matplotlib.pyplot.margins}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{margins}}}}} & Set or retrieve autoscaling margins. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.matshow:matplotlib.pyplot.matshow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matshow}}}}} & Display an array as a matrix in a new figure window. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_off:matplotlib.pyplot.minorticks_off}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_off}}}}} & Remove minor ticks from the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.minorticks_on:matplotlib.pyplot.minorticks_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{minorticks\_on}}}}} & Display minor ticks on the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pause:matplotlib.pyplot.pause}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pause}}}}} & Pause for \sphinxstyleemphasis{interval} seconds. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolor:matplotlib.pyplot.pcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolor}}}}} & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pcolormesh:matplotlib.pyplot.pcolormesh}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pcolormesh}}}}} & Create a pseudocolor plot with a non-regular rectangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.phase_spectrum:matplotlib.pyplot.phase_spectrum}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{phase\_spectrum}}}}} & Plot the phase spectrum. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.pie:matplotlib.pyplot.pie}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pie}}}}} & Plot a pie chart. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} & Plot y versus x as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot_date:matplotlib.pyplot.plot_date}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot\_date}}}}} & Plot data that contains dates. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plotfile:matplotlib.pyplot.plotfile}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plotfile}}}}} & Plot the data in a file. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.polar:matplotlib.pyplot.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{polar}}}}} & Make a polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.psd:matplotlib.pyplot.psd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{psd}}}}} & Plot the power spectral density. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiver:matplotlib.pyplot.quiver}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiver}}}}} & Plot a 2D field of arrows. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.quiverkey:matplotlib.pyplot.quiverkey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{quiverkey}}}}} & Add a key to a quiver plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rc:matplotlib.pyplot.rc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc}}}}} & Set the current rc params. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rc_context:matplotlib.pyplot.rc_context}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rc\_context}}}}} & Return a context manager for managing rc settings. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rcdefaults:matplotlib.pyplot.rcdefaults}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rcdefaults}}}}} & Restore the rc params from Matplotlib's internal default style. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.rgrids:matplotlib.pyplot.rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rgrids}}}}} & Get or set the radial gridlines on the current polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.savefig:matplotlib.pyplot.savefig}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{savefig}}}}} & Save the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sca:matplotlib.pyplot.sca}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sca}}}}} & Set the current Axes instance to \sphinxstyleemphasis{ax}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.scatter:matplotlib.pyplot.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}} & A scatter plot of \sphinxstyleemphasis{y} vs \sphinxstyleemphasis{x} with varying marker size and/or color. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.sci:matplotlib.pyplot.sci}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sci}}}}} & Set the current image. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib.pyplot.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogx}}}}} & Make a plot with log scaling on the x axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib.pyplot.semilogy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogy}}}}} & Make a plot with log scaling on the y axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cmap}}}}} & Set the default colormap. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}} & Set a property on an artist object. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.show:matplotlib.pyplot.show}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{show}}}}} & Display a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.specgram:matplotlib.pyplot.specgram}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{specgram}}}}} & Plot a spectrogram. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.spy:matplotlib.pyplot.spy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{spy}}}}} & Plot the sparsity pattern of a 2D array. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stackplot:matplotlib.pyplot.stackplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stackplot}}}}} & Draw a stacked area plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.stem:matplotlib.pyplot.stem}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{stem}}}}} & Create a stem plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.step:matplotlib.pyplot.step}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{step}}}}} & Make a step plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.streamplot:matplotlib.pyplot.streamplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{streamplot}}}}} & Draw streamlines of a vector flow. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot:matplotlib.pyplot.subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot}}}}} & Add a subplot to the current figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot2grid:matplotlib.pyplot.subplot2grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot2grid}}}}} & Create an axis at specific location inside a regular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplot_tool:matplotlib.pyplot.subplot_tool}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplot\_tool}}}}} & Launch a subplot tool window for a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots:matplotlib.pyplot.subplots}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots}}}}} & Create a figure and a set of subplots. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.subplots_adjust:matplotlib.pyplot.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{subplots\_adjust}}}}} & Tune the subplot layout. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.suptitle:matplotlib.pyplot.suptitle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{suptitle}}}}} & Add a centered title to the figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.switch_backend:matplotlib.pyplot.switch_backend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{switch\_backend}}}}} & Close all open figures and set the Matplotlib backend. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.table:matplotlib.pyplot.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}} & Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & Add text to the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.thetagrids:matplotlib.pyplot.thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{thetagrids}}}}} & Get or set the theta gridlines on the current polar plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tick_params:matplotlib.pyplot.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tick\_params}}}}} & Change the appearance of ticks, tick labels, and gridlines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ticklabel_format:matplotlib.pyplot.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ticklabel\_format}}}}} & Change the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} used by default for linear axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tight_layout:matplotlib.pyplot.tight_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tight\_layout}}}}} & Automatically adjust subplot parameters to give specified padding. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.title:matplotlib.pyplot.title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & Set a title for the axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontour:matplotlib.pyplot.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontour}}}}} & Draw contours on an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tricontourf:matplotlib.pyplot.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tricontourf}}}}} & Draw contours on an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.tripcolor:matplotlib.pyplot.tripcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{tripcolor}}}}} & Create a pseudocolor plot of an unstructured triangular grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.triplot:matplotlib.pyplot.triplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{triplot}}}}} & Draw a unstructured triangular grid as lines and/or markers. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twinx:matplotlib.pyplot.twinx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twinx}}}}} & Make and return a second axes that shares the \sphinxstyleemphasis{x}-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.twiny:matplotlib.pyplot.twiny}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{twiny}}}}} & Make and return a second axes that shares the \sphinxstyleemphasis{y}-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.uninstall_repl_displayhook:matplotlib.pyplot.uninstall_repl_displayhook}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{uninstall\_repl\_displayhook}}}}} & Uninstall the matplotlib display hook. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.violinplot:matplotlib.pyplot.violinplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{violinplot}}}}} & Make a violin plot. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.vlines:matplotlib.pyplot.vlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{vlines}}}}} & Plot vertical lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xcorr:matplotlib.pyplot.xcorr}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xcorr}}}}} & Plot the cross correlation between \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xkcd:matplotlib.pyplot.xkcd}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xkcd}}}}} & Turn on \sphinxhref{https://xkcd.com/}{xkcd} sketch-style drawing mode. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlabel:matplotlib.pyplot.xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & Set the label for the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xlim:matplotlib.pyplot.xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & Get or set the x limits of the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xscale:matplotlib.pyplot.xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & Set the x-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.xticks:matplotlib.pyplot.xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & Get or set the current tick locations and labels of the x-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylabel:matplotlib.pyplot.ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & Set the label for the y-axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.ylim:matplotlib.pyplot.ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & Get or set the y-limits of the current axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.yscale:matplotlib.pyplot.yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & Set the y-axis scale. \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.yticks:matplotlib.pyplot.yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & Get or set the current tick locations and labels of the y-axis. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{fulllineitems} \subsection{Colors in Matplotlib} \label{\detokenize{api/pyplot_summary:colors-in-matplotlib}} There are many colormaps you can use to map data onto color values. Below we list several ways in which color can be utilized in Matplotlib. For a more in-depth look at colormaps, see the {\hyperref[\detokenize{tutorials/colors/colormaps::doc}]{\sphinxcrossref{\DUrole{doc}{Choosing Colormaps in Matplotlib}}}} tutorial. \index{colormaps() (in module matplotlib.pyplot)@\spxentry{colormaps()}\spxextra{in module matplotlib.pyplot}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/pyplot_summary:matplotlib.pyplot.colormaps}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.pyplot.}}\sphinxbfcode{\sphinxupquote{colormaps}}}{}{} Matplotlib provides a number of colormaps, and others can be added using {\hyperref[\detokenize{api/cm_api:matplotlib.cm.register_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{register\_cmap()}}}}}. This function documents the built-in colormaps, and will also return a list of all registered colormaps if called. You can set the colormap for an image, pcolor, scatter, etc, using a keyword argument: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imshow}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{cmap}\PYG{o}{=}\PYG{n}{cm}\PYG{o}{.}\PYG{n}{hot}\PYG{p}{)} \end{sphinxVerbatim} or using the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cmap()}}}}} function: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{imshow}\PYG{p}{(}\PYG{n}{X}\PYG{p}{)} \PYG{n}{pyplot}\PYG{o}{.}\PYG{n}{set\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{hot}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{pyplot}\PYG{o}{.}\PYG{n}{set\PYGZus{}cmap}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{jet}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} In interactive mode, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.set_cmap:matplotlib.pyplot.set_cmap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_cmap()}}}}} will update the colormap post-hoc, allowing you to see which one works best for your data. All built-in colormaps can be reversed by appending \sphinxcode{\sphinxupquote{\_r}}: For instance, \sphinxcode{\sphinxupquote{gray\_r}} is the reverse of \sphinxcode{\sphinxupquote{gray}}. There are several common color schemes used in visualization: \begin{description} \item[{Sequential schemes}] \leavevmode for unipolar data that progresses from low to high \item[{Diverging schemes}] \leavevmode for bipolar data that emphasizes positive or negative deviations from a central value \item[{Cyclic schemes}] \leavevmode for plotting values that wrap around at the endpoints, such as phase angle, wind direction, or time of day \item[{Qualitative schemes}] \leavevmode for nominal data that has no inherent ordering, where color is used only to distinguish categories \end{description} Matplotlib ships with 4 perceptually uniform color maps which are the recommended color maps for sequential data: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline inferno & perceptually uniform shades of black-red-yellow \\ \hline magma & perceptually uniform shades of black-red-white \\ \hline plasma & perceptually uniform shades of blue-red-yellow \\ \hline viridis & perceptually uniform shades of blue-green-yellow \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} The following colormaps are based on the \sphinxhref{http://colorbrewer2.org}{ColorBrewer} color specifications and designs developed by Cynthia Brewer: ColorBrewer Diverging (luminance is highest at the midpoint, and decreases towards differently-colored endpoints): \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline BrBG & brown, white, blue-green \\ \hline PiYG & pink, white, yellow-green \\ \hline PRGn & purple, white, green \\ \hline PuOr & orange, white, purple \\ \hline RdBu & red, white, blue \\ \hline RdGy & red, white, gray \\ \hline RdYlBu & red, yellow, blue \\ \hline RdYlGn & red, yellow, green \\ \hline Spectral & red, orange, yellow, green, blue \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} ColorBrewer Sequential (luminance decreases monotonically): \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline Blues & white to dark blue \\ \hline BuGn & white, light blue, dark green \\ \hline BuPu & white, light blue, dark purple \\ \hline GnBu & white, light green, dark blue \\ \hline Greens & white to dark green \\ \hline Greys & white to black (not linear) \\ \hline Oranges & white, orange, dark brown \\ \hline OrRd & white, orange, dark red \\ \hline PuBu & white, light purple, dark blue \\ \hline PuBuGn & white, light purple, dark green \\ \hline PuRd & white, light purple, dark red \\ \hline Purples & white to dark purple \\ \hline RdPu & white, pink, dark purple \\ \hline Reds & white to dark red \\ \hline YlGn & light yellow, dark green \\ \hline YlGnBu & light yellow, light green, dark blue \\ \hline YlOrBr & light yellow, orange, dark brown \\ \hline YlOrRd & light yellow, orange, dark red \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} ColorBrewer Qualitative: (For plotting nominal data, \sphinxcode{\sphinxupquote{ListedColormap}} is used, not \sphinxcode{\sphinxupquote{LinearSegmentedColormap}}. Different sets of colors are recommended for different numbers of categories.) \begin{itemize} \item {} Accent \item {} Dark2 \item {} Paired \item {} Pastel1 \item {} Pastel2 \item {} Set1 \item {} Set2 \item {} Set3 \end{itemize} A set of colormaps derived from those of the same name provided with Matlab are also included: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline autumn & sequential linearly-increasing shades of red-orange-yellow \\ \hline bone & sequential increasing black-white color map with a tinge of blue, to emulate X-ray film \\ \hline cool & linearly-decreasing shades of cyan-magenta \\ \hline copper & sequential increasing shades of black-copper \\ \hline flag & repetitive red-white-blue-black pattern (not cyclic at endpoints) \\ \hline gray & sequential linearly-increasing black-to-white grayscale \\ \hline hot & sequential black-red-yellow-white, to emulate blackbody radiation from an object at increasing temperatures \\ \hline jet & a spectral map with dark endpoints, blue-cyan-yellow-red; based on a fluid-jet simulation by NCSA % \begin{footnote}[1]\sphinxAtStartFootnote Rainbow colormaps, \sphinxcode{\sphinxupquote{jet}} in particular, are considered a poor choice for scientific visualization by many researchers: \sphinxhref{http://ieeexplore.ieee.org/document/4118486/?arnumber=4118486}{Rainbow Color Map (Still) Considered Harmful} % \end{footnote} \\ \hline pink & sequential increasing pastel black-pink-white, meant for sepia tone colorization of photographs \\ \hline prism & repetitive red-yellow-green-blue-purple-...-green pattern (not cyclic at endpoints) \\ \hline spring & linearly-increasing shades of magenta-yellow \\ \hline summer & sequential linearly-increasing shades of green-yellow \\ \hline winter & linearly-increasing shades of blue-green \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} A set of palettes from the \sphinxhref{https://dhmunro.github.io/yorick-doc/}{Yorick scientific visualisation package}, an evolution of the GIST package, both by David H. Munro are included: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline gist\_earth & mapmaker's colors from dark blue deep ocean to green lowlands to brown highlands to white mountains \\ \hline gist\_heat & sequential increasing black-red-orange-white, to emulate blackbody radiation from an iron bar as it grows hotter \\ \hline gist\_ncar & pseudo-spectral black-blue-green-yellow-red-purple-white colormap from National Center for Atmospheric Research % \begin{footnote}[2]\sphinxAtStartFootnote Resembles "BkBlAqGrYeOrReViWh200" from NCAR Command Language. See \sphinxhref{https://www.ncl.ucar.edu/Document/Graphics/color\_table\_gallery.shtml}{Color Table Gallery} % \end{footnote} \\ \hline gist\_rainbow & runs through the colors in spectral order from red to violet at full saturation (like \sphinxstyleemphasis{hsv} but not cyclic) \\ \hline gist\_stern & "Stern special" color table from Interactive Data Language software \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} A set of cyclic color maps: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline hsv & red-yellow-green-cyan-blue-magenta-red, formed by changing the hue component in the HSV color space \\ \hline twilight & perceptually uniform shades of white-blue-black-red-white \\ \hline twilight\_shifted & perceptually uniform shades of black-blue-white-red-black \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} Other miscellaneous schemes: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline afmhot & sequential black-orange-yellow-white blackbody spectrum, commonly used in atomic force microscopy \\ \hline brg & blue-red-green \\ \hline bwr & diverging blue-white-red \\ \hline coolwarm & diverging blue-gray-red, meant to avoid issues with 3D shading, color blindness, and ordering of colors % \begin{footnote}[3]\sphinxAtStartFootnote See \sphinxhref{http://www.kennethmoreland.com/color-maps/}{Diverging Color Maps for Scientific Visualization} by Kenneth Moreland. % \end{footnote} \\ \hline CMRmap & "Default colormaps on color images often reproduce to confusing grayscale images. The proposed colormap maintains an aesthetically pleasing color image that automatically reproduces to a monotonic grayscale with discrete, quantifiable saturation levels." % \begin{footnote}[4]\sphinxAtStartFootnote See \sphinxhref{https://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m}{A Color Map for Effective Black-and-White Rendering of Color-Scale Images} by Carey Rappaport % \end{footnote} \\ \hline cubehelix & Unlike most other color schemes cubehelix was designed by D.A. Green to be monotonically increasing in terms of perceived brightness. Also, when printed on a black and white postscript printer, the scheme results in a greyscale with monotonically increasing brightness. This color scheme is named cubehelix because the r,g,b values produced can be visualised as a squashed helix around the diagonal in the r,g,b color cube. \\ \hline gnuplot & gnuplot's traditional pm3d scheme (black-blue-red-yellow) \\ \hline gnuplot2 & sequential color printable as gray (black-blue-violet-yellow-white) \\ \hline ocean & green-blue-white \\ \hline rainbow & spectral purple-blue-green-yellow-orange-red colormap with diverging luminance \\ \hline seismic & diverging blue-white-red \\ \hline nipy\_spectral & black-purple-blue-green-yellow-red-white spectrum, originally from the Neuroimaging in Python project \\ \hline terrain & mapmaker's colors, blue-green-yellow-brown-white, originally from IGOR Pro \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} The following colormaps are redundant and may be removed in future versions. It's recommended to use the names in the descriptions instead, which produce identical output: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Colormap &\sphinxstyletheadfamily Description \\ \hline gist\_gray & identical to \sphinxstyleemphasis{gray} \\ \hline gist\_yarg & identical to \sphinxstyleemphasis{gray\_r} \\ \hline binary & identical to \sphinxstyleemphasis{gray\_r} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.projections}}} \label{\detokenize{api/projections_api:module-matplotlib.projections}}\label{\detokenize{api/projections_api:matplotlib-projections}}\label{\detokenize{api/projections_api::doc}}\index{matplotlib.projections (module)@\spxentry{matplotlib.projections}\spxextra{module}}\index{ProjectionRegistry (class in matplotlib.projections)@\spxentry{ProjectionRegistry}\spxextra{class in matplotlib.projections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.ProjectionRegistry}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.}}\sphinxbfcode{\sphinxupquote{ProjectionRegistry}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Manages the set of projections available to the system. \index{get\_projection\_class() (matplotlib.projections.ProjectionRegistry method)@\spxentry{get\_projection\_class()}\spxextra{matplotlib.projections.ProjectionRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.ProjectionRegistry.get_projection_class}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_projection\_class}}}{\emph{self}, \emph{name}}{} Get a projection class from its \sphinxstyleemphasis{name}. \end{fulllineitems} \index{get\_projection\_names() (matplotlib.projections.ProjectionRegistry method)@\spxentry{get\_projection\_names()}\spxextra{matplotlib.projections.ProjectionRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.ProjectionRegistry.get_projection_names}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_projection\_names}}}{\emph{self}}{} Get a list of the names of all projections currently registered. \end{fulllineitems} \index{register() (matplotlib.projections.ProjectionRegistry method)@\spxentry{register()}\spxextra{matplotlib.projections.ProjectionRegistry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.ProjectionRegistry.register}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{register}}}{\emph{self}, \emph{*projections}}{} Register a new set of projections. \end{fulllineitems} \end{fulllineitems} \index{get\_projection\_class() (in module matplotlib.projections)@\spxentry{get\_projection\_class()}\spxextra{in module matplotlib.projections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.get_projection_class}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.projections.}}\sphinxbfcode{\sphinxupquote{get\_projection\_class}}}{\emph{projection=None}}{} Get a projection class from its name. If \sphinxstyleemphasis{projection} is None, a standard rectilinear projection is returned. \end{fulllineitems} \index{get\_projection\_names() (in module matplotlib.projections)@\spxentry{get\_projection\_names()}\spxextra{in module matplotlib.projections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.get_projection_names}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.projections.}}\sphinxbfcode{\sphinxupquote{get\_projection\_names}}}{}{} Get a list of acceptable projection names. \end{fulllineitems} \index{process\_projection\_requirements() (in module matplotlib.projections)@\spxentry{process\_projection\_requirements()}\spxextra{in module matplotlib.projections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.process_projection_requirements}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.projections.}}\sphinxbfcode{\sphinxupquote{process\_projection\_requirements}}}{\emph{figure}, \emph{*args}, \emph{**kwargs}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{register\_projection() (in module matplotlib.projections)@\spxentry{register\_projection()}\spxextra{in module matplotlib.projections}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.register_projection}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.projections.}}\sphinxbfcode{\sphinxupquote{register\_projection}}}{\emph{cls}}{}~ \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.projections.polar}}} \label{\detokenize{api/projections_api:module-matplotlib.projections.polar}}\label{\detokenize{api/projections_api:matplotlib-projections-polar}}\index{matplotlib.projections.polar (module)@\spxentry{matplotlib.projections.polar}\spxextra{module}}\index{InvertedPolarTransform (class in matplotlib.projections.polar)@\spxentry{InvertedPolarTransform}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{InvertedPolarTransform}}}{\emph{axis=None}, \emph{use\_rmin=True}, \emph{\_apply\_theta\_transforms=True}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} The inverse of the polar transform, mapping Cartesian coordinate space \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} back to \sphinxstyleemphasis{theta} and \sphinxstyleemphasis{r}. \index{input\_dims (matplotlib.projections.polar.InvertedPolarTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.projections.polar.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.projections.polar.InvertedPolarTransform method)@\spxentry{inverted()}\spxextra{matplotlib.projections.polar.InvertedPolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.projections.polar.InvertedPolarTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.projections.polar.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{output\_dims (matplotlib.projections.polar.InvertedPolarTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.projections.polar.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.projections.polar.InvertedPolarTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.projections.polar.InvertedPolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{xy}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.InvertedPolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{PolarAffine (class in matplotlib.projections.polar)@\spxentry{PolarAffine}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAffine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{PolarAffine}}}{\emph{scale\_transform}, \emph{limits}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} The affine part of the polar projection. Scales the output so that maximum radius rests on the edge of the axes circle. \sphinxstyleemphasis{limits} is the view limit of the data. The only part of its bounds that is used is the y limits (for the radius limits). The theta range is handled by the non-affine transform. \index{get\_matrix() (matplotlib.projections.polar.PolarAffine method)@\spxentry{get\_matrix()}\spxextra{matplotlib.projections.polar.PolarAffine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAffine.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \end{fulllineitems} \index{PolarAxes (class in matplotlib.projections.polar)@\spxentry{PolarAxes}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{PolarAxes}}}{\emph{*args}, \emph{theta\_offset=0}, \emph{theta\_direction=1}, \emph{rlabel\_position=22.5}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.axes.\_axes.Axes}} A polar graph projection, where the input dimensions are \sphinxstyleemphasis{theta}, \sphinxstyleemphasis{r}. Theta starts pointing east and goes anti-clockwise. \index{PolarAxes.InvertedPolarTransform (class in matplotlib.projections.polar)@\spxentry{PolarAxes.InvertedPolarTransform}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedPolarTransform}}}{\emph{axis=None}, \emph{use\_rmin=True}, \emph{\_apply\_theta\_transforms=True}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} The inverse of the polar transform, mapping Cartesian coordinate space \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y} back to \sphinxstyleemphasis{theta} and \sphinxstyleemphasis{r}. \index{input\_dims (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method)@\spxentry{inverted()}\spxextra{matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{output\_dims (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.projections.polar.PolarAxes.InvertedPolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{xy}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.InvertedPolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{PolarAxes.PolarAffine (class in matplotlib.projections.polar)@\spxentry{PolarAxes.PolarAffine}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarAffine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{PolarAffine}}}{\emph{scale\_transform}, \emph{limits}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} The affine part of the polar projection. Scales the output so that maximum radius rests on the edge of the axes circle. \sphinxstyleemphasis{limits} is the view limit of the data. The only part of its bounds that is used is the y limits (for the radius limits). The theta range is handled by the non-affine transform. \index{get\_matrix() (matplotlib.projections.polar.PolarAxes.PolarAffine method)@\spxentry{get\_matrix()}\spxextra{matplotlib.projections.polar.PolarAxes.PolarAffine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarAffine.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \end{fulllineitems} \index{PolarAxes.PolarTransform (class in matplotlib.projections.polar)@\spxentry{PolarAxes.PolarTransform}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{PolarTransform}}}{\emph{axis=None}, \emph{use\_rmin=True}, \emph{\_apply\_theta\_transforms=True}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} The base polar transform. This handles projection \sphinxstyleemphasis{theta} and \sphinxstyleemphasis{r} into Cartesian coordinate space \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, but does not perform the ultimate affine transformation into the correct position. \index{input\_dims (matplotlib.projections.polar.PolarAxes.PolarTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.projections.polar.PolarAxes.PolarTransform method)@\spxentry{inverted()}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.projections.polar.PolarAxes.PolarTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{output\_dims (matplotlib.projections.polar.PolarAxes.PolarTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.projections.polar.PolarAxes.PolarTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{tr}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.projections.polar.PolarAxes.PolarTransform method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.projections.polar.PolarAxes.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.PolarTransform.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \end{fulllineitems} \index{PolarAxes.RadialLocator (class in matplotlib.projections.polar)@\spxentry{PolarAxes.RadialLocator}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{RadialLocator}}}{\emph{base}, \emph{axes=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Used to locate radius ticks. Ensures that all ticks are strictly positive. For all other tasks, it delegates to the base {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} (which may be different depending on the scale of the \sphinxstyleemphasis{r}-axis. \index{autoscale() (matplotlib.projections.polar.PolarAxes.RadialLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.projections.polar.PolarAxes.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} autoscale the view limits \end{fulllineitems} \index{pan() (matplotlib.projections.polar.PolarAxes.RadialLocator method)@\spxentry{pan()}\spxextra{matplotlib.projections.polar.PolarAxes.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan numticks (can be positive or negative) \end{fulllineitems} \index{refresh() (matplotlib.projections.polar.PolarAxes.RadialLocator method)@\spxentry{refresh()}\spxextra{matplotlib.projections.polar.PolarAxes.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} refresh internal information based on current lim \end{fulllineitems} \index{view\_limits() (matplotlib.projections.polar.PolarAxes.RadialLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.projections.polar.PolarAxes.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \index{zoom() (matplotlib.projections.polar.PolarAxes.RadialLocator method)@\spxentry{zoom()}\spxextra{matplotlib.projections.polar.PolarAxes.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.RadialLocator.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if direction is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \end{fulllineitems} \index{PolarAxes.ThetaFormatter (class in matplotlib.projections.polar)@\spxentry{PolarAxes.ThetaFormatter}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaFormatter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{ThetaFormatter}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Used to format the \sphinxstyleemphasis{theta} tick labels. Converts the native unit of radians into degrees and adds a degree symbol. \end{fulllineitems} \index{PolarAxes.ThetaLocator (class in matplotlib.projections.polar)@\spxentry{PolarAxes.ThetaLocator}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{ThetaLocator}}}{\emph{base}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Used to locate theta ticks. This will work the same as the base locator except in the case that the view spans the entire circle. In such cases, the previously used default locations of every 45 degrees are returned. \index{autoscale() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} autoscale the view limits \end{fulllineitems} \index{pan() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{pan()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan numticks (can be positive or negative) \end{fulllineitems} \index{refresh() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{refresh()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} refresh internal information based on current lim \end{fulllineitems} \index{set\_axis() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{set\_axis()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{view\_limits() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \index{zoom() (matplotlib.projections.polar.PolarAxes.ThetaLocator method)@\spxentry{zoom()}\spxextra{matplotlib.projections.polar.PolarAxes.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.ThetaLocator.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if direction is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \end{fulllineitems} \index{can\_pan() (matplotlib.projections.polar.PolarAxes method)@\spxentry{can\_pan()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.can_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{can\_pan}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports the pan/zoom button functionality. For polar axes, this is slightly misleading. Both panning and zooming are performed by the same button. Panning is performed in azimuth while zooming is done along the radial. \end{fulllineitems} \index{can\_zoom() (matplotlib.projections.polar.PolarAxes method)@\spxentry{can\_zoom()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.can_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{can\_zoom}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports the zoom box button functionality. Polar axes do not support zoom boxes. \end{fulllineitems} \index{cla() (matplotlib.projections.polar.PolarAxes method)@\spxentry{cla()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \index{drag\_pan() (matplotlib.projections.polar.PolarAxes method)@\spxentry{drag\_pan()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.drag_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{drag\_pan}}}{\emph{self}, \emph{button}, \emph{key}, \emph{x}, \emph{y}}{} Called when the mouse moves during a pan operation. \sphinxstyleemphasis{button} is the mouse button number: \begin{itemize} \item {} 1: LEFT \item {} 2: MIDDLE \item {} 3: RIGHT \end{itemize} \sphinxstyleemphasis{key} is a "shift" key \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are the mouse coordinates in display coords. \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \index{draw() (matplotlib.projections.polar.PolarAxes method)@\spxentry{draw()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Draw everything (plot lines, axes, labels) \end{fulllineitems} \index{end\_pan() (matplotlib.projections.polar.PolarAxes method)@\spxentry{end\_pan()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.end_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{end\_pan}}}{\emph{self}}{} Called when a pan operation completes (when the mouse button is up.) \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \index{format\_coord() (matplotlib.projections.polar.PolarAxes method)@\spxentry{format\_coord()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.format_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_coord}}}{\emph{self}, \emph{theta}, \emph{r}}{} Return a format string formatting the coordinate using Unicode characters. \end{fulllineitems} \index{get\_data\_ratio() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_data\_ratio()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_data_ratio}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data\_ratio}}}{\emph{self}}{} Return the aspect ratio of the data itself. For a polar plot, this should always be 1.0 \end{fulllineitems} \index{get\_rlabel\_position() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_rlabel\_position()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_rlabel_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rlabel\_position}}}{\emph{self}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{float}] \leavevmode The theta position of the radius labels in degrees. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_rmax() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_rmax()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_rmax}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rmax}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rmin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_rmin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_rmin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rmin}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rorigin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_rorigin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_rorigin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rorigin}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_rsign() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_rsign()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_rsign}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rsign}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_theta\_direction() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_theta\_direction()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_theta_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_theta\_direction}}}{\emph{self}}{} Get the direction in which theta increases. \begin{description} \item[{-1:}] \leavevmode Theta increases in the clockwise direction \item[{1:}] \leavevmode Theta increases in the counterclockwise direction \end{description} \end{fulllineitems} \index{get\_theta\_offset() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_theta\_offset()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_theta_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_theta\_offset}}}{\emph{self}}{} Get the offset for the location of 0 in radians. \end{fulllineitems} \index{get\_thetamax() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_thetamax()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_thetamax}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_thetamax}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_thetamin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_thetamin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_thetamin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_thetamin}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_xaxis\_text1\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_xaxis\_text1\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_xaxis_text1_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xaxis\_text1\_transform}}}{\emph{self}, \emph{pad}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing x-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \index{get\_xaxis\_text2\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_xaxis\_text2\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_xaxis_text2_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xaxis\_text2\_transform}}}{\emph{self}, \emph{pad}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing secondary x-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in data coordinates and the y-direction is in axis corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \index{get\_xaxis\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_xaxis\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_xaxis_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xaxis\_transform}}}{\emph{self}, \emph{which='grid'}}{} Get the transformation used for drawing x-axis labels, ticks and gridlines. The x-direction is in data coordinates and the y-direction is in axis coordinates. \begin{sphinxadmonition}{note}{Note:} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{sphinxadmonition} \end{fulllineitems} \index{get\_yaxis\_text1\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_yaxis\_text1\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_yaxis_text1_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_yaxis\_text1\_transform}}}{\emph{self}, \emph{pad}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing y-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \index{get\_yaxis\_text2\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_yaxis\_text2\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_yaxis_text2_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_yaxis\_text2\_transform}}}{\emph{self}, \emph{pad}}{}~\begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}Transform{]} The transform used for drawing secondart y-axis labels, which will add \sphinxstyleemphasis{pad\_points} of padding (in points) between the axes and the label. The x-direction is in axis coordinates and the y-direction is in data corrdinates \item[{\sphinxstylestrong{valign}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} The text vertical alignment. \item[{\sphinxstylestrong{halign}}] \leavevmode{[}\{'center', 'left', 'right'\}{]} The text horizontal alignment. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{fulllineitems} \index{get\_yaxis\_transform() (matplotlib.projections.polar.PolarAxes method)@\spxentry{get\_yaxis\_transform()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.get_yaxis_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_yaxis\_transform}}}{\emph{self}, \emph{which='grid'}}{} Get the transformation used for drawing y-axis labels, ticks and gridlines. The x-direction is in axis coordinates and the y-direction is in data coordinates. \begin{sphinxadmonition}{note}{Note:} This transformation is primarily used by the {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} class, and is meant to be overridden by new kinds of projections that may need to place axis elements in different locations. \end{sphinxadmonition} \end{fulllineitems} \index{name (matplotlib.projections.polar.PolarAxes attribute)@\spxentry{name}\spxextra{matplotlib.projections.polar.PolarAxes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'polar'}}} \end{fulllineitems} \index{set\_rgrids() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rgrids()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rgrids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rgrids}}}{\emph{self}, \emph{radii}, \emph{labels=None}, \emph{angle=None}, \emph{fmt=None}, \emph{**kwargs}}{} Set the radial gridlines on a polar plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{radii}}] \leavevmode{[}tuple with floats{]} The radii for the radial gridlines \item[{\sphinxstylestrong{labels}}] \leavevmode{[}tuple with strings or None{]} The labels to use at each radial gridline. The {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.ScalarFormatter}}}}} will be used if None. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}float{]} The angular position of the radius labels in degrees. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str or None{]} Format string used in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FormatStrFormatter}}}}}. For example '\%f'. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines, labels}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lines.Line2D}}}}}, list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.Text}}}}}{]} \sphinxstyleemphasis{lines} are the radial gridlines and \sphinxstyleemphasis{labels} are the tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode \sphinxstyleemphasis{kwargs} are optional {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties for the labels. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetagrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolarAxes.set\_thetagrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gridlines}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabels}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_rlabel\_position() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rlabel\_position()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rlabel_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rlabel\_position}}}{\emph{self}, \emph{value}}{} Updates the theta position of the radius labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}number{]} The angular position of the radius labels in degrees. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rlim() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rlim()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rlim}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{**kwargs}}{} See {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}. \end{fulllineitems} \index{set\_rmax() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rmax()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rmax}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rmax}}}{\emph{self}, \emph{rmax}}{}~ \end{fulllineitems} \index{set\_rmin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rmin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rmin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rmin}}}{\emph{self}, \emph{rmin}}{}~ \end{fulllineitems} \index{set\_rorigin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rorigin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rorigin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rorigin}}}{\emph{self}, \emph{rorigin}}{}~ \end{fulllineitems} \index{set\_rscale() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rscale()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rscale}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{set\_rticks() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_rticks()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rticks}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{set\_theta\_direction() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_theta\_direction()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_theta_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_theta\_direction}}}{\emph{self}, \emph{direction}}{} Set the direction in which theta increases. \begin{description} \item[{clockwise, -1:}] \leavevmode Theta increases in the clockwise direction \item[{counterclockwise, anticlockwise, 1:}] \leavevmode Theta increases in the counterclockwise direction \end{description} \end{fulllineitems} \index{set\_theta\_offset() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_theta\_offset()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_theta_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_theta\_offset}}}{\emph{self}, \emph{offset}}{} Set the offset for the location of 0 in radians. \end{fulllineitems} \index{set\_theta\_zero\_location() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_theta\_zero\_location()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_theta_zero_location}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_theta\_zero\_location}}}{\emph{self}, \emph{loc}, \emph{offset=0.0}}{} Sets the location of theta's zero. (Calls set\_theta\_offset with the correct value in radians under the hood.) \begin{description} \item[{loc}] \leavevmode{[}str{]} May be one of "N", "NW", "W", "SW", "S", "SE", "E", or "NE". \item[{offset}] \leavevmode{[}float, optional{]} An offset in degrees to apply from the specified \sphinxcode{\sphinxupquote{loc}}. \sphinxstylestrong{Note:} this offset is \sphinxstyleemphasis{always} applied counter-clockwise regardless of the direction setting. \end{description} \end{fulllineitems} \index{set\_thetagrids() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_thetagrids()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetagrids}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_thetagrids}}}{\emph{self}, \emph{angles}, \emph{labels=None}, \emph{fmt=None}, \emph{**kwargs}}{} Set the theta gridlines in a polar plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{angles}}] \leavevmode{[}tuple with floats, degrees{]} The angles of the theta gridlines. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}tuple with strings or None{]} The labels to use at each theta gridline. The {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.ThetaFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{projections.polar.ThetaFormatter}}}}} will be used if None. \item[{\sphinxstylestrong{fmt}}] \leavevmode{[}str or None{]} Format string used in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.FormatStrFormatter}}}}}. For example '\%f'. Note that the angle that is used is in radians. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lines, labels}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{lines.Line2D}}}}}, list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text.Text}}}}}{]} \sphinxstyleemphasis{lines} are the theta gridlines and \sphinxstyleemphasis{labels} are the tick labels. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode \sphinxstyleemphasis{kwargs} are optional {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties for the labels. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_rgrids}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PolarAxes.set\_rgrids}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_gridlines:matplotlib.axis.Axis.get_gridlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_gridlines}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.get_ticklabels:matplotlib.axis.Axis.get_ticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.get\_ticklabels}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_thetalim() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_thetalim()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_thetalim}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{set\_thetamax() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_thetamax()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetamax}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_thetamax}}}{\emph{self}, \emph{thetamax}}{}~ \end{fulllineitems} \index{set\_thetamin() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_thetamin()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_thetamin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_thetamin}}}{\emph{self}, \emph{thetamin}}{}~ \end{fulllineitems} \index{set\_xscale() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_xscale()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_xscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xscale}}}{\emph{self}, \emph{scale}, \emph{*args}, \emph{**kwargs}}{} Set the x-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \index{set\_ylim() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_ylim()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_ylim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ylim}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{ymin=None}, \emph{ymax=None}}{} Set the data limits for the radial axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom}}] \leavevmode{[}scalar, optional{]} The bottom limit (default: None, which leaves the bottom limit unchanged). The bottom and top ylims may be passed as the tuple (\sphinxstyleemphasis{bottom}, \sphinxstyleemphasis{top}) as the first positional argument (or as the \sphinxstyleemphasis{bottom} keyword argument). \item[{\sphinxstylestrong{top}}] \leavevmode{[}scalar, optional{]} The top limit (default: None, which leaves the top limit unchanged). \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional{]} Whether to notify observers of limit change (default: True). \item[{\sphinxstylestrong{auto}}] \leavevmode{[}bool or None, optional{]} Whether to turn on autoscaling of the y-axis. True turns on, False turns off (default action), None leaves unchanged. \item[{\sphinxstylestrong{ymin, ymax}}] \leavevmode{[}scalar, optional{]} These arguments are deprecated and will be removed in a future version. They are equivalent to \sphinxstyleemphasis{bottom} and \sphinxstyleemphasis{top} respectively, and it is an error to pass both \sphinxstyleemphasis{ymin} and \sphinxstyleemphasis{bottom} or \sphinxstyleemphasis{ymax} and \sphinxstyleemphasis{top}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom, top}}] \leavevmode{[}(float, float){]} The new y-axis limits in data coordinates. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_yscale() (matplotlib.projections.polar.PolarAxes method)@\spxentry{set\_yscale()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.set_yscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_yscale}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Set the y-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \end{fulllineitems} \index{start\_pan() (matplotlib.projections.polar.PolarAxes method)@\spxentry{start\_pan()}\spxextra{matplotlib.projections.polar.PolarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarAxes.start_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{start\_pan}}}{\emph{self}, \emph{x}, \emph{y}, \emph{button}}{} Called when a pan operation has started. \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} are the mouse coordinates in display coords. button is the mouse button number: \begin{itemize} \item {} 1: LEFT \item {} 2: MIDDLE \item {} 3: RIGHT \end{itemize} \begin{sphinxadmonition}{note}{Note:} Intended to be overridden by new projection types. \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{PolarTransform (class in matplotlib.projections.polar)@\spxentry{PolarTransform}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{PolarTransform}}}{\emph{axis=None}, \emph{use\_rmin=True}, \emph{\_apply\_theta\_transforms=True}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} The base polar transform. This handles projection \sphinxstyleemphasis{theta} and \sphinxstyleemphasis{r} into Cartesian coordinate space \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}, but does not perform the ultimate affine transformation into the correct position. \index{input\_dims (matplotlib.projections.polar.PolarTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.projections.polar.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.projections.polar.PolarTransform method)@\spxentry{inverted()}\spxextra{matplotlib.projections.polar.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.projections.polar.PolarTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.projections.polar.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{output\_dims (matplotlib.projections.polar.PolarTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.projections.polar.PolarTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.projections.polar.PolarTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.projections.polar.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{tr}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.projections.polar.PolarTransform method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.projections.polar.PolarTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.PolarTransform.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \end{fulllineitems} \index{RadialAxis (class in matplotlib.projections.polar)@\spxentry{RadialAxis}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialAxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{RadialAxis}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.YAxis}}}}} A radial Axis. This overrides certain properties of a \sphinxcode{\sphinxupquote{YAxis}} to provide special-casing for a radial axis. \index{axis\_name (matplotlib.projections.polar.RadialAxis attribute)@\spxentry{axis\_name}\spxextra{matplotlib.projections.polar.RadialAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialAxis.axis_name}}\pysigline{\sphinxbfcode{\sphinxupquote{axis\_name}}\sphinxbfcode{\sphinxupquote{ = 'radius'}}} \end{fulllineitems} \index{cla() (matplotlib.projections.polar.RadialAxis method)@\spxentry{cla()}\spxextra{matplotlib.projections.polar.RadialAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialAxis.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} clear the current axis \end{fulllineitems} \end{fulllineitems} \index{RadialLocator (class in matplotlib.projections.polar)@\spxentry{RadialLocator}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{RadialLocator}}}{\emph{base}, \emph{axes=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Used to locate radius ticks. Ensures that all ticks are strictly positive. For all other tasks, it delegates to the base {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} (which may be different depending on the scale of the \sphinxstyleemphasis{r}-axis. \index{autoscale() (matplotlib.projections.polar.RadialLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.projections.polar.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} autoscale the view limits \end{fulllineitems} \index{pan() (matplotlib.projections.polar.RadialLocator method)@\spxentry{pan()}\spxextra{matplotlib.projections.polar.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan numticks (can be positive or negative) \end{fulllineitems} \index{refresh() (matplotlib.projections.polar.RadialLocator method)@\spxentry{refresh()}\spxextra{matplotlib.projections.polar.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} refresh internal information based on current lim \end{fulllineitems} \index{view\_limits() (matplotlib.projections.polar.RadialLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.projections.polar.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \index{zoom() (matplotlib.projections.polar.RadialLocator method)@\spxentry{zoom()}\spxextra{matplotlib.projections.polar.RadialLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialLocator.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if direction is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \end{fulllineitems} \index{RadialTick (class in matplotlib.projections.polar)@\spxentry{RadialTick}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialTick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{RadialTick}}}{\emph{axes}, \emph{loc}, \emph{label}, \emph{size=None}, \emph{width=None}, \emph{color=None}, \emph{tickdir=None}, \emph{pad=None}, \emph{labelsize=None}, \emph{labelcolor=None}, \emph{zorder=None}, \emph{gridOn=None}, \emph{tick1On=True}, \emph{tick2On=True}, \emph{label1On=True}, \emph{label2On=False}, \emph{major=True}, \emph{labelrotation=0}, \emph{grid\_color=None}, \emph{grid\_linestyle=None}, \emph{grid\_linewidth=None}, \emph{grid\_alpha=None}, \emph{**kw}}{} Bases: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.YTick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.YTick}}}}} A radial-axis tick. This subclass of \sphinxcode{\sphinxupquote{YTick}} provides radial ticks with some small modification to their re-positioning such that ticks are rotated based on axes limits. This results in ticks that are correctly perpendicular to the spine. Labels are also rotated to be perpendicular to the spine, when 'auto' rotation is enabled. bbox is the Bound2D bounding box in display coords of the Axes loc is the tick location in data coords size is the tick size in points \index{update\_position() (matplotlib.projections.polar.RadialTick method)@\spxentry{update\_position()}\spxextra{matplotlib.projections.polar.RadialTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.RadialTick.update_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_position}}}{\emph{self}, \emph{loc}}{} Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \end{fulllineitems} \end{fulllineitems} \index{ThetaAxis (class in matplotlib.projections.polar)@\spxentry{ThetaAxis}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaAxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{ThetaAxis}}}{\emph{axes}, \emph{pickradius=15}}{} Bases: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.XAxis}}}}} A theta Axis. This overrides certain properties of an \sphinxcode{\sphinxupquote{XAxis}} to provide special-casing for an angular axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to which the created Axis belongs. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float{]} The acceptance radius for containment tests. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axis.Axis.contains:matplotlib.axis.Axis.contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis.contains}}}}}. \end{description} \end{description}\end{quote} \index{axis\_name (matplotlib.projections.polar.ThetaAxis attribute)@\spxentry{axis\_name}\spxextra{matplotlib.projections.polar.ThetaAxis attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaAxis.axis_name}}\pysigline{\sphinxbfcode{\sphinxupquote{axis\_name}}\sphinxbfcode{\sphinxupquote{ = 'theta'}}} \end{fulllineitems} \index{cla() (matplotlib.projections.polar.ThetaAxis method)@\spxentry{cla()}\spxextra{matplotlib.projections.polar.ThetaAxis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaAxis.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} clear the current axis \end{fulllineitems} \end{fulllineitems} \index{ThetaFormatter (class in matplotlib.projections.polar)@\spxentry{ThetaFormatter}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaFormatter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{ThetaFormatter}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Used to format the \sphinxstyleemphasis{theta} tick labels. Converts the native unit of radians into degrees and adds a degree symbol. \end{fulllineitems} \index{ThetaLocator (class in matplotlib.projections.polar)@\spxentry{ThetaLocator}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{ThetaLocator}}}{\emph{base}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Used to locate theta ticks. This will work the same as the base locator except in the case that the view spans the entire circle. In such cases, the previously used default locations of every 45 degrees are returned. \index{autoscale() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{autoscale()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} autoscale the view limits \end{fulllineitems} \index{pan() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{pan()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan numticks (can be positive or negative) \end{fulllineitems} \index{refresh() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{refresh()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} refresh internal information based on current lim \end{fulllineitems} \index{set\_axis() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{set\_axis()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{view\_limits() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \index{zoom() (matplotlib.projections.polar.ThetaLocator method)@\spxentry{zoom()}\spxextra{matplotlib.projections.polar.ThetaLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaLocator.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if direction is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \end{fulllineitems} \index{ThetaTick (class in matplotlib.projections.polar)@\spxentry{ThetaTick}\spxextra{class in matplotlib.projections.polar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaTick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.projections.polar.}}\sphinxbfcode{\sphinxupquote{ThetaTick}}}{\emph{axes}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XTick}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.XTick}}}}} A theta-axis tick. This subclass of \sphinxcode{\sphinxupquote{XTick}} provides angular ticks with some small modification to their re-positioning such that ticks are rotated based on tick location. This results in ticks that are correctly perpendicular to the arc spine. When 'auto' rotation is enabled, labels are also rotated to be parallel to the spine. The label padding is also applied here since it's not possible to use a generic axes transform to produce tick-specific padding. \index{update\_position() (matplotlib.projections.polar.ThetaTick method)@\spxentry{update\_position()}\spxextra{matplotlib.projections.polar.ThetaTick method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/projections_api:matplotlib.projections.polar.ThetaTick.update_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_position}}}{\emph{self}, \emph{loc}}{} Set the location of tick in data coords with scalar \sphinxstyleemphasis{loc}. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.rcsetup}}} \label{\detokenize{api/rcsetup_api:module-matplotlib.rcsetup}}\label{\detokenize{api/rcsetup_api:matplotlib-rcsetup}}\label{\detokenize{api/rcsetup_api::doc}}\index{matplotlib.rcsetup (module)@\spxentry{matplotlib.rcsetup}\spxextra{module}} The rcsetup module contains the default values and the validation code for customization using matplotlib's rc settings. Each rc setting is assigned a default value and a function used to validate any attempted changes to that setting. The default values and validation functions are defined in the rcsetup module, and are used to construct the rcParams global object which stores the settings and is referenced throughout matplotlib. These default values should be consistent with the default matplotlibrc file that actually reflects the values given here. Any additions or deletions to the parameter set listed here should also be visited to the \sphinxcode{\sphinxupquote{matplotlibrc.template}} in matplotlib's root source directory. \index{ValidateInStrings (class in matplotlib.rcsetup)@\spxentry{ValidateInStrings}\spxextra{class in matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.ValidateInStrings}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{ValidateInStrings}}}{\emph{key}, \emph{valid}, \emph{ignorecase=False}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} valid is a list of legal strings \end{fulllineitems} \index{ValidateInterval (class in matplotlib.rcsetup)@\spxentry{ValidateInterval}\spxextra{class in matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.ValidateInterval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{ValidateInterval}}}{\emph{vmin}, \emph{vmax}, \emph{closedmin=True}, \emph{closedmax=True}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Value must be in interval \end{fulllineitems} \index{cycler() (in module matplotlib.rcsetup)@\spxentry{cycler()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.cycler}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{cycler}}}{\emph{*args}, \emph{**kwargs}}{} Creates a \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} object much like \sphinxhref{https://matplotlib.org/cycler/generated/cycler.cycler.html\#cycler.cycler}{\sphinxcode{\sphinxupquote{cycler.cycler()}}}, but includes input validation. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{cycler}\PYG{p}{)} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{label}\PYG{o}{=}\PYG{n}{values}\PYG{p}{[}\PYG{p}{,} \PYG{n}{label2}\PYG{o}{=}\PYG{n}{values2}\PYG{p}{[}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]}\PYG{p}{]}\PYG{p}{)} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{label}\PYG{p}{,} \PYG{n}{values}\PYG{p}{)} \end{sphinxVerbatim} Form 1 copies a given \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} object. Form 2 creates a \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} which cycles over one or more properties simultaneously. If multiple properties are given, their value lists must have the same length. Form 3 creates a \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} for a single property. This form exists for compatibility with the original cycler. Its use is discouraged in favor of the kwarg form, i.e. \sphinxcode{\sphinxupquote{cycler(label=values)}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cycler}}] \leavevmode{[}Cycler{]} Copy constructor for Cycler. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} The property key. Must be a valid {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} property. For example, 'color' or 'linestyle'. Aliases are allowed, such as 'c' for 'color' and 'lw' for 'linewidth'. \item[{\sphinxstylestrong{values}}] \leavevmode{[}iterable{]} Finite-length iterable of the property values. These values are validated and will raise a ValueError if invalid. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cycler}}] \leavevmode{[}Cycler{]} A new \sphinxhref{https://matplotlib.org/cycler/generated/cycler.Cycler.html\#cycler.Cycler}{\sphinxcode{\sphinxupquote{Cycler}}} for the given properties. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Creating a cycler for a single property: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{c} \PYG{o}{=} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} Creating a cycler for simultaneously cycling over multiple properties (e.g. red circle, green plus, blue cross): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{c} \PYG{o}{=} \PYG{n}{cycler}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{green}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{marker}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{o}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{+}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{x}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{update\_savefig\_format() (in module matplotlib.rcsetup)@\spxentry{update\_savefig\_format()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.update_savefig_format}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{update\_savefig\_format}}}{\emph{value}}{}~ \end{fulllineitems} \index{validate\_animation\_writer\_path() (in module matplotlib.rcsetup)@\spxentry{validate\_animation\_writer\_path()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_animation_writer_path}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_animation\_writer\_path}}}{\emph{p}}{}~ \end{fulllineitems} \index{validate\_any() (in module matplotlib.rcsetup)@\spxentry{validate\_any()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_any}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_any}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_anylist() (in module matplotlib.rcsetup)@\spxentry{validate\_anylist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_anylist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_anylist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_aspect() (in module matplotlib.rcsetup)@\spxentry{validate\_aspect()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_aspect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_aspect}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_axisbelow() (in module matplotlib.rcsetup)@\spxentry{validate\_axisbelow()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_axisbelow}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_axisbelow}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_backend() (in module matplotlib.rcsetup)@\spxentry{validate\_backend()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_backend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_backend}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_bbox() (in module matplotlib.rcsetup)@\spxentry{validate\_bbox()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_bbox}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_bbox}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_bool() (in module matplotlib.rcsetup)@\spxentry{validate\_bool()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_bool}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_bool}}}{\emph{b}}{} Convert b to a boolean or raise \end{fulllineitems} \index{validate\_bool\_maybe\_none() (in module matplotlib.rcsetup)@\spxentry{validate\_bool\_maybe\_none()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_bool_maybe_none}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_bool\_maybe\_none}}}{\emph{b}}{} Convert b to a boolean or raise \end{fulllineitems} \index{validate\_capstylelist() (in module matplotlib.rcsetup)@\spxentry{validate\_capstylelist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_capstylelist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_capstylelist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_color() (in module matplotlib.rcsetup)@\spxentry{validate\_color()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_color}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_color}}}{\emph{s}}{} return a valid color arg \end{fulllineitems} \index{validate\_color\_for\_prop\_cycle() (in module matplotlib.rcsetup)@\spxentry{validate\_color\_for\_prop\_cycle()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_color_for_prop_cycle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_color\_for\_prop\_cycle}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_color\_or\_auto() (in module matplotlib.rcsetup)@\spxentry{validate\_color\_or\_auto()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_color_or_auto}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_color\_or\_auto}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_color\_or\_inherit() (in module matplotlib.rcsetup)@\spxentry{validate\_color\_or\_inherit()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_color_or_inherit}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_color\_or\_inherit}}}{\emph{s}}{} return a valid color arg \end{fulllineitems} \index{validate\_colorlist() (in module matplotlib.rcsetup)@\spxentry{validate\_colorlist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_colorlist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_colorlist}}}{\emph{s}}{} return a list of colorspecs \end{fulllineitems} \index{validate\_cycler() (in module matplotlib.rcsetup)@\spxentry{validate\_cycler()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_cycler}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_cycler}}}{\emph{s}}{} return a Cycler object from a string repr or the object itself \end{fulllineitems} \index{validate\_dashlist() (in module matplotlib.rcsetup)@\spxentry{validate\_dashlist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_dashlist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_dashlist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_dpi() (in module matplotlib.rcsetup)@\spxentry{validate\_dpi()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_dpi}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_dpi}}}{\emph{s}}{} confirm s is string 'figure' or convert s to float or raise \end{fulllineitems} \index{validate\_fillstylelist() (in module matplotlib.rcsetup)@\spxentry{validate\_fillstylelist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_fillstylelist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_fillstylelist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_float() (in module matplotlib.rcsetup)@\spxentry{validate\_float()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_float}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_float}}}{\emph{s}}{} convert s to float or raise \end{fulllineitems} \index{validate\_float\_or\_None() (in module matplotlib.rcsetup)@\spxentry{validate\_float\_or\_None()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_float_or_None}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_float\_or\_None}}}{\emph{s}}{} convert s to float, None or raise \end{fulllineitems} \index{validate\_floatlist() (in module matplotlib.rcsetup)@\spxentry{validate\_floatlist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_floatlist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_floatlist}}}{\emph{s}}{} convert s to float or raise \end{fulllineitems} \index{validate\_font\_properties() (in module matplotlib.rcsetup)@\spxentry{validate\_font\_properties()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_font_properties}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_font\_properties}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_fontsize() (in module matplotlib.rcsetup)@\spxentry{validate\_fontsize()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_fontsize}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_fontsize}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_fontsize\_None() (in module matplotlib.rcsetup)@\spxentry{validate\_fontsize\_None()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_fontsize_None}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_fontsize\_None}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_fontsizelist() (in module matplotlib.rcsetup)@\spxentry{validate\_fontsizelist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_fontsizelist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_fontsizelist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_fonttype() (in module matplotlib.rcsetup)@\spxentry{validate\_fonttype()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_fonttype}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_fonttype}}}{\emph{s}}{} confirm that this is a Postscript of PDF font type that we know how to convert to \end{fulllineitems} \index{validate\_hatch() (in module matplotlib.rcsetup)@\spxentry{validate\_hatch()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_hatch}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_hatch}}}{\emph{s}}{} Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \sphinxcode{\sphinxupquote{\textbackslash{} / \textbar{} - + * . x o O}}. \end{fulllineitems} \index{validate\_hatchlist() (in module matplotlib.rcsetup)@\spxentry{validate\_hatchlist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_hatchlist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_hatchlist}}}{\emph{s}}{} Validate a hatch pattern. A hatch pattern string can have any sequence of the following characters: \sphinxcode{\sphinxupquote{\textbackslash{} / \textbar{} - + * . x o O}}. \end{fulllineitems} \index{validate\_hinting() (in module matplotlib.rcsetup)@\spxentry{validate\_hinting()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_hinting}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_hinting}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_hist\_bins() (in module matplotlib.rcsetup)@\spxentry{validate\_hist\_bins()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_hist_bins}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_hist\_bins}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_int() (in module matplotlib.rcsetup)@\spxentry{validate\_int()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_int}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_int}}}{\emph{s}}{} convert s to int or raise \end{fulllineitems} \index{validate\_int\_or\_None() (in module matplotlib.rcsetup)@\spxentry{validate\_int\_or\_None()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_int_or_None}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_int\_or\_None}}}{\emph{s}}{} if not None, tries to validate as an int \end{fulllineitems} \index{validate\_joinstylelist() (in module matplotlib.rcsetup)@\spxentry{validate\_joinstylelist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_joinstylelist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_joinstylelist}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_markevery() (in module matplotlib.rcsetup)@\spxentry{validate\_markevery()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_markevery}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_markevery}}}{\emph{s}}{} Validate the markevery property of a Line2D object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}None, int, float, slice, length-2 tuple of ints,{]} length-2 tuple of floats, list of ints \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}None, int, float, slice, length-2 tuple of ints,{]} length-2 tuple of floats, list of ints \end{description} \end{description}\end{quote} \end{fulllineitems} \index{validate\_markeverylist() (in module matplotlib.rcsetup)@\spxentry{validate\_markeverylist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_markeverylist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_markeverylist}}}{\emph{s}}{} Validate the markevery property of a Line2D object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}None, int, float, slice, length-2 tuple of ints,{]} length-2 tuple of floats, list of ints \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}None, int, float, slice, length-2 tuple of ints,{]} length-2 tuple of floats, list of ints \end{description} \end{description}\end{quote} \end{fulllineitems} \index{validate\_mathtext\_default() (in module matplotlib.rcsetup)@\spxentry{validate\_mathtext\_default()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_mathtext_default}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_mathtext\_default}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_nseq\_float (class in matplotlib.rcsetup)@\spxentry{validate\_nseq\_float}\spxextra{class in matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_nseq_float}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_nseq\_float}}}{\emph{n=None}, \emph{allow\_none=False}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \index{validate\_nseq\_int (class in matplotlib.rcsetup)@\spxentry{validate\_nseq\_int}\spxextra{class in matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_nseq_int}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_nseq\_int}}}{\emph{n=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \index{validate\_path\_exists() (in module matplotlib.rcsetup)@\spxentry{validate\_path\_exists()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_path_exists}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_path\_exists}}}{\emph{s}}{} If s is a path, return s, else False \end{fulllineitems} \index{validate\_ps\_distiller() (in module matplotlib.rcsetup)@\spxentry{validate\_ps\_distiller()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_ps_distiller}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_ps\_distiller}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_qt4() (in module matplotlib.rcsetup)@\spxentry{validate\_qt4()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_qt4}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_qt4}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{validate\_qt5() (in module matplotlib.rcsetup)@\spxentry{validate\_qt5()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_qt5}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_qt5}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{validate\_sketch() (in module matplotlib.rcsetup)@\spxentry{validate\_sketch()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_sketch}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_sketch}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_string() (in module matplotlib.rcsetup)@\spxentry{validate\_string()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_string}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_string}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_string\_or\_None() (in module matplotlib.rcsetup)@\spxentry{validate\_string\_or\_None()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_string_or_None}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_string\_or\_None}}}{\emph{s}}{} convert s to string or raise \end{fulllineitems} \index{validate\_stringlist() (in module matplotlib.rcsetup)@\spxentry{validate\_stringlist()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_stringlist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_stringlist}}}{\emph{s}}{} return a list \end{fulllineitems} \index{validate\_svg\_fonttype() (in module matplotlib.rcsetup)@\spxentry{validate\_svg\_fonttype()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_svg_fonttype}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_svg\_fonttype}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_toolbar() (in module matplotlib.rcsetup)@\spxentry{validate\_toolbar()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_toolbar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_toolbar}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_verbose() (in module matplotlib.rcsetup)@\spxentry{validate\_verbose()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_verbose}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_verbose}}}{\emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{validate\_webagg\_address() (in module matplotlib.rcsetup)@\spxentry{validate\_webagg\_address()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_webagg_address}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_webagg\_address}}}{\emph{s}}{}~ \end{fulllineitems} \index{validate\_whiskers() (in module matplotlib.rcsetup)@\spxentry{validate\_whiskers()}\spxextra{in module matplotlib.rcsetup}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/rcsetup_api:matplotlib.rcsetup.validate_whiskers}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.rcsetup.}}\sphinxbfcode{\sphinxupquote{validate\_whiskers}}}{\emph{s}}{}~ \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.sankey}}} \label{\detokenize{api/sankey_api:module-matplotlib.sankey}}\label{\detokenize{api/sankey_api:matplotlib-sankey}}\label{\detokenize{api/sankey_api::doc}}\index{matplotlib.sankey (module)@\spxentry{matplotlib.sankey}\spxextra{module}} Module for creating Sankey diagrams using Matplotlib. \index{Sankey (class in matplotlib.sankey)@\spxentry{Sankey}\spxextra{class in matplotlib.sankey}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/sankey_api:matplotlib.sankey.Sankey}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.sankey.}}\sphinxbfcode{\sphinxupquote{Sankey}}}{\emph{ax=None}, \emph{scale=1.0}, \emph{unit=''}, \emph{format='\%G'}, \emph{gap=0.25}, \emph{radius=0.1}, \emph{shoulder=0.03}, \emph{offset=0.15}, \emph{head\_angle=100}, \emph{margin=0.4}, \emph{tolerance=1e-06}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Sankey diagram. \begin{quote} Sankey diagrams are a specific type of flow diagram, in which the width of the arrows is shown proportionally to the flow quantity. They are typically used to visualize energy or material or cost transfers between processes. \sphinxhref{https://en.wikipedia.org/wiki/Sankey\_diagram}{Wikipedia (6/1/2011)} \end{quote} Create a new Sankey instance. Optional keyword arguments: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Field &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{ax} & axes onto which the data should be plotted If \sphinxstyleemphasis{ax} isn't provided, new axes will be created. \\ \hline \sphinxstyleemphasis{scale} & scaling factor for the flows \sphinxstyleemphasis{scale} sizes the width of the paths in order to maintain proper layout. The same scale is applied to all subdiagrams. The value should be chosen such that the product of the scale and the sum of the inputs is approximately 1.0 (and the product of the scale and the sum of the outputs is approximately -1.0). \\ \hline \sphinxstyleemphasis{unit} & string representing the physical unit associated with the flow quantities If \sphinxstyleemphasis{unit} is None, then none of the quantities are labeled. \\ \hline \sphinxstyleemphasis{format} & a Python number formatting string to be used in labeling the flow as a quantity (i.e., a number times a unit, where the unit is given) \\ \hline \sphinxstyleemphasis{gap} & space between paths that break in/break away to/from the top or bottom \\ \hline \sphinxstyleemphasis{radius} & inner radius of the vertical paths \\ \hline \sphinxstyleemphasis{shoulder} & size of the shoulders of output arrowS \\ \hline \sphinxstyleemphasis{offset} & text offset (from the dip or tip of the arrow) \\ \hline \sphinxstyleemphasis{head\_angle} & angle of the arrow heads (and negative of the angle of the tails) {[}deg{]} \\ \hline \sphinxstyleemphasis{margin} & minimum space between Sankey outlines and the edge of the plot area \\ \hline \sphinxstyleemphasis{tolerance} & acceptable maximum of the magnitude of the sum of flows The magnitude of the sum of connected flows cannot be greater than \sphinxstyleemphasis{tolerance}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} The optional arguments listed above are applied to all subdiagrams so that there is consistent alignment and formatting. If {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey}}}}} is instantiated with any keyword arguments other than those explicitly listed above (\sphinxcode{\sphinxupquote{**kwargs}}), they will be passed to {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add()}}}}}, which will create the first subdiagram. In order to draw a complex Sankey diagram, create an instance of {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey}}}}} by calling it without any kwargs: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sankey} \PYG{o}{=} \PYG{n}{Sankey}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Then add simple Sankey sub-diagrams: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sankey}\PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 1} \PYG{n}{sankey}\PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} 2} \PYG{c+c1}{\PYGZsh{}...} \PYG{n}{sankey}\PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} n} \end{sphinxVerbatim} Finally, create the full diagram: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{sankey}\PYG{o}{.}\PYG{n}{finish}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Or, instead, simply daisy-chain those calls: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Sankey}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{add}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{o}{.}\PYG{n}{add}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{finish}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.add}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.finish}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{sankey_basics_00_00}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{sankey_basics_00_01}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{sankey_basics_00_02}.pdf} \end{figure} \index{add() (matplotlib.sankey.Sankey method)@\spxentry{add()}\spxextra{matplotlib.sankey.Sankey method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add}}}{\emph{self}, \emph{patchlabel=''}, \emph{flows=None}, \emph{orientations=None}, \emph{labels=''}, \emph{trunklength=1.0}, \emph{pathlengths=0.25}, \emph{prior=None}, \emph{connect=(0}, \emph{0)}, \emph{rotation=0}, \emph{**kwargs}}{} Add a simple Sankey diagram with flows at the same hierarchical level. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{patchlabel}}] \leavevmode{[}str{]} Label to be placed at the center of the diagram. Note that \sphinxstyleemphasis{label} (not \sphinxstyleemphasis{patchlabel}) can be passed as keyword argument to create an entry in the legend. \item[{\sphinxstylestrong{flows}}] \leavevmode{[}list of float{]} Array of flow values. By convention, inputs are positive and outputs are negative. Flows are placed along the top of the diagram from the inside out in order of their index within \sphinxstyleemphasis{flows}. They are placed along the sides of the diagram from the top down and along the bottom from the outside in. If the sum of the inputs and outputs is nonzero, the discrepancy will appear as a cubic Bezier curve along the top and bottom edges of the trunk. \item[{\sphinxstylestrong{orientations}}] \leavevmode{[}list of \{-1, 0, 1\}{]} List of orientations of the flows (or a single orientation to be used for all flows). Valid values are 0 (inputs from the left, outputs to the right), 1 (from and to the top) or -1 (from and to the bottom). \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list of (str or None){]} List of labels for the flows (or a single label to be used for all flows). Each label may be \sphinxstyleemphasis{None} (no label), or a labeling string. If an entry is a (possibly empty) string, then the quantity for the corresponding flow will be shown below the string. However, if the \sphinxstyleemphasis{unit} of the main diagram is None, then quantities are never shown, regardless of the value of this argument. \item[{\sphinxstylestrong{trunklength}}] \leavevmode{[}float{]} Length between the bases of the input and output groups (in data-space units). \item[{\sphinxstylestrong{pathlengths}}] \leavevmode{[}list of float{]} List of lengths of the vertical arrows before break-in or after break-away. If a single value is given, then it will be applied to the first (inside) paths on the top and bottom, and the length of all other arrows will be justified accordingly. The \sphinxstyleemphasis{pathlengths} are not applied to the horizontal inputs and outputs. \item[{\sphinxstylestrong{prior}}] \leavevmode{[}int{]} Index of the prior diagram to which this diagram should be connected. \item[{\sphinxstylestrong{connect}}] \leavevmode{[}(int, int){]} A (prior, this) tuple indexing the flow of the prior diagram and the flow of this diagram which should be connected. If this is the first diagram or \sphinxstyleemphasis{prior} is \sphinxstyleemphasis{None}, \sphinxstyleemphasis{connect} will be ignored. \item[{\sphinxstylestrong{rotation}}] \leavevmode{[}float{]} Angle of rotation of the diagram in degrees. The interpretation of the \sphinxstyleemphasis{orientations} argument will be rotated accordingly (e.g., if \sphinxstyleemphasis{rotation} == 90, an \sphinxstyleemphasis{orientations} entry of 1 means to/from the left). \sphinxstyleemphasis{rotation} is ignored if this diagram is connected to an existing one (using \sphinxstyleemphasis{prior} and \sphinxstyleemphasis{connect}). \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{Sankey}] \leavevmode The current {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey}}}}} instance. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional keyword arguments set {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}} properties, listed below. For example, one may want to use \sphinxcode{\sphinxupquote{fill=False}} or \sphinxcode{\sphinxupquote{label="A legend entry"}}. \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.finish}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.finish}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{finish() (matplotlib.sankey.Sankey method)@\spxentry{finish()}\spxextra{matplotlib.sankey.Sankey method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/sankey_api:matplotlib.sankey.Sankey.finish}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{finish}}}{\emph{self}}{} Adjust the axes and return a list of information about the Sankey subdiagram(s). Return value is a list of subdiagrams represented with the following fields: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Field &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{patch} & Sankey outline (an instance of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}}) \\ \hline \sphinxstyleemphasis{flows} & values of the flows (positive for input, negative for output) \\ \hline \sphinxstyleemphasis{angles} & list of angles of the arrows {[}deg/90{]} For example, if the diagram has not been rotated, an input to the top side will have an angle of 3 (DOWN), and an output from the top side will have an angle of 1 (UP). If a flow has been skipped (because its magnitude is less than \sphinxstyleemphasis{tolerance}), then its angle will be \sphinxstyleemphasis{None}. \\ \hline \sphinxstyleemphasis{tips} & array in which each row is an {[}x, y{]} pair indicating the positions of the tips (or "dips") of the flow paths If the magnitude of a flow is less the \sphinxstyleemphasis{tolerance} for the instance of {\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey}}}}}, the flow is skipped and its tip will be at the center of the diagram. \\ \hline \sphinxstyleemphasis{text} & {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance for the label of the diagram \\ \hline \sphinxstyleemphasis{texts} & list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances for the labels of flows \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/sankey_api:matplotlib.sankey.Sankey.add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Sankey.add}}}}}}] \leavevmode \end{description} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.scale}}} \label{\detokenize{api/scale_api:module-matplotlib.scale}}\label{\detokenize{api/scale_api:matplotlib-scale}}\label{\detokenize{api/scale_api::doc}}\index{matplotlib.scale (module)@\spxentry{matplotlib.scale}\spxextra{module}}\index{FuncScale (class in matplotlib.scale)@\spxentry{FuncScale}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{FuncScale}}}{\emph{axis}, \emph{functions}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}} Provide an arbitrary scale with user-supplied function for the axis. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis: the axis for the scale}}] \leavevmode \item[{\sphinxstylestrong{functions}}] \leavevmode{[}(callable, callable){]} two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{forward}\PYG{p}{(}\PYG{n}{values}\PYG{p}{:} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \end{sphinxVerbatim} \end{description} \end{description}\end{quote} \index{get\_transform() (matplotlib.scale.FuncScale method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.FuncScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScale.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} The transform for arbitrary scaling \end{fulllineitems} \index{name (matplotlib.scale.FuncScale attribute)@\spxentry{name}\spxextra{matplotlib.scale.FuncScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScale.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'function'}}} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.FuncScale method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.FuncScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScale.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the locators and formatters to the same defaults as the linear scale. \end{fulllineitems} \end{fulllineitems} \index{FuncScaleLog (class in matplotlib.scale)@\spxentry{FuncScaleLog}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScaleLog}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{FuncScaleLog}}}{\emph{axis}, \emph{functions}, \emph{base=10}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} Provide an arbitrary scale with user-supplied function for the axis and then put on a logarithmic axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axis: the axis for the scale}}] \leavevmode \item[{\sphinxstylestrong{functions}}] \leavevmode{[}(callable, callable){]} two-tuple of the forward and inverse functions for the scale. The forward function must be monotonic. Both functions must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{forward}\PYG{p}{(}\PYG{n}{values}\PYG{p}{:} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \end{sphinxVerbatim} \item[{\sphinxstylestrong{base}}] \leavevmode{[}float{]} logarithmic base of the scale (default = 10) \end{description} \end{description}\end{quote} \index{base (matplotlib.scale.FuncScaleLog attribute)@\spxentry{base}\spxextra{matplotlib.scale.FuncScaleLog attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScaleLog.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}}~ \end{fulllineitems} \index{get\_transform() (matplotlib.scale.FuncScaleLog method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.FuncScaleLog method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScaleLog.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} The transform for arbitrary scaling \end{fulllineitems} \index{name (matplotlib.scale.FuncScaleLog attribute)@\spxentry{name}\spxextra{matplotlib.scale.FuncScaleLog attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncScaleLog.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'functionlog'}}} \end{fulllineitems} \end{fulllineitems} \index{FuncTransform (class in matplotlib.scale)@\spxentry{FuncTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{FuncTransform}}}{\emph{forward}, \emph{inverse}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} A simple transform that takes and arbitrary function for the forward and inverse transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{forward}}] \leavevmode{[}callable{]} The forward function for the transform. This function must have an inverse and, for best behavior, be monotonic. It must have the signature: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{forward}\PYG{p}{(}\PYG{n}{values}\PYG{p}{:} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \end{sphinxVerbatim} \item[{\sphinxstylestrong{inverse}}] \leavevmode{[}callable{]} The inverse of the forward function. Signature as \sphinxcode{\sphinxupquote{forward}}. \end{description} \end{description}\end{quote} \index{has\_inverse (matplotlib.scale.FuncTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.FuncTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.FuncTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.FuncTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.FuncTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.FuncTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.FuncTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.FuncTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.FuncTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.FuncTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.FuncTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.FuncTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.FuncTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{values}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.FuncTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{InvertedLog10Transform (class in matplotlib.scale)@\spxentry{InvertedLog10Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog10Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedLog10Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.InvertedLog10Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.InvertedLog10Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog10Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 10.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.InvertedLog10Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.InvertedLog10Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog10Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{InvertedLog2Transform (class in matplotlib.scale)@\spxentry{InvertedLog2Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog2Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedLog2Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.InvertedLog2Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.InvertedLog2Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog2Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.InvertedLog2Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.InvertedLog2Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLog2Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{InvertedLogTransform (class in matplotlib.scale)@\spxentry{InvertedLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedLogTransform}}}{\emph{base}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} \index{has\_inverse (matplotlib.scale.InvertedLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.InvertedLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.InvertedLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.InvertedLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.InvertedLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.InvertedLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.InvertedLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.InvertedLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{InvertedLogTransformBase (class in matplotlib.scale)@\spxentry{InvertedLogTransformBase}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedLogTransformBase}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{has\_inverse (matplotlib.scale.InvertedLogTransformBase attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.InvertedLogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.InvertedLogTransformBase attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.InvertedLogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.InvertedLogTransformBase attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.InvertedLogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.InvertedLogTransformBase attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.InvertedLogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.InvertedLogTransformBase method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.InvertedLogTransformBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{InvertedNaturalLogTransform (class in matplotlib.scale)@\spxentry{InvertedNaturalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedNaturalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedNaturalLogTransform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.InvertedNaturalLogTransform attribute)@\spxentry{base}\spxextra{matplotlib.scale.InvertedNaturalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedNaturalLogTransform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.718281828459045}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.InvertedNaturalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.InvertedNaturalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedNaturalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{InvertedSymmetricalLogTransform (class in matplotlib.scale)@\spxentry{InvertedSymmetricalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{InvertedSymmetricalLogTransform}}}{\emph{base}, \emph{linthresh}, \emph{linscale}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.InvertedSymmetricalLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.InvertedSymmetricalLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.InvertedSymmetricalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.InvertedSymmetricalLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.InvertedSymmetricalLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.InvertedSymmetricalLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.InvertedSymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedSymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LinearScale (class in matplotlib.scale)@\spxentry{LinearScale}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LinearScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LinearScale}}}{\emph{axis}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}} The default linear scale. \index{get\_transform() (matplotlib.scale.LinearScale method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.LinearScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LinearScale.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} The transform for linear scaling is just the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IdentityTransform}}}}}. \end{fulllineitems} \index{name (matplotlib.scale.LinearScale attribute)@\spxentry{name}\spxextra{matplotlib.scale.LinearScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LinearScale.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'linear'}}} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.LinearScale method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.LinearScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LinearScale.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the locators and formatters to reasonable defaults for linear scaling. \end{fulllineitems} \end{fulllineitems} \index{Log10Transform (class in matplotlib.scale)@\spxentry{Log10Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log10Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{Log10Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.Log10Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.Log10Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log10Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 10.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.Log10Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.Log10Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log10Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{Log2Transform (class in matplotlib.scale)@\spxentry{Log2Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log2Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{Log2Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.Log2Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.Log2Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log2Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.Log2Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.Log2Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.Log2Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale (class in matplotlib.scale)@\spxentry{LogScale}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogScale}}}{\emph{axis}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}} A standard logarithmic scale. Care is taken to only plot positive values. \begin{description} \item[{\sphinxstyleemphasis{basex}/\sphinxstyleemphasis{basey}:}] \leavevmode The base of the logarithm \item[{\sphinxstyleemphasis{nonposx}/\sphinxstyleemphasis{nonposy}: \{'mask', 'clip'\}}] \leavevmode non-positive values in \sphinxstyleemphasis{x} or \sphinxstyleemphasis{y} can be masked as invalid, or clipped to a very small positive number \item[{\sphinxstyleemphasis{subsx}/\sphinxstyleemphasis{subsy}:}] \leavevmode Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale: \sphinxcode{\sphinxupquote{{[}2, 3, 4, 5, 6, 7, 8, 9{]}}} will place 8 logarithmically spaced minor ticks between each major tick. \end{description} \index{LogScale.InvertedLog10Transform (class in matplotlib.scale)@\spxentry{LogScale.InvertedLog10Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog10Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedLog10Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.InvertedLog10Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.InvertedLog10Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog10Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 10.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.InvertedLog10Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.InvertedLog10Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog10Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale.InvertedLog2Transform (class in matplotlib.scale)@\spxentry{LogScale.InvertedLog2Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog2Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedLog2Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.InvertedLog2Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.InvertedLog2Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog2Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.InvertedLog2Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.InvertedLog2Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLog2Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale.InvertedLogTransform (class in matplotlib.scale)@\spxentry{LogScale.InvertedLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedLogTransform}}}{\emph{base}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} \index{has\_inverse (matplotlib.scale.LogScale.InvertedLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogScale.InvertedLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.InvertedLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogScale.InvertedLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogScale.InvertedLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogScale.InvertedLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogScale.InvertedLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LogScale.InvertedNaturalLogTransform (class in matplotlib.scale)@\spxentry{LogScale.InvertedNaturalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedNaturalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedNaturalLogTransform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.InvertedLogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.InvertedLogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.InvertedNaturalLogTransform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.InvertedNaturalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedNaturalLogTransform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.718281828459045}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.InvertedNaturalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.InvertedNaturalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.InvertedNaturalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale.Log10Transform (class in matplotlib.scale)@\spxentry{LogScale.Log10Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log10Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Log10Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.Log10Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.Log10Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log10Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 10.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.Log10Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.Log10Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log10Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale.Log2Transform (class in matplotlib.scale)@\spxentry{LogScale.Log2Transform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log2Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Log2Transform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.Log2Transform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.Log2Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log2Transform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.0}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.Log2Transform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.Log2Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.Log2Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{LogScale.LogTransform (class in matplotlib.scale)@\spxentry{LogScale.LogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{LogTransform}}}{\emph{base}, \emph{nonpos='clip'}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.LogScale.LogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogScale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogScale.LogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogScale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.LogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.LogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogScale.LogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogScale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogScale.LogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogScale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogScale.LogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogScale.LogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LogScale.LogTransformBase (class in matplotlib.scale)@\spxentry{LogScale.LogTransformBase}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{LogTransformBase}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{has\_inverse (matplotlib.scale.LogScale.LogTransformBase attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogScale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogScale.LogTransformBase attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogScale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogScale.LogTransformBase attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogScale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogScale.LogTransformBase attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogScale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogScale.LogTransformBase method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogScale.LogTransformBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale.LogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LogScale.NaturalLogTransform (class in matplotlib.scale)@\spxentry{LogScale.NaturalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.NaturalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{NaturalLogTransform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.LogScale.NaturalLogTransform attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale.NaturalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.NaturalLogTransform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.718281828459045}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogScale.NaturalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogScale.NaturalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.NaturalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{base (matplotlib.scale.LogScale attribute)@\spxentry{base}\spxextra{matplotlib.scale.LogScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}}~ \end{fulllineitems} \index{get\_transform() (matplotlib.scale.LogScale method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.LogScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance appropriate for the given logarithm base. \end{fulllineitems} \index{limit\_range\_for\_scale() (matplotlib.scale.LogScale method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.scale.LogScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.limit_range_for_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{minpos}}{} Limit the domain to positive values. \end{fulllineitems} \index{name (matplotlib.scale.LogScale attribute)@\spxentry{name}\spxextra{matplotlib.scale.LogScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'log'}}} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.LogScale method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.LogScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogScale.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the locators and formatters to specialized versions for log scaling. \end{fulllineitems} \end{fulllineitems} \index{LogTransform (class in matplotlib.scale)@\spxentry{LogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogTransform}}}{\emph{base}, \emph{nonpos='clip'}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.LogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LogTransformBase (class in matplotlib.scale)@\spxentry{LogTransformBase}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogTransformBase}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{has\_inverse (matplotlib.scale.LogTransformBase attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogTransformBase attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogTransformBase attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogTransformBase attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogTransformBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogTransformBase method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogTransformBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{LogisticTransform (class in matplotlib.scale)@\spxentry{LogisticTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogisticTransform}}}{\emph{nonpos='mask'}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.LogisticTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogisticTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogisticTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogisticTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogisticTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogisticTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogisticTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogisticTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogisticTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogisticTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogisticTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogisticTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogisticTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} logistic transform (base 10) \end{fulllineitems} \end{fulllineitems} \index{LogitScale (class in matplotlib.scale)@\spxentry{LogitScale}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogitScale}}}{\emph{axis}, \emph{nonpos='mask'}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}} Logit scale for data between zero and one, both excluded. This scale is similar to a log scale close to zero and to one, and almost linear around 0.5. It maps the interval {]}0, 1{[} onto {]}-infty, +infty{[}. \begin{description} \item[{\sphinxstyleemphasis{nonpos}: \{'mask', 'clip'\}}] \leavevmode values beyond {]}0, 1{[} can be masked as invalid, or clipped to a number very close to 0 or 1 \end{description} \index{get\_transform() (matplotlib.scale.LogitScale method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.LogitScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitScale.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return a {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogitTransform}}}}} instance. \end{fulllineitems} \index{limit\_range\_for\_scale() (matplotlib.scale.LogitScale method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.scale.LogitScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitScale.limit_range_for_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{minpos}}{} Limit the domain to values between 0 and 1 (excluded). \end{fulllineitems} \index{name (matplotlib.scale.LogitScale attribute)@\spxentry{name}\spxextra{matplotlib.scale.LogitScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitScale.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'logit'}}} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.LogitScale method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.LogitScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitScale.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} and {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} objects on the given axis to match this scale. \end{fulllineitems} \end{fulllineitems} \index{LogitTransform (class in matplotlib.scale)@\spxentry{LogitTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{LogitTransform}}}{\emph{nonpos='mask'}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.LogitTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.LogitTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.LogitTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.LogitTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.LogitTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.LogitTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.LogitTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.LogitTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.LogitTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.LogitTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.LogitTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.LogitTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.LogitTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} logit transform (base 10), masked or clipped \end{fulllineitems} \end{fulllineitems} \index{NaturalLogTransform (class in matplotlib.scale)@\spxentry{NaturalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.NaturalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{NaturalLogTransform}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogTransformBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogTransformBase}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \index{base (matplotlib.scale.NaturalLogTransform attribute)@\spxentry{base}\spxextra{matplotlib.scale.NaturalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.NaturalLogTransform.base}}\pysigline{\sphinxbfcode{\sphinxupquote{base}}\sphinxbfcode{\sphinxupquote{ = 2.718281828459045}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.NaturalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.NaturalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.NaturalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \end{fulllineitems} \index{ScaleBase (class in matplotlib.scale)@\spxentry{ScaleBase}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.ScaleBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{ScaleBase}}}{\emph{axis}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The base class for all scales. Scales are separable transformations, working on a single dimension. Any subclasses will want to override: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{name}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase.get_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_transform()}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase.set_default_locators_and_formatters}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_default\_locators\_and\_formatters()}}}}} \end{itemize} \begin{description} \item[{And optionally:}] \leavevmode\begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase.limit_range_for_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{limit\_range\_for\_scale()}}}}} \end{itemize} \end{description} Construct a new scale. \subsubsection*{Notes} The following note is for scale implementors. For back-compatibility reasons, scales take an {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} object as first argument. However, this argument should not be used: a single scale object should be usable by multiple {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}es at the same time. \index{get\_transform() (matplotlib.scale.ScaleBase method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.ScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.ScaleBase.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} object associated with this scale. \end{fulllineitems} \index{limit\_range\_for\_scale() (matplotlib.scale.ScaleBase method)@\spxentry{limit\_range\_for\_scale()}\spxextra{matplotlib.scale.ScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.ScaleBase.limit_range_for_scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{limit\_range\_for\_scale}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{minpos}}{} Returns the range \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax}, possibly limited to the domain supported by this scale. \begin{description} \item[{\sphinxstyleemphasis{minpos} should be the minimum positive value in the data.}] \leavevmode This is used by log scales to determine a minimum value. \end{description} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.ScaleBase method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.ScaleBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.ScaleBase.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Locator}}}}} and {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} objects on the given axis to match this scale. \end{fulllineitems} \end{fulllineitems} \index{SymmetricalLogScale (class in matplotlib.scale)@\spxentry{SymmetricalLogScale}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{SymmetricalLogScale}}}{\emph{axis}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}} The symmetrical logarithmic scale is logarithmic in both the positive and negative directions from the origin. Since the values close to zero tend toward infinity, there is a need to have a range around zero that is linear. The parameter \sphinxstyleemphasis{linthresh} allows the user to specify the size of this range (-\sphinxstyleemphasis{linthresh}, \sphinxstyleemphasis{linthresh}). \begin{description} \item[{\sphinxstyleemphasis{basex}/\sphinxstyleemphasis{basey}:}] \leavevmode The base of the logarithm \item[{\sphinxstyleemphasis{linthreshx}/\sphinxstyleemphasis{linthreshy}:}] \leavevmode A single float which defines the range (-\sphinxstyleemphasis{x}, \sphinxstyleemphasis{x}), within which the plot is linear. This avoids having the plot go to infinity around zero. \item[{\sphinxstyleemphasis{subsx}/\sphinxstyleemphasis{subsy}:}] \leavevmode Where to place the subticks between each major tick. Should be a sequence of integers. For example, in a log10 scale: \sphinxcode{\sphinxupquote{{[}2, 3, 4, 5, 6, 7, 8, 9{]}}} will place 8 logarithmically spaced minor ticks between each major tick. \item[{\sphinxstyleemphasis{linscalex}/\sphinxstyleemphasis{linscaley}:}] \leavevmode This allows the linear range (-\sphinxstyleemphasis{linthresh} to \sphinxstyleemphasis{linthresh}) to be stretched relative to the logarithmic range. Its value is the number of decades to use for each half of the linear range. For example, when \sphinxstyleemphasis{linscale} == 1.0 (the default), the space used for the positive and negative halves of the linear range will be equal to one decade in the logarithmic range. \end{description} \index{SymmetricalLogScale.InvertedSymmetricalLogTransform (class in matplotlib.scale)@\spxentry{SymmetricalLogScale.InvertedSymmetricalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{InvertedSymmetricalLogTransform}}}{\emph{base}, \emph{linthresh}, \emph{linscale}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.InvertedSymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{SymmetricalLogScale.SymmetricalLogTransform (class in matplotlib.scale)@\spxentry{SymmetricalLogScale.SymmetricalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{SymmetricalLogTransform}}}{\emph{base}, \emph{linthresh}, \emph{linscale}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.SymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{get\_transform() (matplotlib.scale.SymmetricalLogScale method)@\spxentry{get\_transform()}\spxextra{matplotlib.scale.SymmetricalLogScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return a {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SymmetricalLogTransform}}}}} instance. \end{fulllineitems} \index{name (matplotlib.scale.SymmetricalLogScale attribute)@\spxentry{name}\spxextra{matplotlib.scale.SymmetricalLogScale attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = 'symlog'}}} \end{fulllineitems} \index{set\_default\_locators\_and\_formatters() (matplotlib.scale.SymmetricalLogScale method)@\spxentry{set\_default\_locators\_and\_formatters()}\spxextra{matplotlib.scale.SymmetricalLogScale method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale.set_default_locators_and_formatters}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_locators\_and\_formatters}}}{\emph{self}, \emph{axis}}{} Set the locators and formatters to specialized versions for symmetrical log scaling. \end{fulllineitems} \end{fulllineitems} \index{SymmetricalLogTransform (class in matplotlib.scale)@\spxentry{SymmetricalLogTransform}\spxextra{class in matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{SymmetricalLogTransform}}}{\emph{base}, \emph{linthresh}, \emph{linscale}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} \index{has\_inverse (matplotlib.scale.SymmetricalLogTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.scale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.scale.SymmetricalLogTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.scale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{inverted() (matplotlib.scale.SymmetricalLogTransform method)@\spxentry{inverted()}\spxextra{matplotlib.scale.SymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.scale.SymmetricalLogTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.scale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.scale.SymmetricalLogTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.scale.SymmetricalLogTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.scale.SymmetricalLogTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.scale.SymmetricalLogTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{a}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{get\_scale\_docs() (in module matplotlib.scale)@\spxentry{get\_scale\_docs()}\spxextra{in module matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.get_scale_docs}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{get\_scale\_docs}}}{}{} {[}\sphinxstyleemphasis{Deprecated}{]} Helper function for generating docstrings related to scales. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: }get\_scale\_docs() is considered private API since 3.1 and will be removed from the public API in 3.3. \end{fulllineitems} \index{get\_scale\_names() (in module matplotlib.scale)@\spxentry{get\_scale\_names()}\spxextra{in module matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.get_scale_names}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{get\_scale\_names}}}{}{}~ \end{fulllineitems} \index{register\_scale() (in module matplotlib.scale)@\spxentry{register\_scale()}\spxextra{in module matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.register_scale}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{register\_scale}}}{\emph{scale\_class}}{} Register a new kind of scale. \sphinxstyleemphasis{scale\_class} must be a subclass of {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScaleBase}}}}}. \end{fulllineitems} \index{scale\_factory() (in module matplotlib.scale)@\spxentry{scale\_factory()}\spxextra{in module matplotlib.scale}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/scale_api:matplotlib.scale.scale_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.scale.}}\sphinxbfcode{\sphinxupquote{scale\_factory}}}{\emph{scale}, \emph{axis}, \emph{**kwargs}}{} Return a scale class by name. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{scale}}] \leavevmode{[}\{function, functionlog, linear, log, logit, symlog\}{]} \item[{\sphinxstylestrong{axis}}] \leavevmode{[}Axis{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.spines}}} \label{\detokenize{api/spines_api:module-matplotlib.spines}}\label{\detokenize{api/spines_api:matplotlib-spines}}\label{\detokenize{api/spines_api::doc}}\index{matplotlib.spines (module)@\spxentry{matplotlib.spines}\spxextra{module}}\index{Spine (class in matplotlib.spines)@\spxentry{Spine}\spxextra{class in matplotlib.spines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.spines.}}\sphinxbfcode{\sphinxupquote{Spine}}}{\emph{axes}, \emph{spine\_type}, \emph{path}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} an axis spine -- the line noting the data area boundaries Spines are the lines connecting the axis tick marks and noting the boundaries of the data area. They can be placed at arbitrary positions. See function:{\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position}}}}} for more information. The default position is \sphinxcode{\sphinxupquote{('outward',0)}}. Spines are subclasses of class:{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}}, and inherit much of their behavior. Spines draw a line, a circle, or an arc depending if function:{\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_line}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_patch\_line}}}}}, function:{\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_patch\_circle}}}}}, or function:{\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_arc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_patch\_arc}}}}} has been called. Line-like is the default. \begin{itemize} \item {} \sphinxstyleemphasis{axes} : the Axes instance containing the spine \item {} \sphinxstyleemphasis{spine\_type} : a string specifying the spine type \item {} \sphinxstyleemphasis{path} : the path instance used to draw the spine \end{itemize} Valid kwargs are: \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{arc\_spine() (matplotlib.spines.Spine class method)@\spxentry{arc\_spine()}\spxextra{matplotlib.spines.Spine class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.arc_spine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{arc\_spine}}}{\emph{axes}, \emph{spine\_type}, \emph{center}, \emph{radius}, \emph{theta1}, \emph{theta2}, \emph{**kwargs}}{} (classmethod) Returns an arc {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Spine}}}}}. \end{fulllineitems} \index{circular\_spine() (matplotlib.spines.Spine class method)@\spxentry{circular\_spine()}\spxextra{matplotlib.spines.Spine class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.circular_spine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{circular\_spine}}}{\emph{axes}, \emph{center}, \emph{radius}, \emph{**kwargs}}{} (staticmethod) Returns a circular {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Spine}}}}}. \end{fulllineitems} \index{cla() (matplotlib.spines.Spine method)@\spxentry{cla()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current spine \end{fulllineitems} \index{draw() (matplotlib.spines.Spine method)@\spxentry{draw()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the \sphinxcode{\sphinxupquote{Patch}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_bounds() (matplotlib.spines.Spine method)@\spxentry{get\_bounds()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bounds}}}{\emph{self}}{} Get the bounds of the spine. \end{fulllineitems} \index{get\_patch\_transform() (matplotlib.spines.Spine method)@\spxentry{get\_patch\_transform()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_patch_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_patch\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance which takes patch coordinates to data coordinates. For example, one may define a patch of a circle which represents a radius of 5 by providing coordinates for a unit circle, and a transform which scales the coordinates (the patch coordinate) by 5. \end{fulllineitems} \index{get\_path() (matplotlib.spines.Spine method)@\spxentry{get\_path()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{get\_position() (matplotlib.spines.Spine method)@\spxentry{get\_position()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} get the spine position \end{fulllineitems} \index{get\_smart\_bounds() (matplotlib.spines.Spine method)@\spxentry{get\_smart\_bounds()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_smart_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_smart\_bounds}}}{\emph{self}}{} get whether the spine has smart bounds \end{fulllineitems} \index{get\_spine\_transform() (matplotlib.spines.Spine method)@\spxentry{get\_spine\_transform()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_spine_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_spine\_transform}}}{\emph{self}}{} get the spine transform \end{fulllineitems} \index{get\_window\_extent() (matplotlib.spines.Spine method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Return the window extent of the spines in display space, including padding for ticks (but not their labels) \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_tightbbox:matplotlib.axes.Axes.get_tightbbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_tightbbox}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_window_extent:matplotlib.axes.Axes.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_window\_extent}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{is\_frame\_like() (matplotlib.spines.Spine method)@\spxentry{is\_frame\_like()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.is_frame_like}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_frame\_like}}}{\emph{self}}{} {[}\sphinxstyleemphasis{Deprecated}{]} return True if directly on axes frame This is useful for determining if a spine is the edge of an old style MPL plot. If so, this function will return True. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{linear\_spine() (matplotlib.spines.Spine class method)@\spxentry{linear\_spine()}\spxextra{matplotlib.spines.Spine class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.linear_spine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{linear\_spine}}}{\emph{axes}, \emph{spine\_type}, \emph{**kwargs}}{} (staticmethod) Returns a linear {\hyperref[\detokenize{api/spines_api:matplotlib.spines.Spine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Spine}}}}}. \end{fulllineitems} \index{register\_axis() (matplotlib.spines.Spine method)@\spxentry{register\_axis()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.register_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{register\_axis}}}{\emph{self}, \emph{axis}}{} register an axis An axis should be registered with its corresponding spine from the Axes instance. This allows the spine to clear any axis properties when needed. \end{fulllineitems} \index{set\_bounds() (matplotlib.spines.Spine method)@\spxentry{set\_bounds()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bounds}}}{\emph{self}, \emph{low}, \emph{high}}{} Set the bounds of the spine. \end{fulllineitems} \index{set\_color() (matplotlib.spines.Spine method)@\spxentry{set\_color()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{c}}{} Set the edgecolor. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} This method does not modify the facecolor (which defaults to "none"), unlike the \sphinxcode{\sphinxupquote{Patch.set\_color}} method defined in the parent class. Use \sphinxcode{\sphinxupquote{Patch.set\_facecolor}} to set the facecolor. \end{fulllineitems} \index{set\_patch\_arc() (matplotlib.spines.Spine method)@\spxentry{set\_patch\_arc()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_arc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_patch\_arc}}}{\emph{self}, \emph{center}, \emph{radius}, \emph{theta1}, \emph{theta2}}{} set the spine to be arc-like \end{fulllineitems} \index{set\_patch\_circle() (matplotlib.spines.Spine method)@\spxentry{set\_patch\_circle()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_circle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_patch\_circle}}}{\emph{self}, \emph{center}, \emph{radius}}{} set the spine to be circular \end{fulllineitems} \index{set\_patch\_line() (matplotlib.spines.Spine method)@\spxentry{set\_patch\_line()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_patch_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_patch\_line}}}{\emph{self}}{} set the spine to be linear \end{fulllineitems} \index{set\_position() (matplotlib.spines.Spine method)@\spxentry{set\_position()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_position}}}{\emph{self}, \emph{position}}{} set the position of the spine Spine position is specified by a 2 tuple of (position type, amount). The position types are: \begin{itemize} \item {} 'outward' : place the spine out from the data area by the specified number of points. (Negative values specify placing the spine inward.) \item {} 'axes' : place the spine at the specified Axes coordinate (from 0.0-1.0). \item {} 'data' : place the spine at the specified data coordinate. \end{itemize} Additionally, shorthand notations define a special positions: \begin{itemize} \item {} 'center' -\textgreater{} ('axes',0.5) \item {} 'zero' -\textgreater{} ('data', 0.0) \end{itemize} \end{fulllineitems} \index{set\_smart\_bounds() (matplotlib.spines.Spine method)@\spxentry{set\_smart\_bounds()}\spxextra{matplotlib.spines.Spine method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/spines_api:matplotlib.spines.Spine.set_smart_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_smart\_bounds}}}{\emph{self}, \emph{value}}{} set the spine and associated axis to have smart bounds \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.style}}} \label{\detokenize{api/style_api:module-matplotlib.style}}\label{\detokenize{api/style_api:matplotlib-style}}\label{\detokenize{api/style_api::doc}}\index{matplotlib.style (module)@\spxentry{matplotlib.style}\spxextra{module}}\index{context() (in module matplotlib.style)@\spxentry{context()}\spxextra{in module matplotlib.style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/style_api:matplotlib.style.context}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.style.}}\sphinxbfcode{\sphinxupquote{context}}}{\emph{style}, \emph{after\_reset=False}}{} Context manager for using style settings temporarily. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{style}}] \leavevmode{[}str, dict, or list{]} A style specification. Valid options are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline str & The name of a style or a path/URL to a style file. For a list of available style names, see \sphinxcode{\sphinxupquote{style.available}}. \\ \hline dict & Dictionary with valid key/value pairs for {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}}. \\ \hline list & A list of style specifiers (str or dict) applied from first to last in the list. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{after\_reset}}] \leavevmode{[}bool{]} If True, apply style after resetting settings to their defaults; otherwise, apply style on top of the current settings. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{reload\_library() (in module matplotlib.style)@\spxentry{reload\_library()}\spxextra{in module matplotlib.style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/style_api:matplotlib.style.reload_library}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.style.}}\sphinxbfcode{\sphinxupquote{reload\_library}}}{}{} Reload style library. \end{fulllineitems} \index{use() (in module matplotlib.style)@\spxentry{use()}\spxextra{in module matplotlib.style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/style_api:matplotlib.style.use}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.style.}}\sphinxbfcode{\sphinxupquote{use}}}{\emph{style}}{} Use matplotlib style settings from a style specification. The style name of 'default' is reserved for reverting back to the default style settings. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{style}}] \leavevmode{[}str, dict, or list{]} A style specification. Valid options are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline str & The name of a style or a path/URL to a style file. For a list of available style names, see \sphinxcode{\sphinxupquote{style.available}}. \\ \hline dict & Dictionary with valid key/value pairs for {\hyperref[\detokenize{api/matplotlib_configuration_api:matplotlib.rcParams}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.rcParams}}}}}. \\ \hline list & A list of style specifiers (str or dict) applied from first to last in the list. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{matplotlib.style.library (in module matplotlib.style)@\spxentry{matplotlib.style.library}\spxextra{in module matplotlib.style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/style_api:matplotlib.style.matplotlib.style.library}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.style.}}\sphinxbfcode{\sphinxupquote{library}}} Dictionary of available styles \end{fulllineitems} \index{matplotlib.style.available (in module matplotlib.style)@\spxentry{matplotlib.style.available}\spxextra{in module matplotlib.style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/style_api:matplotlib.style.matplotlib.style.available}}\pysigline{\sphinxcode{\sphinxupquote{matplotlib.style.}}\sphinxbfcode{\sphinxupquote{available}}} List of available styles \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.table}}} \label{\detokenize{api/table_api:module-matplotlib.table}}\label{\detokenize{api/table_api:matplotlib-table}}\label{\detokenize{api/table_api::doc}}\index{matplotlib.table (module)@\spxentry{matplotlib.table}\spxextra{module}} This module provides functionality to add a table to a plot. Use the factory function {\hyperref[\detokenize{api/table_api:matplotlib.table.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}} to create a ready-made table from texts. If you need more control, use the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} class and its methods. The table consists of a grid of cells, which are indexed by (row, column). The cell (0, 0) is positioned at the top left. Thanks to John Gill for providing the class and table. \index{Cell (class in matplotlib.table)@\spxentry{Cell}\spxextra{class in matplotlib.table}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.table.}}\sphinxbfcode{\sphinxupquote{Cell}}}{\emph{xy}, \emph{width}, \emph{height}, \emph{edgecolor='k'}, \emph{facecolor='w'}, \emph{fill=True}, \emph{text=''}, \emph{loc=None}, \emph{fontproperties=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Rectangle}}}}} A cell is a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} with some associated {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}2-tuple{]} The position of the bottom left corner of the cell. \item[{\sphinxstylestrong{width}}] \leavevmode{[}float{]} The cell width. \item[{\sphinxstylestrong{height}}] \leavevmode{[}float{]} The cell height. \item[{\sphinxstylestrong{edgecolor}}] \leavevmode{[}color spec{]} The color of the cell border. \item[{\sphinxstylestrong{facecolor}}] \leavevmode{[}color spec{]} The cell facecolor. \item[{\sphinxstylestrong{fill}}] \leavevmode{[}bool{]} Whether the cell background is filled. \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} The cell text. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{'left', 'center', 'right'\}, default: 'right'{]} The alignment of the text within the cell. \item[{\sphinxstylestrong{fontproperties}}] \leavevmode{[}dict{]} A dict defining the font properties of the text. Supported keys and values are the keyword arguments accepted by {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FontProperties}}}}}. \end{description} \end{description}\end{quote} \index{PAD (matplotlib.table.Cell attribute)@\spxentry{PAD}\spxextra{matplotlib.table.Cell attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.PAD}}\pysigline{\sphinxbfcode{\sphinxupquote{PAD}}\sphinxbfcode{\sphinxupquote{ = 0.1}}} Padding between text and rectangle. \end{fulllineitems} \index{auto\_set\_font\_size() (matplotlib.table.Cell method)@\spxentry{auto\_set\_font\_size()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.auto_set_font_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{auto\_set\_font\_size}}}{\emph{self}, \emph{renderer}}{} Shrink font size until the text fits into the cell width. \end{fulllineitems} \index{draw() (matplotlib.table.Cell method)@\spxentry{draw()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the \sphinxcode{\sphinxupquote{Patch}} to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_fontsize() (matplotlib.table.Cell method)@\spxentry{get\_fontsize()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.get_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontsize}}}{\emph{self}}{} Return the cell fontsize. \end{fulllineitems} \index{get\_required\_width() (matplotlib.table.Cell method)@\spxentry{get\_required\_width()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.get_required_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_required\_width}}}{\emph{self}, \emph{renderer}}{} Return the minimal required width for the cell. \end{fulllineitems} \index{get\_text() (matplotlib.table.Cell method)@\spxentry{get\_text()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.get_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text}}}{\emph{self}}{} Return the cell {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{fulllineitems} \index{get\_text\_bounds() (matplotlib.table.Cell method)@\spxentry{get\_text\_bounds()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.get_text_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_bounds}}}{\emph{self}, \emph{renderer}}{} Return the text bounds as \sphinxstyleemphasis{(x, y, width, height)} in table coordinates. \end{fulllineitems} \index{set\_figure() (matplotlib.table.Cell method)@\spxentry{set\_figure()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_fontsize() (matplotlib.table.Cell method)@\spxentry{set\_fontsize()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.set_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontsize}}}{\emph{self}, \emph{size}}{} Set the text fontsize. \end{fulllineitems} \index{set\_text\_props() (matplotlib.table.Cell method)@\spxentry{set\_text\_props()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.set_text_props}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_text\_props}}}{\emph{self}, \emph{**kwargs}}{} Update the text properties. Valid kwargs are \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backgroundcolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox}}}}} & dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontfamily}}}}} or family & \{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontproperties}}}}} or font\_properties & {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} or size & \{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstretch}}}}} or stretch & \{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstyle}}}}} or style & \{'normal', 'italic', 'oblique'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontvariant}}}}} or variant & \{'normal', 'small-caps'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontweight}}}}} or weight & \{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontalalignment}}}}} or ha & \{'center', 'right', 'left'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linespacing}}}}} & float (multiple of font size) \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{multialignment}}}}} or ma & \{'left', 'right', 'center'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation}}}}} & \{angle in degrees, 'vertical', 'horizontal'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation\_mode}}}}} & \{None, 'default', 'anchor'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_usetex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{usetex}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalalignment}}}}} or va & \{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_wrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wrap}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x}}}}} & float \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.table.Cell method)@\spxentry{set\_transform()}\spxextra{matplotlib.table.Cell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Cell.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{trans}}{} Set the artist transform. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{CustomCell (class in matplotlib.table)@\spxentry{CustomCell}\spxextra{class in matplotlib.table}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.CustomCell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.table.}}\sphinxbfcode{\sphinxupquote{CustomCell}}}{\emph{*args}, \emph{visible\_edges}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/table_api:matplotlib.table.Cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.table.Cell}}}}} A {\hyperref[\detokenize{api/table_api:matplotlib.table.Cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Cell}}}}} subclass with configurable edge visibility. \index{get\_path() (matplotlib.table.CustomCell method)@\spxentry{get\_path()}\spxextra{matplotlib.table.CustomCell method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.CustomCell.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} for the {\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible\_edges}}}}}. \end{fulllineitems} \index{visible\_edges (matplotlib.table.CustomCell attribute)@\spxentry{visible\_edges}\spxextra{matplotlib.table.CustomCell attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}}\pysigline{\sphinxbfcode{\sphinxupquote{visible\_edges}}} The cell edges to be drawn with a line. Reading this property returns a substring of 'BRTL' (bottom, right, top, left'). When setting this property, you can use a substring of 'BRTL' or one of \{'open', 'closed', 'horizontal', 'vertical'\}. \end{fulllineitems} \end{fulllineitems} \index{Table (class in matplotlib.table)@\spxentry{Table}\spxextra{class in matplotlib.table}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.table.}}\sphinxbfcode{\sphinxupquote{Table}}}{\emph{ax}, \emph{loc=None}, \emph{bbox=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} A table of cells. The table consists of a grid of cells, which are indexed by (row, column). For a simple table, you'll have a full grid of cells with indices from (0, 0) to (num\_rows-1, num\_cols-1), in which the cell (0, 0) is positioned at the top left. However, you can also add cells with negative indices. You don't have to add a cell to every grid position, so you can create tables that have holes. \sphinxstyleemphasis{Note}: You'll usually not create an empty table from scratch. Instead use {\hyperref[\detokenize{api/table_api:matplotlib.table.table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{table}}}}} to create a table from data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to plot the table into. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str{]} The position of the cell with respect to \sphinxstyleemphasis{ax}. This must be one of the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{codes}}}}}. \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} or None{]} A bounding box to draw the table into. If this is not \sphinxstyleemphasis{None}, this overrides \sphinxstyleemphasis{loc}. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} properties. \end{description} \end{description}\end{quote} \index{AXESPAD (matplotlib.table.Table attribute)@\spxentry{AXESPAD}\spxextra{matplotlib.table.Table attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.AXESPAD}}\pysigline{\sphinxbfcode{\sphinxupquote{AXESPAD}}\sphinxbfcode{\sphinxupquote{ = 0.02}}} The border between the Axes and the table edge in Axes units. \end{fulllineitems} \index{FONTSIZE (matplotlib.table.Table attribute)@\spxentry{FONTSIZE}\spxextra{matplotlib.table.Table attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.FONTSIZE}}\pysigline{\sphinxbfcode{\sphinxupquote{FONTSIZE}}\sphinxbfcode{\sphinxupquote{ = 10}}} \end{fulllineitems} \index{add\_cell() (matplotlib.table.Table method)@\spxentry{add\_cell()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.add_cell}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_cell}}}{\emph{self}, \emph{row}, \emph{col}, \emph{*args}, \emph{**kwargs}}{} Create a cell and add it to the table. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{row}}] \leavevmode{[}int{]} Row index. \item[{\sphinxstylestrong{col}}] \leavevmode{[}int{]} Column index. \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode All other parameters are passed on to {\hyperref[\detokenize{api/table_api:matplotlib.table.Cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Cell}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cell}}] \leavevmode{[}{\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CustomCell}}}}}{]} The created cell. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{auto\_set\_column\_width() (matplotlib.table.Table method)@\spxentry{auto\_set\_column\_width()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.auto_set_column_width}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{auto\_set\_column\_width}}}{\emph{self}, \emph{col}}{} Automatically set the widths of given columns to optimal sizes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{col}}] \leavevmode{[}int or sequence of ints{]} The indices of the columns to auto-scale. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{auto\_set\_font\_size() (matplotlib.table.Table method)@\spxentry{auto\_set\_font\_size()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.auto_set_font_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{auto\_set\_font\_size}}}{\emph{self}, \emph{value=True}}{} Automatically set font size. \end{fulllineitems} \index{codes (matplotlib.table.Table attribute)@\spxentry{codes}\spxextra{matplotlib.table.Table attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.codes}}\pysigline{\sphinxbfcode{\sphinxupquote{codes}}\sphinxbfcode{\sphinxupquote{ = \{'best': 0, 'bottom': 17, 'bottom left': 12, 'bottom right': 13, 'center': 9, 'center left': 5, 'center right': 6, 'left': 15, 'lower center': 7, 'lower left': 3, 'lower right': 4, 'right': 14, 'top': 16, 'top left': 11, 'top right': 10, 'upper center': 8, 'upper left': 2, 'upper right': 1\}}}} Possible values where to place the table relative to the Axes. \end{fulllineitems} \index{contains() (matplotlib.table.Table method)@\spxentry{contains()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the artist contains the mouse event. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mouseevent}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.MouseEvent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.backend\_bases.MouseEvent}}}}}{]} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{contains}}] \leavevmode{[}bool{]} Whether any values are within the radius. \item[{\sphinxstylestrong{details}}] \leavevmode{[}dict{]} An artist-specific dictionary of details of the event context, such as which points are contained in the pick radius. See the individual Artist subclasses for details. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{\sphinxcode{\sphinxupquote{set\_contains}}, \sphinxcode{\sphinxupquote{get\_contains}}}] \leavevmode \end{description} \end{fulllineitems} \index{draw() (matplotlib.table.Table method)@\spxentry{draw()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{edges (matplotlib.table.Table attribute)@\spxentry{edges}\spxextra{matplotlib.table.Table attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.edges}}\pysigline{\sphinxbfcode{\sphinxupquote{edges}}} The default value of {\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible\_edges}}}}} for newly added cells using {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.add_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_cell}}}}}. \subsubsection*{Notes} This setting does currently only affect newly created cells using {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.add_cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_cell}}}}}. To change existing cells, you have to set their edges explicitly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{for} \PYG{n}{c} \PYG{o+ow}{in} \PYG{n}{tab}\PYG{o}{.}\PYG{n}{get\PYGZus{}celld}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{values}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{c}\PYG{o}{.}\PYG{n}{visible\PYGZus{}edges} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \end{fulllineitems} \index{get\_celld() (matplotlib.table.Table method)@\spxentry{get\_celld()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.get_celld}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_celld}}}{\emph{self}}{} Return a dict of cells in the table mapping \sphinxstyleemphasis{(row, column)} to {\hyperref[\detokenize{api/table_api:matplotlib.table.Cell}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Cell}}}}}s. \subsubsection*{Notes} You can also directly index into the Table object to access individual cells: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cell} \PYG{o}{=} \PYG{n}{table}\PYG{p}{[}\PYG{n}{row}\PYG{p}{,} \PYG{n}{col}\PYG{p}{]} \end{sphinxVerbatim} \end{fulllineitems} \index{get\_child\_artists() (matplotlib.table.Table method)@\spxentry{get\_child\_artists()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.get_child_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_child\_artists}}}{\emph{self}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return the Artists contained by the table. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{get\_children() (matplotlib.table.Table method)@\spxentry{get\_children()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return the Artists contained by the table. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.table.Table method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Return the bounding box of the table in window coords. \end{fulllineitems} \index{scale() (matplotlib.table.Table method)@\spxentry{scale()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scale}}}{\emph{self}, \emph{xscale}, \emph{yscale}}{} Scale column widths by \sphinxstyleemphasis{xscale} and row heights by \sphinxstyleemphasis{yscale}. \end{fulllineitems} \index{set\_fontsize() (matplotlib.table.Table method)@\spxentry{set\_fontsize()}\spxextra{matplotlib.table.Table method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.Table.set_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontsize}}}{\emph{self}, \emph{size}}{} Set the font size, in points, of the cell text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{size}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} As long as auto font size has not been disabled, the value will be clipped such that the text fits horizontally into the cell. You can disable this behavior using {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.auto_set_font_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{auto\_set\_font\_size}}}}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{the\PYGZus{}table}\PYG{o}{.}\PYG{n}{auto\PYGZus{}set\PYGZus{}font\PYGZus{}size}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{the\PYGZus{}table}\PYG{o}{.}\PYG{n}{set\PYGZus{}fontsize}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{)} \end{sphinxVerbatim} However, there is no automatic scaling of the row height so that the text may exceed the cell boundary. \end{fulllineitems} \end{fulllineitems} \index{table() (in module matplotlib.table)@\spxentry{table()}\spxextra{in module matplotlib.table}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/table_api:matplotlib.table.table}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.table.}}\sphinxbfcode{\sphinxupquote{table}}}{\emph{ax}, \emph{cellText=None}, \emph{cellColours=None}, \emph{cellLoc='right'}, \emph{colWidths=None}, \emph{rowLabels=None}, \emph{rowColours=None}, \emph{rowLoc='left'}, \emph{colLabels=None}, \emph{colColours=None}, \emph{colLoc='center'}, \emph{loc='bottom'}, \emph{bbox=None}, \emph{edges='closed'}, \emph{**kwargs}}{} Add a table to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. At least one of \sphinxstyleemphasis{cellText} or \sphinxstyleemphasis{cellColours} must be specified. These parameters must be 2D lists, in which the outer lists define the rows and the inner list define the column values per row. Each row must have the same number of elements. The table can optionally have row and column headers, which are configured using \sphinxstyleemphasis{rowLabels}, \sphinxstyleemphasis{rowColours}, \sphinxstyleemphasis{rowLoc} and \sphinxstyleemphasis{colLabels}, \sphinxstyleemphasis{colColours}, \sphinxstyleemphasis{colLoc} respectively. For finer grained control over tables, use the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} class and add it to the axes with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.add_table:matplotlib.axes.Axes.add_table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.add\_table}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cellText}}] \leavevmode{[}2D list of str, optional{]} The texts to place into the table cells. \sphinxstyleemphasis{Note}: Line breaks in the strings are currently not accounted for and will result in the text exceeding the cell boundaries. \item[{\sphinxstylestrong{cellColours}}] \leavevmode{[}2D list of matplotlib color specs, optional{]} The background colors of the cells. \item[{\sphinxstylestrong{cellLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, default: 'right'{]} The alignment of the text within the cells. \item[{\sphinxstylestrong{colWidths}}] \leavevmode{[}list of float, optional{]} The column widths in units of the axes. If not given, all columns will have a width of \sphinxstyleemphasis{1 / ncols}. \item[{\sphinxstylestrong{rowLabels}}] \leavevmode{[}list of str, optional{]} The text of the row header cells. \item[{\sphinxstylestrong{rowColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the row header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the row header cells. \item[{\sphinxstylestrong{colLabels}}] \leavevmode{[}list of str, optional{]} The text of the column header cells. \item[{\sphinxstylestrong{colColours}}] \leavevmode{[}list of matplotlib color specs, optional{]} The colors of the column header cells. \item[{\sphinxstylestrong{rowLoc}}] \leavevmode{[}\{'left', 'center', 'right'\}, optional, default: 'left'{]} The text alignment of the column header cells. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}str, optional{]} The position of the cell with respect to \sphinxstyleemphasis{ax}. This must be one of the {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{codes}}}}}. \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, optional{]} A bounding box to draw the table into. If this is not \sphinxstyleemphasis{None}, this overrides \sphinxstyleemphasis{loc}. \item[{\sphinxstylestrong{edges}}] \leavevmode{[}substring of 'BRTL' or \{'open', 'closed', 'horizontal', 'vertical'\}{]} The cell edges to be drawn with a line. See also {\hyperref[\detokenize{api/table_api:matplotlib.table.CustomCell.visible_edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible\_edges}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{table}}] \leavevmode{[}{\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}}{]} The created table. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode {\hyperref[\detokenize{api/table_api:matplotlib.table.Table}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Table}}}}} properties. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/table_api:matplotlib.table.Table.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing}}} \label{\detokenize{api/testing_api:matplotlib-testing}}\label{\detokenize{api/testing_api::doc}} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing}}} \label{\detokenize{api/testing_api:id1}}\phantomsection\label{\detokenize{api/testing_api:module-matplotlib.testing}}\index{matplotlib.testing (module)@\spxentry{matplotlib.testing}\spxextra{module}} Helper functions for testing. \index{is\_called\_from\_pytest() (in module matplotlib.testing)@\spxentry{is\_called\_from\_pytest()}\spxextra{in module matplotlib.testing}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.is_called_from_pytest}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.}}\sphinxbfcode{\sphinxupquote{is\_called\_from\_pytest}}}{}{} Whether we are in a pytest run. \end{fulllineitems} \index{set\_font\_settings\_for\_testing() (in module matplotlib.testing)@\spxentry{set\_font\_settings\_for\_testing()}\spxextra{in module matplotlib.testing}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.set_font_settings_for_testing}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.}}\sphinxbfcode{\sphinxupquote{set\_font\_settings\_for\_testing}}}{}{}~ \end{fulllineitems} \index{set\_reproducibility\_for\_testing() (in module matplotlib.testing)@\spxentry{set\_reproducibility\_for\_testing()}\spxextra{in module matplotlib.testing}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.set_reproducibility_for_testing}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.}}\sphinxbfcode{\sphinxupquote{set\_reproducibility\_for\_testing}}}{}{}~ \end{fulllineitems} \index{setup() (in module matplotlib.testing)@\spxentry{setup()}\spxextra{in module matplotlib.testing}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.setup}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.}}\sphinxbfcode{\sphinxupquote{setup}}}{}{}~ \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing.compare}}} \label{\detokenize{api/testing_api:module-matplotlib.testing.compare}}\label{\detokenize{api/testing_api:matplotlib-testing-compare}}\index{matplotlib.testing.compare (module)@\spxentry{matplotlib.testing.compare}\spxextra{module}} Provides a collection of utilities for comparing (image) results. \index{compare\_float() (in module matplotlib.testing.compare)@\spxentry{compare\_float()}\spxextra{in module matplotlib.testing.compare}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.compare.compare_float}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.compare.}}\sphinxbfcode{\sphinxupquote{compare\_float}}}{\emph{expected}, \emph{actual}, \emph{relTol=None}, \emph{absTol=None}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Fail if the floating point values are not close enough, with the given message. You can specify a relative tolerance, absolute tolerance, or both. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{compare\_images() (in module matplotlib.testing.compare)@\spxentry{compare\_images()}\spxextra{in module matplotlib.testing.compare}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.compare.compare_images}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.compare.}}\sphinxbfcode{\sphinxupquote{compare\_images}}}{\emph{expected}, \emph{actual}, \emph{tol}, \emph{in\_decorator=False}}{} Compare two "image" files checking differences within a tolerance. The two given filenames may point to files which are convertible to PNG via the \sphinxcode{\sphinxupquote{converter}} dictionary. The underlying RMS is calculated with the \sphinxcode{\sphinxupquote{calculate\_rms}} function. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{expected}}] \leavevmode{[}str{]} The filename of the expected image. \item[{\sphinxstylestrong{actual}}] \leavevmode{[}str{]} The filename of the actual image. \item[{\sphinxstylestrong{tol}}] \leavevmode{[}float{]} The tolerance (a color value difference, where 255 is the maximal difference). The test fails if the average pixel difference is greater than this value. \item[{\sphinxstylestrong{in\_decorator}}] \leavevmode{[}bool{]} Determines the output format. If called from image\_comparison decorator, this should be True. (default=False) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{comparison\_result}}] \leavevmode{[}None or dict or str{]} Return \sphinxstyleemphasis{None} if the images are equal within the given tolerance. If the images differ, the return value depends on \sphinxstyleemphasis{in\_decorator}. If \sphinxstyleemphasis{in\_decorator} is true, a dict with the following entries is returned: \begin{itemize} \item {} \sphinxstyleemphasis{rms}: The RMS of the image difference. \item {} \sphinxstyleemphasis{expected}: The filename of the expected image. \item {} \sphinxstyleemphasis{actual}: The filename of the actual image. \item {} \sphinxstyleemphasis{diff\_image}: The filename of the difference image. \item {} \sphinxstyleemphasis{tol}: The comparison tolerance. \end{itemize} Otherwise, a human-readable multi-line string representation of this information is returned. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{img1} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{./baseline/plot.png}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{img2} \PYG{o}{=} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{./output/plot.png}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{compare\PYGZus{}images}\PYG{p}{(}\PYG{n}{img1}\PYG{p}{,} \PYG{n}{img2}\PYG{p}{,} \PYG{l+m+mf}{0.001}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{comparable\_formats() (in module matplotlib.testing.compare)@\spxentry{comparable\_formats()}\spxextra{in module matplotlib.testing.compare}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.compare.comparable_formats}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.compare.}}\sphinxbfcode{\sphinxupquote{comparable\_formats}}}{}{} Return the list of file formats that {\hyperref[\detokenize{api/testing_api:matplotlib.testing.compare.compare_images}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{compare\_images}}}}} can compare on this system. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{supported\_formats}}] \leavevmode{[}list of str{]} E.g. \sphinxcode{\sphinxupquote{{[}'png', 'pdf', 'svg', 'eps'{]}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing.decorators}}} \label{\detokenize{api/testing_api:module-matplotlib.testing.decorators}}\label{\detokenize{api/testing_api:matplotlib-testing-decorators}}\index{matplotlib.testing.decorators (module)@\spxentry{matplotlib.testing.decorators}\spxextra{module}}\index{CleanupTest (class in matplotlib.testing.decorators)@\spxentry{CleanupTest}\spxextra{class in matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTest}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{CleanupTest}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \index{setup\_class() (matplotlib.testing.decorators.CleanupTest class method)@\spxentry{setup\_class()}\spxextra{matplotlib.testing.decorators.CleanupTest class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTest.setup_class}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{setup\_class}}}{}{}~ \end{fulllineitems} \index{teardown\_class() (matplotlib.testing.decorators.CleanupTest class method)@\spxentry{teardown\_class()}\spxextra{matplotlib.testing.decorators.CleanupTest class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTest.teardown_class}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{teardown\_class}}}{}{}~ \end{fulllineitems} \index{test() (matplotlib.testing.decorators.CleanupTest method)@\spxentry{test()}\spxextra{matplotlib.testing.decorators.CleanupTest method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTest.test}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{test}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{CleanupTestCase (class in matplotlib.testing.decorators)@\spxentry{CleanupTestCase}\spxextra{class in matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTestCase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{CleanupTestCase}}}{\emph{methodName='runTest'}}{} Bases: \sphinxcode{\sphinxupquote{unittest.case.TestCase}} A wrapper for unittest.TestCase that includes cleanup operations. Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name. \index{setUpClass() (matplotlib.testing.decorators.CleanupTestCase class method)@\spxentry{setUpClass()}\spxextra{matplotlib.testing.decorators.CleanupTestCase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTestCase.setUpClass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{setUpClass}}}{}{} Hook method for setting up class fixture before running tests in the class. \end{fulllineitems} \index{tearDownClass() (matplotlib.testing.decorators.CleanupTestCase class method)@\spxentry{tearDownClass()}\spxextra{matplotlib.testing.decorators.CleanupTestCase class method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTestCase.tearDownClass}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{classmethod }}\sphinxbfcode{\sphinxupquote{tearDownClass}}}{}{} Hook method for deconstructing the class fixture after running all tests in the class. \end{fulllineitems} \end{fulllineitems} \index{ImageComparisonTest (class in matplotlib.testing.decorators)@\spxentry{ImageComparisonTest}\spxextra{class in matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{ImageComparisonTest}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.CleanupTest}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.CleanupTest}}}}}, \sphinxcode{\sphinxupquote{matplotlib.testing.decorators.\_ImageComparisonBase}} {[}\sphinxstyleemphasis{Deprecated}{]} Nose-based image comparison class This class generates tests for a nose-based testing framework. Ideally, this class would not be public, and the only publicly visible API would be the {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison()}}}}} decorator. Unfortunately, there are existing downstream users of this class (e.g., pytest-mpl) so it cannot yet be removed. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \index{nose\_runner() (matplotlib.testing.decorators.ImageComparisonTest method)@\spxentry{nose\_runner()}\spxextra{matplotlib.testing.decorators.ImageComparisonTest method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest.nose_runner}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nose\_runner}}}{\emph{self}}{}~ \end{fulllineitems} \index{setup() (matplotlib.testing.decorators.ImageComparisonTest method)@\spxentry{setup()}\spxextra{matplotlib.testing.decorators.ImageComparisonTest method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest.setup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{setup}}}{\emph{self}}{}~ \end{fulllineitems} \index{teardown() (matplotlib.testing.decorators.ImageComparisonTest method)@\spxentry{teardown()}\spxextra{matplotlib.testing.decorators.ImageComparisonTest method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.ImageComparisonTest.teardown}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{teardown}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{check\_figures\_equal() (in module matplotlib.testing.decorators)@\spxentry{check\_figures\_equal()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{check\_figures\_equal}}}{\emph{*}, \emph{extensions=('png'}, \emph{'pdf'}, \emph{'svg')}, \emph{tol=0}}{} Decorator for test cases that generate and compare two figures. The decorated function must take two arguments, \sphinxstyleemphasis{fig\_test} and \sphinxstyleemphasis{fig\_ref}, and draw the test and reference images on them. After the function returns, the figures are saved and compared. This decorator should be preferred over {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison}}}}} when possible in order to keep the size of the test suite from ballooning. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{extensions}}] \leavevmode{[}list, default: {[}"png", "pdf", "svg"{]}{]} The extensions to test. \item[{\sphinxstylestrong{tol}}] \leavevmode{[}float{]} The RMS threshold above which the test is considered failed. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Check that calling \sphinxcode{\sphinxupquote{Axes.plot}} with a single argument plots it against \sphinxcode{\sphinxupquote{{[}0, 1, 2, ...{]}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nd}{@check\PYGZus{}figures\PYGZus{}equal}\PYG{p}{(}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{test\PYGZus{}plot}\PYG{p}{(}\PYG{n}{fig\PYGZus{}test}\PYG{p}{,} \PYG{n}{fig\PYGZus{}ref}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig\PYGZus{}test}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{]}\PYG{p}{)} \PYG{n}{fig\PYGZus{}ref}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{check\_freetype\_version() (in module matplotlib.testing.decorators)@\spxentry{check\_freetype\_version()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.check_freetype_version}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{check\_freetype\_version}}}{\emph{ver}}{}~ \end{fulllineitems} \index{cleanup() (in module matplotlib.testing.decorators)@\spxentry{cleanup()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.cleanup}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{cleanup}}}{\emph{style=None}}{} A decorator to ensure that any global state is reset before running a test. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{style}}] \leavevmode{[}str, optional{]} The name of the style to apply. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{image\_comparison() (in module matplotlib.testing.decorators)@\spxentry{image\_comparison()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{image\_comparison}}}{\emph{baseline\_images}, \emph{extensions=None}, \emph{tol=0}, \emph{freetype\_version=None}, \emph{remove\_text=False}, \emph{savefig\_kwarg=None}, \emph{style='\_classic\_test'}}{} Compare images generated by the test with those specified in \sphinxstyleemphasis{baseline\_images}, which must correspond, else an \sphinxcode{\sphinxupquote{ImageComparisonFailure}} exception will be raised. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{baseline\_images}}] \leavevmode{[}list or None{]} A list of strings specifying the names of the images generated by calls to \sphinxcode{\sphinxupquote{matplotlib.figure.savefig()}}. If \sphinxstyleemphasis{None}, the test function must use the \sphinxcode{\sphinxupquote{baseline\_images}} fixture, either as a parameter or with \sphinxcode{\sphinxupquote{pytest.mark.usefixtures}}. This value is only allowed when using pytest. \item[{\sphinxstylestrong{extensions}}] \leavevmode{[}None or list of str{]} The list of extensions to test, e.g. \sphinxcode{\sphinxupquote{{[}'png', 'pdf'{]}}}. If \sphinxstyleemphasis{None}, defaults to all supported extensions: png, pdf, and svg. In order to keep the size of the test suite from ballooning, we only include the \sphinxcode{\sphinxupquote{svg}} or \sphinxcode{\sphinxupquote{pdf}} outputs if the test is explicitly exercising a feature dependent on that backend (see also the {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_figures\_equal}}}}} decorator for that purpose). \item[{\sphinxstylestrong{tol}}] \leavevmode{[}float, optional, default: 0{]} The RMS threshold above which the test is considered failed. \item[{\sphinxstylestrong{freetype\_version}}] \leavevmode{[}str or tuple{]} The expected freetype version or range of versions for this test to pass. \item[{\sphinxstylestrong{remove\_text}}] \leavevmode{[}bool{]} Remove the title and tick text from the figure before comparison. This is useful to make the baseline images independent of variations in text rendering between different versions of FreeType. This does not remove other, more deliberate, text, such as legends and annotations. \item[{\sphinxstylestrong{savefig\_kwarg}}] \leavevmode{[}dict{]} Optional arguments that are passed to the savefig method. \item[{\sphinxstylestrong{style}}] \leavevmode{[}string{]} Optional name for the base style to apply to the image test. The test itself can also apply additional styles if desired. Defaults to the '\_classic\_test' style. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{remove\_ticks\_and\_titles() (in module matplotlib.testing.decorators)@\spxentry{remove\_ticks\_and\_titles()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.remove_ticks_and_titles}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{remove\_ticks\_and\_titles}}}{\emph{figure}}{}~ \end{fulllineitems} \index{skip\_if\_command\_unavailable() (in module matplotlib.testing.decorators)@\spxentry{skip\_if\_command\_unavailable()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.skip_if_command_unavailable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{skip\_if\_command\_unavailable}}}{\emph{cmd}}{} {[}\sphinxstyleemphasis{Deprecated}{]} skips a test if a command is unavailable. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cmd}}] \leavevmode{[}list of str{]} must be a complete command which should not return a non zero exit code, something like {[}"latex", "-version"{]} \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0.} \end{fulllineitems} \index{switch\_backend() (in module matplotlib.testing.decorators)@\spxentry{switch\_backend()}\spxextra{in module matplotlib.testing.decorators}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.decorators.switch_backend}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.decorators.}}\sphinxbfcode{\sphinxupquote{switch\_backend}}}{\emph{backend}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing.disable\_internet}}} \label{\detokenize{api/testing_api:module-matplotlib.testing.disable_internet}}\label{\detokenize{api/testing_api:matplotlib-testing-disable-internet}}\index{matplotlib.testing.disable\_internet (module)@\spxentry{matplotlib.testing.disable\_internet}\spxextra{module}}\index{check\_internet\_off() (in module matplotlib.testing.disable\_internet)@\spxentry{check\_internet\_off()}\spxextra{in module matplotlib.testing.disable\_internet}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.disable_internet.check_internet_off}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.disable\_internet.}}\sphinxbfcode{\sphinxupquote{check\_internet\_off}}}{\emph{original\_function}}{} Wraps \sphinxcode{\sphinxupquote{original\_function}}, which in most cases is assumed to be a \sphinxhref{https://docs.python.org/3/library/socket.html\#socket.socket}{\sphinxcode{\sphinxupquote{socket.socket}}} method, to raise an \sphinxhref{https://docs.python.org/3/library/exceptions.html\#IOError}{\sphinxcode{\sphinxupquote{IOError}}} for any operations on non-local AF\_INET sockets. \end{fulllineitems} \index{no\_internet() (in module matplotlib.testing.disable\_internet)@\spxentry{no\_internet()}\spxextra{in module matplotlib.testing.disable\_internet}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.disable_internet.no_internet}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.disable\_internet.}}\sphinxbfcode{\sphinxupquote{no\_internet}}}{\emph{verbose=False}}{} Context manager to temporarily disable internet access (if not already disabled). If it was already disabled before entering the context manager (i.e. {\hyperref[\detokenize{api/testing_api:matplotlib.testing.disable_internet.turn_off_internet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{turn\_off\_internet}}}}} was called previously) then this is a no-op and leaves internet access disabled until a manual call to {\hyperref[\detokenize{api/testing_api:matplotlib.testing.disable_internet.turn_on_internet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{turn\_on\_internet}}}}}. \end{fulllineitems} \index{turn\_off\_internet() (in module matplotlib.testing.disable\_internet)@\spxentry{turn\_off\_internet()}\spxextra{in module matplotlib.testing.disable\_internet}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.disable_internet.turn_off_internet}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.disable\_internet.}}\sphinxbfcode{\sphinxupquote{turn\_off\_internet}}}{\emph{verbose=False}}{} Disable internet access via python by preventing connections from being created using the socket module. Presumably this could be worked around by using some other means of accessing the internet, but all default python modules (urllib, requests, etc.) use socket {[}citation needed{]}. \end{fulllineitems} \index{turn\_on\_internet() (in module matplotlib.testing.disable\_internet)@\spxentry{turn\_on\_internet()}\spxextra{in module matplotlib.testing.disable\_internet}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.disable_internet.turn_on_internet}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.testing.disable\_internet.}}\sphinxbfcode{\sphinxupquote{turn\_on\_internet}}}{\emph{verbose=False}}{} Restore internet access. Not used, but kept in case it is needed. \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.testing.exceptions}}} \label{\detokenize{api/testing_api:module-matplotlib.testing.exceptions}}\label{\detokenize{api/testing_api:matplotlib-testing-exceptions}}\index{matplotlib.testing.exceptions (module)@\spxentry{matplotlib.testing.exceptions}\spxextra{module}}\index{ImageComparisonFailure@\spxentry{ImageComparisonFailure}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/testing_api:matplotlib.testing.exceptions.ImageComparisonFailure}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.testing.exceptions.}}\sphinxbfcode{\sphinxupquote{ImageComparisonFailure}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#AssertionError}{\sphinxcode{\sphinxupquote{AssertionError}}} Raise this exception to mark a test as a comparison between two images. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.text}}} \label{\detokenize{api/text_api:module-matplotlib.text}}\label{\detokenize{api/text_api:matplotlib-text}}\label{\detokenize{api/text_api::doc}}\index{matplotlib.text (module)@\spxentry{matplotlib.text}\spxextra{module}} Classes for including text in a figure. \index{Annotation (class in matplotlib.text)@\spxentry{Annotation}\spxextra{class in matplotlib.text}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.text.}}\sphinxbfcode{\sphinxupquote{Annotation}}}{\emph{text}, \emph{xy}, \emph{xytext=None}, \emph{xycoords='data'}, \emph{textcoords=None}, \emph{arrowprops=None}, \emph{annotation\_clip=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}}, \sphinxcode{\sphinxupquote{matplotlib.text.\_AnnotationBase}} An {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}} is a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} that can refer to a specific position \sphinxstyleemphasis{xy}. Optionally an arrow pointing from the text to \sphinxstyleemphasis{xy} can be drawn. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode The annotated position. \item[{\sphinxstylestrong{xycoords}}] \leavevmode The coordinate system for \sphinxstyleemphasis{xy}. \item[{\sphinxstylestrong{arrow\_patch}}] \leavevmode A {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} to point from \sphinxstyleemphasis{xytext} to \sphinxstyleemphasis{xy}. \end{description} \end{description}\end{quote} Annotate the point \sphinxstyleemphasis{xy} with text \sphinxstyleemphasis{text}. In the simplest form, the text is placed at \sphinxstyleemphasis{xy}. Optionally, the text can be displayed in another position \sphinxstyleemphasis{xytext}. An arrow pointing from the text to the annotated point \sphinxstyleemphasis{xy} can then be added by defining \sphinxstyleemphasis{arrowprops}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} The text of the annotation. \sphinxstyleemphasis{s} is a deprecated synonym for this parameter. \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} The point \sphinxstyleemphasis{(x,y)} to annotate. \item[{\sphinxstylestrong{xytext}}] \leavevmode{[}(float, float), optional{]} The position \sphinxstyleemphasis{(x,y)} to place the text at. If \sphinxstyleemphasis{None}, defaults to \sphinxstyleemphasis{xy}. \item[{\sphinxstylestrong{xycoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xy} is given in. The following types of values are supported: \begin{itemize} \item {} One of the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'figure points' & Points from the lower left of the figure \\ \hline 'figure pixels' & Pixels from the lower left of the figure \\ \hline 'figure fraction' & Fraction of figure from lower left \\ \hline 'axes points' & Points from lower left corner of axes \\ \hline 'axes pixels' & Pixels from lower left corner of axes \\ \hline 'axes fraction' & Fraction of axes from lower left \\ \hline 'data' & Use the coordinate system of the object being annotated (default) \\ \hline 'polar' & \sphinxstyleemphasis{(theta,r)} if not native 'data' coordinates \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item {} An {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}: \sphinxstyleemphasis{xy} is interpreted as a fraction of the artists {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. E.g. \sphinxstyleemphasis{(0, 0)} would be the lower left corner of the bounding box and \sphinxstyleemphasis{(0.5, 1)} would be the center top of the bounding box. \item {} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} to transform \sphinxstyleemphasis{xy} to screen coordinates. \item {} A function with one of the following signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Bbox} \PYG{k}{def} \PYG{n+nf}{transform}\PYG{p}{(}\PYG{n}{renderer}\PYG{p}{)} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZgt{}} \PYG{n}{Transform} \end{sphinxVerbatim} where \sphinxstyleemphasis{renderer} is a {\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass. The result of the function is interpreted like the {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} cases above. \item {} A tuple \sphinxstyleemphasis{(xcoords, ycoords)} specifying separate coordinate systems for \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}. \sphinxstyleemphasis{xcoords} and \sphinxstyleemphasis{ycoords} must each be of one of the above described types. \end{itemize} See {\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}} for more details. Defaults to 'data'. \item[{\sphinxstylestrong{textcoords}}] \leavevmode{[}str, {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}, callable or tuple, optional{]} The coordinate system that \sphinxstyleemphasis{xytext} is given in. All \sphinxstyleemphasis{xycoords} values are valid as well as the following strings: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'offset points' & Offset (in points) from the \sphinxstyleemphasis{xy} value \\ \hline 'offset pixels' & Offset (in pixels) from the \sphinxstyleemphasis{xy} value \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to the value of \sphinxstyleemphasis{xycoords}, i.e. use the same coordinate system for annotation point and text position. \item[{\sphinxstylestrong{arrowprops}}] \leavevmode{[}dict, optional{]} The properties used to draw a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} arrow between the positions \sphinxstyleemphasis{xy} and \sphinxstyleemphasis{xytext}. If \sphinxstyleemphasis{arrowprops} does not contain the key 'arrowstyle' the allowed keys are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline width & The width of the arrow in points \\ \hline headwidth & The width of the base of the arrow head in points \\ \hline headlength & The length of the arrow head in points \\ \hline shrink & Fraction of total length to shrink from both ends \\ \hline ? & Any key to {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} If \sphinxstyleemphasis{arrowprops} contains the key 'arrowstyle' the above keys are forbidden. The allowed values of \sphinxcode{\sphinxupquote{'arrowstyle'}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Name &\sphinxstyletheadfamily Attrs \\ \hline \sphinxcode{\sphinxupquote{'-'}} & None \\ \hline \sphinxcode{\sphinxupquote{'-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'-{[}'}} & widthB=1.0,lengthB=0.2,angleB=None \\ \hline \sphinxcode{\sphinxupquote{'\textbar{}-\textbar{}'}} & widthA=1.0,widthB=1.0 \\ \hline \sphinxcode{\sphinxupquote{'-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}-\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'\textless{}\textbar{}-\textbar{}\textgreater{}'}} & head\_length=0.4,head\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'fancy'}} & head\_length=0.4,head\_width=0.4,tail\_width=0.4 \\ \hline \sphinxcode{\sphinxupquote{'simple'}} & head\_length=0.5,head\_width=0.5,tail\_width=0.2 \\ \hline \sphinxcode{\sphinxupquote{'wedge'}} & tail\_width=0.3,shrink\_factor=0.5 \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Valid keys for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FancyArrowPatch}}}}} are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Key &\sphinxstyletheadfamily Description \\ \hline arrowstyle & the arrow style \\ \hline connectionstyle & the connection style \\ \hline relpos & default is (0.5, 0.5) \\ \hline patchA & default is bounding box of the text \\ \hline patchB & default is None \\ \hline shrinkA & default is 2 points \\ \hline shrinkB & default is 2 points \\ \hline mutation\_scale & default is text size (in points) \\ \hline mutation\_aspect & default is 1. \\ \hline ? & any key for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Defaults to None, i.e. no arrow is drawn. \item[{\sphinxstylestrong{annotation\_clip}}] \leavevmode{[}bool or None, optional{]} Whether to draw the annotation when the annotation point \sphinxstyleemphasis{xy} is outside the axes area. \begin{itemize} \item {} If \sphinxstyleemphasis{True}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes. \item {} If \sphinxstyleemphasis{False}, the annotation will always be drawn. \item {} If \sphinxstyleemphasis{None}, the annotation will only be drawn when \sphinxstyleemphasis{xy} is within the axes and \sphinxstyleemphasis{xycoords} is 'data'. \end{itemize} Defaults to \sphinxstyleemphasis{None}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional kwargs are passed to {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{annotation}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{tutorials/text/annotations:plotting-guide-annotation}]{\sphinxcrossref{\DUrole{std,std-ref}{Advanced Annotation}}}}}] \leavevmode \end{description} \index{anncoords (matplotlib.text.Annotation attribute)@\spxentry{anncoords}\spxextra{matplotlib.text.Annotation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.anncoords}}\pysigline{\sphinxbfcode{\sphinxupquote{anncoords}}} The coordinate system to use for {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation.xyann}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation.xyann}}}}}. \end{fulllineitems} \index{arrow (matplotlib.text.Annotation attribute)@\spxentry{arrow}\spxextra{matplotlib.text.Annotation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.arrow}}\pysigline{\sphinxbfcode{\sphinxupquote{arrow}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: }arrow was deprecated in Matplotlib 3.0 and will be removed in 3.2. Use arrow\_patch instead. \end{fulllineitems} \index{contains() (matplotlib.text.Annotation method)@\spxentry{contains()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{event}}{} Test whether the mouse event occurred in the patch. In the case of text, a hit is true anywhere in the axis-aligned bounding-box containing the text. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bool}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw() (matplotlib.text.Annotation method)@\spxentry{draw()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_anncoords() (matplotlib.text.Annotation method)@\spxentry{get\_anncoords()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.get_anncoords}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_anncoords}}}{\emph{self}}{} Return the coordinate system to use for {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation.xyann}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation.xyann}}}}}. See also \sphinxstyleemphasis{xycoords} in {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.text.Annotation method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Return the \sphinxcode{\sphinxupquote{Bbox}} bounding the text and arrow, in display units. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}Renderer, optional{]} A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent}}}}} before the first {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}}. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_anncoords() (matplotlib.text.Annotation method)@\spxentry{set\_anncoords()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.set_anncoords}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_anncoords}}}{\emph{self}, \emph{coords}}{} Set the coordinate system to use for {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation.xyann}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation.xyann}}}}}. See also \sphinxstyleemphasis{xycoords} in {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}. \end{fulllineitems} \index{set\_figure() (matplotlib.text.Annotation method)@\spxentry{set\_figure()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_positions() (matplotlib.text.Annotation method)@\spxentry{update\_positions()}\spxextra{matplotlib.text.Annotation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.update_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_positions}}}{\emph{self}, \emph{renderer}}{} Update the pixel positions of the annotated point and the text. \end{fulllineitems} \index{xyann (matplotlib.text.Annotation attribute)@\spxentry{xyann}\spxextra{matplotlib.text.Annotation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Annotation.xyann}}\pysigline{\sphinxbfcode{\sphinxupquote{xyann}}} The the text position. See also \sphinxstyleemphasis{xytext} in {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}}. \end{fulllineitems} \end{fulllineitems} \index{OffsetFrom (class in matplotlib.text)@\spxentry{OffsetFrom}\spxextra{class in matplotlib.text}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.OffsetFrom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.text.}}\sphinxbfcode{\sphinxupquote{OffsetFrom}}}{\emph{artist}, \emph{ref\_coord}, \emph{unit='points'}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Callable helper class for working with {\hyperref[\detokenize{api/text_api:matplotlib.text.Annotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Annotation}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{artist}}] \leavevmode{[}\sphinxcode{\sphinxupquote{Artist}}, \sphinxcode{\sphinxupquote{BboxBase}}, or \sphinxcode{\sphinxupquote{Transform}}{]} The object to compute the offset from. \item[{\sphinxstylestrong{ref\_coord}}] \leavevmode{[}length 2 sequence{]} If \sphinxcode{\sphinxupquote{artist}} is an \sphinxcode{\sphinxupquote{Artist}} or \sphinxcode{\sphinxupquote{BboxBase}}, this values is the location to of the offset origin in fractions of the \sphinxcode{\sphinxupquote{artist}} bounding box. If \sphinxcode{\sphinxupquote{artist}} is a transform, the offset origin is the transform applied to this value. \item[{\sphinxstylestrong{unit}}] \leavevmode{[}\{'points, 'pixels'\}{]} The screen units to use (pixels or points) for the offset input. \end{description} \end{description}\end{quote} \index{get\_unit() (matplotlib.text.OffsetFrom method)@\spxentry{get\_unit()}\spxextra{matplotlib.text.OffsetFrom method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.OffsetFrom.get_unit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_unit}}}{\emph{self}}{} The unit for input to the transform used by \sphinxcode{\sphinxupquote{\_\_call\_\_}} \end{fulllineitems} \index{set\_unit() (matplotlib.text.OffsetFrom method)@\spxentry{set\_unit()}\spxextra{matplotlib.text.OffsetFrom method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.OffsetFrom.set_unit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_unit}}}{\emph{self}, \emph{unit}}{} The unit for input to the transform used by \sphinxcode{\sphinxupquote{\_\_call\_\_}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{unit}}] \leavevmode{[}\{'points', 'pixels'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{Text (class in matplotlib.text)@\spxentry{Text}\spxextra{class in matplotlib.text}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.text.}}\sphinxbfcode{\sphinxupquote{Text}}}{\emph{x=0}, \emph{y=0}, \emph{text=''}, \emph{color=None}, \emph{verticalalignment='baseline'}, \emph{horizontalalignment='left'}, \emph{multialignment=None}, \emph{fontproperties=None}, \emph{rotation=None}, \emph{linespacing=None}, \emph{rotation\_mode=None}, \emph{usetex=None}, \emph{wrap=False}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} Handle storing and drawing of text in window or data coordinates. Create a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance at \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} with string \sphinxstyleemphasis{text}. Valid kwargs are \begin{quote} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{backgroundcolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{bbox}}}}} & dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} or c & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontfamily}}}}} or family & \{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontproperties}}}}} or font\_properties & {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontsize}}}}} or size & \{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstretch}}}}} or stretch & \{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontstyle}}}}} or style & \{'normal', 'italic', 'oblique'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontvariant}}}}} or variant & \{'normal', 'small-caps'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fontweight}}}}} or weight & \{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{horizontalalignment}}}}} or ha & \{'center', 'right', 'left'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linespacing}}}}} & float (multiple of font size) \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{multialignment}}}}} or ma & \{'left', 'right', 'center'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & (float, float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation}}}}} & \{angle in degrees, 'vertical', 'horizontal'\} \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotation\_mode}}}}} & \{None, 'default', 'anchor'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_usetex}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{usetex}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{verticalalignment}}}}} or va & \{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_wrap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{wrap}}}}} & bool \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x}}}}} & float \\ \hline {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_y}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{quote} \index{contains() (matplotlib.text.Text method)@\spxentry{contains()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{mouseevent}}{} Test whether the mouse event occurred in the patch. In the case of text, a hit is true anywhere in the axis-aligned bounding-box containing the text. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bool}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{draw() (matplotlib.text.Text method)@\spxentry{draw()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draws the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_bbox\_patch() (matplotlib.text.Text method)@\spxentry{get\_bbox\_patch()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_bbox_patch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_bbox\_patch}}}{\emph{self}}{} Return the bbox Patch, or None if the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} is not made. \end{fulllineitems} \index{get\_c() (matplotlib.text.Text method)@\spxentry{get\_c()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_c}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_c}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_color}}}}}. \end{fulllineitems} \index{get\_color() (matplotlib.text.Text method)@\spxentry{get\_color()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{} Return the color of the text \end{fulllineitems} \index{get\_family() (matplotlib.text.Text method)@\spxentry{get\_family()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_family}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_family}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontfamily}}}}}. \end{fulllineitems} \index{get\_font\_properties() (matplotlib.text.Text method)@\spxentry{get\_font\_properties()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_font_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_font\_properties}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontproperties}}}}}. \end{fulllineitems} \index{get\_fontfamily() (matplotlib.text.Text method)@\spxentry{get\_fontfamily()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontfamily}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontfamily}}}{\emph{self}}{} Return the list of font families used for font lookup \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_family}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_family}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_fontname() (matplotlib.text.Text method)@\spxentry{get\_fontname()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontname}}}{\emph{self}}{} Return the font name as string \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_name}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_name}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_fontproperties() (matplotlib.text.Text method)@\spxentry{get\_fontproperties()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontproperties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontproperties}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}} object \end{fulllineitems} \index{get\_fontsize() (matplotlib.text.Text method)@\spxentry{get\_fontsize()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontsize}}}{\emph{self}}{} Return the font size as integer \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_size_in_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_size\_in\_points}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_fontstyle() (matplotlib.text.Text method)@\spxentry{get\_fontstyle()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontstyle}}}{\emph{self}}{} Return the font style as string \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_style}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_style}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_fontvariant() (matplotlib.text.Text method)@\spxentry{get\_fontvariant()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontvariant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontvariant}}}{\emph{self}}{} Return the font variant as a string \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_variant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_variant}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_fontweight() (matplotlib.text.Text method)@\spxentry{get\_fontweight()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_fontweight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fontweight}}}{\emph{self}}{} Get the font weight as string or number \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_weight}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_ha() (matplotlib.text.Text method)@\spxentry{get\_ha()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_ha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ha}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_horizontalalignment}}}}}. \end{fulllineitems} \index{get\_horizontalalignment() (matplotlib.text.Text method)@\spxentry{get\_horizontalalignment()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_horizontalalignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_horizontalalignment}}}{\emph{self}}{} Return the horizontal alignment as string. Will be one of 'left', 'center' or 'right'. \end{fulllineitems} \index{get\_name() (matplotlib.text.Text method)@\spxentry{get\_name()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_name}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontname}}}}}. \end{fulllineitems} \index{get\_position() (matplotlib.text.Text method)@\spxentry{get\_position()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} Return the position of the text as a tuple (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) \end{fulllineitems} \index{get\_prop\_tup() (matplotlib.text.Text method)@\spxentry{get\_prop\_tup()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_prop_tup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_prop\_tup}}}{\emph{self}, \emph{renderer=None}}{} Return a hashable tuple of properties. Not intended to be human readable, but useful for backends who want to cache derived information about text (e.g., layouts) and need to know if the text has changed. \end{fulllineitems} \index{get\_rotation() (matplotlib.text.Text method)@\spxentry{get\_rotation()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{self}}{} Return the text angle as float in degrees. \end{fulllineitems} \index{get\_rotation\_mode() (matplotlib.text.Text method)@\spxentry{get\_rotation\_mode()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_rotation_mode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotation\_mode}}}{\emph{self}}{} Get the text rotation mode. \end{fulllineitems} \index{get\_size() (matplotlib.text.Text method)@\spxentry{get\_size()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontsize}}}}}. \end{fulllineitems} \index{get\_stretch() (matplotlib.text.Text method)@\spxentry{get\_stretch()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_stretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_stretch}}}{\emph{self}}{} Get the font stretch as a string or number \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.get_stretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.get\_stretch}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{get\_style() (matplotlib.text.Text method)@\spxentry{get\_style()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_style}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontstyle}}}}}. \end{fulllineitems} \index{get\_text() (matplotlib.text.Text method)@\spxentry{get\_text()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text}}}{\emph{self}}{} Get the text as string \end{fulllineitems} \index{get\_unitless\_position() (matplotlib.text.Text method)@\spxentry{get\_unitless\_position()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_unitless_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_unitless\_position}}}{\emph{self}}{} Return the unitless position of the text as a tuple (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) \end{fulllineitems} \index{get\_usetex() (matplotlib.text.Text method)@\spxentry{get\_usetex()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_usetex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_usetex}}}{\emph{self}}{} Return whether this {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object uses TeX for rendering. \end{fulllineitems} \index{get\_va() (matplotlib.text.Text method)@\spxentry{get\_va()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_va}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_va}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_verticalalignment}}}}}. \end{fulllineitems} \index{get\_variant() (matplotlib.text.Text method)@\spxentry{get\_variant()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_variant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_variant}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontvariant}}}}}. \end{fulllineitems} \index{get\_verticalalignment() (matplotlib.text.Text method)@\spxentry{get\_verticalalignment()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_verticalalignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_verticalalignment}}}{\emph{self}}{} Return the vertical alignment as string. Will be one of 'top', 'center', 'bottom' or 'baseline'. \end{fulllineitems} \index{get\_weight() (matplotlib.text.Text method)@\spxentry{get\_weight()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_weight}}}{\emph{self}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_fontweight}}}}}. \end{fulllineitems} \index{get\_window\_extent() (matplotlib.text.Text method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}, \emph{dpi=None}}{} Return the \sphinxcode{\sphinxupquote{Bbox}} bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}Renderer, optional{]} A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent}}}}} before the first {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}}. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure). \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float, optional{]} The dpi value for computing the bbox, defaults to \sphinxcode{\sphinxupquote{self.figure.dpi}} (\sphinxstyleemphasis{not} the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_wrap() (matplotlib.text.Text method)@\spxentry{get\_wrap()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.get_wrap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_wrap}}}{\emph{self}}{} Return the wrapping state for the text. \end{fulllineitems} \index{is\_math\_text() (matplotlib.text.Text static method)@\spxentry{is\_math\_text()}\spxextra{matplotlib.text.Text static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.is_math_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{is\_math\_text}}}{\emph{s}, \emph{usetex=None}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Returns a cleaned string and a boolean flag. The flag indicates if the given string \sphinxstyleemphasis{s} contains any mathtext, determined by counting unescaped dollar signs. If no mathtext is present, the cleaned string has its dollar signs unescaped. If usetex is on, the flag always has the value "TeX". \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{set\_backgroundcolor() (matplotlib.text.Text method)@\spxentry{set\_backgroundcolor()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_backgroundcolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_backgroundcolor}}}{\emph{self}, \emph{color}}{} Set the background color of the text by updating the bbox. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_bbox}}}}}}] \leavevmode To change the position of the bounding box \end{description} \end{fulllineitems} \index{set\_bbox() (matplotlib.text.Text method)@\spxentry{set\_bbox()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bbox}}}{\emph{self}, \emph{rectprops}}{} Draw a bounding box around self. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rectprops}}] \leavevmode{[}dict with properties for {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}}{]} The default boxstyle is 'square'. The mutation scale of the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyBboxPatch:matplotlib.patches.FancyBboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{patches.FancyBboxPatch}}}}} is set to the fontsize. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{t}\PYG{o}{.}\PYG{n}{set\PYGZus{}bbox}\PYG{p}{(}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{set\_c() (matplotlib.text.Text method)@\spxentry{set\_c()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_c}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_c}}}{\emph{self}, \emph{color}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_color}}}}}. \end{fulllineitems} \index{set\_clip\_box() (matplotlib.text.Text method)@\spxentry{set\_clip\_box()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_clip_box}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_box}}}{\emph{self}, \emph{clipbox}}{} Set the artist's clip {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{clipbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_on() (matplotlib.text.Text method)@\spxentry{set\_clip\_on()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_clip_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_on}}}{\emph{self}, \emph{b}}{} Set whether the artist uses clipping. When False artists will be visible out side of the axes which can lead to unexpected results. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_clip\_path() (matplotlib.text.Text method)@\spxentry{set\_clip\_path()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_clip_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_clip\_path}}}{\emph{self}, \emph{path}, \emph{transform=None}}{} Set the artist's clip path, which may be: \begin{itemize} \item {} a {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} (or subclass) instance; or \item {} a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance, in which case a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance, which will be applied to the path before using it for clipping, must be provided; or \item {} \sphinxcode{\sphinxupquote{None}}, to remove a previously set clipping path. \end{itemize} For efficiency, if the path happens to be an axis-aligned rectangle, this method will set the clipping box to the corresponding rectangle and set the clipping path to \sphinxcode{\sphinxupquote{None}}. ACCEPTS: {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \end{fulllineitems} \index{set\_color() (matplotlib.text.Text method)@\spxentry{set\_color()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_color}}}{\emph{self}, \emph{color}}{} Set the foreground color of the text \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_family() (matplotlib.text.Text method)@\spxentry{set\_family()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_family}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_family}}}{\emph{self}, \emph{fontname}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontfamily}}}}}. \end{fulllineitems} \index{set\_font\_properties() (matplotlib.text.Text method)@\spxentry{set\_font\_properties()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_font_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_font\_properties}}}{\emph{self}, \emph{fp}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontproperties}}}}}. \end{fulllineitems} \index{set\_fontfamily() (matplotlib.text.Text method)@\spxentry{set\_fontfamily()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontfamily}}}{\emph{self}, \emph{fontname}}{} Set the font family. May be either a single string, or a list of strings in decreasing priority. Each string may be either a real font name or a generic font class name. If the latter, the specific font names will be looked up in the corresponding rcParams. If a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance is constructed with \sphinxcode{\sphinxupquote{fontfamily=None}}, then the font is set to \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"font.family"{]}}}}, and the same is done when {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontfamily}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontfamily()}}}}} is called on an existing {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontname}}] \leavevmode{[}\{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_family}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_family}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontname() (matplotlib.text.Text method)@\spxentry{set\_fontname()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontname}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontname}}}{\emph{self}, \emph{fontname}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_family}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_family}}}}}. One-way alias only: the getter differs. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontname}}] \leavevmode{[}\{FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_family}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_family}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontproperties() (matplotlib.text.Text method)@\spxentry{set\_fontproperties()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontproperties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontproperties}}}{\emph{self}, \emph{fp}}{} Set the font properties that control the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fp}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_fontsize() (matplotlib.text.Text method)@\spxentry{set\_fontsize()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontsize}}}{\emph{self}, \emph{fontsize}}{} Set the font size. May be either a size string, relative to the default font size, or an absolute font size in points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}\{size in points, 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_size}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontstretch() (matplotlib.text.Text method)@\spxentry{set\_fontstretch()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontstretch}}}{\emph{self}, \emph{stretch}}{} Set the font stretch (horizontal condensation or expansion). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{stretch}}] \leavevmode{[}\{a numeric value in range 0-1000, 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_stretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_stretch}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontstyle() (matplotlib.text.Text method)@\spxentry{set\_fontstyle()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontstyle}}}{\emph{self}, \emph{fontstyle}}{} Set the font style. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fontstyle}}] \leavevmode{[}\{'normal', 'italic', 'oblique'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_style}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_style}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontvariant() (matplotlib.text.Text method)@\spxentry{set\_fontvariant()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontvariant}}}{\emph{self}, \emph{variant}}{} Set the font variant, either 'normal' or 'small-caps'. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{variant}}] \leavevmode{[}\{'normal', 'small-caps'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_variant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_variant}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_fontweight() (matplotlib.text.Text method)@\spxentry{set\_fontweight()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_fontweight}}}{\emph{self}, \emph{weight}}{} Set the font weight. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{weight}}] \leavevmode{[}\{a numeric value in range 0-1000, 'ultralight', 'light', 'normal', 'regular', 'book', 'medium', 'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy', 'extra bold', 'black'\}{]} \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties.set_weight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{font\_manager.FontProperties.set\_weight}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_ha() (matplotlib.text.Text method)@\spxentry{set\_ha()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_ha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ha}}}{\emph{self}, \emph{align}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_horizontalalignment}}}}}. \end{fulllineitems} \index{set\_horizontalalignment() (matplotlib.text.Text method)@\spxentry{set\_horizontalalignment()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_horizontalalignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_horizontalalignment}}}{\emph{self}, \emph{align}}{} Set the horizontal alignment to one of \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'right', 'left'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_linespacing() (matplotlib.text.Text method)@\spxentry{set\_linespacing()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_linespacing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_linespacing}}}{\emph{self}, \emph{spacing}}{} Set the line spacing as a multiple of the font size. Default is 1.2. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{spacing}}] \leavevmode{[}float (multiple of font size){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ma() (matplotlib.text.Text method)@\spxentry{set\_ma()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_ma}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ma}}}{\emph{self}, \emph{align}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_multialignment}}}}}. \end{fulllineitems} \index{set\_multialignment() (matplotlib.text.Text method)@\spxentry{set\_multialignment()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_multialignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_multialignment}}}{\emph{self}, \emph{align}}{} Set the alignment for multiple lines layout. The layout of the bounding box of all the lines is determined bu the horizontalalignment and verticalalignment properties, but the multiline text within that box can be \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'left', 'right', 'center'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_name() (matplotlib.text.Text method)@\spxentry{set\_name()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_name}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_name}}}{\emph{self}, \emph{fontname}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontname}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontname}}}}}. \end{fulllineitems} \index{set\_position() (matplotlib.text.Text method)@\spxentry{set\_position()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_position}}}{\emph{self}, \emph{xy}}{} Set the (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) position of the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rotation() (matplotlib.text.Text method)@\spxentry{set\_rotation()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rotation}}}{\emph{self}, \emph{s}}{} Set the rotation of the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}\{angle in degrees, 'vertical', 'horizontal'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_rotation\_mode() (matplotlib.text.Text method)@\spxentry{set\_rotation\_mode()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_rotation_mode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rotation\_mode}}}{\emph{self}, \emph{m}}{} Set text rotation mode. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{m}}] \leavevmode{[}\{None, 'default', 'anchor'\}{]} If \sphinxcode{\sphinxupquote{None}} or \sphinxcode{\sphinxupquote{"default"}}, the text will be first rotated, then aligned according to their horizontal and vertical alignments. If \sphinxcode{\sphinxupquote{"anchor"}}, then alignment occurs before rotation. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_size() (matplotlib.text.Text method)@\spxentry{set\_size()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_size}}}{\emph{self}, \emph{fontsize}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontsize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontsize}}}}}. \end{fulllineitems} \index{set\_stretch() (matplotlib.text.Text method)@\spxentry{set\_stretch()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_stretch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_stretch}}}{\emph{self}, \emph{stretch}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstretch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontstretch}}}}}. \end{fulllineitems} \index{set\_style() (matplotlib.text.Text method)@\spxentry{set\_style()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_style}}}{\emph{self}, \emph{fontstyle}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontstyle}}}}}. \end{fulllineitems} \index{set\_text() (matplotlib.text.Text method)@\spxentry{set\_text()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_text}}}{\emph{self}, \emph{s}}{} Set the text string \sphinxstyleemphasis{s}. It may contain newlines (\sphinxcode{\sphinxupquote{\textbackslash{}n}}) or math in LaTeX syntax. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} Any object gets converted to its \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}, except \sphinxcode{\sphinxupquote{None}} which becomes \sphinxcode{\sphinxupquote{'{'}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_usetex() (matplotlib.text.Text method)@\spxentry{set\_usetex()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_usetex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_usetex}}}{\emph{self}, \emph{usetex}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{usetex}}] \leavevmode{[}bool or None{]} Whether to render using TeX, \sphinxcode{\sphinxupquote{None}} means to use \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.usetex"{]}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_va() (matplotlib.text.Text method)@\spxentry{set\_va()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_va}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_va}}}{\emph{self}, \emph{align}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_verticalalignment}}}}}. \end{fulllineitems} \index{set\_variant() (matplotlib.text.Text method)@\spxentry{set\_variant()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_variant}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_variant}}}{\emph{self}, \emph{variant}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontvariant}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontvariant}}}}}. \end{fulllineitems} \index{set\_verticalalignment() (matplotlib.text.Text method)@\spxentry{set\_verticalalignment()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_verticalalignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verticalalignment}}}{\emph{self}, \emph{align}}{} Set the vertical alignment \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{align}}] \leavevmode{[}\{'center', 'top', 'bottom', 'baseline', 'center\_baseline'\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_weight() (matplotlib.text.Text method)@\spxentry{set\_weight()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_weight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_weight}}}{\emph{self}, \emph{weight}}{} Alias for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_fontweight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_fontweight}}}}}. \end{fulllineitems} \index{set\_wrap() (matplotlib.text.Text method)@\spxentry{set\_wrap()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_wrap}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_wrap}}}{\emph{self}, \emph{wrap}}{} Set the wrapping state for the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{wrap}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_x() (matplotlib.text.Text method)@\spxentry{set\_x()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_x}}}{\emph{self}, \emph{x}}{} Set the \sphinxstyleemphasis{x} position of the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_y() (matplotlib.text.Text method)@\spxentry{set\_y()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.set_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_y}}}{\emph{self}, \emph{y}}{} Set the \sphinxstyleemphasis{y} position of the text. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update() (matplotlib.text.Text method)@\spxentry{update()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{kwargs}}{} Update properties from a dictionary. \end{fulllineitems} \index{update\_bbox\_position\_size() (matplotlib.text.Text method)@\spxentry{update\_bbox\_position\_size()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.update_bbox_position_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_bbox\_position\_size}}}{\emph{self}, \emph{renderer}}{} Update the location and the size of the bbox. This method should be used when the position and size of the bbox needs to be updated before actually drawing the bbox. \end{fulllineitems} \index{update\_from() (matplotlib.text.Text method)@\spxentry{update\_from()}\spxextra{matplotlib.text.Text method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.update_from}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from}}}{\emph{self}, \emph{other}}{} Copy properties from other to self. \end{fulllineitems} \index{zorder (matplotlib.text.Text attribute)@\spxentry{zorder}\spxextra{matplotlib.text.Text attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.Text.zorder}}\pysigline{\sphinxbfcode{\sphinxupquote{zorder}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \end{fulllineitems} \index{TextWithDash (class in matplotlib.text)@\spxentry{TextWithDash}\spxextra{class in matplotlib.text}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.text.}}\sphinxbfcode{\sphinxupquote{TextWithDash}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} This is basically a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} with a dash (drawn with a {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}}) before/after it. It is intended to be a drop-in replacement for {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, and should behave identically to it when \sphinxstyleemphasis{dashlength} = 0.0. The dash always comes between the point specified by {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position()}}}}} and the text. When a dash exists, the text alignment arguments (\sphinxstyleemphasis{horizontalalignment}, \sphinxstyleemphasis{verticalalignment}) are ignored. \sphinxstyleemphasis{dashlength} is the length of the dash in canvas units. (default = 0.0). \sphinxstyleemphasis{dashdirection} is one of 0 or 1, where 0 draws the dash after the text and 1 before. (default = 0). \sphinxstyleemphasis{dashrotation} specifies the rotation of the dash, and should generally stay \sphinxstyleemphasis{None}. In this case {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashrotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_dashrotation()}}}}} returns {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.get_rotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_rotation()}}}}}. (i.e., the dash takes its rotation from the text's rotation). Because the text center is projected onto the dash, major deviations in the rotation cause what may be considered visually unappealing results. (default = \sphinxstyleemphasis{None}) \sphinxstyleemphasis{dashpad} is a padding length to add (or subtract) space between the text and the dash, in canvas units. (default = 3) \sphinxstyleemphasis{dashpush} "pushes" the dash and text away from the point specified by {\hyperref[\detokenize{api/text_api:matplotlib.text.Text.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_position()}}}}} by the amount in canvas units. (default = 0) \begin{sphinxadmonition}{note}{Note:} The alignment of the two objects is based on the bounding box of the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}, as obtained by {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_window_extent:matplotlib.artist.Artist.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}}. This, in turn, appears to depend on the font metrics as given by the rendering backend. Hence the quality of the "centering" of the label text with respect to the dash varies depending on the backend used. \end{sphinxadmonition} \begin{sphinxadmonition}{note}{Note:} I'm not sure that I got the {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} right, or whether that's sufficient for providing the object bounding box. \end{sphinxadmonition} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \index{draw() (matplotlib.text.TextWithDash method)@\spxentry{draw()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_dashdirection() (matplotlib.text.TextWithDash method)@\spxentry{get\_dashdirection()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashdirection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashdirection}}}{\emph{self}}{} Get the direction dash. 1 is before the text and 0 is after. \end{fulllineitems} \index{get\_dashlength() (matplotlib.text.TextWithDash method)@\spxentry{get\_dashlength()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashlength}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashlength}}}{\emph{self}}{} Get the length of the dash. \end{fulllineitems} \index{get\_dashpad() (matplotlib.text.TextWithDash method)@\spxentry{get\_dashpad()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashpad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashpad}}}{\emph{self}}{} Get the extra spacing between the dash and the text, in canvas units. \end{fulllineitems} \index{get\_dashpush() (matplotlib.text.TextWithDash method)@\spxentry{get\_dashpush()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashpush}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashpush}}}{\emph{self}}{} Get the extra spacing between the dash and the specified text position, in canvas units. \end{fulllineitems} \index{get\_dashrotation() (matplotlib.text.TextWithDash method)@\spxentry{get\_dashrotation()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_dashrotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_dashrotation}}}{\emph{self}}{} Get the rotation of the dash in degrees. \end{fulllineitems} \index{get\_figure() (matplotlib.text.TextWithDash method)@\spxentry{get\_figure()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_figure}}}{\emph{self}}{} return the figure instance the artist belongs to \end{fulllineitems} \index{get\_position() (matplotlib.text.TextWithDash method)@\spxentry{get\_position()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} Return the position of the text as a tuple (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) \end{fulllineitems} \index{get\_prop\_tup() (matplotlib.text.TextWithDash method)@\spxentry{get\_prop\_tup()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_prop_tup}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_prop\_tup}}}{\emph{self}, \emph{renderer=None}}{} Return a hashable tuple of properties. Not intended to be human readable, but useful for backends who want to cache derived information about text (e.g., layouts) and need to know if the text has changed. \end{fulllineitems} \index{get\_unitless\_position() (matplotlib.text.TextWithDash method)@\spxentry{get\_unitless\_position()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_unitless_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_unitless\_position}}}{\emph{self}}{} Return the unitless position of the text as a tuple (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) \end{fulllineitems} \index{get\_window\_extent() (matplotlib.text.TextWithDash method)@\spxentry{get\_window\_extent()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer=None}}{} Return a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} object bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. \sphinxstyleemphasis{renderer} defaults to the \_renderer attribute of the text object. This is not assigned until the first execution of {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}}, so you must use this kwarg if you want to call {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent()}}}}} prior to the first {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw()}}}}}. For getting web page regions, it is simpler to call the method after saving the figure. \end{fulllineitems} \index{set\_dashdirection() (matplotlib.text.TextWithDash method)@\spxentry{set\_dashdirection()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_dashdirection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashdirection}}}{\emph{self}, \emph{dd}}{} Set the direction of the dash following the text. 1 is before the text and 0 is after. The default is 0, which is what you'd want for the typical case of ticks below and on the left of the figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dd}}] \leavevmode{[}int (1 is before, 0 is after){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashlength() (matplotlib.text.TextWithDash method)@\spxentry{set\_dashlength()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_dashlength}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashlength}}}{\emph{self}, \emph{dl}}{} Set the length of the dash, in canvas units. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dl}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashpad() (matplotlib.text.TextWithDash method)@\spxentry{set\_dashpad()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_dashpad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashpad}}}{\emph{self}, \emph{dp}}{} Set the "pad" of the TextWithDash, which is the extra spacing between the dash and the text, in canvas units. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dp}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashpush() (matplotlib.text.TextWithDash method)@\spxentry{set\_dashpush()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_dashpush}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashpush}}}{\emph{self}, \emph{dp}}{} Set the "push" of the TextWithDash, which is the extra spacing between the beginning of the dash and the specified position. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dp}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_dashrotation() (matplotlib.text.TextWithDash method)@\spxentry{set\_dashrotation()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_dashrotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_dashrotation}}}{\emph{self}, \emph{dr}}{} Set the rotation of the dash, in degrees. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dr}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_figure() (matplotlib.text.TextWithDash method)@\spxentry{set\_figure()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_figure}}}{\emph{self}, \emph{fig}}{} Set the figure instance the artist belongs to. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}matplotlib.figure.Figure{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_position() (matplotlib.text.TextWithDash method)@\spxentry{set\_position()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_position}}}{\emph{self}, \emph{xy}}{} Set the (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) position of the {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_transform() (matplotlib.text.TextWithDash method)@\spxentry{set\_transform()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_transform}}}{\emph{self}, \emph{t}}{} Set the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} instance used by this artist. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{t}}] \leavevmode{[}matplotlib.transforms.Transform{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_x() (matplotlib.text.TextWithDash method)@\spxentry{set\_x()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_x}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_x}}}{\emph{self}, \emph{x}}{} Set the \sphinxstyleemphasis{x} position of the {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_y() (matplotlib.text.TextWithDash method)@\spxentry{set\_y()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.set_y}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_y}}}{\emph{self}, \emph{y}}{} Set the \sphinxstyleemphasis{y} position of the {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{y}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_coords() (matplotlib.text.TextWithDash method)@\spxentry{update\_coords()}\spxextra{matplotlib.text.TextWithDash method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.TextWithDash.update_coords}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_coords}}}{\emph{self}, \emph{renderer}}{} Computes the actual \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} coordinates for text based on the input \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} and the \sphinxstyleemphasis{dashlength}. Since the rotation is with respect to the actual canvas's coordinates we need to map back and forth. \end{fulllineitems} \end{fulllineitems} \index{get\_rotation() (in module matplotlib.text)@\spxentry{get\_rotation()}\spxextra{in module matplotlib.text}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/text_api:matplotlib.text.get_rotation}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.text.}}\sphinxbfcode{\sphinxupquote{get\_rotation}}}{\emph{rotation}}{} Return the text angle as float between 0 and 360 degrees. \sphinxstyleemphasis{rotation} may be 'horizontal', 'vertical', or a numeric value in degrees. \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.textpath}}} \label{\detokenize{api/textpath_api:module-matplotlib.textpath}}\label{\detokenize{api/textpath_api:matplotlib-textpath}}\label{\detokenize{api/textpath_api::doc}}\index{matplotlib.textpath (module)@\spxentry{matplotlib.textpath}\spxextra{module}}\index{TextPath (class in matplotlib.textpath)@\spxentry{TextPath}\spxextra{class in matplotlib.textpath}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.textpath.}}\sphinxbfcode{\sphinxupquote{TextPath}}}{\emph{xy}, \emph{s}, \emph{size=None}, \emph{prop=None}, \emph{\_interpolation\_steps=1}, \emph{usetex=False}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} Create a path from the text. Create a path from the text. Note that it simply is a path, not an artist. You need to use the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathPatch}}}}} (or other artists) to draw this path onto the canvas. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}tuple or array of two float values{]} Position of the text. For no offset, use \sphinxcode{\sphinxupquote{xy=(0, 0)}}. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text to convert to a path. \item[{\sphinxstylestrong{size}}] \leavevmode{[}float, optional{]} Font size in points. Defaults to the size specified via the font properties \sphinxstyleemphasis{prop}. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font property. If not provided, will use a default \sphinxcode{\sphinxupquote{FontProperties}} with parameters from the {\hyperref[\detokenize{tutorials/introductory/customizing:matplotlib-rcparams}]{\sphinxcrossref{\DUrole{std,std-ref}{rcParams}}}}. \item[{\sphinxstylestrong{\_interpolation\_steps}}] \leavevmode{[}integer, optional{]} (Currently ignored) \item[{\sphinxstylestrong{usetex}}] \leavevmode{[}bool, optional{]} Whether to use tex rendering. Defaults to \sphinxcode{\sphinxupquote{False}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} The following creates a path from the string "ABC" with Helvetica font face; and another path from the latex fraction 1/2: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{textpath} \PYG{k}{import} \PYG{n}{TextPath} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{font\PYGZus{}manager} \PYG{k}{import} \PYG{n}{FontProperties} \PYG{n}{fp} \PYG{o}{=} \PYG{n}{FontProperties}\PYG{p}{(}\PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Helvetica}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{style}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{italic}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{path1} \PYG{o}{=} \PYG{n}{TextPath}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{12}\PYG{p}{,}\PYG{l+m+mi}{12}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ABC}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{,} \PYG{n}{prop}\PYG{o}{=}\PYG{n}{fp}\PYG{p}{)} \PYG{n}{path2} \PYG{o}{=} \PYG{n}{TextPath}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{frac}\PYG{l+s+si}{\PYGZob{}1\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}2\PYGZcb{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{,} \PYG{n}{usetex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} Also see \DUrole{xref,std,std-doc}{/gallery/text\_labels\_and\_annotations/demo\_text\_path}. \index{codes (matplotlib.textpath.TextPath attribute)@\spxentry{codes}\spxextra{matplotlib.textpath.TextPath attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.codes}}\pysigline{\sphinxbfcode{\sphinxupquote{codes}}} Return the codes \end{fulllineitems} \index{get\_size() (matplotlib.textpath.TextPath method)@\spxentry{get\_size()}\spxextra{matplotlib.textpath.TextPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}}{} Get the text size. \end{fulllineitems} \index{is\_math\_text() (matplotlib.textpath.TextPath method)@\spxentry{is\_math\_text()}\spxextra{matplotlib.textpath.TextPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.is_math_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_math\_text}}}{\emph{self}, \emph{s}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Returns True if the given string \sphinxstyleemphasis{s} contains any mathtext. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{set\_size() (matplotlib.textpath.TextPath method)@\spxentry{set\_size()}\spxextra{matplotlib.textpath.TextPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.set_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_size}}}{\emph{self}, \emph{size}}{} Set the text size. \end{fulllineitems} \index{text\_get\_vertices\_codes() (matplotlib.textpath.TextPath method)@\spxentry{text\_get\_vertices\_codes()}\spxextra{matplotlib.textpath.TextPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.text_get_vertices_codes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{text\_get\_vertices\_codes}}}{\emph{self}, \emph{prop}, \emph{s}, \emph{usetex}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert string \sphinxstyleemphasis{s} to a (vertices, codes) pair using font property \sphinxstyleemphasis{prop}. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{vertices (matplotlib.textpath.TextPath attribute)@\spxentry{vertices}\spxextra{matplotlib.textpath.TextPath attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextPath.vertices}}\pysigline{\sphinxbfcode{\sphinxupquote{vertices}}} Return the cached path after updating it if necessary. \end{fulllineitems} \end{fulllineitems} \index{TextToPath (class in matplotlib.textpath)@\spxentry{TextToPath}\spxextra{class in matplotlib.textpath}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.textpath.}}\sphinxbfcode{\sphinxupquote{TextToPath}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class that converts strings to paths. \index{DPI (matplotlib.textpath.TextToPath attribute)@\spxentry{DPI}\spxextra{matplotlib.textpath.TextToPath attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.DPI}}\pysigline{\sphinxbfcode{\sphinxupquote{DPI}}\sphinxbfcode{\sphinxupquote{ = 72}}} \end{fulllineitems} \index{FONT\_SCALE (matplotlib.textpath.TextToPath attribute)@\spxentry{FONT\_SCALE}\spxextra{matplotlib.textpath.TextToPath attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.FONT_SCALE}}\pysigline{\sphinxbfcode{\sphinxupquote{FONT\_SCALE}}\sphinxbfcode{\sphinxupquote{ = 100.0}}} \end{fulllineitems} \index{get\_glyphs\_mathtext() (matplotlib.textpath.TextToPath method)@\spxentry{get\_glyphs\_mathtext()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_glyphs_mathtext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_glyphs\_mathtext}}}{\emph{self}, \emph{prop}, \emph{s}, \emph{glyph\_map=None}, \emph{return\_new\_glyphs\_only=False}}{} Parse mathtext string \sphinxstyleemphasis{s} and convert it to a (vertices, codes) pair. \end{fulllineitems} \index{get\_glyphs\_tex() (matplotlib.textpath.TextToPath method)@\spxentry{get\_glyphs\_tex()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_glyphs_tex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_glyphs\_tex}}}{\emph{self}, \emph{prop}, \emph{s}, \emph{glyph\_map=None}, \emph{return\_new\_glyphs\_only=False}}{} Convert the string \sphinxstyleemphasis{s} to vertices and codes using usetex mode. \end{fulllineitems} \index{get\_glyphs\_with\_font() (matplotlib.textpath.TextToPath method)@\spxentry{get\_glyphs\_with\_font()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_glyphs_with_font}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_glyphs\_with\_font}}}{\emph{self}, \emph{font}, \emph{s}, \emph{glyph\_map=None}, \emph{return\_new\_glyphs\_only=False}}{} Convert string \sphinxstyleemphasis{s} to vertices and codes using the provided ttf font. \end{fulllineitems} \index{get\_texmanager() (matplotlib.textpath.TextToPath method)@\spxentry{get\_texmanager()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_texmanager}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_texmanager}}}{\emph{self}}{} Return the cached \sphinxcode{\sphinxupquote{TexManager}} instance. \end{fulllineitems} \index{get\_text\_path() (matplotlib.textpath.TextToPath method)@\spxentry{get\_text\_path()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_text_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_path}}}{\emph{self}, \emph{prop}, \emph{s}, \emph{ismath=False}, \emph{usetex=\textless{}deprecated parameter\textgreater{}}}{} Convert text \sphinxstyleemphasis{s} to path (a tuple of vertices and codes for matplotlib.path.Path). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}} instance{]} The font properties for the text. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text to be converted. \item[{\sphinxstylestrong{ismath}}] \leavevmode{[}\{False, True, "TeX"\}{]} If True, use mathtext parser. If "TeX", use tex for renderering. \item[{\sphinxstylestrong{usetex}}] \leavevmode{[}bool, optional{]} If set, forces \sphinxstyleemphasis{ismath} to True. This parameter is deprecated. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{verts, codes}}] \leavevmode{[}tuple of lists{]} \sphinxstyleemphasis{verts} is a list of numpy arrays containing the x and y coordinates of the vertices. \sphinxstyleemphasis{codes} is a list of path codes. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Create a list of vertices and codes from a text, and create a \sphinxcode{\sphinxupquote{Path}} from those: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{path} \PYG{k}{import} \PYG{n}{Path} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{textpath} \PYG{k}{import} \PYG{n}{TextToPath} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{font\PYGZus{}manager} \PYG{k}{import} \PYG{n}{FontProperties} \PYG{n}{fp} \PYG{o}{=} \PYG{n}{FontProperties}\PYG{p}{(}\PYG{n}{family}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{Humor Sans}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{style}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{italic}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes} \PYG{o}{=} \PYG{n}{TextToPath}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{get\PYGZus{}text\PYGZus{}path}\PYG{p}{(}\PYG{n}{fp}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{ABC}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{path} \PYG{o}{=} \PYG{n}{Path}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{,} \PYG{n}{codes}\PYG{p}{,} \PYG{n}{closed}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} Also see {\hyperref[\detokenize{api/textpath_api:matplotlib.textpath.TextPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextPath}}}}} for a more direct way to create a path from a text. \end{fulllineitems} \index{get\_text\_width\_height\_descent() (matplotlib.textpath.TextToPath method)@\spxentry{get\_text\_width\_height\_descent()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.get_text_width_height_descent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text\_width\_height\_descent}}}{\emph{self}, \emph{s}, \emph{prop}, \emph{ismath}}{}~ \end{fulllineitems} \index{glyph\_to\_path() (matplotlib.textpath.TextToPath method)@\spxentry{glyph\_to\_path()}\spxextra{matplotlib.textpath.TextToPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.glyph_to_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{glyph\_to\_path}}}{\emph{self}, \emph{font}, \emph{currx=0.0}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert the \sphinxstyleemphasis{font}'s current glyph to a (vertices, codes) pair. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{tex\_font\_map (matplotlib.textpath.TextToPath attribute)@\spxentry{tex\_font\_map}\spxextra{matplotlib.textpath.TextToPath attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/textpath_api:matplotlib.textpath.TextToPath.tex_font_map}}\pysigline{\sphinxbfcode{\sphinxupquote{tex\_font\_map}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.ticker}}} \label{\detokenize{api/ticker_api:module-matplotlib.ticker}}\label{\detokenize{api/ticker_api:matplotlib-ticker}}\label{\detokenize{api/ticker_api::doc}}\index{matplotlib.ticker (module)@\spxentry{matplotlib.ticker}\spxextra{module}} \subsection{Tick locating and formatting} \label{\detokenize{api/ticker_api:tick-locating-and-formatting}} This module contains classes to support completely configurable tick locating and formatting. Although the locators know nothing about major or minor ticks, they are used by the Axis class to support major and minor tick locating and formatting. Generic tick locators and formatters are provided, as well as domain specific custom ones. \subsubsection{Default Formatter} \label{\detokenize{api/ticker_api:default-formatter}} The default formatter identifies when the x-data being plotted is a small range on top of a large offset. To reduce the chances that the ticklabels overlap, the ticks are labeled as deltas from a fixed offset. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{2000}\PYG{p}{,} \PYG{l+m+mi}{2010}\PYG{p}{)}\PYG{p}{,} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} will have tick of 0-9 with an offset of +2e3. If this is not desired turn off the use of the offset on the default formatter: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{get\PYGZus{}xaxis}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{get\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{set\PYGZus{}useOffset}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} set the rcParam \sphinxcode{\sphinxupquote{axes.formatter.useoffset=False}} to turn it off globally, or set a different formatter. \subsubsection{Tick locating} \label{\detokenize{api/ticker_api:tick-locating}} The Locator class is the base class for all tick locators. The locators handle autoscaling of the view limits based on the data limits, and the choosing of tick locations. A useful semi-automatic tick locator is {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MultipleLocator}}}}}. It is initialized with a base, e.g., 10, and it picks axis limits and ticks that are multiples of that base. The Locator subclasses defined here are \begin{description} \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoLocator}}}}}}] \leavevmode {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} with simple defaults. This is the default tick locator for most plotting. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}}] \leavevmode Finds up to a max number of intervals with ticks at nice locations. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LinearLocator}}}}}}] \leavevmode Space ticks evenly from min to max. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}}}] \leavevmode Space ticks logarithmically from min to max. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MultipleLocator}}}}}}] \leavevmode Ticks and range are a multiple of base; either integer or float. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FixedLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedLocator}}}}}}] \leavevmode Tick locations are fixed. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.IndexLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IndexLocator}}}}}}] \leavevmode Locator for index plots (e.g., where \sphinxcode{\sphinxupquote{x = range(len(y))}}). \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.NullLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NullLocator}}}}}}] \leavevmode No ticks. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.SymmetricalLogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SymmetricalLogLocator}}}}}}] \leavevmode Locator for use with with the symlog norm; works like {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}} for the part outside of the threshold and adds 0 if inside the limits. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogitLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogitLocator}}}}}}] \leavevmode Locator for logit scaling. \item[{\sphinxcode{\sphinxupquote{OldAutoLocator}}}] \leavevmode Choose a {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MultipleLocator}}}}} and dynamically reassign it for intelligent ticking during navigation. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.AutoMinorLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AutoMinorLocator}}}}}}] \leavevmode Locator for minor ticks when the axis is linear and the major ticks are uniformly spaced. Subdivides the major tick interval into a specified number of minor intervals, defaulting to 4 or 5 depending on the major interval. \end{description} There are a number of locators specialized for date locations - see the \sphinxcode{\sphinxupquote{dates}} module. You can define your own locator by deriving from Locator. You must override the \sphinxcode{\sphinxupquote{\_\_call\_\_}} method, which returns a sequence of locations, and you will probably want to override the autoscale method to set the view limits from the data limits. If you want to override the default locator, use one of the above or a custom locator and pass it to the x or y axis instance. The relevant methods are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{xmajor\PYGZus{}locator}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}minor\PYGZus{}locator}\PYG{p}{(}\PYG{n}{xminor\PYGZus{}locator}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}locator}\PYG{p}{(}\PYG{n}{ymajor\PYGZus{}locator}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}minor\PYGZus{}locator}\PYG{p}{(}\PYG{n}{yminor\PYGZus{}locator}\PYG{p}{)} \end{sphinxVerbatim} The default minor locator is {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.NullLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NullLocator}}}}}, i.e., no minor ticks on by default. \subsubsection{Tick formatting} \label{\detokenize{api/ticker_api:tick-formatting}} Tick formatting is controlled by classes derived from Formatter. The formatter operates on a single tick value and returns a string to the axis. \begin{description} \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.NullFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NullFormatter}}}}}}] \leavevmode No labels on the ticks. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.IndexFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IndexFormatter}}}}}}] \leavevmode Set the strings from a list of labels. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FixedFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedFormatter}}}}}}] \leavevmode Set the strings manually for the labels. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FuncFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FuncFormatter}}}}}}] \leavevmode User defined function sets the labels. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.StrMethodFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{StrMethodFormatter}}}}}}] \leavevmode Use string \sphinxhref{https://docs.python.org/3/library/functions.html\#format}{\sphinxcode{\sphinxupquote{format}}} method. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FormatStrFormatter}}}}}}] \leavevmode Use an old-style sprintf format string. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}}}] \leavevmode Default formatter for scalars: autopick the format string. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatter}}}}}}] \leavevmode Formatter for log axes. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterExponent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatterExponent}}}}}}] \leavevmode Format values for log axis using \sphinxcode{\sphinxupquote{exponent = log\_base(value)}}. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterMathtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatterMathtext}}}}}}] \leavevmode Format values for log axis using \sphinxcode{\sphinxupquote{exponent = log\_base(value)}} using Math text. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterSciNotation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogFormatterSciNotation}}}}}}] \leavevmode Format values for log axis using scientific notation. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogitFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogitFormatter}}}}}}] \leavevmode Probability formatter. \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{EngFormatter}}}}}}] \leavevmode Format labels in engineering notation \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PercentFormatter}}}}}}] \leavevmode Format labels as a percentage \end{description} You can derive your own formatter from the Formatter base class by simply overriding the \sphinxcode{\sphinxupquote{\_\_call\_\_}} method. The formatter class has access to the axis view and data limits. To control the major and minor tick label formats, use one of the following methods: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{xmajor\PYGZus{}formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{xaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}minor\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{xminor\PYGZus{}formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}major\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{ymajor\PYGZus{}formatter}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{yaxis}\PYG{o}{.}\PYG{n}{set\PYGZus{}minor\PYGZus{}formatter}\PYG{p}{(}\PYG{n}{yminor\PYGZus{}formatter}\PYG{p}{)} \end{sphinxVerbatim} See \DUrole{xref,std,std-doc}{/gallery/ticks\_and\_spines/major\_minor\_demo} for an example of setting major and minor ticks. See the {\hyperref[\detokenize{api/dates_api:module-matplotlib.dates}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.dates}}}}} module for more information and examples of using date locators and formatters. \index{TickHelper (class in matplotlib.ticker)@\spxentry{TickHelper}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{TickHelper}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{axis (matplotlib.ticker.TickHelper attribute)@\spxentry{axis}\spxextra{matplotlib.ticker.TickHelper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.axis}}\pysigline{\sphinxbfcode{\sphinxupquote{axis}}\sphinxbfcode{\sphinxupquote{ = None}}} \end{fulllineitems} \index{create\_dummy\_axis() (matplotlib.ticker.TickHelper method)@\spxentry{create\_dummy\_axis()}\spxextra{matplotlib.ticker.TickHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.create_dummy_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{create\_dummy\_axis}}}{\emph{self}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{set\_axis() (matplotlib.ticker.TickHelper method)@\spxentry{set\_axis()}\spxextra{matplotlib.ticker.TickHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{set\_bounds() (matplotlib.ticker.TickHelper method)@\spxentry{set\_bounds()}\spxextra{matplotlib.ticker.TickHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.set_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_bounds}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \index{set\_data\_interval() (matplotlib.ticker.TickHelper method)@\spxentry{set\_data\_interval()}\spxextra{matplotlib.ticker.TickHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.set_data_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \index{set\_view\_interval() (matplotlib.ticker.TickHelper method)@\spxentry{set\_view\_interval()}\spxextra{matplotlib.ticker.TickHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.TickHelper.set_view_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{}~ \end{fulllineitems} \end{fulllineitems} \index{Formatter (class in matplotlib.ticker)@\spxentry{Formatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{Formatter}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.TickHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.TickHelper}}}}} Create a string based on a tick value and location. \index{fix\_minus() (matplotlib.ticker.Formatter method)@\spxentry{fix\_minus()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.fix_minus}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fix\_minus}}}{\emph{self}, \emph{s}}{} Some classes may want to replace a hyphen for minus with the proper unicode symbol (U+2212) for typographical correctness. The default is to not replace it. Note, if you use this method, e.g., in {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_data}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_data()}}}}} or call, you probably don't want to use it for {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_data_short}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_data\_short()}}}}} since the toolbar uses this for interactive coord reporting and I doubt we can expect GUIs across platforms will handle the unicode correctly. So for now the classes that override {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.fix_minus}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fix\_minus()}}}}} should have an explicit {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_data_short}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{format\_data\_short()}}}}} method \end{fulllineitems} \index{format\_data() (matplotlib.ticker.Formatter method)@\spxentry{format\_data()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data}}}{\emph{self}, \emph{value}}{} Returns the full string representation of the value with the position unspecified. \end{fulllineitems} \index{format\_data\_short() (matplotlib.ticker.Formatter method)@\spxentry{format\_data\_short()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_data_short}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data\_short}}}{\emph{self}, \emph{value}}{} Return a short string version of the tick value. Defaults to the position-independent long value. \end{fulllineitems} \index{format\_ticks() (matplotlib.ticker.Formatter method)@\spxentry{format\_ticks()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.format_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_ticks}}}{\emph{self}, \emph{values}}{} Return the tick labels for all the ticks at once. \end{fulllineitems} \index{get\_offset() (matplotlib.ticker.Formatter method)@\spxentry{get\_offset()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{locs (matplotlib.ticker.Formatter attribute)@\spxentry{locs}\spxextra{matplotlib.ticker.Formatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.locs}}\pysigline{\sphinxbfcode{\sphinxupquote{locs}}\sphinxbfcode{\sphinxupquote{ = {[}{]}}}} \end{fulllineitems} \index{set\_locs() (matplotlib.ticker.Formatter method)@\spxentry{set\_locs()}\spxextra{matplotlib.ticker.Formatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Formatter.set_locs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locs}}}{\emph{self}, \emph{locs}}{}~ \end{fulllineitems} \end{fulllineitems} \index{FixedFormatter (class in matplotlib.ticker)@\spxentry{FixedFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{FixedFormatter}}}{\emph{seq}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Return fixed strings for tick labels based only on position, not value. Set the sequence of strings that will be used for labels. \index{get\_offset() (matplotlib.ticker.FixedFormatter method)@\spxentry{get\_offset()}\spxextra{matplotlib.ticker.FixedFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedFormatter.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_offset\_string() (matplotlib.ticker.FixedFormatter method)@\spxentry{set\_offset\_string()}\spxextra{matplotlib.ticker.FixedFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedFormatter.set_offset_string}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_offset\_string}}}{\emph{self}, \emph{ofs}}{}~ \end{fulllineitems} \end{fulllineitems} \index{NullFormatter (class in matplotlib.ticker)@\spxentry{NullFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.NullFormatter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{NullFormatter}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Always return the empty string. \end{fulllineitems} \index{FuncFormatter (class in matplotlib.ticker)@\spxentry{FuncFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FuncFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{FuncFormatter}}}{\emph{func}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Use a user-defined function for formatting. The function should take in two inputs (a tick value \sphinxcode{\sphinxupquote{x}} and a position \sphinxcode{\sphinxupquote{pos}}), and return a string containing the corresponding tick label. \end{fulllineitems} \index{FormatStrFormatter (class in matplotlib.ticker)@\spxentry{FormatStrFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FormatStrFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{FormatStrFormatter}}}{\emph{fmt}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Use an old-style ('\%' operator) format string to format the tick. The format string should have a single variable format (\%) in it. It will be applied to the value (not the position) of the tick. \end{fulllineitems} \index{StrMethodFormatter (class in matplotlib.ticker)@\spxentry{StrMethodFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.StrMethodFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{StrMethodFormatter}}}{\emph{fmt}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Use a new-style format string (as used by \sphinxcode{\sphinxupquote{str.format()}}) to format the tick. The field used for the value must be labeled \sphinxcode{\sphinxupquote{x}} and the field used for the position must be labeled \sphinxcode{\sphinxupquote{pos}}. \end{fulllineitems} \index{ScalarFormatter (class in matplotlib.ticker)@\spxentry{ScalarFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{ScalarFormatter}}}{\emph{useOffset=None}, \emph{useMathText=None}, \emph{useLocale=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Format tick values as a number. Tick value is interpreted as a plain old number. If \sphinxcode{\sphinxupquote{useOffset==True}} and the data range is much smaller than the data average, then an offset will be determined such that the tick labels are meaningful. Scientific notation is used for \sphinxcode{\sphinxupquote{data \textless{} 10\textasciicircum{}-n}} or \sphinxcode{\sphinxupquote{data \textgreater{}= 10\textasciicircum{}m}}, where \sphinxcode{\sphinxupquote{n}} and \sphinxcode{\sphinxupquote{m}} are the power limits set using \sphinxcode{\sphinxupquote{set\_powerlimits((n,m))}}. The defaults for these are controlled by the \sphinxcode{\sphinxupquote{axes.formatter.limits}} rc parameter. \index{fix\_minus() (matplotlib.ticker.ScalarFormatter method)@\spxentry{fix\_minus()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.fix_minus}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fix\_minus}}}{\emph{self}, \emph{s}}{} Replace hyphens with a unicode minus. \end{fulllineitems} \index{format\_data() (matplotlib.ticker.ScalarFormatter method)@\spxentry{format\_data()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.format_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data}}}{\emph{self}, \emph{value}}{} Return a formatted string representation of a number. \end{fulllineitems} \index{format\_data\_short() (matplotlib.ticker.ScalarFormatter method)@\spxentry{format\_data\_short()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.format_data_short}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data\_short}}}{\emph{self}, \emph{value}}{} Return a short formatted string representation of a number. \end{fulllineitems} \index{get\_offset() (matplotlib.ticker.ScalarFormatter method)@\spxentry{get\_offset()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.get_offset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_offset}}}{\emph{self}}{} Return scientific notation, plus offset. \end{fulllineitems} \index{get\_useLocale() (matplotlib.ticker.ScalarFormatter method)@\spxentry{get\_useLocale()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.get_useLocale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_useLocale}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_useMathText() (matplotlib.ticker.ScalarFormatter method)@\spxentry{get\_useMathText()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.get_useMathText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_useMathText}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_useOffset() (matplotlib.ticker.ScalarFormatter method)@\spxentry{get\_useOffset()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.get_useOffset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_useOffset}}}{\emph{self}}{}~ \end{fulllineitems} \index{pprint\_val() (matplotlib.ticker.ScalarFormatter method)@\spxentry{pprint\_val()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.pprint_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pprint\_val}}}{\emph{self}, \emph{x}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{set\_locs() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_locs()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_locs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locs}}}{\emph{self}, \emph{locs}}{} Set the locations of the ticks. \end{fulllineitems} \index{set\_powerlimits() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_powerlimits()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_powerlimits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_powerlimits}}}{\emph{self}, \emph{lims}}{} Sets size thresholds for scientific notation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{lims}}] \leavevmode{[}(min\_exp, max\_exp){]} A tuple containing the powers of 10 that determine the switchover threshold. Numbers below \sphinxcode{\sphinxupquote{10**min\_exp}} and above \sphinxcode{\sphinxupquote{10**max\_exp}} will be displayed in scientific notation. For example, \sphinxcode{\sphinxupquote{formatter.set\_powerlimits((-3, 4))}} sets the pre-2007 default in which scientific notation is used for numbers less than 1e-3 or greater than 1e4. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_scientific}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter.set\_scientific}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_scientific() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_scientific()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_scientific}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_scientific}}}{\emph{self}, \emph{b}}{} Turn scientific notation on or off. \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_powerlimits}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter.set\_powerlimits}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{set\_useLocale() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_useLocale()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_useLocale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_useLocale}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{set\_useMathText() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_useMathText()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_useMathText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_useMathText}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{set\_useOffset() (matplotlib.ticker.ScalarFormatter method)@\spxentry{set\_useOffset()}\spxextra{matplotlib.ticker.ScalarFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.set_useOffset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_useOffset}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{useLocale (matplotlib.ticker.ScalarFormatter attribute)@\spxentry{useLocale}\spxextra{matplotlib.ticker.ScalarFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.useLocale}}\pysigline{\sphinxbfcode{\sphinxupquote{useLocale}}}~ \end{fulllineitems} \index{useMathText (matplotlib.ticker.ScalarFormatter attribute)@\spxentry{useMathText}\spxextra{matplotlib.ticker.ScalarFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.useMathText}}\pysigline{\sphinxbfcode{\sphinxupquote{useMathText}}}~ \end{fulllineitems} \index{useOffset (matplotlib.ticker.ScalarFormatter attribute)@\spxentry{useOffset}\spxextra{matplotlib.ticker.ScalarFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter.useOffset}}\pysigline{\sphinxbfcode{\sphinxupquote{useOffset}}}~ \end{fulllineitems} \end{fulllineitems} \index{LogFormatter (class in matplotlib.ticker)@\spxentry{LogFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogFormatter}}}{\emph{base=10.0}, \emph{labelOnlyBase=False}, \emph{minor\_thresholds=None}, \emph{linthresh=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Base class for formatting ticks on a log or symlog scale. It may be instantiated directly, or subclassed. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{base}}] \leavevmode{[}float, optional, default: 10.{]} Base of the logarithm used in all calculations. \item[{\sphinxstylestrong{labelOnlyBase}}] \leavevmode{[}bool, optional, default: False{]} If True, label ticks only at integer powers of base. This is normally True for major ticks and False for minor ticks. \item[{\sphinxstylestrong{minor\_thresholds}}] \leavevmode{[}(subset, all), optional, default: (1, 0.4){]} If labelOnlyBase is False, these two numbers control the labeling of ticks that are not at integer powers of base; normally these are the minor ticks. The controlling parameter is the log of the axis data range. In the typical case where base is 10 it is the number of decades spanned by the axis, so we can call it 'numdec'. If \sphinxcode{\sphinxupquote{numdec \textless{}= all}}, all minor ticks will be labeled. If \sphinxcode{\sphinxupquote{all \textless{} numdec \textless{}= subset}}, then only a subset of minor ticks will be labeled, so as to avoid crowding. If \sphinxcode{\sphinxupquote{numdec \textgreater{} subset}} then no minor ticks will be labeled. \item[{\sphinxstylestrong{linthresh}}] \leavevmode{[}None or float, optional, default: None{]} If a symmetric log scale is in use, its \sphinxcode{\sphinxupquote{linthresh}} parameter must be supplied here. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.set_locs}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_locs}}}}} method must be called to enable the subsetting logic controlled by the \sphinxcode{\sphinxupquote{minor\_thresholds}} parameter. In some cases such as the colorbar, there is no distinction between major and minor ticks; the tick locations might be set manually, or by a locator that puts ticks at integer powers of base and at intermediate locations. For this situation, disable the minor\_thresholds logic by using \sphinxcode{\sphinxupquote{minor\_thresholds=(np.inf, np.inf)}}, so that all ticks will be labeled. To disable labeling of minor ticks when 'labelOnlyBase' is False, use \sphinxcode{\sphinxupquote{minor\_thresholds=(0, 0)}}. This is the default for the "classic" style. \subsubsection*{Examples} To label a subset of minor ticks when the view limits span up to 2 decades, and all of the ticks when zoomed in to 0.5 decades or less, use \sphinxcode{\sphinxupquote{minor\_thresholds=(2, 0.5)}}. To label all minor ticks when the view limits span up to 1.5 decades, use \sphinxcode{\sphinxupquote{minor\_thresholds=(1.5, 1.5)}}. \index{base() (matplotlib.ticker.LogFormatter method)@\spxentry{base()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.base}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{base}}}{\emph{self}, \emph{base}}{} Change the \sphinxstyleemphasis{base} for labeling. \begin{sphinxadmonition}{warning}{Warning:} Should always match the base used for {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LogLocator}}}}} \end{sphinxadmonition} \end{fulllineitems} \index{format\_data() (matplotlib.ticker.LogFormatter method)@\spxentry{format\_data()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.format_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data}}}{\emph{self}, \emph{value}}{} Returns the full string representation of the value with the position unspecified. \end{fulllineitems} \index{format\_data\_short() (matplotlib.ticker.LogFormatter method)@\spxentry{format\_data\_short()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.format_data_short}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data\_short}}}{\emph{self}, \emph{value}}{} Return a short formatted string representation of a number. \end{fulllineitems} \index{label\_minor() (matplotlib.ticker.LogFormatter method)@\spxentry{label\_minor()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.label_minor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{label\_minor}}}{\emph{self}, \emph{labelOnlyBase}}{} Switch minor tick labeling on or off. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labelOnlyBase}}] \leavevmode{[}bool{]} If True, label ticks only at integer powers of base. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{pprint\_val() (matplotlib.ticker.LogFormatter method)@\spxentry{pprint\_val()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.pprint_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pprint\_val}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{set\_locs() (matplotlib.ticker.LogFormatter method)@\spxentry{set\_locs()}\spxextra{matplotlib.ticker.LogFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter.set_locs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locs}}}{\emph{self}, \emph{locs=None}}{} Use axis view limits to control which ticks are labeled. The \sphinxstyleemphasis{locs} parameter is ignored in the present algorithm. \end{fulllineitems} \end{fulllineitems} \index{LogFormatterExponent (class in matplotlib.ticker)@\spxentry{LogFormatterExponent}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterExponent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogFormatterExponent}}}{\emph{base=10.0}, \emph{labelOnlyBase=False}, \emph{minor\_thresholds=None}, \emph{linthresh=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.LogFormatter}}}}} Format values for log axis using \sphinxcode{\sphinxupquote{exponent = log\_base(value)}}. \end{fulllineitems} \index{LogFormatterMathtext (class in matplotlib.ticker)@\spxentry{LogFormatterMathtext}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterMathtext}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogFormatterMathtext}}}{\emph{base=10.0}, \emph{labelOnlyBase=False}, \emph{minor\_thresholds=None}, \emph{linthresh=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.LogFormatter}}}}} Format values for log axis using \sphinxcode{\sphinxupquote{exponent = log\_base(value)}}. \end{fulllineitems} \index{IndexFormatter (class in matplotlib.ticker)@\spxentry{IndexFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.IndexFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{IndexFormatter}}}{\emph{labels}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Format the position x to the nearest i-th label where \sphinxcode{\sphinxupquote{i = int(x + 0.5)}}. Positions where \sphinxcode{\sphinxupquote{i \textless{} 0}} or \sphinxcode{\sphinxupquote{i \textgreater{} len(list)}} have no tick labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list{]} List of labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{LogFormatterSciNotation (class in matplotlib.ticker)@\spxentry{LogFormatterSciNotation}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterSciNotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogFormatterSciNotation}}}{\emph{base=10.0}, \emph{labelOnlyBase=False}, \emph{minor\_thresholds=None}, \emph{linthresh=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.LogFormatterMathtext}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.LogFormatterMathtext}}}}} Format values following scientific notation in a logarithmic axis. \end{fulllineitems} \index{LogitFormatter (class in matplotlib.ticker)@\spxentry{LogitFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitFormatter}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogitFormatter}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Probability formatter (using Math text). \index{format\_data\_short() (matplotlib.ticker.LogitFormatter method)@\spxentry{format\_data\_short()}\spxextra{matplotlib.ticker.LogitFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitFormatter.format_data_short}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_data\_short}}}{\emph{self}, \emph{value}}{} return a short formatted string representation of a number \end{fulllineitems} \end{fulllineitems} \index{EngFormatter (class in matplotlib.ticker)@\spxentry{EngFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{EngFormatter}}}{\emph{unit=''}, \emph{places=None}, \emph{sep=' '}, \emph{*}, \emph{usetex=None}, \emph{useMathText=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Formats axis values using engineering prefixes to represent powers of 1000, plus a specified unit, e.g., 10 MHz instead of 1e7. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{unit}}] \leavevmode{[}str (default: ""){]} Unit symbol to use, suitable for use with single-letter representations of powers of 1000. For example, 'Hz' or 'm'. \item[{\sphinxstylestrong{places}}] \leavevmode{[}int (default: None){]} Precision with which to display the number, specified in digits after the decimal point (there will be between one and three digits before the decimal point). If it is None, the formatting falls back to the floating point format '\%g', which displays up to 6 \sphinxstyleemphasis{significant} digits, i.e. the equivalent value for \sphinxstyleemphasis{places} varies between 0 and 5 (inclusive). \item[{\sphinxstylestrong{sep}}] \leavevmode{[}str (default: " "){]} Separator used between the value and the prefix/unit. For example, one get '3.14 mV' if \sphinxcode{\sphinxupquote{sep}} is " " (default) and '3.14mV' if \sphinxcode{\sphinxupquote{sep}} is "". Besides the default behavior, some other useful options may be: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{sep=""}} to append directly the prefix/unit to the value; \item {} \sphinxcode{\sphinxupquote{sep="\textbackslash{}N\{THIN SPACE\}"}} (\sphinxcode{\sphinxupquote{U+2009}}); \item {} \sphinxcode{\sphinxupquote{sep="\textbackslash{}N\{NARROW NO-BREAK SPACE\}"}} (\sphinxcode{\sphinxupquote{U+202F}}); \item {} \sphinxcode{\sphinxupquote{sep="\textbackslash{}N\{NO-BREAK SPACE\}"}} (\sphinxcode{\sphinxupquote{U+00A0}}). \end{itemize} \item[{\sphinxstylestrong{usetex}}] \leavevmode{[}bool (default: None){]} To enable/disable the use of TeX's math mode for rendering the numbers in the formatter. \item[{\sphinxstylestrong{useMathText}}] \leavevmode{[}bool (default: None){]} To enable/disable the use mathtext for rendering the numbers in the formatter. \end{description} \end{description}\end{quote} \index{ENG\_PREFIXES (matplotlib.ticker.EngFormatter attribute)@\spxentry{ENG\_PREFIXES}\spxextra{matplotlib.ticker.EngFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.ENG_PREFIXES}}\pysigline{\sphinxbfcode{\sphinxupquote{ENG\_PREFIXES}}\sphinxbfcode{\sphinxupquote{ = \{-24: 'y', -21: 'z', -18: 'a', -15: 'f', -12: 'p', -9: 'n', -6: 'µ', -3: 'm', 0: '', 3: 'k', 6: 'M', 9: 'G', 12: 'T', 15: 'P', 18: 'E', 21: 'Z', 24: 'Y'\}}}} \end{fulllineitems} \index{fix\_minus() (matplotlib.ticker.EngFormatter method)@\spxentry{fix\_minus()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.fix_minus}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fix\_minus}}}{\emph{self}, \emph{s}}{} Replace hyphens with a unicode minus. \end{fulllineitems} \index{format\_eng() (matplotlib.ticker.EngFormatter method)@\spxentry{format\_eng()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.format_eng}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_eng}}}{\emph{self}, \emph{num}}{} Formats a number in engineering notation, appending a letter representing the power of 1000 of the original number. Some examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{format\PYGZus{}eng}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} for self.places = 0} \PYG{g+go}{\PYGZsq{}0\PYGZsq{}} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{format\PYGZus{}eng}\PYG{p}{(}\PYG{l+m+mi}{1000000}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} for self.places = 1} \PYG{g+go}{\PYGZsq{}1.0 M\PYGZsq{}} \end{sphinxVerbatim} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{format\PYGZus{}eng}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZhy{}1e\PYGZhy{}6}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} for self.places = 2} \PYG{g+go}{\PYGZsq{}\PYGZhy{}1.00 µ\PYGZsq{}} \end{sphinxVerbatim} \end{fulllineitems} \index{get\_useMathText() (matplotlib.ticker.EngFormatter method)@\spxentry{get\_useMathText()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.get_useMathText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_useMathText}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_usetex() (matplotlib.ticker.EngFormatter method)@\spxentry{get\_usetex()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.get_usetex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_usetex}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_useMathText() (matplotlib.ticker.EngFormatter method)@\spxentry{set\_useMathText()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.set_useMathText}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_useMathText}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{set\_usetex() (matplotlib.ticker.EngFormatter method)@\spxentry{set\_usetex()}\spxextra{matplotlib.ticker.EngFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.set_usetex}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_usetex}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{useMathText (matplotlib.ticker.EngFormatter attribute)@\spxentry{useMathText}\spxextra{matplotlib.ticker.EngFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.useMathText}}\pysigline{\sphinxbfcode{\sphinxupquote{useMathText}}}~ \end{fulllineitems} \index{usetex (matplotlib.ticker.EngFormatter attribute)@\spxentry{usetex}\spxextra{matplotlib.ticker.EngFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.EngFormatter.usetex}}\pysigline{\sphinxbfcode{\sphinxupquote{usetex}}}~ \end{fulllineitems} \end{fulllineitems} \index{PercentFormatter (class in matplotlib.ticker)@\spxentry{PercentFormatter}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{PercentFormatter}}}{\emph{xmax=100}, \emph{decimals=None}, \emph{symbol='\%'}, \emph{is\_latex=False}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Formatter}}}}} Format numbers as a percentage. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmax}}] \leavevmode{[}float{]} Determines how the number is converted into a percentage. \sphinxstyleemphasis{xmax} is the data value that corresponds to 100\%. Percentages are computed as \sphinxcode{\sphinxupquote{x / xmax * 100}}. So if the data is already scaled to be percentages, \sphinxstyleemphasis{xmax} will be 100. Another common situation is where \sphinxcode{\sphinxupquote{xmax}} is 1.0. \item[{\sphinxstylestrong{decimals}}] \leavevmode{[}None or int{]} The number of decimal places to place after the point. If \sphinxstyleemphasis{None} (the default), the number will be computed automatically. \item[{\sphinxstylestrong{symbol}}] \leavevmode{[}string or None{]} A string that will be appended to the label. It may be \sphinxstyleemphasis{None} or empty to indicate that no symbol should be used. LaTeX special characters are escaped in \sphinxstyleemphasis{symbol} whenever latex mode is enabled, unless \sphinxstyleemphasis{is\_latex} is \sphinxstyleemphasis{True}. \item[{\sphinxstylestrong{is\_latex}}] \leavevmode{[}bool{]} If \sphinxstyleemphasis{False}, reserved LaTeX characters in \sphinxstyleemphasis{symbol} will be escaped. \end{description} \end{description}\end{quote} \index{convert\_to\_pct() (matplotlib.ticker.PercentFormatter method)@\spxentry{convert\_to\_pct()}\spxextra{matplotlib.ticker.PercentFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter.convert_to_pct}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_to\_pct}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \index{format\_pct() (matplotlib.ticker.PercentFormatter method)@\spxentry{format\_pct()}\spxextra{matplotlib.ticker.PercentFormatter method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter.format_pct}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_pct}}}{\emph{self}, \emph{x}, \emph{display\_range}}{} Formats the number as a percentage number with the correct number of decimals and adds the percent symbol, if any. If \sphinxcode{\sphinxupquote{self.decimals}} is \sphinxhref{https://docs.python.org/3/library/constants.html\#None}{\sphinxcode{\sphinxupquote{None}}}, the number of digits after the decimal point is set based on the \sphinxcode{\sphinxupquote{display\_range}} of the axis as follows: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline display\_range & decimals & sample \\ \hline \textgreater{}50 & 0 & \sphinxcode{\sphinxupquote{x = 34.5}} =\textgreater{} 35\% \\ \hline \textgreater{}5 & 1 & \sphinxcode{\sphinxupquote{x = 34.5}} =\textgreater{} 34.5\% \\ \hline \textgreater{}0.5 & 2 & \sphinxcode{\sphinxupquote{x = 34.5}} =\textgreater{} 34.50\% \\ \hline ... & ... & ... \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} This method will not be very good for tiny axis ranges or extremely large ones. It assumes that the values on the chart are percentages displayed on a reasonable scale. \end{fulllineitems} \index{symbol (matplotlib.ticker.PercentFormatter attribute)@\spxentry{symbol}\spxextra{matplotlib.ticker.PercentFormatter attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.PercentFormatter.symbol}}\pysigline{\sphinxbfcode{\sphinxupquote{symbol}}} The configured percent symbol as a string. If LaTeX is enabled via \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"text.usetex"{]}}}}, the special characters \sphinxcode{\sphinxupquote{\{'\#', '\$', '\%', '\&', '\textasciitilde{}', '\_', '\textasciicircum{}', '\textbackslash{}', '\{', '\}'\}}} are automatically escaped in the string. \end{fulllineitems} \end{fulllineitems} \index{Locator (class in matplotlib.ticker)@\spxentry{Locator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{Locator}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.TickHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.TickHelper}}}}} Determine the tick locations; Note that the same locator should not be used across multiple {\hyperref[\detokenize{api/axis_api:matplotlib.axis.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}} because the locator stores references to the Axis data and view limits. \index{MAXTICKS (matplotlib.ticker.Locator attribute)@\spxentry{MAXTICKS}\spxextra{matplotlib.ticker.Locator attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.MAXTICKS}}\pysigline{\sphinxbfcode{\sphinxupquote{MAXTICKS}}\sphinxbfcode{\sphinxupquote{ = 1000}}} \end{fulllineitems} \index{autoscale() (matplotlib.ticker.Locator method)@\spxentry{autoscale()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}}{} autoscale the view limits \end{fulllineitems} \index{nonsingular() (matplotlib.ticker.Locator method)@\spxentry{nonsingular()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.nonsingular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{self}, \emph{v0}, \emph{v1}}{} Modify the endpoints of a range as needed to avoid singularities. \end{fulllineitems} \index{pan() (matplotlib.ticker.Locator method)@\spxentry{pan()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pan}}}{\emph{self}, \emph{numsteps}}{} Pan numticks (can be positive or negative) \end{fulllineitems} \index{raise\_if\_exceeds() (matplotlib.ticker.Locator method)@\spxentry{raise\_if\_exceeds()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.raise_if_exceeds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{raise\_if\_exceeds}}}{\emph{self}, \emph{locs}}{} raise a RuntimeError if Locator attempts to create more than MAXTICKS locs \end{fulllineitems} \index{refresh() (matplotlib.ticker.Locator method)@\spxentry{refresh()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.refresh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refresh}}}{\emph{self}}{} refresh internal information based on current lim \end{fulllineitems} \index{set\_params() (matplotlib.ticker.Locator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{**kwargs}}{} Do nothing, and raise a warning. Any locator class not supporting the set\_params() function will call this. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.Locator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.Locator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \index{zoom() (matplotlib.ticker.Locator method)@\spxentry{zoom()}\spxextra{matplotlib.ticker.Locator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.Locator.zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zoom}}}{\emph{self}, \emph{direction}}{} Zoom in/out on axis; if direction is \textgreater{}0 zoom in, else zoom out \end{fulllineitems} \end{fulllineitems} \index{IndexLocator (class in matplotlib.ticker)@\spxentry{IndexLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.IndexLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{IndexLocator}}}{\emph{base}, \emph{offset}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Place a tick on every multiple of some base number of points plotted, e.g., on every 5th point. It is assumed that you are doing index plotting; i.e., the axis is 0, len(data). This is mainly useful for x ticks. place ticks on the i-th data points where (i-offset)\%base==0 \index{set\_params() (matplotlib.ticker.IndexLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.IndexLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.IndexLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{base=None}, \emph{offset=None}}{} Set parameters within this locator \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.IndexLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.IndexLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.IndexLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{FixedLocator (class in matplotlib.ticker)@\spxentry{FixedLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{FixedLocator}}}{\emph{locs}, \emph{nbins=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Tick locations are fixed. If nbins is not None, the array of possible positions will be subsampled to keep the number of ticks \textless{}= nbins +1. The subsampling will be done so as to include the smallest absolute value; for example, if zero is included in the array of possibilities, then it is guaranteed to be one of the chosen ticks. \index{set\_params() (matplotlib.ticker.FixedLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.FixedLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{nbins=None}}{} Set parameters within this locator. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.FixedLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.FixedLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.FixedLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} " Return the locations of the ticks. \begin{sphinxadmonition}{note}{Note:} Because the values are fixed, vmin and vmax are not used in this method. \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{NullLocator (class in matplotlib.ticker)@\spxentry{NullLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.NullLocator}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{NullLocator}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} No ticks \index{tick\_values() (matplotlib.ticker.NullLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.NullLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.NullLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} " Return the locations of the ticks. \begin{sphinxadmonition}{note}{Note:} Because the values are Null, vmin and vmax are not used in this method. \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{LinearLocator (class in matplotlib.ticker)@\spxentry{LinearLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LinearLocator}}}{\emph{numticks=None}, \emph{presets=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Determine the tick locations The first time this function is called it will try to set the number of ticks to make a nice tick partitioning. Thereafter the number of ticks will be fixed so that interactive navigation will be nice Use presets to set locs based on lom. A dict mapping vmin, vmax-\textgreater{}locs \index{set\_params() (matplotlib.ticker.LinearLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.LinearLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{numticks=None}, \emph{presets=None}}{} Set parameters within this locator. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.LinearLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.LinearLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.LinearLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.LinearLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LinearLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Try to choose the view limits intelligently \end{fulllineitems} \end{fulllineitems} \index{LogLocator (class in matplotlib.ticker)@\spxentry{LogLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogLocator}}}{\emph{base=10.0}, \emph{subs=(1.0}, \emph{)}, \emph{numdecs=4}, \emph{numticks=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Determine the tick locations for log axes Place ticks on the locations : subs{[}j{]} * base**i \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{subs}}] \leavevmode{[}None, string, or sequence of float, optional, default (1.0,){]} Gives the multiples of integer powers of the base at which to place ticks. The default places ticks only at integer powers of the base. The permitted string values are \sphinxcode{\sphinxupquote{'auto'}} and \sphinxcode{\sphinxupquote{'all'}}, both of which use an algorithm based on the axis view limits to determine whether and how to put ticks between integer powers of the base. With \sphinxcode{\sphinxupquote{'auto'}}, ticks are placed only between integer powers; with \sphinxcode{\sphinxupquote{'all'}}, the integer powers are included. A value of None is equivalent to \sphinxcode{\sphinxupquote{'auto'}}. \end{description} \end{description}\end{quote} \index{base() (matplotlib.ticker.LogLocator method)@\spxentry{base()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.base}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{base}}}{\emph{self}, \emph{base}}{} set the base of the log scaling (major tick every base**i, i integer) \end{fulllineitems} \index{nonsingular() (matplotlib.ticker.LogLocator method)@\spxentry{nonsingular()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.nonsingular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Modify the endpoints of a range as needed to avoid singularities. \end{fulllineitems} \index{set\_params() (matplotlib.ticker.LogLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{base=None}, \emph{subs=None}, \emph{numdecs=None}, \emph{numticks=None}}{} Set parameters within this locator. \end{fulllineitems} \index{subs() (matplotlib.ticker.LogLocator method)@\spxentry{subs()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.subs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{subs}}}{\emph{self}, \emph{subs}}{} set the minor ticks for the log scaling every base**i*subs{[}j{]} \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.LogLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.LogLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.LogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Try to choose the view limits intelligently \end{fulllineitems} \end{fulllineitems} \index{AutoLocator (class in matplotlib.ticker)@\spxentry{AutoLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.AutoLocator}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{AutoLocator}}} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} Dynamically find major tick positions. This is actually a subclass of {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}, with parameters \sphinxstyleemphasis{nbins = 'auto'} and \sphinxstyleemphasis{steps = {[}1, 2, 2.5, 5, 10{]}}. To know the values of the non-public parameters, please have a look to the defaults of {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}. \end{fulllineitems} \index{MultipleLocator (class in matplotlib.ticker)@\spxentry{MultipleLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{MultipleLocator}}}{\emph{base=1.0}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Set a tick on each integer multiple of a base within the view interval. \index{set\_params() (matplotlib.ticker.MultipleLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.MultipleLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{base}}{} Set parameters within this locator. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.MultipleLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.MultipleLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.MultipleLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.MultipleLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MultipleLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{dmin}, \emph{dmax}}{} Set the view limits to the nearest multiples of base that contain the data. \end{fulllineitems} \end{fulllineitems} \index{MaxNLocator (class in matplotlib.ticker)@\spxentry{MaxNLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{MaxNLocator}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Select no more than N intervals at nice locations. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nbins}}] \leavevmode{[}int or 'auto', optional, default: 10{]} Maximum number of intervals; one less than max number of ticks. If the string \sphinxcode{\sphinxupquote{'auto'}}, the number of bins will be automatically determined based on the length of the axis. \item[{\sphinxstylestrong{steps}}] \leavevmode{[}array-like, optional{]} Sequence of nice numbers starting with 1 and ending with 10; e.g., {[}1, 2, 4, 5, 10{]}, where the values are acceptable tick multiples. i.e. for the example, 20, 40, 60 would be an acceptable set of ticks, as would 0.4, 0.6, 0.8, because they are multiples of 2. However, 30, 60, 90 would not be allowed because 3 does not appear in the list of steps. \item[{\sphinxstylestrong{integer}}] \leavevmode{[}bool, optional, default: False{]} If True, ticks will take only integer values, provided at least \sphinxcode{\sphinxupquote{min\_n\_ticks}} integers are found within the view limits. \item[{\sphinxstylestrong{symmetric}}] \leavevmode{[}bool, optional, default: False{]} If True, autoscaling will result in a range symmetric about zero. \item[{\sphinxstylestrong{prune}}] \leavevmode{[}\{'lower', 'upper', 'both', None\}, optional, default: None{]} Remove edge ticks -- useful for stacked or ganged plots where the upper tick of one axes overlaps with the lower tick of the axes above it, primarily when \sphinxcode{\sphinxupquote{\sphinxhref{../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"axes.autolimit\_mode"{]}}}} is \sphinxcode{\sphinxupquote{'round\_numbers'}}. If \sphinxcode{\sphinxupquote{prune=='lower'}}, the smallest tick will be removed. If \sphinxcode{\sphinxupquote{prune == 'upper'}}, the largest tick will be removed. If \sphinxcode{\sphinxupquote{prune == 'both'}}, the largest and smallest ticks will be removed. If \sphinxcode{\sphinxupquote{prune == None}}, no ticks will be removed. \item[{\sphinxstylestrong{min\_n\_ticks}}] \leavevmode{[}int, optional, default: 2{]} Relax \sphinxstyleemphasis{nbins} and \sphinxstyleemphasis{integer} constraints if necessary to obtain this minimum number of ticks. \end{description} \end{description}\end{quote} \index{default\_params (matplotlib.ticker.MaxNLocator attribute)@\spxentry{default\_params}\spxextra{matplotlib.ticker.MaxNLocator attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.default_params}}\pysigline{\sphinxbfcode{\sphinxupquote{default\_params}}\sphinxbfcode{\sphinxupquote{ = \{'integer': False, 'min\_n\_ticks': 2, 'nbins': 10, 'prune': None, 'steps': None, 'symmetric': False\}}}} \end{fulllineitems} \index{set\_params() (matplotlib.ticker.MaxNLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.MaxNLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{**kwargs}}{} Set parameters for this locator. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nbins}}] \leavevmode{[}int or 'auto', optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \item[{\sphinxstylestrong{steps}}] \leavevmode{[}array-like, optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \item[{\sphinxstylestrong{integer}}] \leavevmode{[}bool, optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \item[{\sphinxstylestrong{symmetric}}] \leavevmode{[}bool, optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \item[{\sphinxstylestrong{prune}}] \leavevmode{[}\{'lower', 'upper', 'both', None\}, optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \item[{\sphinxstylestrong{min\_n\_ticks}}] \leavevmode{[}int, optional{]} see {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.MaxNLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.MaxNLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.MaxNLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.MaxNLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{dmin}, \emph{dmax}}{} Select a scale for the range from vmin to vmax. Subclasses should override this method to change locator behaviour. \end{fulllineitems} \end{fulllineitems} \index{AutoMinorLocator (class in matplotlib.ticker)@\spxentry{AutoMinorLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.AutoMinorLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{AutoMinorLocator}}}{\emph{n=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Dynamically find minor tick positions based on the positions of major ticks. The scale must be linear with major ticks evenly spaced. \sphinxstyleemphasis{n} is the number of subdivisions of the interval between major ticks; e.g., n=2 will place a single minor tick midway between major ticks. If \sphinxstyleemphasis{n} is omitted or None, it will be set to 5 or 4. \index{tick\_values() (matplotlib.ticker.AutoMinorLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.AutoMinorLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.AutoMinorLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \index{SymmetricalLogLocator (class in matplotlib.ticker)@\spxentry{SymmetricalLogLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.SymmetricalLogLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{SymmetricalLogLocator}}}{\emph{transform=None}, \emph{subs=None}, \emph{linthresh=None}, \emph{base=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Determine the tick locations for symmetric log axes place ticks on the location= base**i*subs{[}j{]} \index{set\_params() (matplotlib.ticker.SymmetricalLogLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.SymmetricalLogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.SymmetricalLogLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{subs=None}, \emph{numticks=None}}{} Set parameters within this locator. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.SymmetricalLogLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.SymmetricalLogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.SymmetricalLogLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \index{view\_limits() (matplotlib.ticker.SymmetricalLogLocator method)@\spxentry{view\_limits()}\spxextra{matplotlib.ticker.SymmetricalLogLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.SymmetricalLogLocator.view_limits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_limits}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Try to choose the view limits intelligently \end{fulllineitems} \end{fulllineitems} \index{LogitLocator (class in matplotlib.ticker)@\spxentry{LogitLocator}\spxextra{class in matplotlib.ticker}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.ticker.}}\sphinxbfcode{\sphinxupquote{LogitLocator}}}{\emph{minor=False}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.Locator}}}}} Determine the tick locations for logit axes place ticks on the logit locations \index{nonsingular() (matplotlib.ticker.LogitLocator method)@\spxentry{nonsingular()}\spxextra{matplotlib.ticker.LogitLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitLocator.nonsingular}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Modify the endpoints of a range as needed to avoid singularities. \end{fulllineitems} \index{set\_params() (matplotlib.ticker.LogitLocator method)@\spxentry{set\_params()}\spxextra{matplotlib.ticker.LogitLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitLocator.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{minor=None}}{} Set parameters within this locator. \end{fulllineitems} \index{tick\_values() (matplotlib.ticker.LogitLocator method)@\spxentry{tick\_values()}\spxextra{matplotlib.ticker.LogitLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/ticker_api:matplotlib.ticker.LogitLocator.tick_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_values}}}{\emph{self}, \emph{vmin}, \emph{vmax}}{} Return the values of the located ticks given \sphinxstylestrong{vmin} and \sphinxstylestrong{vmax}. \begin{sphinxadmonition}{note}{Note:} To get tick locations with the vmin and vmax values defined automatically for the associated \sphinxcode{\sphinxupquote{axis}} simply call the Locator instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{\PYGZlt{}type \PYGZsq{}Locator\PYGZsq{}\PYGZgt{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{loc}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)} \PYG{g+go}{[1, 2, 3, 4]} \end{sphinxVerbatim} \end{sphinxadmonition} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.tight\_layout}}} \label{\detokenize{api/tight_layout_api:module-matplotlib.tight_layout}}\label{\detokenize{api/tight_layout_api:matplotlib-tight-layout}}\label{\detokenize{api/tight_layout_api::doc}}\index{matplotlib.tight\_layout (module)@\spxentry{matplotlib.tight\_layout}\spxextra{module}} This module provides routines to adjust subplot params so that subplots are nicely fit in the figure. In doing so, only axis labels, tick labels, axes titles and offsetboxes that are anchored to axes are currently considered. Internally, it assumes that the margins (left\_margin, etc.) which are differences between ax.get\_tightbbox and ax.bbox are independent of axes position. This may fail if Axes.adjustable is datalim. Also, This will fail for some cases (for example, left or right margin is affected by xlabel). \index{auto\_adjust\_subplotpars() (in module matplotlib.tight\_layout)@\spxentry{auto\_adjust\_subplotpars()}\spxextra{in module matplotlib.tight\_layout}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tight_layout_api:matplotlib.tight_layout.auto_adjust_subplotpars}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.tight\_layout.}}\sphinxbfcode{\sphinxupquote{auto\_adjust\_subplotpars}}}{\emph{fig}, \emph{renderer}, \emph{nrows\_ncols}, \emph{num1num2\_list}, \emph{subplot\_list}, \emph{ax\_bbox\_list=None}, \emph{pad=1.08}, \emph{h\_pad=None}, \emph{w\_pad=None}, \emph{rect=None}}{} Return a dict of subplot parameters to adjust spacing between subplots or \sphinxcode{\sphinxupquote{None}} if resulting axes would have zero height or width. Note that this function ignores geometry information of subplot itself, but uses what is given by the \sphinxstyleemphasis{nrows\_ncols} and \sphinxstyleemphasis{num1num2\_list} parameters. Also, the results could be incorrect if some subplots have \sphinxcode{\sphinxupquote{adjustable=datalim}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nrows\_ncols}}] \leavevmode{[}Tuple{[}int, int{]}{]} Number of rows and number of columns of the grid. \item[{\sphinxstylestrong{num1num2\_list}}] \leavevmode{[}List{[}int{]}{]} List of numbers specifying the area occupied by the subplot \item[{\sphinxstylestrong{subplot\_list}}] \leavevmode{[}list of subplots{]} List of subplots that will be used to calculate optimal subplot\_params. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Padding between the figure edge and the edges of subplots, as a fraction of the font size. \item[{\sphinxstylestrong{h\_pad, w\_pad}}] \leavevmode{[}float{]} Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to \sphinxstyleemphasis{pad}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}Tuple{[}float, float, float, float{]}{]} {[}left, bottom, right, top{]} in normalized (0, 1) figure coordinates. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_renderer() (in module matplotlib.tight\_layout)@\spxentry{get\_renderer()}\spxextra{in module matplotlib.tight\_layout}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tight_layout_api:matplotlib.tight_layout.get_renderer}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.tight\_layout.}}\sphinxbfcode{\sphinxupquote{get\_renderer}}}{\emph{fig}}{}~ \end{fulllineitems} \index{get\_subplotspec\_list() (in module matplotlib.tight\_layout)@\spxentry{get\_subplotspec\_list()}\spxextra{in module matplotlib.tight\_layout}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tight_layout_api:matplotlib.tight_layout.get_subplotspec_list}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.tight\_layout.}}\sphinxbfcode{\sphinxupquote{get\_subplotspec\_list}}}{\emph{axes\_list}, \emph{grid\_spec=None}}{} Return a list of subplotspec from the given list of axes. For an instance of axes that does not support subplotspec, None is inserted in the list. If grid\_spec is given, None is inserted for those not from the given grid\_spec. \end{fulllineitems} \index{get\_tight\_layout\_figure() (in module matplotlib.tight\_layout)@\spxentry{get\_tight\_layout\_figure()}\spxextra{in module matplotlib.tight\_layout}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tight_layout_api:matplotlib.tight_layout.get_tight_layout_figure}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.tight\_layout.}}\sphinxbfcode{\sphinxupquote{get\_tight\_layout\_figure}}}{\emph{fig}, \emph{axes\_list}, \emph{subplotspec\_list}, \emph{renderer}, \emph{pad=1.08}, \emph{h\_pad=None}, \emph{w\_pad=None}, \emph{rect=None}}{} Return subplot parameters for tight-layouted-figure with specified padding. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}Figure{]} \item[{\sphinxstylestrong{axes\_list}}] \leavevmode{[}list of Axes{]} \item[{\sphinxstylestrong{subplotspec\_list}}] \leavevmode{[}list of {\hyperref[\detokenize{api/_as_gen/matplotlib.gridspec.SubplotSpec:matplotlib.gridspec.SubplotSpec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotSpec}}}}}{]} The subplotspecs of each axes. \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}renderer{]} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} Padding between the figure edge and the edges of subplots, as a fraction of the font size. \item[{\sphinxstylestrong{h\_pad, w\_pad}}] \leavevmode{[}float{]} Padding (height/width) between edges of adjacent subplots. Defaults to \sphinxstyleemphasis{pad\_inches}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}Tuple{[}float, float, float, float{]}, optional{]} (left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Defaults to using the entire figure. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{subplotspec or None}] \leavevmode subplotspec kwargs to be passed to {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.subplots_adjust}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure.subplots\_adjust}}}}} or None if tight\_layout could not be accomplished. \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.transforms}}} \label{\detokenize{api/transformations:matplotlib-transforms}}\label{\detokenize{api/transformations::doc}} \sphinxincludegraphics[]{inheritance-b12c31436c04593cda1514d7dc55ca653c06932e.pdf} \phantomsection\label{\detokenize{api/transformations:module-matplotlib.transforms}}\index{matplotlib.transforms (module)@\spxentry{matplotlib.transforms}\spxextra{module}} matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}} objects whose actual value depends on their children. When the contents of children change, their parents are automatically invalidated. The next time an invalidated transform is accessed, it is recomputed to reflect those changes. This invalidation/caching approach prevents unnecessary recomputations of transforms, and contributes to better interactive performance. For example, here is a graph of the transform tree used to plot data to the graph: \noindent\sphinxincludegraphics{{transforms}.png} The framework can be used for both affine and non-affine transformations. However, for speed, we want use the backend renderers to perform affine transformations whenever possible. Therefore, it is possible to perform just the affine or non-affine part of a transformation on a set of data. The affine is always assumed to occur after the non-affine. For any transform: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{full} \PYG{n}{transform} \PYG{o}{==} \PYG{n}{non}\PYG{o}{\PYGZhy{}}\PYG{n}{affine} \PYG{n}{part} \PYG{o}{+} \PYG{n}{affine} \PYG{n}{part} \end{sphinxVerbatim} The backends are not expected to handle non-affine transformations themselves. \index{Affine2D (class in matplotlib.transforms)@\spxentry{Affine2D}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{Affine2D}}}{\emph{matrix=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} A mutable 2D affine transformation. Initialize an Affine transform from a 3x3 numpy float array: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} If \sphinxstyleemphasis{matrix} is None, initialize with the identity transform. \index{clear() (matplotlib.transforms.Affine2D method)@\spxentry{clear()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}}{} Reset the underlying matrix to the identity transform. \end{fulllineitems} \index{from\_values() (matplotlib.transforms.Affine2D static method)@\spxentry{from\_values()}\spxextra{matplotlib.transforms.Affine2D static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.from_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{from\_values}}}{\emph{a}, \emph{b}, \emph{c}, \emph{d}, \emph{e}, \emph{f}}{} (staticmethod) Create a new Affine2D instance from the given values: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} . \end{fulllineitems} \index{get\_matrix() (matplotlib.transforms.Affine2D method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the underlying transformation matrix as a 3x3 numpy array: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} . \end{fulllineitems} \index{identity() (matplotlib.transforms.Affine2D static method)@\spxentry{identity()}\spxextra{matplotlib.transforms.Affine2D static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.identity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{identity}}}{}{} (staticmethod) Return a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}} object that is the identity transform. Unless this transform will be mutated later on, consider using the faster {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{IdentityTransform}}}}} class instead. \end{fulllineitems} \index{rotate() (matplotlib.transforms.Affine2D method)@\spxentry{rotate()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rotate}}}{\emph{self}, \emph{theta}}{} Add a rotation (in radians) to this transform in place. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{rotate\_around() (matplotlib.transforms.Affine2D method)@\spxentry{rotate\_around()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_around}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rotate\_around}}}{\emph{self}, \emph{x}, \emph{y}, \emph{theta}}{} Add a rotation (in radians) around the point (x, y) in place. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{rotate\_deg() (matplotlib.transforms.Affine2D method)@\spxentry{rotate\_deg()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rotate\_deg}}}{\emph{self}, \emph{degrees}}{} Add a rotation (in degrees) to this transform in place. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{rotate\_deg\_around() (matplotlib.transforms.Affine2D method)@\spxentry{rotate\_deg\_around()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg_around}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rotate\_deg\_around}}}{\emph{self}, \emph{x}, \emph{y}, \emph{degrees}}{} Add a rotation (in degrees) around the point (x, y) in place. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{scale() (matplotlib.transforms.Affine2D method)@\spxentry{scale()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scale}}}{\emph{self}, \emph{sx}, \emph{sy=None}}{} Adds a scale in place. If \sphinxstyleemphasis{sy} is None, the same scale is applied in both the \sphinxstyleemphasis{x}- and \sphinxstyleemphasis{y}-directions. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{set() (matplotlib.transforms.Affine2D method)@\spxentry{set()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{other}}{} Set this transformation from the frozen copy of another {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}} object. \end{fulllineitems} \index{set\_matrix() (matplotlib.transforms.Affine2D method)@\spxentry{set\_matrix()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.set_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_matrix}}}{\emph{self}, \emph{mtx}}{} Set the underlying transformation matrix from a 3x3 numpy array: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} . \end{fulllineitems} \index{skew() (matplotlib.transforms.Affine2D method)@\spxentry{skew()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.skew}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{skew}}}{\emph{self}, \emph{xShear}, \emph{yShear}}{} Adds a skew in place. \sphinxstyleemphasis{xShear} and \sphinxstyleemphasis{yShear} are the shear angles along the \sphinxstyleemphasis{x}- and \sphinxstyleemphasis{y}-axes, respectively, in radians. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{skew\_deg() (matplotlib.transforms.Affine2D method)@\spxentry{skew\_deg()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.skew_deg}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{skew\_deg}}}{\emph{self}, \emph{xShear}, \emph{yShear}}{} Adds a skew in place. \sphinxstyleemphasis{xShear} and \sphinxstyleemphasis{yShear} are the shear angles along the \sphinxstyleemphasis{x}- and \sphinxstyleemphasis{y}-axes, respectively, in degrees. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \index{translate() (matplotlib.transforms.Affine2D method)@\spxentry{translate()}\spxextra{matplotlib.transforms.Affine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{translate}}}{\emph{self}, \emph{tx}, \emph{ty}}{} Adds a translation in place. Returns \sphinxstyleemphasis{self}, so this method can easily be chained with more calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.rotate_deg}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rotate\_deg()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.translate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{translate()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale()}}}}}. \end{fulllineitems} \end{fulllineitems} \index{Affine2DBase (class in matplotlib.transforms)@\spxentry{Affine2DBase}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{Affine2DBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.AffineBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.AffineBase}}}}} The base class of all 2D affine transformations. 2D affine transformations are performed using a 3x3 numpy array: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} This class provides the read-only interface. For a mutable 2D affine transformation, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}}. Subclasses of this class will generally only need to override a constructor and \sphinxcode{\sphinxupquote{get\_matrix()}} that generates a custom 3x3 matrix. \index{frozen() (matplotlib.transforms.Affine2DBase method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.Affine2DBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{has\_inverse (matplotlib.transforms.Affine2DBase attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.transforms.Affine2DBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{input\_dims (matplotlib.transforms.Affine2DBase attribute)@\spxentry{input\_dims}\spxextra{matplotlib.transforms.Affine2DBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.transforms.Affine2DBase method)@\spxentry{inverted()}\spxextra{matplotlib.transforms.Affine2DBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.transforms.Affine2DBase attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.Affine2DBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}} bool(x) -\textgreater{} bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. \end{fulllineitems} \index{matrix\_from\_values() (matplotlib.transforms.Affine2DBase static method)@\spxentry{matrix\_from\_values()}\spxextra{matplotlib.transforms.Affine2DBase static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.matrix_from_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{matrix\_from\_values}}}{\emph{a}, \emph{b}, \emph{c}, \emph{d}, \emph{e}, \emph{f}}{} (staticmethod) Create a new transformation matrix as a 3x3 numpy array of the form: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{a} \PYG{n}{c} \PYG{n}{e} \PYG{n}{b} \PYG{n}{d} \PYG{n}{f} \PYG{l+m+mi}{0} \PYG{l+m+mi}{0} \PYG{l+m+mi}{1} \end{sphinxVerbatim} \end{fulllineitems} \index{output\_dims (matplotlib.transforms.Affine2DBase attribute)@\spxentry{output\_dims}\spxextra{matplotlib.transforms.Affine2DBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{to\_values() (matplotlib.transforms.Affine2DBase method)@\spxentry{to\_values()}\spxextra{matplotlib.transforms.Affine2DBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.to_values}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{to\_values}}}{\emph{self}}{} Return the values of the matrix as an \sphinxcode{\sphinxupquote{(a, b, c, d, e, f)}} tuple. \end{fulllineitems} \index{transform\_affine() (matplotlib.transforms.Affine2DBase method)@\spxentry{transform\_affine()}\spxextra{matplotlib.transforms.Affine2DBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.transform_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_affine}}}{\emph{self}, \emph{points}}{} Performs only the affine part of this transformation on the given array of values. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_point() (matplotlib.transforms.Affine2DBase method)@\spxentry{transform\_point()}\spxextra{matplotlib.transforms.Affine2DBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.transform_point}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_point}}}{\emph{self}, \emph{point}}{} A convenience function that returns the transformed copy of a single point. The point is given as a sequence of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}. The transformed point is returned as a sequence of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{AffineBase (class in matplotlib.transforms)@\spxentry{AffineBase}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{AffineBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} The base class of all affine transformations of any number of dimensions. \index{get\_affine() (matplotlib.transforms.AffineBase method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{} Get the affine part of this transform. \end{fulllineitems} \index{is\_affine (matplotlib.transforms.AffineBase attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.AffineBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{transform() (matplotlib.transforms.AffineBase method)@\spxentry{transform()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform}}}{\emph{self}, \emph{values}}{} Performs the transformation on the given array of values. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_affine() (matplotlib.transforms.AffineBase method)@\spxentry{transform\_affine()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_affine}}}{\emph{self}, \emph{values}}{} Performs only the affine part of this transformation on the given array of values. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.transforms.AffineBase method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{points}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_path() (matplotlib.transforms.AffineBase method)@\spxentry{transform\_path()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path}}}{\emph{self}, \emph{path}}{} Returns a transformed path. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. In some cases, this transform may insert curves into the path that began as line segments. \end{fulllineitems} \index{transform\_path\_affine() (matplotlib.transforms.AffineBase method)@\spxentry{transform\_path\_affine()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform_path_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.transforms.AffineBase method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.transforms.AffineBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.AffineBase.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \end{fulllineitems} \index{Bbox (class in matplotlib.transforms)@\spxentry{Bbox}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{Bbox}}}{\emph{points}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxBase}}}}} A mutable bounding box. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{points}}] \leavevmode{[}ndarray{]} A 2x2 numpy array of the form \sphinxcode{\sphinxupquote{{[}{[}x0, y0{]}, {[}x1, y1{]}{]}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If you need to create a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} object from another form of data, consider the static methods {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.unit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{unit()}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.from_bounds}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{from\_bounds()}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.from_extents}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{from\_extents()}}}}}. \index{bounds (matplotlib.transforms.Bbox attribute)@\spxentry{bounds}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.bounds}}\pysigline{\sphinxbfcode{\sphinxupquote{bounds}}} Return ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}}, \sphinxcode{\sphinxupquote{width}}, \sphinxcode{\sphinxupquote{height}}). \end{fulllineitems} \index{from\_bounds() (matplotlib.transforms.Bbox static method)@\spxentry{from\_bounds()}\spxextra{matplotlib.transforms.Bbox static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.from_bounds}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{from\_bounds}}}{\emph{x0}, \emph{y0}, \emph{width}, \emph{height}}{} (staticmethod) Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} from \sphinxstyleemphasis{x0}, \sphinxstyleemphasis{y0}, \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}. \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height} may be negative. \end{fulllineitems} \index{from\_extents() (matplotlib.transforms.Bbox static method)@\spxentry{from\_extents()}\spxextra{matplotlib.transforms.Bbox static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.from_extents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{from\_extents}}}{\emph{*args}}{} (staticmethod) Create a new Bbox from \sphinxstyleemphasis{left}, \sphinxstyleemphasis{bottom}, \sphinxstyleemphasis{right} and \sphinxstyleemphasis{top}. The \sphinxstyleemphasis{y}-axis increases upwards. \end{fulllineitems} \index{get\_points() (matplotlib.transforms.Bbox method)@\spxentry{get\_points()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.get_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_points}}}{\emph{self}}{} Get the points of the bounding box directly as a numpy array of the form: \sphinxcode{\sphinxupquote{{[}{[}x0, y0{]}, {[}x1, y1{]}{]}}}. \end{fulllineitems} \index{ignore() (matplotlib.transforms.Bbox method)@\spxentry{ignore()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.ignore}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ignore}}}{\emph{self}, \emph{value}}{} Set whether the existing bounds of the box should be ignored by subsequent calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.update_from_data_xy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_from\_data\_xy()}}}}}. \begin{description} \item[{value}] \leavevmode{[}bool{]}\begin{itemize} \item {} When \sphinxcode{\sphinxupquote{True}}, subsequent calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.update_from_data_xy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_from\_data\_xy()}}}}} will ignore the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \item {} When \sphinxcode{\sphinxupquote{False}}, subsequent calls to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.update_from_data_xy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{update\_from\_data\_xy()}}}}} will include the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \end{itemize} \end{description} \end{fulllineitems} \index{intervalx (matplotlib.transforms.Bbox attribute)@\spxentry{intervalx}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.intervalx}}\pysigline{\sphinxbfcode{\sphinxupquote{intervalx}}} The pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be sorted from left to right. \end{fulllineitems} \index{intervaly (matplotlib.transforms.Bbox attribute)@\spxentry{intervaly}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.intervaly}}\pysigline{\sphinxbfcode{\sphinxupquote{intervaly}}} The pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be sorted from bottom to top. \end{fulllineitems} \index{minpos (matplotlib.transforms.Bbox attribute)@\spxentry{minpos}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.minpos}}\pysigline{\sphinxbfcode{\sphinxupquote{minpos}}}~ \end{fulllineitems} \index{minposx (matplotlib.transforms.Bbox attribute)@\spxentry{minposx}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.minposx}}\pysigline{\sphinxbfcode{\sphinxupquote{minposx}}}~ \end{fulllineitems} \index{minposy (matplotlib.transforms.Bbox attribute)@\spxentry{minposy}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.minposy}}\pysigline{\sphinxbfcode{\sphinxupquote{minposy}}}~ \end{fulllineitems} \index{mutated() (matplotlib.transforms.Bbox method)@\spxentry{mutated()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.mutated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mutated}}}{\emph{self}}{} Return whether the bbox has changed since init. \end{fulllineitems} \index{mutatedx() (matplotlib.transforms.Bbox method)@\spxentry{mutatedx()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.mutatedx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mutatedx}}}{\emph{self}}{} Return whether the x-limits have changed since init. \end{fulllineitems} \index{mutatedy() (matplotlib.transforms.Bbox method)@\spxentry{mutatedy()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.mutatedy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mutatedy}}}{\emph{self}}{} Return whether the y-limits have changed since init. \end{fulllineitems} \index{null() (matplotlib.transforms.Bbox static method)@\spxentry{null()}\spxextra{matplotlib.transforms.Bbox static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.null}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{null}}}{}{} (staticmethod) Create a new null {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} from (inf, inf) to (-inf, -inf). \end{fulllineitems} \index{p0 (matplotlib.transforms.Bbox attribute)@\spxentry{p0}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.p0}}\pysigline{\sphinxbfcode{\sphinxupquote{p0}}} The first pair of (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) coordinates that define the bounding box. This is not guaranteed to be the bottom-left corner (for that, use \sphinxcode{\sphinxupquote{min}}). \end{fulllineitems} \index{p1 (matplotlib.transforms.Bbox attribute)@\spxentry{p1}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.p1}}\pysigline{\sphinxbfcode{\sphinxupquote{p1}}} The second pair of (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) coordinates that define the bounding box. This is not guaranteed to be the top-right corner (for that, use \sphinxcode{\sphinxupquote{max}}). \end{fulllineitems} \index{set() (matplotlib.transforms.Bbox method)@\spxentry{set()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{other}}{} Set this bounding box from the "frozen" bounds of another {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \end{fulllineitems} \index{set\_points() (matplotlib.transforms.Bbox method)@\spxentry{set\_points()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.set_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_points}}}{\emph{self}, \emph{points}}{} Set the points of the bounding box directly from a numpy array of the form: \sphinxcode{\sphinxupquote{{[}{[}x0, y0{]}, {[}x1, y1{]}{]}}}. No error checking is performed, as this method is mainly for internal use. \end{fulllineitems} \index{unit() (matplotlib.transforms.Bbox static method)@\spxentry{unit()}\spxextra{matplotlib.transforms.Bbox static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.unit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{unit}}}{}{} (staticmethod) Create a new unit {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} from (0, 0) to (1, 1). \end{fulllineitems} \index{update\_from\_data\_xy() (matplotlib.transforms.Bbox method)@\spxentry{update\_from\_data\_xy()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.update_from_data_xy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from\_data\_xy}}}{\emph{self}, \emph{xy}, \emph{ignore=None}, \emph{updatex=True}, \emph{updatey=True}}{} Update the bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} based on the passed in data. After updating, the bounds will have positive \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}; \sphinxstyleemphasis{x0} and \sphinxstyleemphasis{y0} will be the minimal values. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xy}}] \leavevmode{[}ndarray{]} A numpy array of 2D points. \item[{\sphinxstylestrong{ignore}}] \leavevmode{[}bool, optional{]}\begin{itemize} \item {} When \sphinxcode{\sphinxupquote{True}}, ignore the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \item {} When \sphinxcode{\sphinxupquote{False}}, include the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \item {} When \sphinxcode{\sphinxupquote{None}}, use the last value passed to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.ignore}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ignore()}}}}}. \end{itemize} \item[{\sphinxstylestrong{updatex, updatey}}] \leavevmode{[}bool, optional{]} When \sphinxcode{\sphinxupquote{True}}, update the x/y values. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{update\_from\_path() (matplotlib.transforms.Bbox method)@\spxentry{update\_from\_path()}\spxextra{matplotlib.transforms.Bbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.update_from_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_from\_path}}}{\emph{self}, \emph{path}, \emph{ignore=None}, \emph{updatex=True}, \emph{updatey=True}}{} Update the bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} based on the passed in data. After updating, the bounds will have positive \sphinxstyleemphasis{width} and \sphinxstyleemphasis{height}; \sphinxstyleemphasis{x0} and \sphinxstyleemphasis{y0} will be the minimal values. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path}}] \leavevmode{[}{\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}{]} \item[{\sphinxstylestrong{ignore}}] \leavevmode{[}bool, optional{]}\begin{itemize} \item {} when \sphinxcode{\sphinxupquote{True}}, ignore the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \item {} when \sphinxcode{\sphinxupquote{False}}, include the existing bounds of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \item {} when \sphinxcode{\sphinxupquote{None}}, use the last value passed to {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.ignore}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ignore()}}}}}. \end{itemize} \item[{\sphinxstylestrong{updatex, updatey}}] \leavevmode{[}bool, optional{]} When \sphinxcode{\sphinxupquote{True}}, update the x/y values. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{x0 (matplotlib.transforms.Bbox attribute)@\spxentry{x0}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.x0}}\pysigline{\sphinxbfcode{\sphinxupquote{x0}}} The first of the pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be less than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.x1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x1}}}}} (for that, use \sphinxcode{\sphinxupquote{xmin}}). \end{fulllineitems} \index{x1 (matplotlib.transforms.Bbox attribute)@\spxentry{x1}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.x1}}\pysigline{\sphinxbfcode{\sphinxupquote{x1}}} The second of the pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be greater than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}} (for that, use \sphinxcode{\sphinxupquote{xmax}}). \end{fulllineitems} \index{y0 (matplotlib.transforms.Bbox attribute)@\spxentry{y0}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.y0}}\pysigline{\sphinxbfcode{\sphinxupquote{y0}}} The first of the pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be less than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.y1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y1}}}}} (for that, use \sphinxcode{\sphinxupquote{ymin}}). \end{fulllineitems} \index{y1 (matplotlib.transforms.Bbox attribute)@\spxentry{y1}\spxextra{matplotlib.transforms.Bbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Bbox.y1}}\pysigline{\sphinxbfcode{\sphinxupquote{y1}}} The second of the pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be greater than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}} (for that, use \sphinxcode{\sphinxupquote{ymax}}). \end{fulllineitems} \end{fulllineitems} \index{BboxBase (class in matplotlib.transforms)@\spxentry{BboxBase}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BboxBase}}}{\emph{shorthand\_name=None}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformNode}}}}} This is the base class of all bounding boxes, and provides read-only access to its data. A mutable bounding box is provided by the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} class. The canonical representation is as two points, with no restrictions on their ordering. Convenience properties are provided to get the left, bottom, right and top edges and width and height, but these are not stored explicitly. Creates a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{shorthand\_name}}] \leavevmode{[}str{]} A string representing the "name" of the transform. The name carries no significance other than to improve the readability of \sphinxcode{\sphinxupquote{str(transform)}} when DEBUG=True. \end{description} \end{description}\end{quote} \index{anchored() (matplotlib.transforms.BboxBase method)@\spxentry{anchored()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.anchored}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{anchored}}}{\emph{self}, \emph{c}, \emph{container=None}}{} Return a copy of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, shifted to position \sphinxstyleemphasis{c} within a container. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}(float, float) or str{]} May be either: \begin{itemize} \item {} A sequence (\sphinxstyleemphasis{cx}, \sphinxstyleemphasis{cy}) where \sphinxstyleemphasis{cx} and \sphinxstyleemphasis{cy} range from 0 to 1, where 0 is left or bottom and 1 is right or top \item {} a string: - 'C' for centered - 'S' for bottom-center - 'SE' for bottom-left - 'E' for left - etc. \end{itemize} \item[{\sphinxstylestrong{container}}] \leavevmode{[}Bbox, optional{]} The box within which the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} is positioned; it defaults to the initial {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{bounds (matplotlib.transforms.BboxBase attribute)@\spxentry{bounds}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.bounds}}\pysigline{\sphinxbfcode{\sphinxupquote{bounds}}} Return ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.width}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{width}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.height}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{height}}}}}). \end{fulllineitems} \index{coefs (matplotlib.transforms.BboxBase attribute)@\spxentry{coefs}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.coefs}}\pysigline{\sphinxbfcode{\sphinxupquote{coefs}}\sphinxbfcode{\sphinxupquote{ = \{'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)\}}}} \end{fulllineitems} \index{contains() (matplotlib.transforms.BboxBase method)@\spxentry{contains()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains}}}{\emph{self}, \emph{x}, \emph{y}}{} Return whether \sphinxcode{\sphinxupquote{(x, y)}} is in the bounding box or on its edge. \end{fulllineitems} \index{containsx() (matplotlib.transforms.BboxBase method)@\spxentry{containsx()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.containsx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{containsx}}}{\emph{self}, \emph{x}}{} Return whether \sphinxstyleemphasis{x} is in the closed ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x1}}}}}) interval. \end{fulllineitems} \index{containsy() (matplotlib.transforms.BboxBase method)@\spxentry{containsy()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.containsy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{containsy}}}{\emph{self}, \emph{y}}{} Return whether \sphinxstyleemphasis{y} is in the closed ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y1}}}}}) interval. \end{fulllineitems} \index{corners() (matplotlib.transforms.BboxBase method)@\spxentry{corners()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.corners}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{corners}}}{\emph{self}}{} Return the corners of this rectangle as an array of points. Specifically, this returns the array \sphinxcode{\sphinxupquote{{[}{[}x0, y0{]}, {[}x0, y1{]}, {[}x1, y0{]}, {[}x1, y1{]}{]}}}. \end{fulllineitems} \index{count\_contains() (matplotlib.transforms.BboxBase method)@\spxentry{count\_contains()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.count_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{count\_contains}}}{\emph{self}, \emph{vertices}}{} Count the number of vertices contained in the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. Any vertices with a non-finite x or y value are ignored. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vertices}}] \leavevmode{[}Nx2 Numpy array.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{count\_overlaps() (matplotlib.transforms.BboxBase method)@\spxentry{count\_overlaps()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.count_overlaps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{count\_overlaps}}}{\emph{self}, \emph{bboxes}}{} Count the number of bounding boxes that overlap this one. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bboxes}}] \leavevmode{[}sequence of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxBase}}}}} objects{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{expanded() (matplotlib.transforms.BboxBase method)@\spxentry{expanded()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.expanded}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{expanded}}}{\emph{self}, \emph{sw}, \emph{sh}}{} Construct a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} by expanding this one around its center by the factors \sphinxstyleemphasis{sw} and \sphinxstyleemphasis{sh}. \end{fulllineitems} \index{extents (matplotlib.transforms.BboxBase attribute)@\spxentry{extents}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.extents}}\pysigline{\sphinxbfcode{\sphinxupquote{extents}}} Return ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x1}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y1}}}}}). \end{fulllineitems} \index{frozen() (matplotlib.transforms.BboxBase method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}} is the base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values. \end{fulllineitems} \index{fully\_contains() (matplotlib.transforms.BboxBase method)@\spxentry{fully\_contains()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.fully_contains}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fully\_contains}}}{\emph{self}, \emph{x}, \emph{y}}{} Return whether \sphinxcode{\sphinxupquote{x, y}} is in the bounding box, but not on its edge. \end{fulllineitems} \index{fully\_containsx() (matplotlib.transforms.BboxBase method)@\spxentry{fully\_containsx()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.fully_containsx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fully\_containsx}}}{\emph{self}, \emph{x}}{} Return whether \sphinxstyleemphasis{x} is in the open ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x1}}}}}) interval. \end{fulllineitems} \index{fully\_containsy() (matplotlib.transforms.BboxBase method)@\spxentry{fully\_containsy()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.fully_containsy}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fully\_containsy}}}{\emph{self}, \emph{y}}{} Return whether \sphinxstyleemphasis{y} is in the open ({\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y1}}}}}) interval. \end{fulllineitems} \index{fully\_overlaps() (matplotlib.transforms.BboxBase method)@\spxentry{fully\_overlaps()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.fully_overlaps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{fully\_overlaps}}}{\emph{self}, \emph{other}}{} Return whether this bounding box overlaps with the other bounding box, not including the edges. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{other}}] \leavevmode{[}BboxBase{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_points() (matplotlib.transforms.BboxBase method)@\spxentry{get\_points()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.get_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_points}}}{\emph{self}}{}~ \end{fulllineitems} \index{height (matplotlib.transforms.BboxBase attribute)@\spxentry{height}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.height}}\pysigline{\sphinxbfcode{\sphinxupquote{height}}} The (signed) height of the bounding box. \end{fulllineitems} \index{intersection() (matplotlib.transforms.BboxBase static method)@\spxentry{intersection()}\spxextra{matplotlib.transforms.BboxBase static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.intersection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{intersection}}}{\emph{bbox1}, \emph{bbox2}}{} Return the intersection of \sphinxstyleemphasis{bbox1} and \sphinxstyleemphasis{bbox2} if they intersect, or None if they don't. \end{fulllineitems} \index{intervalx (matplotlib.transforms.BboxBase attribute)@\spxentry{intervalx}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.intervalx}}\pysigline{\sphinxbfcode{\sphinxupquote{intervalx}}} The pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be sorted from left to right. \end{fulllineitems} \index{intervaly (matplotlib.transforms.BboxBase attribute)@\spxentry{intervaly}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.intervaly}}\pysigline{\sphinxbfcode{\sphinxupquote{intervaly}}} The pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be sorted from bottom to top. \end{fulllineitems} \index{inverse\_transformed() (matplotlib.transforms.BboxBase method)@\spxentry{inverse\_transformed()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.inverse_transformed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverse\_transformed}}}{\emph{self}, \emph{transform}}{} Construct a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} by statically transforming this one by the inverse of \sphinxstyleemphasis{transform}. \end{fulllineitems} \index{is\_affine (matplotlib.transforms.BboxBase attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{is\_bbox (matplotlib.transforms.BboxBase attribute)@\spxentry{is\_bbox}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.is_bbox}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_bbox}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{is\_unit() (matplotlib.transforms.BboxBase method)@\spxentry{is\_unit()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.is_unit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{is\_unit}}}{\emph{self}}{} Return whether this is the unit box (from (0, 0) to (1, 1)). \end{fulllineitems} \index{max (matplotlib.transforms.BboxBase attribute)@\spxentry{max}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.max}}\pysigline{\sphinxbfcode{\sphinxupquote{max}}} The top-right corner of the bounding box. \end{fulllineitems} \index{min (matplotlib.transforms.BboxBase attribute)@\spxentry{min}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.min}}\pysigline{\sphinxbfcode{\sphinxupquote{min}}} The bottom-left corner of the bounding box. \end{fulllineitems} \index{overlaps() (matplotlib.transforms.BboxBase method)@\spxentry{overlaps()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.overlaps}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{overlaps}}}{\emph{self}, \emph{other}}{} Return whether this bounding box overlaps with the other bounding box. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{other}}] \leavevmode{[}BboxBase{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{p0 (matplotlib.transforms.BboxBase attribute)@\spxentry{p0}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.p0}}\pysigline{\sphinxbfcode{\sphinxupquote{p0}}} The first pair of (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) coordinates that define the bounding box. This is not guaranteed to be the bottom-left corner (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.min}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{min}}}}}). \end{fulllineitems} \index{p1 (matplotlib.transforms.BboxBase attribute)@\spxentry{p1}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.p1}}\pysigline{\sphinxbfcode{\sphinxupquote{p1}}} The second pair of (\sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}) coordinates that define the bounding box. This is not guaranteed to be the top-right corner (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.max}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{max}}}}}). \end{fulllineitems} \index{padded() (matplotlib.transforms.BboxBase method)@\spxentry{padded()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.padded}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{padded}}}{\emph{self}, \emph{p}}{} Construct a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} by padding this one on all four sides by \sphinxstyleemphasis{p}. \end{fulllineitems} \index{rotated() (matplotlib.transforms.BboxBase method)@\spxentry{rotated()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.rotated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{rotated}}}{\emph{self}, \emph{radians}}{} Return a new bounding box that bounds a rotated version of this bounding box by the given radians. The new bounding box is still aligned with the axes, of course. \end{fulllineitems} \index{shrunk() (matplotlib.transforms.BboxBase method)@\spxentry{shrunk()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.shrunk}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrunk}}}{\emph{self}, \emph{mx}, \emph{my}}{} Return a copy of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, shrunk by the factor \sphinxstyleemphasis{mx} in the \sphinxstyleemphasis{x} direction and the factor \sphinxstyleemphasis{my} in the \sphinxstyleemphasis{y} direction. The lower left corner of the box remains unchanged. Normally \sphinxstyleemphasis{mx} and \sphinxstyleemphasis{my} will be less than 1, but this is not enforced. \end{fulllineitems} \index{shrunk\_to\_aspect() (matplotlib.transforms.BboxBase method)@\spxentry{shrunk\_to\_aspect()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.shrunk_to_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{shrunk\_to\_aspect}}}{\emph{self}, \emph{box\_aspect}, \emph{container=None}, \emph{fig\_aspect=1.0}}{} Return a copy of the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}, shrunk so that it is as large as it can be while having the desired aspect ratio, \sphinxstyleemphasis{box\_aspect}. If the box coordinates are relative---that is, fractions of a larger box such as a figure---then the physical aspect ratio of that figure is specified with \sphinxstyleemphasis{fig\_aspect}, so that \sphinxstyleemphasis{box\_aspect} can also be given as a ratio of the absolute dimensions, not the relative dimensions. \end{fulllineitems} \index{size (matplotlib.transforms.BboxBase attribute)@\spxentry{size}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.size}}\pysigline{\sphinxbfcode{\sphinxupquote{size}}} The (signed) width and height of the bounding box. \end{fulllineitems} \index{splitx() (matplotlib.transforms.BboxBase method)@\spxentry{splitx()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.splitx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{splitx}}}{\emph{self}, \emph{*args}}{} Return a list of new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} objects formed by splitting the original one with vertical lines at fractional positions given by \sphinxstyleemphasis{args}. \end{fulllineitems} \index{splity() (matplotlib.transforms.BboxBase method)@\spxentry{splity()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.splity}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{splity}}}{\emph{self}, \emph{*args}}{} Return a list of new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} objects formed by splitting the original one with horizontal lines at fractional positions given by \sphinxstyleemphasis{args}. \end{fulllineitems} \index{transformed() (matplotlib.transforms.BboxBase method)@\spxentry{transformed()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.transformed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transformed}}}{\emph{self}, \emph{transform}}{} Construct a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} by statically transforming this one by \sphinxstyleemphasis{transform}. \end{fulllineitems} \index{translated() (matplotlib.transforms.BboxBase method)@\spxentry{translated()}\spxextra{matplotlib.transforms.BboxBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.translated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{translated}}}{\emph{self}, \emph{tx}, \emph{ty}}{} Construct a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} by translating this one by \sphinxstyleemphasis{tx} and \sphinxstyleemphasis{ty}. \end{fulllineitems} \index{union() (matplotlib.transforms.BboxBase static method)@\spxentry{union()}\spxextra{matplotlib.transforms.BboxBase static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.union}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{union}}}{\emph{bboxes}}{} Return a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} that contains all of the given \sphinxstyleemphasis{bboxes}. \end{fulllineitems} \index{width (matplotlib.transforms.BboxBase attribute)@\spxentry{width}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.width}}\pysigline{\sphinxbfcode{\sphinxupquote{width}}} The (signed) width of the bounding box. \end{fulllineitems} \index{x0 (matplotlib.transforms.BboxBase attribute)@\spxentry{x0}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}}\pysigline{\sphinxbfcode{\sphinxupquote{x0}}} The first of the pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be less than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x1}}}}} (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.xmin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmin}}}}}). \end{fulllineitems} \index{x1 (matplotlib.transforms.BboxBase attribute)@\spxentry{x1}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.x1}}\pysigline{\sphinxbfcode{\sphinxupquote{x1}}} The second of the pair of \sphinxstyleemphasis{x} coordinates that define the bounding box. This is not guaranteed to be greater than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.x0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{x0}}}}} (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.xmax}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmax}}}}}). \end{fulllineitems} \index{xmax (matplotlib.transforms.BboxBase attribute)@\spxentry{xmax}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.xmax}}\pysigline{\sphinxbfcode{\sphinxupquote{xmax}}} The right edge of the bounding box. \end{fulllineitems} \index{xmin (matplotlib.transforms.BboxBase attribute)@\spxentry{xmin}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.xmin}}\pysigline{\sphinxbfcode{\sphinxupquote{xmin}}} The left edge of the bounding box. \end{fulllineitems} \index{y0 (matplotlib.transforms.BboxBase attribute)@\spxentry{y0}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}}\pysigline{\sphinxbfcode{\sphinxupquote{y0}}} The first of the pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be less than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y1}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y1}}}}} (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.ymin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymin}}}}}). \end{fulllineitems} \index{y1 (matplotlib.transforms.BboxBase attribute)@\spxentry{y1}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.y1}}\pysigline{\sphinxbfcode{\sphinxupquote{y1}}} The second of the pair of \sphinxstyleemphasis{y} coordinates that define the bounding box. This is not guaranteed to be greater than {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.y0}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{y0}}}}} (for that, use {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase.ymax}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymax}}}}}). \end{fulllineitems} \index{ymax (matplotlib.transforms.BboxBase attribute)@\spxentry{ymax}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.ymax}}\pysigline{\sphinxbfcode{\sphinxupquote{ymax}}} The top edge of the bounding box. \end{fulllineitems} \index{ymin (matplotlib.transforms.BboxBase attribute)@\spxentry{ymin}\spxextra{matplotlib.transforms.BboxBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxBase.ymin}}\pysigline{\sphinxbfcode{\sphinxupquote{ymin}}} The bottom edge of the bounding box. \end{fulllineitems} \end{fulllineitems} \index{BboxTransform (class in matplotlib.transforms)@\spxentry{BboxTransform}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BboxTransform}}}{\emph{boxin}, \emph{boxout}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransform}}}}} linearly transforms points from one {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} to another {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransform}}}}} that linearly transforms points from \sphinxstyleemphasis{boxin} to \sphinxstyleemphasis{boxout}. \index{get\_matrix() (matplotlib.transforms.BboxTransform method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.BboxTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransform.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{is\_separable (matplotlib.transforms.BboxTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.BboxTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \end{fulllineitems} \index{BboxTransformFrom (class in matplotlib.transforms)@\spxentry{BboxTransformFrom}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformFrom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BboxTransformFrom}}}{\emph{boxin}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformFrom}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransformFrom}}}}} linearly transforms points from a given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} to the unit bounding box. \index{get\_matrix() (matplotlib.transforms.BboxTransformFrom method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.BboxTransformFrom method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformFrom.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{is\_separable (matplotlib.transforms.BboxTransformFrom attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.BboxTransformFrom attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformFrom.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \end{fulllineitems} \index{BboxTransformTo (class in matplotlib.transforms)@\spxentry{BboxTransformTo}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BboxTransformTo}}}{\emph{boxout}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransformTo}}}}} is a transformation that linearly transforms points from the unit bounding box to a given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}. Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransformTo}}}}} that linearly transforms points from the unit bounding box to \sphinxstyleemphasis{boxout}. \index{get\_matrix() (matplotlib.transforms.BboxTransformTo method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.BboxTransformTo method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{is\_separable (matplotlib.transforms.BboxTransformTo attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.BboxTransformTo attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \end{fulllineitems} \index{BboxTransformToMaxOnly (class in matplotlib.transforms)@\spxentry{BboxTransformToMaxOnly}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformToMaxOnly}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BboxTransformToMaxOnly}}}{\emph{boxout}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxTransformTo}}}}} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransformTo}}}}} is a transformation that linearly transforms points from the unit bounding box to a given {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} with a fixed upper left of (0, 0). Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxTransformTo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxTransformTo}}}}} that linearly transforms points from the unit bounding box to \sphinxstyleemphasis{boxout}. \index{get\_matrix() (matplotlib.transforms.BboxTransformToMaxOnly method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.BboxTransformToMaxOnly method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BboxTransformToMaxOnly.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \end{fulllineitems} \index{BlendedAffine2D (class in matplotlib.transforms)@\spxentry{BlendedAffine2D}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedAffine2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BlendedAffine2D}}}{\emph{x\_transform}, \emph{y\_transform}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} A "blended" transform uses one transform for the \sphinxstyleemphasis{x}-direction, and another transform for the \sphinxstyleemphasis{y}-direction. This version is an optimization for the case where both child transforms are of type {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}}. Create a new "blended" transform using \sphinxstyleemphasis{x\_transform} to transform the \sphinxstyleemphasis{x}-axis and \sphinxstyleemphasis{y\_transform} to transform the \sphinxstyleemphasis{y}-axis. Both \sphinxstyleemphasis{x\_transform} and \sphinxstyleemphasis{y\_transform} must be 2D affine transforms. You will generally not call this constructor directly but use the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.blended_transform_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{blended\_transform\_factory()}}}}} function instead, which can determine automatically which kind of blended transform to create. \index{contains\_branch\_seperately() (matplotlib.transforms.BlendedAffine2D method)@\spxentry{contains\_branch\_seperately()}\spxextra{matplotlib.transforms.BlendedAffine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedAffine2D.contains_branch_seperately}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_branch\_seperately}}}{\emph{self}, \emph{transform}}{} Returns whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an axes' data transform. e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x\PYGZus{}isdata}\PYG{p}{,} \PYG{n}{y\PYGZus{}isdata} \PYG{o}{=} \PYG{n}{trans}\PYG{o}{.}\PYG{n}{contains\PYGZus{}branch\PYGZus{}seperately}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{get\_matrix() (matplotlib.transforms.BlendedAffine2D method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.BlendedAffine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedAffine2D.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{is\_separable (matplotlib.transforms.BlendedAffine2D attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.BlendedAffine2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedAffine2D.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \end{fulllineitems} \index{BlendedGenericTransform (class in matplotlib.transforms)@\spxentry{BlendedGenericTransform}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{BlendedGenericTransform}}}{\emph{x\_transform}, \emph{y\_transform}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} A "blended" transform uses one transform for the \sphinxstyleemphasis{x}-direction, and another transform for the \sphinxstyleemphasis{y}-direction. This "generic" version can handle any given child transform in the \sphinxstyleemphasis{x}- and \sphinxstyleemphasis{y}-directions. Create a new "blended" transform using \sphinxstyleemphasis{x\_transform} to transform the \sphinxstyleemphasis{x}-axis and \sphinxstyleemphasis{y\_transform} to transform the \sphinxstyleemphasis{y}-axis. You will generally not call this constructor directly but use the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.blended_transform_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{blended\_transform\_factory()}}}}} function instead, which can determine automatically which kind of blended transform to create. \index{contains\_branch() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{contains\_branch()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.contains_branch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_branch}}}{\emph{self}, \emph{other}}{} Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True. \end{fulllineitems} \index{contains\_branch\_seperately() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{contains\_branch\_seperately()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.contains_branch_seperately}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_branch\_seperately}}}{\emph{self}, \emph{transform}}{} Returns whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an axes' data transform. e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x\PYGZus{}isdata}\PYG{p}{,} \PYG{n}{y\PYGZus{}isdata} \PYG{o}{=} \PYG{n}{trans}\PYG{o}{.}\PYG{n}{contains\PYGZus{}branch\PYGZus{}seperately}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{depth (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{depth}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}} Returns the number of transforms which have been chained together to form this Transform instance. \begin{sphinxadmonition}{note}{Note:} For the special case of a Composite transform, the maximum depth of the two is returned. \end{sphinxadmonition} \end{fulllineitems} \index{frozen() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{get\_affine() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{} Get the affine part of this transform. \end{fulllineitems} \index{has\_inverse (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}}~ \end{fulllineitems} \index{input\_dims (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{inverted() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{inverted()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_affine (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}}~ \end{fulllineitems} \index{is\_separable (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{output\_dims (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{pass\_through (matplotlib.transforms.BlendedGenericTransform attribute)@\spxentry{pass\_through}\spxextra{matplotlib.transforms.BlendedGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.pass_through}}\pysigline{\sphinxbfcode{\sphinxupquote{pass\_through}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.transforms.BlendedGenericTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.transforms.BlendedGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{points}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BlendedGenericTransform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{CompositeAffine2D (class in matplotlib.transforms)@\spxentry{CompositeAffine2D}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeAffine2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{CompositeAffine2D}}}{\emph{a}, \emph{b}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} A composite transform formed by applying transform \sphinxstyleemphasis{a} then transform \sphinxstyleemphasis{b}. This version is an optimization that handles the case where both \sphinxstyleemphasis{a} and \sphinxstyleemphasis{b} are 2D affines. Create a new composite transform that is the result of applying transform \sphinxstyleemphasis{a} then transform \sphinxstyleemphasis{b}. Both \sphinxstyleemphasis{a} and \sphinxstyleemphasis{b} must be instances of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2DBase}}}}}. You will generally not call this constructor directly but use the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.composite_transform_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{composite\_transform\_factory()}}}}} function instead, which can automatically choose the best kind of composite transform instance to create. \index{depth (matplotlib.transforms.CompositeAffine2D attribute)@\spxentry{depth}\spxextra{matplotlib.transforms.CompositeAffine2D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeAffine2D.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}} Returns the number of transforms which have been chained together to form this Transform instance. \begin{sphinxadmonition}{note}{Note:} For the special case of a Composite transform, the maximum depth of the two is returned. \end{sphinxadmonition} \end{fulllineitems} \index{get\_matrix() (matplotlib.transforms.CompositeAffine2D method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.CompositeAffine2D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeAffine2D.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \end{fulllineitems} \index{CompositeGenericTransform (class in matplotlib.transforms)@\spxentry{CompositeGenericTransform}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{CompositeGenericTransform}}}{\emph{a}, \emph{b}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} A composite transform formed by applying transform \sphinxstyleemphasis{a} then transform \sphinxstyleemphasis{b}. This "generic" version can handle any two arbitrary transformations. Create a new composite transform that is the result of applying transform \sphinxstyleemphasis{a} then transform \sphinxstyleemphasis{b}. You will generally not call this constructor directly but use the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.composite_transform_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{composite\_transform\_factory()}}}}} function instead, which can automatically choose the best kind of composite transform instance to create. \index{depth (matplotlib.transforms.CompositeGenericTransform attribute)@\spxentry{depth}\spxextra{matplotlib.transforms.CompositeGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}}~ \end{fulllineitems} \index{frozen() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{get\_affine() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{} Get the affine part of this transform. \end{fulllineitems} \index{has\_inverse (matplotlib.transforms.CompositeGenericTransform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.transforms.CompositeGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}}~ \end{fulllineitems} \index{inverted() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{inverted()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_affine (matplotlib.transforms.CompositeGenericTransform attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.CompositeGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}}~ \end{fulllineitems} \index{is\_separable (matplotlib.transforms.CompositeGenericTransform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.CompositeGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}}~ \end{fulllineitems} \index{pass\_through (matplotlib.transforms.CompositeGenericTransform attribute)@\spxentry{pass\_through}\spxextra{matplotlib.transforms.CompositeGenericTransform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.pass_through}}\pysigline{\sphinxbfcode{\sphinxupquote{pass\_through}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{transform\_affine() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{transform\_affine()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.transform_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_affine}}}{\emph{self}, \emph{points}}{} Performs only the affine part of this transformation on the given array of values. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{points}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.transforms.CompositeGenericTransform method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.transforms.CompositeGenericTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.CompositeGenericTransform.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \end{fulllineitems} \index{IdentityTransform (class in matplotlib.transforms)@\spxentry{IdentityTransform}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{IdentityTransform}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} A special class that does one thing, the identity transform, in a fast way. \index{frozen() (matplotlib.transforms.IdentityTransform method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{get\_affine() (matplotlib.transforms.IdentityTransform method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{} Get the affine part of this transform. \end{fulllineitems} \index{get\_matrix() (matplotlib.transforms.IdentityTransform method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{inverted() (matplotlib.transforms.IdentityTransform method)@\spxentry{inverted()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{transform() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform}}}{\emph{self}, \emph{points}}{} Performs the transformation on the given array of values. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_affine() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform\_affine()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_affine}}}{\emph{self}, \emph{points}}{} Performs only the affine part of this transformation on the given array of values. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{points}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x \sphinxcode{\sphinxupquote{input\_dims}}) and returns a numpy array of shape (N x \sphinxcode{\sphinxupquote{output\_dims}}). Alternatively, accepts a numpy array of length \sphinxcode{\sphinxupquote{input\_dims}} and returns a numpy array of length \sphinxcode{\sphinxupquote{output\_dims}}. \end{fulllineitems} \index{transform\_path() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform\_path()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path}}}{\emph{self}, \emph{path}}{} Returns a transformed path. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. In some cases, this transform may insert curves into the path that began as line segments. \end{fulllineitems} \index{transform\_path\_affine() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform\_path\_affine()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform_path_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.transforms.IdentityTransform method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.transforms.IdentityTransform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.IdentityTransform.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \end{fulllineitems} \index{LockableBbox (class in matplotlib.transforms)@\spxentry{LockableBbox}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{LockableBbox}}}{\emph{bbox}, \emph{x0=None}, \emph{y0=None}, \emph{x1=None}, \emph{y1=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxBase}}}}} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} where some elements may be locked at certain values. When the child bounding box changes, the bounds of this bbox will update accordingly with the exception of the locked elements. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}Bbox{]} The child bounding box to wrap. \item[{\sphinxstylestrong{x0}}] \leavevmode{[}float or None{]} The locked value for x0, or None to leave unlocked. \item[{\sphinxstylestrong{y0}}] \leavevmode{[}float or None{]} The locked value for y0, or None to leave unlocked. \item[{\sphinxstylestrong{x1}}] \leavevmode{[}float or None{]} The locked value for x1, or None to leave unlocked. \item[{\sphinxstylestrong{y1}}] \leavevmode{[}float or None{]} The locked value for y1, or None to leave unlocked. \end{description} \end{description}\end{quote} \index{get\_points() (matplotlib.transforms.LockableBbox method)@\spxentry{get\_points()}\spxextra{matplotlib.transforms.LockableBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox.get_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_points}}}{\emph{self}}{}~ \end{fulllineitems} \index{locked\_x0 (matplotlib.transforms.LockableBbox attribute)@\spxentry{locked\_x0}\spxextra{matplotlib.transforms.LockableBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox.locked_x0}}\pysigline{\sphinxbfcode{\sphinxupquote{locked\_x0}}} float or None: The value used for the locked x0. \end{fulllineitems} \index{locked\_x1 (matplotlib.transforms.LockableBbox attribute)@\spxentry{locked\_x1}\spxextra{matplotlib.transforms.LockableBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox.locked_x1}}\pysigline{\sphinxbfcode{\sphinxupquote{locked\_x1}}} float or None: The value used for the locked x1. \end{fulllineitems} \index{locked\_y0 (matplotlib.transforms.LockableBbox attribute)@\spxentry{locked\_y0}\spxextra{matplotlib.transforms.LockableBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox.locked_y0}}\pysigline{\sphinxbfcode{\sphinxupquote{locked\_y0}}} float or None: The value used for the locked y0. \end{fulllineitems} \index{locked\_y1 (matplotlib.transforms.LockableBbox attribute)@\spxentry{locked\_y1}\spxextra{matplotlib.transforms.LockableBbox attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.LockableBbox.locked_y1}}\pysigline{\sphinxbfcode{\sphinxupquote{locked\_y1}}} float or None: The value used for the locked y1. \end{fulllineitems} \end{fulllineitems} \index{ScaledTranslation (class in matplotlib.transforms)@\spxentry{ScaledTranslation}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.ScaledTranslation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{ScaledTranslation}}}{\emph{xt}, \emph{yt}, \emph{scale\_trans}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2DBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Affine2DBase}}}}} A transformation that translates by \sphinxstyleemphasis{xt} and \sphinxstyleemphasis{yt}, after \sphinxstyleemphasis{xt} and \sphinxstyleemphasis{yt} have been transformed by \sphinxstyleemphasis{scale\_trans}. \index{get\_matrix() (matplotlib.transforms.ScaledTranslation method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.ScaledTranslation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.ScaledTranslation.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \end{fulllineitems} \index{Transform (class in matplotlib.transforms)@\spxentry{Transform}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{Transform}}}{\emph{shorthand\_name=None}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformNode}}}}} The base class of all {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}} instances that actually perform a transformation. All non-affine transformations should be subclasses of this class. New affine transformations should be subclasses of {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Affine2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Affine2D}}}}}. Subclasses of this class should override the following members (at minimum): \begin{itemize} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform()}}}}} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.is_separable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{is\_separable}}}}} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.has_inverse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{has\_inverse}}}}} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.inverted}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inverted()}}}}} (if {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.has_inverse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{has\_inverse}}}}} is True) \end{itemize} If the transform needs to do something non-standard with {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}} objects, such as adding curves where there were once line segments, it should override: \begin{itemize} \item {} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.transform_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform\_path()}}}}} \end{itemize} Creates a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{shorthand\_name}}] \leavevmode{[}str{]} A string representing the "name" of the transform. The name carries no significance other than to improve the readability of \sphinxcode{\sphinxupquote{str(transform)}} when DEBUG=True. \end{description} \end{description}\end{quote} \index{contains\_branch() (matplotlib.transforms.Transform method)@\spxentry{contains\_branch()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.contains_branch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_branch}}}{\emph{self}, \emph{other}}{} Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True. \end{fulllineitems} \index{contains\_branch\_seperately() (matplotlib.transforms.Transform method)@\spxentry{contains\_branch\_seperately()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.contains_branch_seperately}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contains\_branch\_seperately}}}{\emph{self}, \emph{other\_transform}}{} Returns whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an axes' data transform. e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{x\PYGZus{}isdata}\PYG{p}{,} \PYG{n}{y\PYGZus{}isdata} \PYG{o}{=} \PYG{n}{trans}\PYG{o}{.}\PYG{n}{contains\PYGZus{}branch\PYGZus{}seperately}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{depth (matplotlib.transforms.Transform attribute)@\spxentry{depth}\spxextra{matplotlib.transforms.Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.depth}}\pysigline{\sphinxbfcode{\sphinxupquote{depth}}} Returns the number of transforms which have been chained together to form this Transform instance. \begin{sphinxadmonition}{note}{Note:} For the special case of a Composite transform, the maximum depth of the two is returned. \end{sphinxadmonition} \end{fulllineitems} \index{get\_affine() (matplotlib.transforms.Transform method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{} Get the affine part of this transform. \end{fulllineitems} \index{get\_matrix() (matplotlib.transforms.Transform method)@\spxentry{get\_matrix()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.get_matrix}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_matrix}}}{\emph{self}}{} Get the Affine transformation array for the affine part of this transform. \end{fulllineitems} \index{has\_inverse (matplotlib.transforms.Transform attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.transforms.Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}\sphinxbfcode{\sphinxupquote{ = False}}} True if this transform has a corresponding inverse transform. \end{fulllineitems} \index{input\_dims (matplotlib.transforms.Transform attribute)@\spxentry{input\_dims}\spxextra{matplotlib.transforms.Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{input\_dims}}\sphinxbfcode{\sphinxupquote{ = None}}} The number of input dimensions of this transform. Must be overridden (with integers) in the subclass. \end{fulllineitems} \index{inverted() (matplotlib.transforms.Transform method)@\spxentry{inverted()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{inverted}}}{\emph{self}}{} Return the corresponding inverse transformation. The return value of this method should be treated as temporary. An update to \sphinxstyleemphasis{self} does not cause a corresponding update to its inverted copy. \sphinxcode{\sphinxupquote{x === self.inverted().transform(self.transform(x))}} \end{fulllineitems} \index{is\_separable (matplotlib.transforms.Transform attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}\sphinxbfcode{\sphinxupquote{ = False}}} True if this transform is separable in the x- and y- dimensions. \end{fulllineitems} \index{output\_dims (matplotlib.transforms.Transform attribute)@\spxentry{output\_dims}\spxextra{matplotlib.transforms.Transform attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}}\pysigline{\sphinxbfcode{\sphinxupquote{output\_dims}}\sphinxbfcode{\sphinxupquote{ = None}}} The number of output dimensions of this transform. Must be overridden (with integers) in the subclass. \end{fulllineitems} \index{transform() (matplotlib.transforms.Transform method)@\spxentry{transform()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform}}}{\emph{self}, \emph{values}}{} Performs the transformation on the given array of values. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_affine() (matplotlib.transforms.Transform method)@\spxentry{transform\_affine()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_affine}}}{\emph{self}, \emph{values}}{} Performs only the affine part of this transformation on the given array of values. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_angles() (matplotlib.transforms.Transform method)@\spxentry{transform\_angles()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_angles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_angles}}}{\emph{self}, \emph{angles}, \emph{pts}, \emph{radians=False}, \emph{pushoff=1e-05}}{} Transforms a set of angles anchored at specific locations. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{angles}}] \leavevmode{[}(N,) array-like{]} The angles to transform. \item[{\sphinxstylestrong{pts}}] \leavevmode{[}(N, 2) array-like{]} The points where the angles are anchored. \item[{\sphinxstylestrong{radians}}] \leavevmode{[}bool, default: False{]} Whether \sphinxstyleemphasis{angles} are radians or degrees. \item[{\sphinxstylestrong{pushoff}}] \leavevmode{[}float{]} For each point in \sphinxstyleemphasis{pts} and angle in \sphinxstyleemphasis{angles}, the transformed angle is computed by transforming a segment of length \sphinxstyleemphasis{pushoff} starting at that point and making that angle relative to the horizontal axis, and measuring the angle between the horizontal axis and the transformed segment. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transformed\_angles}}] \leavevmode{[}(N,) array{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{transform\_bbox() (matplotlib.transforms.Transform method)@\spxentry{transform\_bbox()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_bbox}}}{\emph{self}, \emph{bbox}}{} Transform the given bounding box. Note, for smarter transforms including caching (a common requirement for matplotlib figures), see {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedBbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedBbox}}}}}. \end{fulllineitems} \index{transform\_non\_affine() (matplotlib.transforms.Transform method)@\spxentry{transform\_non\_affine()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_non\_affine}}}{\emph{self}, \emph{values}}{} Performs only the non-affine part of the transformation. \sphinxcode{\sphinxupquote{transform(values)}} is always equivalent to \sphinxcode{\sphinxupquote{transform\_affine(transform\_non\_affine(values))}}. In non-affine transformations, this is generally equivalent to \sphinxcode{\sphinxupquote{transform(values)}}. In affine transformations, this is always a no-op. Accepts a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}) and returns a numpy array of shape (N x {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}). Alternatively, accepts a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}} and returns a numpy array of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \index{transform\_path() (matplotlib.transforms.Transform method)@\spxentry{transform\_path()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path}}}{\emph{self}, \emph{path}}{} Returns a transformed path. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. In some cases, this transform may insert curves into the path that began as line segments. \end{fulllineitems} \index{transform\_path\_affine() (matplotlib.transforms.Transform method)@\spxentry{transform\_path\_affine()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_path_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \index{transform\_path\_non\_affine() (matplotlib.transforms.Transform method)@\spxentry{transform\_path\_non\_affine()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_path_non_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_path\_non\_affine}}}{\emph{self}, \emph{path}}{} Returns a path, transformed only by the non-affine part of this transform. \sphinxstyleemphasis{path}: a {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} instance. \sphinxcode{\sphinxupquote{transform\_path(path)}} is equivalent to \sphinxcode{\sphinxupquote{transform\_path\_affine(transform\_path\_non\_affine(values))}}. \end{fulllineitems} \index{transform\_point() (matplotlib.transforms.Transform method)@\spxentry{transform\_point()}\spxextra{matplotlib.transforms.Transform method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.Transform.transform_point}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform\_point}}}{\emph{self}, \emph{point}}{} A convenience function that returns the transformed copy of a single point. The point is given as a sequence of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.input_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{input\_dims}}}}}. The transformed point is returned as a sequence of length {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform.output_dims}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{output\_dims}}}}}. \end{fulllineitems} \end{fulllineitems} \index{TransformNode (class in matplotlib.transforms)@\spxentry{TransformNode}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{TransformNode}}}{\emph{shorthand\_name=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}} is the base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values. Creates a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{shorthand\_name}}] \leavevmode{[}str{]} A string representing the "name" of the transform. The name carries no significance other than to improve the readability of \sphinxcode{\sphinxupquote{str(transform)}} when DEBUG=True. \end{description} \end{description}\end{quote} \index{INVALID (matplotlib.transforms.TransformNode attribute)@\spxentry{INVALID}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.INVALID}}\pysigline{\sphinxbfcode{\sphinxupquote{INVALID}}\sphinxbfcode{\sphinxupquote{ = 3}}} \end{fulllineitems} \index{INVALID\_AFFINE (matplotlib.transforms.TransformNode attribute)@\spxentry{INVALID\_AFFINE}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.INVALID_AFFINE}}\pysigline{\sphinxbfcode{\sphinxupquote{INVALID\_AFFINE}}\sphinxbfcode{\sphinxupquote{ = 2}}} \end{fulllineitems} \index{INVALID\_NON\_AFFINE (matplotlib.transforms.TransformNode attribute)@\spxentry{INVALID\_NON\_AFFINE}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.INVALID_NON_AFFINE}}\pysigline{\sphinxbfcode{\sphinxupquote{INVALID\_NON\_AFFINE}}\sphinxbfcode{\sphinxupquote{ = 1}}} \end{fulllineitems} \index{frozen() (matplotlib.transforms.TransformNode method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.TransformNode method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{invalidate() (matplotlib.transforms.TransformNode method)@\spxentry{invalidate()}\spxextra{matplotlib.transforms.TransformNode method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.invalidate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invalidate}}}{\emph{self}}{} Invalidate this {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformNode}}}}} and triggers an invalidation of its ancestors. Should be called any time the transform changes. \end{fulllineitems} \index{is\_affine (matplotlib.transforms.TransformNode attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{is\_bbox (matplotlib.transforms.TransformNode attribute)@\spxentry{is\_bbox}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.is_bbox}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_bbox}}\sphinxbfcode{\sphinxupquote{ = False}}} \end{fulllineitems} \index{pass\_through (matplotlib.transforms.TransformNode attribute)@\spxentry{pass\_through}\spxextra{matplotlib.transforms.TransformNode attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.pass_through}}\pysigline{\sphinxbfcode{\sphinxupquote{pass\_through}}\sphinxbfcode{\sphinxupquote{ = False}}} If pass\_through is True, all ancestors will always be invalidated, even if 'self' is already invalid. \end{fulllineitems} \index{set\_children() (matplotlib.transforms.TransformNode method)@\spxentry{set\_children()}\spxextra{matplotlib.transforms.TransformNode method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformNode.set_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_children}}}{\emph{self}, \emph{*children}}{} Set the children of the transform, to let the invalidation system know which transforms can invalidate this transform. Should be called from the constructor of any transforms that depend on other transforms. \end{fulllineitems} \end{fulllineitems} \index{TransformWrapper (class in matplotlib.transforms)@\spxentry{TransformWrapper}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{TransformWrapper}}}{\emph{child}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}} A helper class that holds a single child transform and acts equivalently to it. This is useful if a node of the transform tree must be replaced at run time with a transform of a different type. This class allows that replacement to correctly trigger invalidation. Note that {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformWrapper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformWrapper}}}}} instances must have the same input and output dimensions during their entire lifetime, so the child transform may only be replaced with another child transform of the same dimensions. \sphinxstyleemphasis{child}: A class:{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance. This child may later be replaced with {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.set}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set()}}}}}. \index{frozen() (matplotlib.transforms.TransformWrapper method)@\spxentry{frozen()}\spxextra{matplotlib.transforms.TransformWrapper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.frozen}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{frozen}}}{\emph{self}}{} Returns a frozen copy of this transform node. The frozen copy will not update when its children change. Useful for storing a previously known state of a transform where \sphinxcode{\sphinxupquote{copy.deepcopy()}} might normally be used. \end{fulllineitems} \index{has\_inverse (matplotlib.transforms.TransformWrapper attribute)@\spxentry{has\_inverse}\spxextra{matplotlib.transforms.TransformWrapper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.has_inverse}}\pysigline{\sphinxbfcode{\sphinxupquote{has\_inverse}}}~ \end{fulllineitems} \index{is\_affine (matplotlib.transforms.TransformWrapper attribute)@\spxentry{is\_affine}\spxextra{matplotlib.transforms.TransformWrapper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.is_affine}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_affine}}}~ \end{fulllineitems} \index{is\_separable (matplotlib.transforms.TransformWrapper attribute)@\spxentry{is\_separable}\spxextra{matplotlib.transforms.TransformWrapper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.is_separable}}\pysigline{\sphinxbfcode{\sphinxupquote{is\_separable}}}~ \end{fulllineitems} \index{pass\_through (matplotlib.transforms.TransformWrapper attribute)@\spxentry{pass\_through}\spxextra{matplotlib.transforms.TransformWrapper attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.pass_through}}\pysigline{\sphinxbfcode{\sphinxupquote{pass\_through}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{set() (matplotlib.transforms.TransformWrapper method)@\spxentry{set()}\spxextra{matplotlib.transforms.TransformWrapper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformWrapper.set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set}}}{\emph{self}, \emph{child}}{} Replace the current child of this transform with another one. The new child must have the same number of input and output dimensions as the current child. \end{fulllineitems} \end{fulllineitems} \index{TransformedBbox (class in matplotlib.transforms)@\spxentry{TransformedBbox}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedBbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{TransformedBbox}}}{\emph{bbox}, \emph{transform}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxBase}}}}} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} that is automatically transformed by a given transform. When either the child bounding box or transform changes, the bounds of this bbox will update accordingly. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}}{]} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}{]} \end{description} \end{description}\end{quote} \index{get\_points() (matplotlib.transforms.TransformedBbox method)@\spxentry{get\_points()}\spxextra{matplotlib.transforms.TransformedBbox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedBbox.get_points}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_points}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{TransformedPatchPath (class in matplotlib.transforms)@\spxentry{TransformedPatchPath}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPatchPath}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{TransformedPatchPath}}}{\emph{patch}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformedPath}}}}} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPatchPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPatchPath}}}}} caches a non-affine transformed copy of the \sphinxcode{\sphinxupquote{Patch}}. This cached copy is automatically updated when the non-affine part of the transform or the patch changes. Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPatchPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPatchPath}}}}} from the given \sphinxcode{\sphinxupquote{Patch}}. \end{fulllineitems} \index{TransformedPath (class in matplotlib.transforms)@\spxentry{TransformedPath}\spxextra{class in matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPath}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{TransformedPath}}}{\emph{path}, \emph{transform}}{} Bases: {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformNode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.TransformNode}}}}} A {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPath}}}}} caches a non-affine transformed copy of the {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}. This cached copy is automatically updated when the non-affine part of the transform changes. \begin{sphinxadmonition}{note}{Note:} Paths are considered immutable by this class. Any update to the path's vertices/codes will not trigger a transform recomputation. \end{sphinxadmonition} Create a new {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TransformedPath}}}}} from the given {\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}} and {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}. \index{get\_affine() (matplotlib.transforms.TransformedPath method)@\spxentry{get\_affine()}\spxextra{matplotlib.transforms.TransformedPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPath.get_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_affine}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_fully\_transformed\_path() (matplotlib.transforms.TransformedPath method)@\spxentry{get\_fully\_transformed\_path()}\spxextra{matplotlib.transforms.TransformedPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPath.get_fully_transformed_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_fully\_transformed\_path}}}{\emph{self}}{} Return a fully-transformed copy of the child path. \end{fulllineitems} \index{get\_transformed\_path\_and\_affine() (matplotlib.transforms.TransformedPath method)@\spxentry{get\_transformed\_path\_and\_affine()}\spxextra{matplotlib.transforms.TransformedPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPath.get_transformed_path_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_path\_and\_affine}}}{\emph{self}}{} Return a copy of the child path, with the non-affine part of the transform already applied, along with the affine part of the path necessary to complete the transformation. \end{fulllineitems} \index{get\_transformed\_points\_and\_affine() (matplotlib.transforms.TransformedPath method)@\spxentry{get\_transformed\_points\_and\_affine()}\spxextra{matplotlib.transforms.TransformedPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.TransformedPath.get_transformed_points_and_affine}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transformed\_points\_and\_affine}}}{\emph{self}}{} Return a copy of the child path, with the non-affine part of the transform already applied, along with the affine part of the path necessary to complete the transformation. Unlike {\hyperref[\detokenize{api/transformations:matplotlib.transforms.TransformedPath.get_transformed_path_and_affine}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_transformed\_path\_and\_affine()}}}}}, no interpolation will be performed. \end{fulllineitems} \end{fulllineitems} \index{blended\_transform\_factory() (in module matplotlib.transforms)@\spxentry{blended\_transform\_factory()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.blended_transform_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{blended\_transform\_factory}}}{\emph{x\_transform}, \emph{y\_transform}}{} Create a new "blended" transform using \sphinxstyleemphasis{x\_transform} to transform the \sphinxstyleemphasis{x}-axis and \sphinxstyleemphasis{y\_transform} to transform the \sphinxstyleemphasis{y}-axis. A faster version of the blended transform is returned for the case where both child transforms are affine. \end{fulllineitems} \index{composite\_transform\_factory() (in module matplotlib.transforms)@\spxentry{composite\_transform\_factory()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.composite_transform_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{composite\_transform\_factory}}}{\emph{a}, \emph{b}}{} Create a new composite transform that is the result of applying transform a then transform b. Shortcut versions of the blended transform are provided for the case where both child transforms are affine, or one or the other is the identity transform. Composite transforms may also be created using the '+' operator, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{c} \PYG{o}{=} \PYG{n}{a} \PYG{o}{+} \PYG{n}{b} \end{sphinxVerbatim} \end{fulllineitems} \index{interval\_contains() (in module matplotlib.transforms)@\spxentry{interval\_contains()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.interval_contains}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{interval\_contains}}}{\emph{interval}, \emph{val}}{} Check, inclusively, whether an interval includes a given value. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}sequence of scalar{]} A 2-length sequence, endpoints that define the interval. \item[{\sphinxstylestrong{val}}] \leavevmode{[}scalar{]} Value to check is within interval. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{bool}] \leavevmode Returns \sphinxstyleemphasis{True} if given \sphinxstyleemphasis{val} is within the \sphinxstyleemphasis{interval}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{interval\_contains\_open() (in module matplotlib.transforms)@\spxentry{interval\_contains\_open()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.interval_contains_open}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{interval\_contains\_open}}}{\emph{interval}, \emph{val}}{} Check, excluding endpoints, whether an interval includes a given value. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{interval}}] \leavevmode{[}sequence of scalar{]} A 2-length sequence, endpoints that define the interval. \item[{\sphinxstylestrong{val}}] \leavevmode{[}scalar{]} Value to check is within interval. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{bool}] \leavevmode Returns true if given val is within the interval. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{nonsingular() (in module matplotlib.transforms)@\spxentry{nonsingular()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.nonsingular}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{nonsingular}}}{\emph{vmin}, \emph{vmax}, \emph{expander=0.001}, \emph{tiny=1e-15}, \emph{increasing=True}}{} Modify the endpoints of a range as needed to avoid singularities. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float{]} The initial endpoints. \item[{\sphinxstylestrong{expander}}] \leavevmode{[}float, optional, default: 0.001{]} Fractional amount by which \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} are expanded if the original interval is too small, based on \sphinxstyleemphasis{tiny}. \item[{\sphinxstylestrong{tiny}}] \leavevmode{[}float, optional, default: 1e-15{]} Threshold for the ratio of the interval to the maximum absolute value of its endpoints. If the interval is smaller than this, it will be expanded. This value should be around 1e-15 or larger; otherwise the interval will be approaching the double precision resolution limit. \item[{\sphinxstylestrong{increasing}}] \leavevmode{[}bool, optional, default: True{]} If True, swap \sphinxstyleemphasis{vmin}, \sphinxstyleemphasis{vmax} if \sphinxstyleemphasis{vmin} \textgreater{} \sphinxstyleemphasis{vmax}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float{]} Endpoints, expanded and/or swapped if necessary. If either input is inf or NaN, or if both inputs are 0 or very close to zero, it returns -\sphinxstyleemphasis{expander}, \sphinxstyleemphasis{expander}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{offset\_copy() (in module matplotlib.transforms)@\spxentry{offset\_copy()}\spxextra{in module matplotlib.transforms}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/transformations:matplotlib.transforms.offset_copy}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.transforms.}}\sphinxbfcode{\sphinxupquote{offset\_copy}}}{\emph{trans}, \emph{fig=None}, \emph{x=0.0}, \emph{y=0.0}, \emph{units='inches'}}{} Return a new transform with an added offset. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance{]} Any transform, to which offset will be applied. \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}, optional, default: None{]} Current figure. It can be None if \sphinxstyleemphasis{units} are 'dots'. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float, optional, default: 0.0{]} Specifies the offset to apply. \item[{\sphinxstylestrong{units}}] \leavevmode{[}\{'inches', 'points', 'dots'\}, optional{]} Units of the offset. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{trans}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance{]} Transform with applied offset. \end{description} \end{description}\end{quote} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.tri}}} \label{\detokenize{api/tri_api:module-matplotlib.tri}}\label{\detokenize{api/tri_api:matplotlib-tri}}\label{\detokenize{api/tri_api::doc}}\index{matplotlib.tri (module)@\spxentry{matplotlib.tri}\spxextra{module}} Unstructured triangular grid functions. \index{Triangulation (class in matplotlib.tri)@\spxentry{Triangulation}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{Triangulation}}}{\emph{x}, \emph{y}, \emph{triangles=None}, \emph{mask=None}}{} An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automatically generated using a Delaunay triangulation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like of shape (npoints){]} Coordinates of grid points. \item[{\sphinxstylestrong{triangles}}] \leavevmode{[}integer array\_like of shape (ntri, 3), optional{]} For each triangle, the indices of the three points that make up the triangle, ordered in an anticlockwise manner. If not specified, the Delaunay triangulation is calculated. \item[{\sphinxstylestrong{mask}}] \leavevmode{[}boolean array-like of shape (ntri), optional{]} Which triangles are masked out. \end{description} \end{description}\end{quote} \subsubsection*{Notes} For a Triangulation to be valid it must not have duplicate points, triangles formed from colinear points, or overlapping triangles. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.edges}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edges}}}}}}] \leavevmode{[}int array of shape (nedges, 2){]} Return integer array of shape (nedges, 2) containing all edges of non-masked triangles. \item[{{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.neighbors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{neighbors}}}}}}] \leavevmode{[}int array of shape (ntri, 3){]} Return integer array of shape (ntri, 3) containing neighbor triangles. \item[{\sphinxstylestrong{mask}}] \leavevmode{[}bool array of shape (ntri, 3){]} Masked out triangles. \item[{\sphinxstylestrong{is\_delaunay}}] \leavevmode{[}bool{]} Whether the Triangulation is a calculated Delaunay triangulation (where \sphinxcode{\sphinxupquote{triangles}} was not specified) or not. \end{description} \end{description}\end{quote} \index{calculate\_plane\_coefficients() (matplotlib.tri.Triangulation method)@\spxentry{calculate\_plane\_coefficients()}\spxextra{matplotlib.tri.Triangulation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.calculate_plane_coefficients}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{calculate\_plane\_coefficients}}}{\emph{self}, \emph{z}}{} Calculate plane equation coefficients for all unmasked triangles from the point (x, y) coordinates and specified z-array of shape (npoints). The returned array has shape (npoints, 3) and allows z-value at (x, y) position in triangle tri to be calculated using \sphinxcode{\sphinxupquote{z = array{[}tri, 0{]} * x + array{[}tri, 1{]} * y + array{[}tri, 2{]}}}. \end{fulllineitems} \index{edges (matplotlib.tri.Triangulation attribute)@\spxentry{edges}\spxextra{matplotlib.tri.Triangulation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.edges}}\pysigline{\sphinxbfcode{\sphinxupquote{edges}}} Return integer array of shape (nedges, 2) containing all edges of non-masked triangles. Each row defines an edge by it's start point index and end point index. Each edge appears only once, i.e. for an edge between points \sphinxstyleemphasis{i} and \sphinxstyleemphasis{j}, there will only be either \sphinxstyleemphasis{(i, j)} or \sphinxstyleemphasis{(j, i)}. \end{fulllineitems} \index{get\_cpp\_triangulation() (matplotlib.tri.Triangulation method)@\spxentry{get\_cpp\_triangulation()}\spxextra{matplotlib.tri.Triangulation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_cpp_triangulation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_cpp\_triangulation}}}{\emph{self}}{} Return the underlying C++ Triangulation object, creating it if necessary. \end{fulllineitems} \index{get\_from\_args\_and\_kwargs() (matplotlib.tri.Triangulation static method)@\spxentry{get\_from\_args\_and\_kwargs()}\spxextra{matplotlib.tri.Triangulation static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_from_args_and_kwargs}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_from\_args\_and\_kwargs}}}{\emph{*args}, \emph{**kwargs}}{} Return a Triangulation object from the args and kwargs, and the remaining args and kwargs with the consumed values removed. There are two alternatives: either the first argument is a Triangulation object, in which case it is returned, or the args and kwargs are sufficient to create a new Triangulation to return. In the latter case, see Triangulation.\_\_init\_\_ for the possible args and kwargs. \end{fulllineitems} \index{get\_masked\_triangles() (matplotlib.tri.Triangulation method)@\spxentry{get\_masked\_triangles()}\spxextra{matplotlib.tri.Triangulation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_masked_triangles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_masked\_triangles}}}{\emph{self}}{} Return an array of triangles that are not masked. \end{fulllineitems} \index{get\_trifinder() (matplotlib.tri.Triangulation method)@\spxentry{get\_trifinder()}\spxextra{matplotlib.tri.Triangulation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_trifinder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_trifinder}}}{\emph{self}}{} Return the default {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.TriFinder}}}}} of this triangulation, creating it if necessary. This allows the same TriFinder object to be easily shared. \end{fulllineitems} \index{neighbors (matplotlib.tri.Triangulation attribute)@\spxentry{neighbors}\spxextra{matplotlib.tri.Triangulation attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.neighbors}}\pysigline{\sphinxbfcode{\sphinxupquote{neighbors}}} Return integer array of shape (ntri, 3) containing neighbor triangles. For each triangle, the indices of the three triangles that share the same edges, or -1 if there is no such neighboring triangle. neighbors{[}i,j{]} is the triangle that is the neighbor to the edge from point index triangles{[}i,j{]} to point index triangles{[}i,(j+1)\%3{]}. \end{fulllineitems} \index{set\_mask() (matplotlib.tri.Triangulation method)@\spxentry{set\_mask()}\spxextra{matplotlib.tri.Triangulation method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.Triangulation.set_mask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_mask}}}{\emph{self}, \emph{mask}}{} Set or clear the mask array. This is either None, or a boolean array of shape (ntri). \end{fulllineitems} \end{fulllineitems} \index{TriFinder (class in matplotlib.tri)@\spxentry{TriFinder}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriFinder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{TriFinder}}}{\emph{triangulation}}{} Abstract base class for classes used to find the triangles of a Triangulation in which (x,y) points lie. Rather than instantiate an object of a class derived from TriFinder, it is usually better to use the function {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_trifinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation.get\_trifinder()}}}}}. Derived classes implement \_\_call\_\_(x,y) where x,y are array\_like point coordinates of the same shape. \end{fulllineitems} \index{TrapezoidMapTriFinder (class in matplotlib.tri)@\spxentry{TrapezoidMapTriFinder}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TrapezoidMapTriFinder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{TrapezoidMapTriFinder}}}{\emph{triangulation}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.tri.trifinder.TriFinder}} {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriFinder}}}}} class implemented using the trapezoid map algorithm from the book "Computational Geometry, Algorithms and Applications", second edition, by M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf. The triangulation must be valid, i.e. it must not have duplicate points, triangles formed from colinear points, or overlapping triangles. The algorithm has some tolerance to triangles formed from colinear points, but this should not be relied upon. \end{fulllineitems} \index{TriInterpolator (class in matplotlib.tri)@\spxentry{TriInterpolator}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriInterpolator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{TriInterpolator}}}{\emph{triangulation}, \emph{z}, \emph{trifinder=None}}{} Abstract base class for classes used to perform interpolation on triangular grids. Derived classes implement the following methods: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{\_\_call\_\_(x, y)}} , where x, y are array\_like point coordinates of the same shape, and that returns a masked array of the same shape containing the interpolated z-values. \item {} \sphinxcode{\sphinxupquote{gradient(x, y)}} , where x, y are array\_like point coordinates of the same shape, and that returns a list of 2 masked arrays of the same shape containing the 2 derivatives of the interpolator (derivatives of interpolated z values with respect to x and y). \end{itemize} \end{fulllineitems} \index{LinearTriInterpolator (class in matplotlib.tri)@\spxentry{LinearTriInterpolator}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.LinearTriInterpolator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{LinearTriInterpolator}}}{\emph{triangulation}, \emph{z}, \emph{trifinder=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.tri.triinterpolate.TriInterpolator}} A LinearTriInterpolator performs linear interpolation on a triangular grid. Each triangle is represented by a plane so that an interpolated value at point (x,y) lies on the plane of the triangle containing (x,y). Interpolated values are therefore continuous across the triangulation, but their first derivatives are discontinuous at edges between triangles. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{triangulation}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object{]} The triangulation to interpolate over. \item[{\sphinxstylestrong{z}}] \leavevmode{[}array\_like of shape (npoints,){]} Array of values, defined at grid points, to interpolate between. \item[{\sphinxstylestrong{trifinder}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriFinder}}}}} object, optional{]} If this is not specified, the Triangulation's default TriFinder will be used by calling {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_trifinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation.get\_trifinder()}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Methods} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstylestrong{{}`\_\_call\_\_{}` (x, y)} & ( Returns interpolated values at x,y points) \\ \hline \sphinxstylestrong{{}`gradient{}` (x, y)} & (Returns interpolated derivatives at x,y points) \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \index{gradient() (matplotlib.tri.LinearTriInterpolator method)@\spxentry{gradient()}\spxextra{matplotlib.tri.LinearTriInterpolator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.LinearTriInterpolator.gradient}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{gradient}}}{\emph{self}, \emph{x}, \emph{y}}{} Returns a list of 2 masked arrays containing interpolated derivatives at the specified x,y points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like{]} x and y coordinates of the same shape and any number of dimensions. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dzdx, dzdy}}] \leavevmode{[}np.ma.array{]} 2 masked arrays of the same shape as \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}; values corresponding to (x,y) points outside of the triangulation are masked out. The first returned array contains the values of \(\frac{\partial z}{\partial x}\) and the second those of \(\frac{\partial z}{\partial y}\). \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{CubicTriInterpolator (class in matplotlib.tri)@\spxentry{CubicTriInterpolator}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.CubicTriInterpolator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{CubicTriInterpolator}}}{\emph{triangulation}, \emph{z}, \emph{kind='min\_E'}, \emph{trifinder=None}, \emph{dz=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.tri.triinterpolate.TriInterpolator}} A CubicTriInterpolator performs cubic interpolation on triangular grids. In one-dimension - on a segment - a cubic interpolating function is defined by the values of the function and its derivative at both ends. This is almost the same in 2-d inside a triangle, except that the values of the function and its 2 derivatives have to be defined at each triangle node. The CubicTriInterpolator takes the value of the function at each node - provided by the user - and internally computes the value of the derivatives, resulting in a smooth interpolation. (As a special feature, the user can also impose the value of the derivatives at each node, but this is not supposed to be the common usage.) \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{triangulation}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object{]} The triangulation to interpolate over. \item[{\sphinxstylestrong{z}}] \leavevmode{[}array\_like of shape (npoints,){]} Array of values, defined at grid points, to interpolate between. \item[{\sphinxstylestrong{kind}}] \leavevmode{[}\{'min\_E', 'geom', 'user'\}, optional{]} Choice of the smoothing algorithm, in order to compute the interpolant derivatives (defaults to 'min\_E'): \begin{itemize} \item {} if 'min\_E': (default) The derivatives at each node is computed to minimize a bending energy. \item {} if 'geom': The derivatives at each node is computed as a weighted average of relevant triangle normals. To be used for speed optimization (large grids). \item {} if 'user': The user provides the argument \sphinxcode{\sphinxupquote{dz}}, no computation is hence needed. \end{itemize} \item[{\sphinxstylestrong{trifinder}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriFinder}}}}} object, optional{]} If not specified, the Triangulation's default TriFinder will be used by calling {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.get_trifinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation.get\_trifinder()}}}}}. \item[{\sphinxstylestrong{dz}}] \leavevmode{[}tuple of array\_likes (dzdx, dzdy), optional{]} Used only if \sphinxstyleemphasis{kind} ='user'. In this case \sphinxstyleemphasis{dz} must be provided as (dzdx, dzdy) where dzdx, dzdy are arrays of the same shape as \sphinxstyleemphasis{z} and are the interpolant first derivatives at the \sphinxstyleemphasis{triangulation} points. \end{description} \end{description}\end{quote} \subsubsection*{Notes} This note is a bit technical and details the way a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.CubicTriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CubicTriInterpolator}}}}} computes a cubic interpolation. The interpolation is based on a Clough-Tocher subdivision scheme of the \sphinxstyleemphasis{triangulation} mesh (to make it clearer, each triangle of the grid will be divided in 3 child-triangles, and on each child triangle the interpolated function is a cubic polynomial of the 2 coordinates). This technique originates from FEM (Finite Element Method) analysis; the element used is a reduced Hsieh-Clough-Tocher (HCT) element. Its shape functions are described in \sphinxcite{api/tri_api:r0be0c58fd53f-1}. The assembled function is guaranteed to be C1-smooth, i.e. it is continuous and its first derivatives are also continuous (this is easy to show inside the triangles but is also true when crossing the edges). In the default case (\sphinxstyleemphasis{kind} ='min\_E'), the interpolant minimizes a curvature energy on the functional space generated by the HCT element shape functions - with imposed values but arbitrary derivatives at each node. The minimized functional is the integral of the so-called total curvature (implementation based on an algorithm from \sphinxcite{api/tri_api:r0be0c58fd53f-2} - PCG sparse solver): \begin{quote} \begin{equation*} \begin{split}E(z) = \frac{1}{2} \int_{\Omega} \left( \left( \frac{\partial^2{z}}{\partial{x}^2} \right)^2 + \left( \frac{\partial^2{z}}{\partial{y}^2} \right)^2 + 2\left( \frac{\partial^2{z}}{\partial{y}\partial{x}} \right)^2 \right) dx\,dy\end{split} \end{equation*}\end{quote} If the case \sphinxstyleemphasis{kind} ='geom' is chosen by the user, a simple geometric approximation is used (weighted average of the triangle normal vectors), which could improve speed on very large grids. \subsubsection*{References} \sphinxcite{api/tri_api:r0be0c58fd53f-1}, \sphinxcite{api/tri_api:r0be0c58fd53f-2} \subsubsection*{Methods} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstylestrong{{}`\_\_call\_\_{}` (x, y)} & ( Returns interpolated values at x,y points) \\ \hline \sphinxstylestrong{{}`gradient{}` (x, y)} & (Returns interpolated derivatives at x,y points) \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \index{gradient() (matplotlib.tri.CubicTriInterpolator method)@\spxentry{gradient()}\spxextra{matplotlib.tri.CubicTriInterpolator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.CubicTriInterpolator.gradient}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{gradient}}}{\emph{self}, \emph{x}, \emph{y}}{} Returns a list of 2 masked arrays containing interpolated derivatives at the specified x,y points. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}array-like{]} x and y coordinates of the same shape and any number of dimensions. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{dzdx, dzdy}}] \leavevmode{[}np.ma.array{]} 2 masked arrays of the same shape as \sphinxstyleemphasis{x} and \sphinxstyleemphasis{y}; values corresponding to (x,y) points outside of the triangulation are masked out. The first returned array contains the values of \(\frac{\partial z}{\partial x}\) and the second those of \(\frac{\partial z}{\partial y}\). \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{TriRefiner (class in matplotlib.tri)@\spxentry{TriRefiner}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriRefiner}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{TriRefiner}}}{\emph{triangulation}}{} Abstract base class for classes implementing mesh refinement. A TriRefiner encapsulates a Triangulation object and provides tools for mesh refinement and interpolation. Derived classes must implements: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{refine\_triangulation(return\_tri\_index=False, **kwargs)}} , where the optional keyword arguments \sphinxstyleemphasis{kwargs} are defined in each TriRefiner concrete implementation, and which returns: \begin{itemize} \item {} a refined triangulation \item {} optionally (depending on \sphinxstyleemphasis{return\_tri\_index}), for each point of the refined triangulation: the index of the initial triangulation triangle to which it belongs. \end{itemize} \item {} \sphinxcode{\sphinxupquote{refine\_field(z, triinterpolator=None, **kwargs)}} , where: \begin{itemize} \item {} \sphinxstyleemphasis{z} array of field values (to refine) defined at the base triangulation nodes \item {} \sphinxstyleemphasis{triinterpolator} is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriInterpolator}}}}} (optional) \item {} the other optional keyword arguments \sphinxstyleemphasis{kwargs} are defined in each TriRefiner concrete implementation \end{itemize} and which returns (as a tuple) a refined triangular mesh and the interpolated values of the field at the refined triangulation nodes. \end{itemize} \end{fulllineitems} \index{UniformTriRefiner (class in matplotlib.tri)@\spxentry{UniformTriRefiner}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.UniformTriRefiner}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{UniformTriRefiner}}}{\emph{triangulation}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.tri.trirefine.TriRefiner}} Uniform mesh refinement by recursive subdivisions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{triangulation}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}}{]} The encapsulated triangulation (to be refined) \end{description} \end{description}\end{quote} \index{refine\_field() (matplotlib.tri.UniformTriRefiner method)@\spxentry{refine\_field()}\spxextra{matplotlib.tri.UniformTriRefiner method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.UniformTriRefiner.refine_field}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refine\_field}}}{\emph{self}, \emph{z}, \emph{triinterpolator=None}, \emph{subdiv=3}}{} Refines a field defined on the encapsulated triangulation. Returns \sphinxstyleemphasis{refi\_tri} (refined triangulation), \sphinxstyleemphasis{refi\_z} (interpolated values of the field at the node of the refined triangulation). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{z}}] \leavevmode{[}1d-array-like of length \sphinxcode{\sphinxupquote{n\_points}}{]} Values of the field to refine, defined at the nodes of the encapsulated triangulation. (\sphinxcode{\sphinxupquote{n\_points}} is the number of points in the initial triangulation) \item[{\sphinxstylestrong{triinterpolator}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TriInterpolator}}}}}, optional{]} Interpolator used for field interpolation. If not specified, a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.CubicTriInterpolator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CubicTriInterpolator}}}}} will be used. \item[{\sphinxstylestrong{subdiv}}] \leavevmode{[}integer, optional{]} Recursion level for the subdivision. Defaults to 3. Each triangle will be divided into \sphinxcode{\sphinxupquote{4**subdiv}} child triangles. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{refi\_tri}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object{]} The returned refined triangulation \item[{\sphinxstylestrong{refi\_z}}] \leavevmode{[}1d array of length: \sphinxstyleemphasis{refi\_tri} node count.{]} The returned interpolated field (at \sphinxstyleemphasis{refi\_tri} nodes) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{refine\_triangulation() (matplotlib.tri.UniformTriRefiner method)@\spxentry{refine\_triangulation()}\spxextra{matplotlib.tri.UniformTriRefiner method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.UniformTriRefiner.refine_triangulation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{refine\_triangulation}}}{\emph{self}, \emph{return\_tri\_index=False}, \emph{subdiv=3}}{} Computes an uniformly refined triangulation \sphinxstyleemphasis{refi\_triangulation} of the encapsulated \sphinxcode{\sphinxupquote{triangulation}}. This function refines the encapsulated triangulation by splitting each father triangle into 4 child sub-triangles built on the edges midside nodes, recursively (level of recursion \sphinxstyleemphasis{subdiv}). In the end, each triangle is hence divided into \sphinxcode{\sphinxupquote{4**subdiv}} child triangles. The default value for \sphinxstyleemphasis{subdiv} is 3 resulting in 64 refined subtriangles for each triangle of the initial triangulation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{return\_tri\_index}}] \leavevmode{[}boolean, optional{]} Boolean indicating whether an index table indicating the father triangle index of each point will be returned. Default value False. \item[{\sphinxstylestrong{subdiv}}] \leavevmode{[}integer, optional{]} Recursion level for the subdivision. Defaults value 3. Each triangle will be divided into \sphinxcode{\sphinxupquote{4**subdiv}} child triangles. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{refi\_triangulation}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}}{]} The returned refined triangulation \item[{\sphinxstylestrong{found\_index}}] \leavevmode{[}array-like of integers{]} Index of the initial triangulation containing triangle, for each point of \sphinxstyleemphasis{refi\_triangulation}. Returned only if \sphinxstyleemphasis{return\_tri\_index} is set to True. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{TriAnalyzer (class in matplotlib.tri)@\spxentry{TriAnalyzer}\spxextra{class in matplotlib.tri}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.tri.}}\sphinxbfcode{\sphinxupquote{TriAnalyzer}}}{\emph{triangulation}}{} Define basic tools for triangular mesh analysis and improvement. A TriAnalyzer encapsulates a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object and provides basic tools for mesh analysis and mesh improvement. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{triangulation}}] \leavevmode{[}{\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object{]} The encapsulated triangulation to analyze. \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{{}`scale\_factors{}`}}] \leavevmode \end{description} \end{description}\end{quote} \index{circle\_ratios() (matplotlib.tri.TriAnalyzer method)@\spxentry{circle\_ratios()}\spxextra{matplotlib.tri.TriAnalyzer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.circle_ratios}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{circle\_ratios}}}{\emph{self}, \emph{rescale=True}}{} Returns a measure of the triangulation triangles flatness. The ratio of the incircle radius over the circumcircle radius is a widely used indicator of a triangle flatness. It is always \sphinxcode{\sphinxupquote{\textless{}= 0.5}} and \sphinxcode{\sphinxupquote{== 0.5}} only for equilateral triangles. Circle ratios below 0.01 denote very flat triangles. To avoid unduly low values due to a difference of scale between the 2 axis, the triangular mesh can first be rescaled to fit inside a unit square with {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.scale_factors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale\_factors}}}}} (Only if \sphinxstyleemphasis{rescale} is True, which is its default value). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rescale}}] \leavevmode{[}boolean, optional{]} If True, a rescaling will be internally performed (based on {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.scale_factors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale\_factors}}}}}, so that the (unmasked) triangles fit exactly inside a unit square mesh. Default is True. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{circle\_ratios}}] \leavevmode{[}masked array{]} Ratio of the incircle radius over the circumcircle radius, for each 'rescaled' triangle of the encapsulated triangulation. Values corresponding to masked triangles are masked out. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_flat\_tri\_mask() (matplotlib.tri.TriAnalyzer method)@\spxentry{get\_flat\_tri\_mask()}\spxextra{matplotlib.tri.TriAnalyzer method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.get_flat_tri_mask}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_flat\_tri\_mask}}}{\emph{self}, \emph{min\_circle\_ratio=0.01}, \emph{rescale=True}}{} Eliminates excessively flat border triangles from the triangulation. Returns a mask \sphinxstyleemphasis{new\_mask} which allows to clean the encapsulated triangulation from its border-located flat triangles (according to their {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.circle_ratios}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{circle\_ratios()}}}}}). This mask is meant to be subsequently applied to the triangulation using {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation.set_mask}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.tri.Triangulation.set\_mask()}}}}}. \sphinxstyleemphasis{new\_mask} is an extension of the initial triangulation mask in the sense that an initially masked triangle will remain masked. The \sphinxstyleemphasis{new\_mask} array is computed recursively; at each step flat triangles are removed only if they share a side with the current mesh border. Thus no new holes in the triangulated domain will be created. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{min\_circle\_ratio}}] \leavevmode{[}float, optional{]} Border triangles with incircle/circumcircle radii ratio r/R will be removed if r/R \textless{} \sphinxstyleemphasis{min\_circle\_ratio}. Default value: 0.01 \item[{\sphinxstylestrong{rescale}}] \leavevmode{[}boolean, optional{]} If True, a rescaling will first be internally performed (based on {\hyperref[\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.scale_factors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scale\_factors}}}}} ), so that the (unmasked) triangles fit exactly inside a unit square mesh. This rescaling accounts for the difference of scale which might exist between the 2 axis. Default (and recommended) value is True. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{new\_mask}}] \leavevmode{[}array-like of booleans{]} Mask to apply to encapsulated triangulation. All the initially masked triangles remain masked in the \sphinxstyleemphasis{new\_mask}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The rationale behind this function is that a Delaunay triangulation - of an unstructured set of points - sometimes contains almost flat triangles at its border, leading to artifacts in plots (especially for high-resolution contouring). Masked with computed \sphinxstyleemphasis{new\_mask}, the encapsulated triangulation would contain no more unmasked border triangles with a circle ratio below \sphinxstyleemphasis{min\_circle\_ratio}, thus improving the mesh quality for subsequent plots or interpolation. \end{fulllineitems} \index{scale\_factors (matplotlib.tri.TriAnalyzer attribute)@\spxentry{scale\_factors}\spxextra{matplotlib.tri.TriAnalyzer attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/tri_api:matplotlib.tri.TriAnalyzer.scale_factors}}\pysigline{\sphinxbfcode{\sphinxupquote{scale\_factors}}} Factors to rescale the triangulation into a unit square. Returns \sphinxstyleemphasis{k}, tuple of 2 scale factors. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{k}}] \leavevmode{[}tuple of 2 floats (kx, ky){]} Tuple of floats that would rescale the triangulation : \sphinxcode{\sphinxupquote{{[}triangulation.x * kx, triangulation.y * ky{]}}} fits exactly inside a unit square. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.type1font}}} \label{\detokenize{api/type1font:module-matplotlib.type1font}}\label{\detokenize{api/type1font:matplotlib-type1font}}\label{\detokenize{api/type1font::doc}}\index{matplotlib.type1font (module)@\spxentry{matplotlib.type1font}\spxextra{module}} This module contains a class representing a Type 1 font. This version reads pfa and pfb files and splits them for embedding in pdf files. It also supports SlantFont and ExtendFont transformations, similarly to pdfTeX and friends. There is no support yet for subsetting. Usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{font} \PYG{o}{=} \PYG{n}{Type1Font}\PYG{p}{(}\PYG{n}{filename}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{clear\PYGZus{}part}\PYG{p}{,} \PYG{n}{encrypted\PYGZus{}part}\PYG{p}{,} \PYG{n}{finale} \PYG{o}{=} \PYG{n}{font}\PYG{o}{.}\PYG{n}{parts} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{slanted\PYGZus{}font} \PYG{o}{=} \PYG{n}{font}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{slant}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{0.167}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{extended\PYGZus{}font} \PYG{o}{=} \PYG{n}{font}\PYG{o}{.}\PYG{n}{transform}\PYG{p}{(}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{extend}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+m+mf}{1.2}\PYG{p}{\PYGZcb{}}\PYG{p}{)} \end{sphinxVerbatim} Sources: \begin{itemize} \item {} Adobe Technical Note \#5040, Supporting Downloadable PostScript Language Fonts. \item {} Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing, v1.1, 1993. ISBN 0-201-57044-0. \end{itemize} \index{Type1Font (class in matplotlib.type1font)@\spxentry{Type1Font}\spxextra{class in matplotlib.type1font}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/type1font:matplotlib.type1font.Type1Font}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.type1font.}}\sphinxbfcode{\sphinxupquote{Type1Font}}}{\emph{input}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class representing a Type-1 font, for use by backends. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parts}}] \leavevmode{[}tuple{]} A 3-tuple of the cleartext part, the encrypted part, and the finale of zeros. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}Dict{[}str, Any{]}{]} A dictionary of font properties. \end{description} \end{description}\end{quote} Initialize a Type-1 font. \sphinxstyleemphasis{input} can be either the file name of a pfb file or a 3-tuple of already-decoded Type-1 font parts. \index{parts (matplotlib.type1font.Type1Font attribute)@\spxentry{parts}\spxextra{matplotlib.type1font.Type1Font attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/type1font:matplotlib.type1font.Type1Font.parts}}\pysigline{\sphinxbfcode{\sphinxupquote{parts}}}~ \end{fulllineitems} \index{prop (matplotlib.type1font.Type1Font attribute)@\spxentry{prop}\spxextra{matplotlib.type1font.Type1Font attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/type1font:matplotlib.type1font.Type1Font.prop}}\pysigline{\sphinxbfcode{\sphinxupquote{prop}}}~ \end{fulllineitems} \index{transform() (matplotlib.type1font.Type1Font method)@\spxentry{transform()}\spxextra{matplotlib.type1font.Type1Font method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/type1font:matplotlib.type1font.Type1Font.transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{transform}}}{\emph{self}, \emph{effects}}{} Transform the font by slanting or extending. \sphinxstyleemphasis{effects} should be a dict where \sphinxcode{\sphinxupquote{effects{[}'slant'{]}}} is the tangent of the angle that the font is to be slanted to the right (so negative values slant to the left) and \sphinxcode{\sphinxupquote{effects{[}'extend'{]}}} is the multiplier by which the font is to be extended (so values less than 1.0 condense). Returns a new {\hyperref[\detokenize{api/type1font:matplotlib.type1font.Type1Font}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Type1Font}}}}} object. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.units}}} \label{\detokenize{api/units_api:module-matplotlib.units}}\label{\detokenize{api/units_api:matplotlib-units}}\label{\detokenize{api/units_api::doc}}\index{matplotlib.units (module)@\spxentry{matplotlib.units}\spxextra{module}} The classes here provide support for using custom classes with Matplotlib, e.g., those that do not expose the array interface but know how to convert themselves to arrays. It also supports classes with units and units conversion. Use cases include converters for custom objects, e.g., a list of datetime objects, as well as for objects that are unit aware. We don't assume any particular units implementation; rather a units implementation must provide the register with the Registry converter dictionary and a {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConversionInterface}}}}}. For example, here is a complete implementation which supports plotting with native datetime objects: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{units} \PYG{k}{as} \PYG{n+nn}{units} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{dates} \PYG{k}{as} \PYG{n+nn}{dates} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{ticker} \PYG{k}{as} \PYG{n+nn}{ticker} \PYG{k+kn}{import} \PYG{n+nn}{datetime} \PYG{k}{class} \PYG{n+nc}{DateConverter}\PYG{p}{(}\PYG{n}{units}\PYG{o}{.}\PYG{n}{ConversionInterface}\PYG{p}{)}\PYG{p}{:} \PYG{n+nd}{@staticmethod} \PYG{k}{def} \PYG{n+nf}{convert}\PYG{p}{(}\PYG{n}{value}\PYG{p}{,} \PYG{n}{unit}\PYG{p}{,} \PYG{n}{axis}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Convert a datetime value to a scalar or array}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{return} \PYG{n}{dates}\PYG{o}{.}\PYG{n}{date2num}\PYG{p}{(}\PYG{n}{value}\PYG{p}{)} \PYG{n+nd}{@staticmethod} \PYG{k}{def} \PYG{n+nf}{axisinfo}\PYG{p}{(}\PYG{n}{unit}\PYG{p}{,} \PYG{n}{axis}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Return major and minor tick locators and formatters}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{if} \PYG{n}{unit}\PYG{o}{!=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{k}{return} \PYG{k+kc}{None} \PYG{n}{majloc} \PYG{o}{=} \PYG{n}{dates}\PYG{o}{.}\PYG{n}{AutoDateLocator}\PYG{p}{(}\PYG{p}{)} \PYG{n}{majfmt} \PYG{o}{=} \PYG{n}{dates}\PYG{o}{.}\PYG{n}{AutoDateFormatter}\PYG{p}{(}\PYG{n}{majloc}\PYG{p}{)} \PYG{k}{return} \PYG{n}{AxisInfo}\PYG{p}{(}\PYG{n}{majloc}\PYG{o}{=}\PYG{n}{majloc}\PYG{p}{,} \PYG{n}{majfmt}\PYG{o}{=}\PYG{n}{majfmt}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n+nd}{@staticmethod} \PYG{k}{def} \PYG{n+nf}{default\PYGZus{}units}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{axis}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Return the default unit for x or None}\PYG{l+s+s1}{\PYGZsq{}} \PYG{k}{return} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{date}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} Finally we register our object type with the Matplotlib units registry.} \PYG{n}{units}\PYG{o}{.}\PYG{n}{registry}\PYG{p}{[}\PYG{n}{datetime}\PYG{o}{.}\PYG{n}{date}\PYG{p}{]} \PYG{o}{=} \PYG{n}{DateConverter}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \index{AxisInfo (class in matplotlib.units)@\spxentry{AxisInfo}\spxextra{class in matplotlib.units}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.AxisInfo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.units.}}\sphinxbfcode{\sphinxupquote{AxisInfo}}}{\emph{majloc=None}, \emph{minloc=None}, \emph{majfmt=None}, \emph{minfmt=None}, \emph{label=None}, \emph{default\_limits=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Information to support default axis labeling, tick labeling, and limits. An instance of this class must be returned by {\hyperref[\detokenize{api/units_api:matplotlib.units.ConversionInterface.axisinfo}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ConversionInterface.axisinfo}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{majloc, minloc}}] \leavevmode{[}Locator, optional{]} Tick locators for the major and minor ticks. \item[{\sphinxstylestrong{majfmt, minfmt}}] \leavevmode{[}Formatter, optional{]} Tick formatters for the major and minor ticks. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str, optional{]} The default axis label. \item[{\sphinxstylestrong{default\_limits}}] \leavevmode{[}optional{]} The default min and max limits of the axis if no data has been plotted. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If any of the above are \sphinxcode{\sphinxupquote{None}}, the axis will simply use the default value. \end{fulllineitems} \index{ConversionError@\spxentry{ConversionError}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionError}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.units.}}\sphinxbfcode{\sphinxupquote{ConversionError}}} Bases: \sphinxhref{https://docs.python.org/3/library/exceptions.html\#TypeError}{\sphinxcode{\sphinxupquote{TypeError}}} \end{fulllineitems} \index{ConversionInterface (class in matplotlib.units)@\spxentry{ConversionInterface}\spxextra{class in matplotlib.units}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionInterface}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.units.}}\sphinxbfcode{\sphinxupquote{ConversionInterface}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} The minimal interface for a converter to take custom data types (or sequences) and convert them to values Matplotlib can use. \index{axisinfo() (matplotlib.units.ConversionInterface static method)@\spxentry{axisinfo()}\spxextra{matplotlib.units.ConversionInterface static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionInterface.axisinfo}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{axisinfo}}}{\emph{unit}, \emph{axis}}{} Return an \sphinxcode{\sphinxupquote{AxisInfo}} for the axis with the specified units. \end{fulllineitems} \index{convert() (matplotlib.units.ConversionInterface static method)@\spxentry{convert()}\spxextra{matplotlib.units.ConversionInterface static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionInterface.convert}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{convert}}}{\emph{obj}, \emph{unit}, \emph{axis}}{} Convert \sphinxstyleemphasis{obj} using \sphinxstyleemphasis{unit} for the specified \sphinxstyleemphasis{axis}. If \sphinxstyleemphasis{obj} is a sequence, return the converted sequence. The output must be a sequence of scalars that can be used by the numpy array layer. \end{fulllineitems} \index{default\_units() (matplotlib.units.ConversionInterface static method)@\spxentry{default\_units()}\spxextra{matplotlib.units.ConversionInterface static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionInterface.default_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{default\_units}}}{\emph{x}, \emph{axis}}{} Return the default unit for \sphinxstyleemphasis{x} or \sphinxcode{\sphinxupquote{None}} for the given axis. \end{fulllineitems} \index{is\_numlike() (matplotlib.units.ConversionInterface static method)@\spxentry{is\_numlike()}\spxextra{matplotlib.units.ConversionInterface static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.ConversionInterface.is_numlike}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{is\_numlike}}}{\emph{x}}{} The Matplotlib datalim, autoscaling, locators etc work with scalars which are the units converted to floats given the current unit. The converter may be passed these floats, or arrays of them, even when units are set. \end{fulllineitems} \end{fulllineitems} \index{Registry (class in matplotlib.units)@\spxentry{Registry}\spxextra{class in matplotlib.units}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.Registry}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.units.}}\sphinxbfcode{\sphinxupquote{Registry}}} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}} Register types with conversion interface. \index{get\_converter() (matplotlib.units.Registry method)@\spxentry{get\_converter()}\spxextra{matplotlib.units.Registry method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/units_api:matplotlib.units.Registry.get_converter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_converter}}}{\emph{self}, \emph{x}}{} Get the converter interface instance for \sphinxstyleemphasis{x}, or None. \end{fulllineitems} \end{fulllineitems} \section{\sphinxstyleliteralintitle{\sphinxupquote{matplotlib.widgets}}} \label{\detokenize{api/widgets_api:matplotlib-widgets}}\label{\detokenize{api/widgets_api::doc}} \sphinxincludegraphics[]{inheritance-0008327dd35f1107da98953fdcb91899fde05d66.pdf} \phantomsection\label{\detokenize{api/widgets_api:module-matplotlib.widgets}}\index{matplotlib.widgets (module)@\spxentry{matplotlib.widgets}\spxextra{module}} \subsection{GUI neutral widgets} \label{\detokenize{api/widgets_api:gui-neutral-widgets}} Widgets that are designed to work for any of the GUI backends. All of these widgets require you to predefine a {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance and pass that as the first arg. matplotlib doesn't try to be too smart with respect to layout -- you will have to figure out how wide and tall you want your Axes to be to accommodate your widget. \index{AxesWidget (class in matplotlib.widgets)@\spxentry{AxesWidget}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{AxesWidget}}}{\emph{ax}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Widget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Widget}}}}} Widget that is connected to a single {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. To guarantee that the widget remains responsive and not garbage-collected, a reference to the object should be maintained by the user. This is necessary because the callback registry maintains only weak-refs to the functions, which are member functions of the widget. If there are no references to the widget object it may be garbage collected which will disconnect the callbacks. Attributes: \begin{description} \item[{\sphinxstyleemphasis{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The parent axes for the widget \item[{\sphinxstyleemphasis{canvas}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.FigureCanvasBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureCanvasBase}}}}} subclass{]} The parent figure canvas for the widget. \item[{\sphinxstyleemphasis{active}}] \leavevmode{[}bool{]} If False, the widget does not respond to events. \end{description} \index{connect\_event() (matplotlib.widgets.AxesWidget method)@\spxentry{connect\_event()}\spxextra{matplotlib.widgets.AxesWidget method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget.connect_event}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect\_event}}}{\emph{self}, \emph{event}, \emph{callback}}{} Connect callback with an event. This should be used in lieu of \sphinxcode{\sphinxupquote{figure.canvas.mpl\_connect}} since this function stores callback ids for later clean up. \end{fulllineitems} \index{disconnect\_events() (matplotlib.widgets.AxesWidget method)@\spxentry{disconnect\_events()}\spxextra{matplotlib.widgets.AxesWidget method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget.disconnect_events}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect\_events}}}{\emph{self}}{} Disconnect all events created by this widget. \end{fulllineitems} \end{fulllineitems} \index{Button (class in matplotlib.widgets)@\spxentry{Button}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Button}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{Button}}}{\emph{ax}, \emph{label}, \emph{image=None}, \emph{color='0.85'}, \emph{hovercolor='0.95'}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A GUI neutral button. For the button to remain responsive you must keep a reference to it. Call {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Button.on_clicked}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_clicked()}}}}} to connect to the button. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} the button renders into. \item[{\sphinxstylestrong{label}}] \leavevmode A {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instance. \item[{\sphinxstylestrong{color}}] \leavevmode The color of the button when not hovering. \item[{\sphinxstylestrong{hovercolor}}] \leavevmode The color of the button when hovering. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}matplotlib.axes.Axes{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance the button will be placed into. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} The button text. Accepts string. \item[{\sphinxstylestrong{image}}] \leavevmode{[}array, mpl image, Pillow Image{]} The image to place in the button, if not \sphinxstyleemphasis{None}. Can be any legal arg to imshow (numpy array, matplotlib Image instance, or Pillow Image). \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} The color of the button when not activated \item[{\sphinxstylestrong{hovercolor}}] \leavevmode{[}color{]} The color of the button when the mouse is over it \end{description} \end{description}\end{quote} \index{disconnect() (matplotlib.widgets.Button method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.Button method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Button.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} Remove the callback function with connection id \sphinxstyleemphasis{cid}. \end{fulllineitems} \index{on\_clicked() (matplotlib.widgets.Button method)@\spxentry{on\_clicked()}\spxextra{matplotlib.widgets.Button method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Button.on_clicked}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_clicked}}}{\emph{self}, \emph{func}}{} Connect the callback function \sphinxstyleemphasis{func} to button click events. Returns a connection id, which can be used to disconnect the callback. \end{fulllineitems} \end{fulllineitems} \index{CheckButtons (class in matplotlib.widgets)@\spxentry{CheckButtons}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{CheckButtons}}}{\emph{ax}, \emph{labels}, \emph{actives=None}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A GUI neutral set of check buttons. For the check buttons to remain responsive you must keep a reference to this object. The following attributes are exposed \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{ax}}] \leavevmode The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance the buttons are located in \item[{\sphinxstyleemphasis{labels}}] \leavevmode List of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instances \item[{\sphinxstyleemphasis{lines}}] \leavevmode List of (line1, line2) tuples for the x's in the check boxes. These lines exist for each box, but have \sphinxcode{\sphinxupquote{set\_visible(False)}} when its box is not checked. \item[{\sphinxstyleemphasis{rectangles}}] \leavevmode List of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Rectangle}}}}} instances \end{description} \end{quote} Connect to the CheckButtons with the {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.on_clicked}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_clicked()}}}}} method Add check buttons to {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance \sphinxstyleemphasis{ax} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The parent axes for the widget. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}List{[}str{]}{]} The labels of the check buttons. \item[{\sphinxstylestrong{actives}}] \leavevmode{[}List{[}bool{]}, optional{]} The initial check states of the buttons. The list must have the same length as \sphinxstyleemphasis{labels}. If not given, all buttons are unchecked. \end{description} \end{description}\end{quote} \index{disconnect() (matplotlib.widgets.CheckButtons method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.CheckButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} remove the observer with connection id \sphinxstyleemphasis{cid} \end{fulllineitems} \index{get\_status() (matplotlib.widgets.CheckButtons method)@\spxentry{get\_status()}\spxextra{matplotlib.widgets.CheckButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.get_status}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_status}}}{\emph{self}}{} returns a tuple of the status (True/False) of all of the check buttons \end{fulllineitems} \index{on\_clicked() (matplotlib.widgets.CheckButtons method)@\spxentry{on\_clicked()}\spxextra{matplotlib.widgets.CheckButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.on_clicked}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_clicked}}}{\emph{self}, \emph{func}}{} Connect the callback function \sphinxstyleemphasis{func} to button click events. Returns a connection id, which can be used to disconnect the callback. \end{fulllineitems} \index{set\_active() (matplotlib.widgets.CheckButtons method)@\spxentry{set\_active()}\spxextra{matplotlib.widgets.CheckButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.CheckButtons.set_active}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_active}}}{\emph{self}, \emph{index}}{} Directly (de)activate a check button by index. \begin{description} \item[{\sphinxstyleemphasis{index} is an index into the original label list}] \leavevmode that this object was constructed with. Raises ValueError if \sphinxstyleemphasis{index} is invalid. \end{description} Callbacks will be triggered if \sphinxcode{\sphinxupquote{eventson}} is True. \end{fulllineitems} \end{fulllineitems} \index{Cursor (class in matplotlib.widgets)@\spxentry{Cursor}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Cursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{Cursor}}}{\emph{ax}, \emph{horizOn=True}, \emph{vertOn=True}, \emph{useblit=False}, \emph{**lineprops}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A crosshair cursor that spans the axes and moves with mouse cursor. For the cursor to remain responsive you must keep a reference to it. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} to attach the cursor to. \item[{\sphinxstylestrong{horizOn}}] \leavevmode{[}bool, optional, default: True{]} Whether to draw the horizontal line. \item[{\sphinxstylestrong{vertOn}}] \leavevmode{[}bool, optional, default: True{]} Whether to draw the vertical line. \item[{\sphinxstylestrong{useblit}}] \leavevmode{[}bool, optional, default: False{]} Use blitting for faster drawing if supported by the backend. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**lineprops}}] \leavevmode {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} properties that control the appearance of the lines. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.axhline:matplotlib.axes.Axes.axhline}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axhline}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} See \DUrole{xref,std,std-doc}{/gallery/widgets/cursor}. \index{clear() (matplotlib.widgets.Cursor method)@\spxentry{clear()}\spxextra{matplotlib.widgets.Cursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Cursor.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}, \emph{event}}{} Internal event handler to clear the cursor. \end{fulllineitems} \index{onmove() (matplotlib.widgets.Cursor method)@\spxentry{onmove()}\spxextra{matplotlib.widgets.Cursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Cursor.onmove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onmove}}}{\emph{self}, \emph{event}}{} Internal event handler to draw the cursor when the mouse moves. \end{fulllineitems} \end{fulllineitems} \index{EllipseSelector (class in matplotlib.widgets)@\spxentry{EllipseSelector}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.EllipseSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{EllipseSelector}}}{\emph{ax}, \emph{onselect}, \emph{drawtype='box'}, \emph{minspanx=None}, \emph{minspany=None}, \emph{useblit=False}, \emph{lineprops=None}, \emph{rectprops=None}, \emph{spancoords='data'}, \emph{button=None}, \emph{maxdist=10}, \emph{marker\_props=None}, \emph{interactive=False}, \emph{state\_modifier\_keys=None}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.RectangleSelector}}}}} Select an elliptical region of an axes. For the cursor to remain responsive you must keep a reference to it. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{widgets} \PYG{k}{import} \PYG{n}{EllipseSelector} \PYG{k}{def} \PYG{n+nf}{onselect}\PYG{p}{(}\PYG{n}{eclick}\PYG{p}{,} \PYG{n}{erelease}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{eclick and erelease are matplotlib events at press and release.}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{startposition: (}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{eclick}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{eclick}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{endposition : (}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{erelease}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{erelease}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{used button : }\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{eclick}\PYG{o}{.}\PYG{n}{button}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{toggle\PYGZus{}selector}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ Key pressed.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{key} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Q}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{q}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o+ow}{and} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{ES}\PYG{o}{.}\PYG{n}{active}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{EllipseSelector deactivated.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS}\PYG{o}{.}\PYG{n}{set\PYGZus{}active}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{key} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o+ow}{and} \PYG{o+ow}{not} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{ES}\PYG{o}{.}\PYG{n}{active}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{EllipseSelector activated.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{ES}\PYG{o}{.}\PYG{n}{set\PYGZus{}active}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{100.}\PYG{p}{)} \PYG{o}{/} \PYG{l+m+mi}{99} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{ES} \PYG{o}{=} \PYG{n}{EllipseSelector}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{onselect}\PYG{p}{,} \PYG{n}{drawtype}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{key\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{toggle\PYGZus{}selector}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Create a selector in \sphinxstyleemphasis{ax}. When a selection is made, clear the span and call onselect with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{onselect}\PYG{p}{(}\PYG{n}{pos\PYGZus{}1}\PYG{p}{,} \PYG{n}{pos\PYGZus{}2}\PYG{p}{)} \end{sphinxVerbatim} and clear the drawn box/line. The \sphinxcode{\sphinxupquote{pos\_1}} and \sphinxcode{\sphinxupquote{pos\_2}} are arrays of length 2 containing the x- and y-coordinate. If \sphinxstyleemphasis{minspanx} is not \sphinxstyleemphasis{None} then events smaller than \sphinxstyleemphasis{minspanx} in x direction are ignored (it's the same for y). The rectangle is drawn with \sphinxstyleemphasis{rectprops}; default: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rectprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{fill}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} The line is drawn with \sphinxstyleemphasis{lineprops}; default: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lineprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth} \PYG{o}{=} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} Use \sphinxstyleemphasis{drawtype} if you want the mouse to draw a line, a box or nothing between click and actual position by setting \sphinxcode{\sphinxupquote{drawtype = 'line'}}, \sphinxcode{\sphinxupquote{drawtype='box'}} or \sphinxcode{\sphinxupquote{drawtype = 'none'}}. Drawing a line would result in a line from vertex A to vertex C in a rectangle ABCD. \sphinxstyleemphasis{spancoords} is one of 'data' or 'pixels'. If 'data', \sphinxstyleemphasis{minspanx} and \sphinxstyleemphasis{minspanx} will be interpreted in the same coordinates as the x and y axis. If 'pixels', they are in pixels. \sphinxstyleemphasis{button} is a list of integers indicating which mouse buttons should be used for rectangle selection. You can also specify a single integer if only a single button is desired. Default is \sphinxstyleemphasis{None}, which does not limit which button can be used. \begin{description} \item[{Note, typically:}] \leavevmode 1 = left mouse button 2 = center mouse button (scroll wheel) 3 = right mouse button \end{description} \sphinxstyleemphasis{interactive} will draw a set of handles and allow you interact with the widget after it is drawn. \sphinxstyleemphasis{state\_modifier\_keys} are keyboard modifiers that affect the behavior of the widget. The defaults are: dict(move=' ', clear='escape', square='shift', center='ctrl') Keyboard modifiers, which: 'move': Move the existing shape. 'clear': Clear the current shape. 'square': Makes the shape square. 'center': Make the initial point the center of the shape. 'square' and 'center' can be combined. \index{draw\_shape() (matplotlib.widgets.EllipseSelector method)@\spxentry{draw\_shape()}\spxextra{matplotlib.widgets.EllipseSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.EllipseSelector.draw_shape}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_shape}}}{\emph{self}, \emph{extents}}{}~ \end{fulllineitems} \end{fulllineitems} \index{Lasso (class in matplotlib.widgets)@\spxentry{Lasso}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Lasso}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{Lasso}}}{\emph{ax}, \emph{xy}, \emph{callback=None}, \emph{useblit=True}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} Selection curve of an arbitrary shape. The selected path can be used in conjunction with {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.contains_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains\_point()}}}}} to select data points from an image. Unlike {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.LassoSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LassoSelector}}}}}, this must be initialized with a starting point \sphinxcode{\sphinxupquote{xy}}, and the {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Lasso}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Lasso}}}}} events are destroyed upon release. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The parent axes for the widget. \item[{\sphinxstylestrong{xy}}] \leavevmode{[}(float, float){]} Coordinates of the start of the lasso. \item[{\sphinxstylestrong{callback}}] \leavevmode{[}callable{]} Whenever the lasso is released, the \sphinxcode{\sphinxupquote{callback}} function is called and passed the vertices of the selected path. \end{description} \end{description}\end{quote} \index{onmove() (matplotlib.widgets.Lasso method)@\spxentry{onmove()}\spxextra{matplotlib.widgets.Lasso method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Lasso.onmove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onmove}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \index{onrelease() (matplotlib.widgets.Lasso method)@\spxentry{onrelease()}\spxextra{matplotlib.widgets.Lasso method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Lasso.onrelease}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onrelease}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \end{fulllineitems} \index{LassoSelector (class in matplotlib.widgets)@\spxentry{LassoSelector}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LassoSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{LassoSelector}}}{\emph{ax}, \emph{onselect=None}, \emph{useblit=True}, \emph{lineprops=None}, \emph{button=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.widgets.\_SelectorWidget}} Selection curve of an arbitrary shape. For the selector to remain responsive you must keep a reference to it. The selected path can be used in conjunction with {\hyperref[\detokenize{api/path_api:matplotlib.path.Path.contains_point}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains\_point}}}}} to select data points from an image. In contrast to {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Lasso}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Lasso}}}}}, {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.LassoSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LassoSelector}}}}} is written with an interface similar to {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RectangleSelector}}}}} and {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SpanSelector}}}}}, and will continue to interact with the axes until disconnected. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax} \PYG{o}{=} \PYG{n}{subplot}\PYG{p}{(}\PYG{l+m+mi}{111}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,}\PYG{n}{y}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{onselect}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{verts}\PYG{p}{)} \PYG{n}{lasso} \PYG{o}{=} \PYG{n}{LassoSelector}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{onselect}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The parent axes for the widget. \item[{\sphinxstylestrong{onselect}}] \leavevmode{[}function{]} Whenever the lasso is released, the \sphinxstyleemphasis{onselect} function is called and passed the vertices of the selected path. \item[{\sphinxstylestrong{button}}] \leavevmode{[}List{[}Int{]}, optional{]} A list of integers indicating which mouse buttons should be used for rectangle selection. You can also specify a single integer if only a single button is desired. Default is \sphinxcode{\sphinxupquote{None}}, which does not limit which button can be used. Note, typically: \begin{itemize} \item {} 1 = left mouse button \item {} 2 = center mouse button (scroll wheel) \item {} 3 = right mouse button \end{itemize} \end{description} \end{description}\end{quote} \index{onpress() (matplotlib.widgets.LassoSelector method)@\spxentry{onpress()}\spxextra{matplotlib.widgets.LassoSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LassoSelector.onpress}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onpress}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \index{onrelease() (matplotlib.widgets.LassoSelector method)@\spxentry{onrelease()}\spxextra{matplotlib.widgets.LassoSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LassoSelector.onrelease}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onrelease}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \end{fulllineitems} \index{LockDraw (class in matplotlib.widgets)@\spxentry{LockDraw}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LockDraw}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{LockDraw}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Some widgets, like the cursor, draw onto the canvas, and this is not desirable under all circumstances, like when the toolbar is in zoom-to-rect mode and drawing a rectangle. To avoid this, a widget can acquire a canvas' lock with \sphinxcode{\sphinxupquote{canvas.widgetlock(widget)}} before drawing on the canvas; this will prevent other widgets from doing so at the same time (if they also try to acquire the lock first). \index{available() (matplotlib.widgets.LockDraw method)@\spxentry{available()}\spxextra{matplotlib.widgets.LockDraw method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LockDraw.available}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{available}}}{\emph{self}, \emph{o}}{} Return whether drawing is available to \sphinxstyleemphasis{o}. \end{fulllineitems} \index{isowner() (matplotlib.widgets.LockDraw method)@\spxentry{isowner()}\spxextra{matplotlib.widgets.LockDraw method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LockDraw.isowner}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{isowner}}}{\emph{self}, \emph{o}}{} Return whether \sphinxstyleemphasis{o} owns this lock. \end{fulllineitems} \index{locked() (matplotlib.widgets.LockDraw method)@\spxentry{locked()}\spxextra{matplotlib.widgets.LockDraw method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LockDraw.locked}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locked}}}{\emph{self}}{} Return whether the lock is currently held by an owner. \end{fulllineitems} \index{release() (matplotlib.widgets.LockDraw method)@\spxentry{release()}\spxextra{matplotlib.widgets.LockDraw method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.LockDraw.release}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{release}}}{\emph{self}, \emph{o}}{} Release the lock from \sphinxstyleemphasis{o}. \end{fulllineitems} \end{fulllineitems} \index{MultiCursor (class in matplotlib.widgets)@\spxentry{MultiCursor}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{MultiCursor}}}{\emph{canvas}, \emph{axes}, \emph{useblit=True}, \emph{horizOn=False}, \emph{vertOn=True}, \emph{**lineprops}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Widget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Widget}}}}} Provide a vertical (default) and/or horizontal line cursor shared between multiple axes. For the cursor to remain responsive you must keep a reference to it. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{widgets} \PYG{k}{import} \PYG{n}{MultiCursor} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{nrows}\PYG{o}{=}\PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{sharex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{2.0}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{o}{*}\PYG{n}{t}\PYG{p}{)}\PYG{p}{)} \PYG{n}{multi} \PYG{o}{=} \PYG{n}{MultiCursor}\PYG{p}{(}\PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{horizOn}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{vertOn}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \index{clear() (matplotlib.widgets.MultiCursor method)@\spxentry{clear()}\spxextra{matplotlib.widgets.MultiCursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor.clear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clear}}}{\emph{self}, \emph{event}}{} clear the cursor \end{fulllineitems} \index{connect() (matplotlib.widgets.MultiCursor method)@\spxentry{connect()}\spxextra{matplotlib.widgets.MultiCursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor.connect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{connect}}}{\emph{self}}{} connect events \end{fulllineitems} \index{disconnect() (matplotlib.widgets.MultiCursor method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.MultiCursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}}{} disconnect events \end{fulllineitems} \index{onmove() (matplotlib.widgets.MultiCursor method)@\spxentry{onmove()}\spxextra{matplotlib.widgets.MultiCursor method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.MultiCursor.onmove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onmove}}}{\emph{self}, \emph{event}}{}~ \end{fulllineitems} \end{fulllineitems} \index{PolygonSelector (class in matplotlib.widgets)@\spxentry{PolygonSelector}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.PolygonSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{PolygonSelector}}}{\emph{ax}, \emph{onselect}, \emph{useblit=False}, \emph{lineprops=None}, \emph{markerprops=None}, \emph{vertex\_select\_radius=15}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.widgets.\_SelectorWidget}} Select a polygon region of an axes. Place vertices with each mouse click, and make the selection by completing the polygon (clicking on the first vertex). Hold the \sphinxstyleemphasis{ctrl} key and click and drag a vertex to reposition it (the \sphinxstyleemphasis{ctrl} key is not necessary if the polygon has already been completed). Hold the \sphinxstyleemphasis{shift} key and click and drag anywhere in the axes to move all vertices. Press the \sphinxstyleemphasis{esc} key to start a new polygon. For the selector to remain responsive you must keep a reference to it. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The parent axes for the widget. \item[{\sphinxstylestrong{onselect}}] \leavevmode{[}function{]} When a polygon is completed or modified after completion, the \sphinxcode{\sphinxupquote{onselect}} function is called and passed a list of the vertices as \sphinxcode{\sphinxupquote{(xdata, ydata)}} tuples. \item[{\sphinxstylestrong{useblit}}] \leavevmode{[}bool, optional{]} \item[{\sphinxstylestrong{lineprops}}] \leavevmode{[}dict, optional{]} The line for the sides of the polygon is drawn with the properties given by \sphinxcode{\sphinxupquote{lineprops}}. The default is \sphinxcode{\sphinxupquote{dict(color='k', linestyle='-', linewidth=2, alpha=0.5)}}. \item[{\sphinxstylestrong{markerprops}}] \leavevmode{[}dict, optional{]} The markers for the vertices of the polygon are drawn with the properties given by \sphinxcode{\sphinxupquote{markerprops}}. The default is \sphinxcode{\sphinxupquote{dict(marker='o', markersize=7, mec='k', mfc='k', alpha=0.5)}}. \item[{\sphinxstylestrong{vertex\_select\_radius}}] \leavevmode{[}float, optional{]} A vertex is selected (to complete the polygon or to move a vertex) if the mouse click is within \sphinxcode{\sphinxupquote{vertex\_select\_radius}} pixels of the vertex. The default radius is 15 pixels. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \DUrole{xref,std,std-doc}{/gallery/widgets/polygon\_selector\_demo} \index{onmove() (matplotlib.widgets.PolygonSelector method)@\spxentry{onmove()}\spxextra{matplotlib.widgets.PolygonSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.PolygonSelector.onmove}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{onmove}}}{\emph{self}, \emph{event}}{} Cursor move event handler and validator \end{fulllineitems} \index{verts (matplotlib.widgets.PolygonSelector attribute)@\spxentry{verts}\spxextra{matplotlib.widgets.PolygonSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.PolygonSelector.verts}}\pysigline{\sphinxbfcode{\sphinxupquote{verts}}} Get the polygon vertices. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{list}] \leavevmode A list of the vertices of the polygon as \sphinxcode{\sphinxupquote{(xdata, ydata)}} tuples. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{RadioButtons (class in matplotlib.widgets)@\spxentry{RadioButtons}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RadioButtons}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{RadioButtons}}}{\emph{ax}, \emph{labels}, \emph{active=0}, \emph{activecolor='blue'}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A GUI neutral radio button. For the buttons to remain responsive you must keep a reference to this object. Connect to the RadioButtons with the {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.RadioButtons.on_clicked}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_clicked()}}}}} method. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode The containing {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} instance. \item[{\sphinxstylestrong{activecolor}}] \leavevmode The color of the selected button. \item[{\sphinxstylestrong{labels}}] \leavevmode A list of {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instances containing the button labels. \item[{\sphinxstylestrong{circles}}] \leavevmode A list of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Circle:matplotlib.patches.Circle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Circle}}}}} instances defining the buttons. \item[{\sphinxstylestrong{value\_selected}}] \leavevmode{[}str{]} The label text of the currently selected button. \end{description} \end{description}\end{quote} Add radio buttons to an {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The axes to add the buttons to. \item[{\sphinxstylestrong{labels}}] \leavevmode{[}list of str{]} The button labels. \item[{\sphinxstylestrong{active}}] \leavevmode{[}int{]} The index of the initially selected button. \item[{\sphinxstylestrong{activecolor}}] \leavevmode{[}color{]} The color of the selected button. \end{description} \end{description}\end{quote} \index{disconnect() (matplotlib.widgets.RadioButtons method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.RadioButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RadioButtons.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} Remove the observer with connection id \sphinxstyleemphasis{cid}. \end{fulllineitems} \index{on\_clicked() (matplotlib.widgets.RadioButtons method)@\spxentry{on\_clicked()}\spxextra{matplotlib.widgets.RadioButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RadioButtons.on_clicked}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_clicked}}}{\emph{self}, \emph{func}}{} Connect the callback function \sphinxstyleemphasis{func} to button click events. Returns a connection id, which can be used to disconnect the callback. \end{fulllineitems} \index{set\_active() (matplotlib.widgets.RadioButtons method)@\spxentry{set\_active()}\spxextra{matplotlib.widgets.RadioButtons method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RadioButtons.set_active}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_active}}}{\emph{self}, \emph{index}}{} Select button with number \sphinxstyleemphasis{index}. Callbacks will be triggered if \sphinxcode{\sphinxupquote{eventson}} is True. \end{fulllineitems} \end{fulllineitems} \index{RectangleSelector (class in matplotlib.widgets)@\spxentry{RectangleSelector}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{RectangleSelector}}}{\emph{ax}, \emph{onselect}, \emph{drawtype='box'}, \emph{minspanx=None}, \emph{minspany=None}, \emph{useblit=False}, \emph{lineprops=None}, \emph{rectprops=None}, \emph{spancoords='data'}, \emph{button=None}, \emph{maxdist=10}, \emph{marker\_props=None}, \emph{interactive=False}, \emph{state\_modifier\_keys=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.widgets.\_SelectorWidget}} Select a rectangular region of an axes. For the cursor to remain responsive you must keep a reference to it. Example usage: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{widgets} \PYG{k}{import} \PYG{n}{RectangleSelector} \PYG{k}{def} \PYG{n+nf}{onselect}\PYG{p}{(}\PYG{n}{eclick}\PYG{p}{,} \PYG{n}{erelease}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{eclick and erelease are matplotlib events at press and release.}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{startposition: (}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{eclick}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{eclick}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{endposition : (}\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{, }\PYG{l+s+si}{\PYGZpc{}f}\PYG{l+s+s1}{)}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{erelease}\PYG{o}{.}\PYG{n}{xdata}\PYG{p}{,} \PYG{n}{erelease}\PYG{o}{.}\PYG{n}{ydata}\PYG{p}{)}\PYG{p}{)} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{used button : }\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{eclick}\PYG{o}{.}\PYG{n}{button}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{toggle\PYGZus{}selector}\PYG{p}{(}\PYG{n}{event}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Key pressed.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{key} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Q}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{q}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o+ow}{and} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS}\PYG{o}{.}\PYG{n}{active}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RectangleSelector deactivated.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS}\PYG{o}{.}\PYG{n}{set\PYGZus{}active}\PYG{p}{(}\PYG{k+kc}{False}\PYG{p}{)} \PYG{k}{if} \PYG{n}{event}\PYG{o}{.}\PYG{n}{key} \PYG{o+ow}{in} \PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{A}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{a}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]} \PYG{o+ow}{and} \PYG{o+ow}{not} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS}\PYG{o}{.}\PYG{n}{active}\PYG{p}{:} \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{RectangleSelector activated.}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS}\PYG{o}{.}\PYG{n}{set\PYGZus{}active}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{100.}\PYG{p}{)} \PYG{o}{/} \PYG{l+m+mi}{99} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{x}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)} \PYG{n}{toggle\PYGZus{}selector}\PYG{o}{.}\PYG{n}{RS} \PYG{o}{=} \PYG{n}{RectangleSelector}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{onselect}\PYG{p}{,} \PYG{n}{drawtype}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{canvas}\PYG{o}{.}\PYG{n}{mpl\PYGZus{}connect}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{key\PYGZus{}press\PYGZus{}event}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{toggle\PYGZus{}selector}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Create a selector in \sphinxstyleemphasis{ax}. When a selection is made, clear the span and call onselect with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{onselect}\PYG{p}{(}\PYG{n}{pos\PYGZus{}1}\PYG{p}{,} \PYG{n}{pos\PYGZus{}2}\PYG{p}{)} \end{sphinxVerbatim} and clear the drawn box/line. The \sphinxcode{\sphinxupquote{pos\_1}} and \sphinxcode{\sphinxupquote{pos\_2}} are arrays of length 2 containing the x- and y-coordinate. If \sphinxstyleemphasis{minspanx} is not \sphinxstyleemphasis{None} then events smaller than \sphinxstyleemphasis{minspanx} in x direction are ignored (it's the same for y). The rectangle is drawn with \sphinxstyleemphasis{rectprops}; default: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{rectprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{edgecolor} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.2}\PYG{p}{,} \PYG{n}{fill}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} The line is drawn with \sphinxstyleemphasis{lineprops}; default: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lineprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{black}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZhy{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linewidth} \PYG{o}{=} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \end{sphinxVerbatim} Use \sphinxstyleemphasis{drawtype} if you want the mouse to draw a line, a box or nothing between click and actual position by setting \sphinxcode{\sphinxupquote{drawtype = 'line'}}, \sphinxcode{\sphinxupquote{drawtype='box'}} or \sphinxcode{\sphinxupquote{drawtype = 'none'}}. Drawing a line would result in a line from vertex A to vertex C in a rectangle ABCD. \sphinxstyleemphasis{spancoords} is one of 'data' or 'pixels'. If 'data', \sphinxstyleemphasis{minspanx} and \sphinxstyleemphasis{minspanx} will be interpreted in the same coordinates as the x and y axis. If 'pixels', they are in pixels. \sphinxstyleemphasis{button} is a list of integers indicating which mouse buttons should be used for rectangle selection. You can also specify a single integer if only a single button is desired. Default is \sphinxstyleemphasis{None}, which does not limit which button can be used. \begin{description} \item[{Note, typically:}] \leavevmode 1 = left mouse button 2 = center mouse button (scroll wheel) 3 = right mouse button \end{description} \sphinxstyleemphasis{interactive} will draw a set of handles and allow you interact with the widget after it is drawn. \sphinxstyleemphasis{state\_modifier\_keys} are keyboard modifiers that affect the behavior of the widget. The defaults are: dict(move=' ', clear='escape', square='shift', center='ctrl') Keyboard modifiers, which: 'move': Move the existing shape. 'clear': Clear the current shape. 'square': Makes the shape square. 'center': Make the initial point the center of the shape. 'square' and 'center' can be combined. \index{center (matplotlib.widgets.RectangleSelector attribute)@\spxentry{center}\spxextra{matplotlib.widgets.RectangleSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.center}}\pysigline{\sphinxbfcode{\sphinxupquote{center}}} Center of rectangle \end{fulllineitems} \index{corners (matplotlib.widgets.RectangleSelector attribute)@\spxentry{corners}\spxextra{matplotlib.widgets.RectangleSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.corners}}\pysigline{\sphinxbfcode{\sphinxupquote{corners}}} Corners of rectangle from lower left, moving clockwise. \end{fulllineitems} \index{draw\_shape() (matplotlib.widgets.RectangleSelector method)@\spxentry{draw\_shape()}\spxextra{matplotlib.widgets.RectangleSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.draw_shape}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_shape}}}{\emph{self}, \emph{extents}}{}~ \end{fulllineitems} \index{edge\_centers (matplotlib.widgets.RectangleSelector attribute)@\spxentry{edge\_centers}\spxextra{matplotlib.widgets.RectangleSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.edge_centers}}\pysigline{\sphinxbfcode{\sphinxupquote{edge\_centers}}} Midpoint of rectangle edges from left, moving clockwise. \end{fulllineitems} \index{extents (matplotlib.widgets.RectangleSelector attribute)@\spxentry{extents}\spxextra{matplotlib.widgets.RectangleSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.extents}}\pysigline{\sphinxbfcode{\sphinxupquote{extents}}} Return (xmin, xmax, ymin, ymax). \end{fulllineitems} \index{geometry (matplotlib.widgets.RectangleSelector attribute)@\spxentry{geometry}\spxextra{matplotlib.widgets.RectangleSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.RectangleSelector.geometry}}\pysigline{\sphinxbfcode{\sphinxupquote{geometry}}} Returns numpy.ndarray of shape (2,5) containing x (\sphinxcode{\sphinxupquote{RectangleSelector.geometry{[}1,:{]}}}) and y (\sphinxcode{\sphinxupquote{RectangleSelector.geometry{[}0,:{]}}}) coordinates of the four corners of the rectangle starting and ending in the top left corner. \end{fulllineitems} \end{fulllineitems} \index{Slider (class in matplotlib.widgets)@\spxentry{Slider}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Slider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{Slider}}}{\emph{ax}, \emph{label}, \emph{valmin}, \emph{valmax}, \emph{valinit=0.5}, \emph{valfmt='\%1.2f'}, \emph{closedmin=True}, \emph{closedmax=True}, \emph{slidermin=None}, \emph{slidermax=None}, \emph{dragging=True}, \emph{valstep=None}, \emph{orientation='horizontal'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A slider representing a floating point range. Create a slider from \sphinxstyleemphasis{valmin} to \sphinxstyleemphasis{valmax} in axes \sphinxstyleemphasis{ax}. For the slider to remain responsive you must maintain a reference to it. Call {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Slider.on_changed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_changed()}}}}} to connect to the slider event. \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} Slider value. \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}Axes{]} The Axes to put the slider in. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Slider label. \item[{\sphinxstylestrong{valmin}}] \leavevmode{[}float{]} The minimum value of the slider. \item[{\sphinxstylestrong{valmax}}] \leavevmode{[}float{]} The maximum value of the slider. \item[{\sphinxstylestrong{valinit}}] \leavevmode{[}float, optional, default: 0.5{]} The slider initial position. \item[{\sphinxstylestrong{valfmt}}] \leavevmode{[}str, optional, default: "\%1.2f"{]} Used to format the slider value, fprint format string. \item[{\sphinxstylestrong{closedmin}}] \leavevmode{[}bool, optional, default: True{]} Indicate whether the slider interval is closed on the bottom. \item[{\sphinxstylestrong{closedmax}}] \leavevmode{[}bool, optional, default: True{]} Indicate whether the slider interval is closed on the top. \item[{\sphinxstylestrong{slidermin}}] \leavevmode{[}Slider, optional, default: None{]} Do not allow the current slider to have a value less than the value of the Slider \sphinxcode{\sphinxupquote{slidermin}}. \item[{\sphinxstylestrong{slidermax}}] \leavevmode{[}Slider, optional, default: None{]} Do not allow the current slider to have a value greater than the value of the Slider \sphinxcode{\sphinxupquote{slidermax}}. \item[{\sphinxstylestrong{dragging}}] \leavevmode{[}bool, optional, default: True{]} If True the slider can be dragged by the mouse. \item[{\sphinxstylestrong{valstep}}] \leavevmode{[}float, optional, default: None{]} If given, the slider will snap to multiples of \sphinxcode{\sphinxupquote{valstep}}. \item[{\sphinxstylestrong{orientation}}] \leavevmode{[}str, 'horizontal' or 'vertical', default: 'horizontal'{]} The orientation of the slider. \end{description} \end{description}\end{quote} \subsubsection*{Notes} Additional kwargs are passed on to \sphinxcode{\sphinxupquote{self.poly}} which is the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} that draws the slider knob. See the {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} documentation for valid property names (e.g., \sphinxcode{\sphinxupquote{facecolor}}, \sphinxcode{\sphinxupquote{edgecolor}}, \sphinxcode{\sphinxupquote{alpha}}). \index{disconnect() (matplotlib.widgets.Slider method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.Slider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Slider.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} Remove the observer with connection id \sphinxstyleemphasis{cid} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cid}}] \leavevmode{[}int{]} Connection id of the observer to be removed \end{description} \end{description}\end{quote} \end{fulllineitems} \index{on\_changed() (matplotlib.widgets.Slider method)@\spxentry{on\_changed()}\spxextra{matplotlib.widgets.Slider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Slider.on_changed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_changed}}}{\emph{self}, \emph{func}}{} When the slider value is changed call \sphinxstyleemphasis{func} with the new slider value \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{func}}] \leavevmode{[}callable{]} Function to call when slider is changed. The function must accept a single float as its arguments. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{cid}}] \leavevmode{[}int{]} Connection id (which can be used to disconnect \sphinxstyleemphasis{func}) \end{description} \end{description}\end{quote} \end{fulllineitems} \index{reset() (matplotlib.widgets.Slider method)@\spxentry{reset()}\spxextra{matplotlib.widgets.Slider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Slider.reset}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{reset}}}{\emph{self}}{} Reset the slider to the initial value \end{fulllineitems} \index{set\_val() (matplotlib.widgets.Slider method)@\spxentry{set\_val()}\spxextra{matplotlib.widgets.Slider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Slider.set_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_val}}}{\emph{self}, \emph{val}}{} Set slider value to \sphinxstyleemphasis{val} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{val}}] \leavevmode{[}float{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \index{SpanSelector (class in matplotlib.widgets)@\spxentry{SpanSelector}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{SpanSelector}}}{\emph{ax}, \emph{onselect}, \emph{direction}, \emph{minspan=None}, \emph{useblit=False}, \emph{rectprops=None}, \emph{onmove\_callback=None}, \emph{span\_stays=False}, \emph{button=None}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.widgets.\_SelectorWidget}} Visually select a min/max range on a single axis and call a function with those values. To guarantee that the selector remains responsive, keep a reference to it. In order to turn off the SpanSelector, set \sphinxcode{\sphinxupquote{span\_selector.active=False}}. To turn it back on, set \sphinxcode{\sphinxupquote{span\_selector.active=True}}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} object{]} \item[{\sphinxstylestrong{onselect}}] \leavevmode{[}func(min, max), min/max are floats{]} \item[{\sphinxstylestrong{direction}}] \leavevmode{[}"horizontal" or "vertical"{]} The axis along which to draw the span selector \item[{\sphinxstylestrong{minspan}}] \leavevmode{[}float, default is None{]} If selection is less than \sphinxstyleemphasis{minspan}, do not call \sphinxstyleemphasis{onselect} \item[{\sphinxstylestrong{useblit}}] \leavevmode{[}bool, default is False{]} If True, use the backend-dependent blitting features for faster canvas updates. \item[{\sphinxstylestrong{rectprops}}] \leavevmode{[}dict, default is None{]} Dictionary of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} properties \item[{\sphinxstylestrong{onmove\_callback}}] \leavevmode{[}func(min, max), min/max are floats, default is None{]} Called on mouse move while the span is being selected \item[{\sphinxstylestrong{span\_stays}}] \leavevmode{[}bool, default is False{]} If True, the span stays visible after the mouse is released \item[{\sphinxstylestrong{button}}] \leavevmode{[}int or list of ints{]}\begin{description} \item[{Determines which mouse buttons activate the span selector}] \leavevmode 1 = left mouse button 2 = center mouse button (scroll wheel) 3 = right mouse button \end{description} \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{widgets} \PYG{k}{as} \PYG{n+nn}{mwidgets} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{50}\PYG{p}{,} \PYG{l+m+mi}{100}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{def} \PYG{n+nf}{onselect}\PYG{p}{(}\PYG{n}{vmin}\PYG{p}{,} \PYG{n}{vmax}\PYG{p}{)}\PYG{p}{:} \PYG{g+gp}{... } \PYG{n+nb}{print}\PYG{p}{(}\PYG{n}{vmin}\PYG{p}{,} \PYG{n}{vmax}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{rectprops} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{blue}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{span} \PYG{o}{=} \PYG{n}{mwidgets}\PYG{o}{.}\PYG{n}{SpanSelector}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{n}{onselect}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontal}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{rectprops}\PYG{o}{=}\PYG{n}{rectprops}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} See also: \DUrole{xref,std,std-doc}{/gallery/widgets/span\_selector} \index{buttonDown (matplotlib.widgets.SpanSelector attribute)@\spxentry{buttonDown}\spxextra{matplotlib.widgets.SpanSelector attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector.buttonDown}}\pysigline{\sphinxbfcode{\sphinxupquote{buttonDown}}}~ \end{fulllineitems} \index{ignore() (matplotlib.widgets.SpanSelector method)@\spxentry{ignore()}\spxextra{matplotlib.widgets.SpanSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector.ignore}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ignore}}}{\emph{self}, \emph{event}}{} return \sphinxstyleemphasis{True} if \sphinxstyleemphasis{event} should be ignored \end{fulllineitems} \index{new\_axes() (matplotlib.widgets.SpanSelector method)@\spxentry{new\_axes()}\spxextra{matplotlib.widgets.SpanSelector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SpanSelector.new_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_axes}}}{\emph{self}, \emph{ax}}{} Set SpanSelector to operate on a new Axes \end{fulllineitems} \end{fulllineitems} \index{SubplotTool (class in matplotlib.widgets)@\spxentry{SubplotTool}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{SubplotTool}}}{\emph{targetfig}, \emph{toolfig}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.Widget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.Widget}}}}} A tool to adjust the subplot params of a {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}. \begin{description} \item[{\sphinxstyleemphasis{targetfig}}] \leavevmode The figure instance to adjust. \item[{\sphinxstyleemphasis{toolfig}}] \leavevmode The figure instance to embed the subplot tool into. If \sphinxstyleemphasis{None}, a default figure will be created. If you are using this from the GUI \end{description} \index{funcbottom() (matplotlib.widgets.SubplotTool method)@\spxentry{funcbottom()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.funcbottom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{funcbottom}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{funchspace() (matplotlib.widgets.SubplotTool method)@\spxentry{funchspace()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.funchspace}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{funchspace}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{funcleft() (matplotlib.widgets.SubplotTool method)@\spxentry{funcleft()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.funcleft}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{funcleft}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{funcright() (matplotlib.widgets.SubplotTool method)@\spxentry{funcright()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.funcright}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{funcright}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{functop() (matplotlib.widgets.SubplotTool method)@\spxentry{functop()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.functop}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{functop}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{funcwspace() (matplotlib.widgets.SubplotTool method)@\spxentry{funcwspace()}\spxextra{matplotlib.widgets.SubplotTool method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.SubplotTool.funcwspace}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{funcwspace}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \end{fulllineitems} \index{TextBox (class in matplotlib.widgets)@\spxentry{TextBox}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{TextBox}}}{\emph{ax}, \emph{label}, \emph{initial=''}, \emph{color='.95'}, \emph{hovercolor='1'}, \emph{label\_pad=0.01}}{} Bases: {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.AxesWidget}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.widgets.AxesWidget}}}}} A GUI neutral text input box. For the text box to remain responsive you must keep a reference to it. The following attributes are accessible: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{ax}}] \leavevmode The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} the button renders into. \item[{\sphinxstyleemphasis{label}}] \leavevmode A {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} instance. \item[{\sphinxstyleemphasis{color}}] \leavevmode The color of the text box when not hovering. \item[{\sphinxstyleemphasis{hovercolor}}] \leavevmode The color of the text box when hovering. \end{description} \end{quote} Call {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.TextBox.on_text_change}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_text\_change()}}}}} to be updated whenever the text changes. Call {\hyperref[\detokenize{api/widgets_api:matplotlib.widgets.TextBox.on_submit}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{on\_submit()}}}}} to be updated whenever the user hits enter or leaves the text entry field. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}matplotlib.axes.Axes{]} The {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} instance the button will be placed into. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Label for this text box. Accepts string. \item[{\sphinxstylestrong{initial}}] \leavevmode{[}str{]} Initial value in the text box \item[{\sphinxstylestrong{color}}] \leavevmode{[}color{]} The color of the box \item[{\sphinxstylestrong{hovercolor}}] \leavevmode{[}color{]} The color of the box when the mouse is over it \item[{\sphinxstylestrong{label\_pad}}] \leavevmode{[}float{]} the distance between the label and the right side of the textbox \end{description} \end{description}\end{quote} \index{begin\_typing() (matplotlib.widgets.TextBox method)@\spxentry{begin\_typing()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.begin_typing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{begin\_typing}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \index{disconnect() (matplotlib.widgets.TextBox method)@\spxentry{disconnect()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.disconnect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disconnect}}}{\emph{self}, \emph{cid}}{} Remove the observer with connection id \sphinxstyleemphasis{cid}. \end{fulllineitems} \index{on\_submit() (matplotlib.widgets.TextBox method)@\spxentry{on\_submit()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.on_submit}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_submit}}}{\emph{self}, \emph{func}}{} When the user hits enter or leaves the submission box, call this \sphinxstyleemphasis{func} with event. A connection id is returned which can be used to disconnect. \end{fulllineitems} \index{on\_text\_change() (matplotlib.widgets.TextBox method)@\spxentry{on\_text\_change()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.on_text_change}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{on\_text\_change}}}{\emph{self}, \emph{func}}{} When the text changes, call this \sphinxstyleemphasis{func} with event. A connection id is returned which can be used to disconnect. \end{fulllineitems} \index{position\_cursor() (matplotlib.widgets.TextBox method)@\spxentry{position\_cursor()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.position_cursor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{position\_cursor}}}{\emph{self}, \emph{x}}{}~ \end{fulllineitems} \index{set\_val() (matplotlib.widgets.TextBox method)@\spxentry{set\_val()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.set_val}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_val}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{stop\_typing() (matplotlib.widgets.TextBox method)@\spxentry{stop\_typing()}\spxextra{matplotlib.widgets.TextBox method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.TextBox.stop_typing}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{stop\_typing}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \index{ToolHandles (class in matplotlib.widgets)@\spxentry{ToolHandles}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{ToolHandles}}}{\emph{ax}, \emph{x}, \emph{y}, \emph{marker='o'}, \emph{marker\_props=None}, \emph{useblit=True}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Control handles for canvas tools. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ax}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} Matplotlib axes where tool handles are displayed. \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}1D arrays{]} Coordinates of control handles. \item[{\sphinxstylestrong{marker}}] \leavevmode{[}str{]} Shape of marker used to display handle. See {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.plot}}}}}. \item[{\sphinxstylestrong{marker\_props}}] \leavevmode{[}dict{]} Additional marker properties. See {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}}. \end{description} \end{description}\end{quote} \index{closest() (matplotlib.widgets.ToolHandles method)@\spxentry{closest()}\spxextra{matplotlib.widgets.ToolHandles method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.closest}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{closest}}}{\emph{self}, \emph{x}, \emph{y}}{} Return index and pixel distance to closest index. \end{fulllineitems} \index{set\_animated() (matplotlib.widgets.ToolHandles method)@\spxentry{set\_animated()}\spxextra{matplotlib.widgets.ToolHandles method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.set_animated}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_animated}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{set\_data() (matplotlib.widgets.ToolHandles method)@\spxentry{set\_data()}\spxextra{matplotlib.widgets.ToolHandles method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.set_data}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data}}}{\emph{self}, \emph{pts}, \emph{y=None}}{} Set x and y positions of handles \end{fulllineitems} \index{set\_visible() (matplotlib.widgets.ToolHandles method)@\spxentry{set\_visible()}\spxextra{matplotlib.widgets.ToolHandles method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{val}}{}~ \end{fulllineitems} \index{x (matplotlib.widgets.ToolHandles attribute)@\spxentry{x}\spxextra{matplotlib.widgets.ToolHandles attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.x}}\pysigline{\sphinxbfcode{\sphinxupquote{x}}}~ \end{fulllineitems} \index{y (matplotlib.widgets.ToolHandles attribute)@\spxentry{y}\spxextra{matplotlib.widgets.ToolHandles attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.ToolHandles.y}}\pysigline{\sphinxbfcode{\sphinxupquote{y}}}~ \end{fulllineitems} \end{fulllineitems} \index{Widget (class in matplotlib.widgets)@\spxentry{Widget}\spxextra{class in matplotlib.widgets}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.widgets.}}\sphinxbfcode{\sphinxupquote{Widget}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} Abstract base class for GUI neutral widgets \index{active (matplotlib.widgets.Widget attribute)@\spxentry{active}\spxextra{matplotlib.widgets.Widget attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.active}}\pysigline{\sphinxbfcode{\sphinxupquote{active}}} Is the widget active? \end{fulllineitems} \index{drawon (matplotlib.widgets.Widget attribute)@\spxentry{drawon}\spxextra{matplotlib.widgets.Widget attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.drawon}}\pysigline{\sphinxbfcode{\sphinxupquote{drawon}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{eventson (matplotlib.widgets.Widget attribute)@\spxentry{eventson}\spxextra{matplotlib.widgets.Widget attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.eventson}}\pysigline{\sphinxbfcode{\sphinxupquote{eventson}}\sphinxbfcode{\sphinxupquote{ = True}}} \end{fulllineitems} \index{get\_active() (matplotlib.widgets.Widget method)@\spxentry{get\_active()}\spxextra{matplotlib.widgets.Widget method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.get_active}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_active}}}{\emph{self}}{} Get whether the widget is active. \end{fulllineitems} \index{ignore() (matplotlib.widgets.Widget method)@\spxentry{ignore()}\spxextra{matplotlib.widgets.Widget method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.ignore}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ignore}}}{\emph{self}, \emph{event}}{} Return True if event should be ignored. This method (or a version of it) should be called at the beginning of any event callback. \end{fulllineitems} \index{set\_active() (matplotlib.widgets.Widget method)@\spxentry{set\_active()}\spxextra{matplotlib.widgets.Widget method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/widgets_api:matplotlib.widgets.Widget.set_active}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_active}}}{\emph{self}, \emph{active}}{} Set whether the widget is active. \end{fulllineitems} \end{fulllineitems} \chapter{Toolkits} \label{\detokenize{api/index:toolkits}} {\hyperref[\detokenize{api/toolkits/index:toolkits-index}]{\sphinxcrossref{\DUrole{std,std-ref}{Toolkits}}}} are collections of application-specific functions that extend Matplotlib. The following toolkits are included: \section{Toolkits} \label{\detokenize{api/toolkits/index:toolkits}}\label{\detokenize{api/toolkits/index:toolkits-index}}\label{\detokenize{api/toolkits/index:id1}}\label{\detokenize{api/toolkits/index::doc}} Toolkits are collections of application-specific functions that extend Matplotlib. \subsection{mplot3d} \label{\detokenize{api/toolkits/index:mplot3d}}\label{\detokenize{api/toolkits/index:toolkit-mplot3d}} {\hyperref[\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d}}}}} provides some basic 3D plotting (scatter, surf, line, mesh) tools. Not the fastest or most feature complete 3D library out there, but it ships with Matplotlib and thus may be a lighter weight solution for some use cases. Check out the {\hyperref[\detokenize{tutorials/toolkits/mplot3d::doc}]{\sphinxcrossref{\DUrole{doc}{mplot3d tutorial}}}} for more information. \begin{figure}[htbp] \centering \capstart \sphinxhref{../../gallery/mplot3d/contourf3d\_2.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_contourf3d_2_001}.png}} \caption{Contourf3d 2}\label{\detokenize{api/toolkits/index:id2}}\end{figure} \subsubsection{mplot3d} \label{\detokenize{api/toolkits/mplot3d/index:mplot3d}}\label{\detokenize{api/toolkits/mplot3d/index:toolkit-mplot3d-index}}\label{\detokenize{api/toolkits/mplot3d/index::doc}} \paragraph{Matplotlib mplot3d toolkit} \label{\detokenize{api/toolkits/mplot3d/index:matplotlib-mplot3d-toolkit}} The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by supplying an axes object that can create a 2D projection of a 3D scene. The resulting graph will have the same look and feel as regular 2D plots. See the {\hyperref[\detokenize{tutorials/toolkits/mplot3d::doc}]{\sphinxcrossref{\DUrole{doc}{mplot3d tutorial}}}} for more information on how to use this toolkit. \noindent\sphinxincludegraphics{{demo_mplot3d}.png} The interactive backends also provide the ability to rotate and zoom the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging the scene. Zooming is done by right-clicking the scene and dragging the mouse up and down. Note that one does not use the zoom button like one would use for regular 2D plots. \subparagraph{mplot3d FAQ} \label{\detokenize{api/toolkits/mplot3d/faq:mplot3d-faq}}\label{\detokenize{api/toolkits/mplot3d/faq:toolkit-mplot3d-faq}}\label{\detokenize{api/toolkits/mplot3d/faq::doc}} \subparagraph{How is mplot3d different from MayaVi?} \label{\detokenize{api/toolkits/mplot3d/faq:how-is-mplot3d-different-from-mayavi}} \sphinxhref{http://code.enthought.com/projects/mayavi/documentation.php}{MayaVi2} is a very powerful and featureful 3D graphing library. For advanced 3D scenes and excellent rendering capabilities, it is highly recommended to use MayaVi2. mplot3d was intended to allow users to create simple 3D graphs with the same "look-and-feel" as matplotlib's 2D plots. Furthermore, users can use the same toolkit that they are already familiar with to generate both their 2D and 3D plots. \subparagraph{My 3D plot doesn't look right at certain viewing angles} \label{\detokenize{api/toolkits/mplot3d/faq:my-3d-plot-doesn-t-look-right-at-certain-viewing-angles}} This is probably the most commonly reported issue with mplot3d. The problem is that -- from some viewing angles -- a 3D object would appear in front of another object, even though it is physically behind it. This can result in plots that do not look "physically correct." Unfortunately, while some work is being done to reduce the occurrence of this artifact, it is currently an intractable problem, and can not be fully solved until matplotlib supports 3D graphics rendering at its core. The problem occurs due to the reduction of 3D data down to 2D + z-order scalar. A single value represents the 3rd dimension for all parts of 3D objects in a collection. Therefore, when the bounding boxes of two collections intersect, it becomes possible for this artifact to occur. Furthermore, the intersection of two 3D objects (such as polygons or patches) can not be rendered properly in matplotlib's 2D rendering engine. This problem will likely not be solved until OpenGL support is added to all of the backends (patches are greatly welcomed). Until then, if you need complex 3D scenes, we recommend using \sphinxhref{http://code.enthought.com/projects/mayavi/documentation.php}{MayaVi}. \subparagraph{I don't like how the 3D plot is laid out, how do I change that?} \label{\detokenize{api/toolkits/mplot3d/faq:i-don-t-like-how-the-3d-plot-is-laid-out-how-do-i-change-that}} Historically, mplot3d has suffered from a hard-coding of parameters used to control visuals such as label spacing, tick length, and grid line width. Work is being done to eliminate this issue. For matplotlib v1.1.0, there is a semi-official manner to modify these parameters. See the note in the {\hyperref[\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-axisapi}]{\sphinxcrossref{\DUrole{std,std-ref}{axis3d}}}} section of the mplot3d API documentation for more information. \subsubsection{Links} \label{\detokenize{api/toolkits/index:links}}\begin{itemize} \item {} mpl3d API: {\hyperref[\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-api}]{\sphinxcrossref{\DUrole{std,std-ref}{mplot3d API}}}} \end{itemize} \subsection{Matplotlib axes\_grid1 Toolkit} \label{\detokenize{api/toolkits/index:matplotlib-axes-grid1-toolkit}}\label{\detokenize{api/toolkits/index:toolkit-axes-grid1-incl}} The matplotlib \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1}} toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. While the aspect parameter in matplotlib adjust the position of the single axes, axes\_grid1 toolkit provides a framework to adjust the position of multiple axes according to their aspects. See {\hyperref[\detokenize{tutorials/toolkits/axes_grid:axes-grid1-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{What is axes\_grid1 toolkit?}}}} for a guide on the usage of axes\_grid1. \begin{figure}[htbp] \centering \sphinxhref{../../gallery/axes\_grid1/demo\_axes\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_axes_grid_001}.png}} \end{figure} \sphinxstylestrong{The submodules of the axes\_grid1 API are:} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:module-mpl_toolkits.axes_grid1.anchored_artists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.anchored\_artists}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:module-mpl_toolkits.axes_grid1.axes_divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_divider}}}}} & The axes\_divider module provides helper classes to adjust the positions of multiple axes at drawing time. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:module-mpl_toolkits.axes_grid1.axes_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_grid}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:module-mpl_toolkits.axes_grid1.axes_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_rgb}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_size}}}}} & Provides classes of simple units that will be used with AxesDivider class (or others) to determine the size of each axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:module-mpl_toolkits.axes_grid1.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.colorbar}}}}} & Colorbar toolkit with two classes and a function: \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:module-mpl_toolkits.axes_grid1.inset_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.inset\_locator}}}}} & A collection of functions and objects for creating or placing inset axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:module-mpl_toolkits.axes_grid1.mpl_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.mpl\_axes}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:module-mpl_toolkits.axes_grid1.parasite_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.parasite\_axes}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.axes\_grid1.anchored\_artists} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:module-mpl_toolkits.axes_grid1.anchored_artists}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:mpl-toolkits-axes-grid1-anchored-artists}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists::doc}}\index{mpl\_toolkits.axes\_grid1.anchored\_artists (module)@\spxentry{mpl\_toolkits.axes\_grid1.anchored\_artists}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredAuxTransformBox}}}}}(transform, loc{[}, ...{]}) & An anchored container with transformed coordinates. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredDirectionArrows}}}}}(transform, label\_x, ...) & Draw two perpendicular arrows to indicate directions. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea:mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredDrawingArea}}}}}(width, height, xdescent, ...) & An anchored container with a fixed size and fillable DrawingArea. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredEllipse}}}}}(transform, width, height, ...) & Draw an anchored ellipse of a given size. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredSizeBar}}}}}(transform, size, label, loc) & Draw a horizontal scale bar with a center-aligned label underneath. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredAuxTransformBox} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:mpl-toolkits-axes-grid1-anchored-artists-anchoredauxtransformbox}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox::doc}}\index{AnchoredAuxTransformBox (class in mpl\_toolkits.axes\_grid1.anchored\_artists)@\spxentry{AnchoredAuxTransformBox}\spxextra{class in mpl\_toolkits.axes\_grid1.anchored\_artists}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.}}\sphinxbfcode{\sphinxupquote{AnchoredAuxTransformBox}}}{\emph{transform}, \emph{loc}, \emph{pad=0.4}, \emph{borderpad=0.5}, \emph{prop=None}, \emph{frameon=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} An anchored container with transformed coordinates. Artists added to the \sphinxstyleemphasis{drawing\_area} are scaled according to the coordinates of the transformation used. The dimensions of this artist will scale to contain the artists added. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transformation object for the coordinate system in use, i.e., \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.transData}}. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int{]} Location of this artist. Valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}int or float, optional{]} Padding around the child objects, in fraction of the font size. Defaults to 0.4. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}int or float, optional{]} Border padding, in fraction of the font size. Defaults to 0.5. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font property used as a reference for paddings. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} If True, draw a box around this artists. Defaults to True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyworded arguments to pass to {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} To display an ellipse in the upper left, with a width of 0.1 and height of 0.4 in data coordinates: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{box} \PYG{o}{=} \PYG{n}{AnchoredAuxTransformBox}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{el} \PYG{o}{=} \PYG{n}{Ellipse}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{l+m+mi}{0}\PYG{p}{)}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{n}{angle}\PYG{o}{=}\PYG{l+m+mi}{30}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{box}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{el}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{box}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{drawing\_area}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AuxTransformBox}}}}}{]} A container for artists to display. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredAuxTransformBox}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredAuxTransformBox:examples-using-mpl-toolkits-axes-grid1-anchored-artists-anchoredauxtransformbox}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box03.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredDirectionArrows} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:mpl-toolkits-axes-grid1-anchored-artists-anchoreddirectionarrows}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows::doc}}\index{AnchoredDirectionArrows (class in mpl\_toolkits.axes\_grid1.anchored\_artists)@\spxentry{AnchoredDirectionArrows}\spxextra{class in mpl\_toolkits.axes\_grid1.anchored\_artists}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.}}\sphinxbfcode{\sphinxupquote{AnchoredDirectionArrows}}}{\emph{transform}, \emph{label\_x}, \emph{label\_y}, \emph{length=0.15}, \emph{fontsize=0.08}, \emph{loc=2}, \emph{angle=0}, \emph{aspect\_ratio=1}, \emph{pad=0.4}, \emph{borderpad=0.4}, \emph{frameon=False}, \emph{color='w'}, \emph{alpha=1}, \emph{sep\_x=0.01}, \emph{sep\_y=0}, \emph{fontproperties=None}, \emph{back\_length=0.15}, \emph{head\_width=10}, \emph{head\_length=15}, \emph{tail\_width=2}, \emph{text\_props=None}, \emph{arrow\_props=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} Draw two perpendicular arrows to indicate directions. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transformation object for the coordinate system in use, i.e., \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.transAxes}}. \item[{\sphinxstylestrong{label\_x, label\_y}}] \leavevmode{[}string{]} Label text for the x and y arrows \item[{\sphinxstylestrong{length}}] \leavevmode{[}int or float, optional{]} Length of the arrow, given in coordinates of \sphinxstyleemphasis{transform}. Defaults to 0.15. \item[{\sphinxstylestrong{fontsize}}] \leavevmode{[}int, optional{]} Size of label strings, given in coordinates of \sphinxstyleemphasis{transform}. Defaults to 0.08. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int, optional{]} Location of the direction arrows. Valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} Defaults to 2. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}int or float, optional{]} The angle of the arrows in degrees. Defaults to 0. \item[{\sphinxstylestrong{aspect\_ratio}}] \leavevmode{[}int or float, optional{]} The ratio of the length of arrow\_x and arrow\_y. Negative numbers can be used to change the direction. Defaults to 1. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}int or float, optional{]} Padding around the labels and arrows, in fraction of the font size. Defaults to 0.4. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}int or float, optional{]} Border padding, in fraction of the font size. Defaults to 0.4. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} If True, draw a box around the arrows and labels. Defaults to False. \item[{\sphinxstylestrong{color}}] \leavevmode{[}str, optional{]} Color for the arrows and labels. Defaults to white. \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}int or float, optional{]} Alpha values of the arrows and labels Defaults to 1. \item[{\sphinxstylestrong{sep\_x, sep\_y}}] \leavevmode{[}int or float, optional{]} Separation between the arrows and labels in coordinates of \sphinxstyleemphasis{transform}. Defaults to 0.01 and 0. \item[{\sphinxstylestrong{fontproperties}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font properties for the label text. \item[{\sphinxstylestrong{back\_length}}] \leavevmode{[}float, optional{]} Fraction of the arrow behind the arrow crossing. Defaults to 0.15. \item[{\sphinxstylestrong{head\_width}}] \leavevmode{[}int or float, optional{]} Width of arrow head, sent to ArrowStyle. Defaults to 10. \item[{\sphinxstylestrong{head\_length}}] \leavevmode{[}int or float, optional{]} Length of arrow head, sent to ArrowStyle. Defaults to 15. \item[{\sphinxstylestrong{tail\_width}}] \leavevmode{[}int or float, optional{]} Width of arrow tail, sent to ArrowStyle. Defaults to 2. \item[{\sphinxstylestrong{text\_props, arrow\_props}}] \leavevmode{[}dict{]} Properties of the text and arrows, passed to \sphinxcode{\sphinxupquote{matplotlib.text.TextPath}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyworded arguments to pass to {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If \sphinxstyleemphasis{prop} is passed as a keyword argument, but \sphinxstyleemphasis{fontproperties} is not, then \sphinxstyleemphasis{prop} is be assumed to be the intended \sphinxstyleemphasis{fontproperties}. Using both \sphinxstyleemphasis{prop} and \sphinxstyleemphasis{fontproperties} is not supported. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{anchored\PYGZus{}artists} \PYG{k}{import} \PYG{p}{(} \PYG{g+gp}{... } \PYG{n}{AnchoredDirectionArrows}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{random}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{arrows} \PYG{o}{=} \PYG{n}{AnchoredDirectionArrows}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{111}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{110}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{arrows}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Using several of the optional parameters, creating downward pointing arrow and high contrast text labels. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{font\PYGZus{}manager} \PYG{k}{as} \PYG{n+nn}{fm} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fontprops} \PYG{o}{=} \PYG{n}{fm}\PYG{o}{.}\PYG{n}{FontProperties}\PYG{p}{(}\PYG{n}{family}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{monospace}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{arrows} \PYG{o}{=} \PYG{n}{AnchoredDirectionArrows}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{East}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{South}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{aspect\PYGZus{}ratio}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n}{sep\PYGZus{}x}\PYG{o}{=}\PYG{l+m+mf}{0.02}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{sep\PYGZus{}y}\PYG{o}{=}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{0.01}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{text\PYGZus{}props}\PYG{o}{=}\PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{ec}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{w}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fc}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{\PYGZcb{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{fontproperties}\PYG{o}{=}\PYG{n}{fontprops}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{arrow\_x, arrow\_y}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.FancyArrowPatch:matplotlib.patches.FancyArrowPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.FancyArrowPatch}}}}}{]} Arrow x and y \item[{\sphinxstylestrong{text\_path\_x, text\_path\_y}}] \leavevmode{[}\sphinxcode{\sphinxupquote{matplotlib.text.TextPath}}{]} Path for arrow labels \item[{\sphinxstylestrong{p\_x, p\_y}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.PathPatch:matplotlib.patches.PathPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.PathPatch}}}}}{]} Patch for arrow labels \item[{\sphinxstylestrong{box}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AuxTransformBox}}}}}{]} Container for the arrows and labels. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredDirectionArrows}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:examples-using-mpl-toolkits-axes-grid1-anchored-artists-anchoreddirectionarrows}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_anchored\_direction\_arrows.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredDrawingArea} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea:mpl-toolkits-axes-grid1-anchored-artists-anchoreddrawingarea}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea::doc}}\index{AnchoredDrawingArea (class in mpl\_toolkits.axes\_grid1.anchored\_artists)@\spxentry{AnchoredDrawingArea}\spxextra{class in mpl\_toolkits.axes\_grid1.anchored\_artists}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea:mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.}}\sphinxbfcode{\sphinxupquote{AnchoredDrawingArea}}}{\emph{width}, \emph{height}, \emph{xdescent}, \emph{ydescent}, \emph{loc}, \emph{pad=0.4}, \emph{borderpad=0.5}, \emph{prop=None}, \emph{frameon=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} An anchored container with a fixed size and fillable DrawingArea. Artists added to the \sphinxstyleemphasis{drawing\_area} will have their coordinates interpreted as pixels. Any transformations set on the artists will be overridden. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{width, height}}] \leavevmode{[}int or float{]} width and height of the container, in pixels. \item[{\sphinxstylestrong{xdescent, ydescent}}] \leavevmode{[}int or float{]} descent of the container in the x- and y- direction, in pixels. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int{]} Location of this artist. Valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}int or float, optional{]} Padding around the child objects, in fraction of the font size. Defaults to 0.4. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}int or float, optional{]} Border padding, in fraction of the font size. Defaults to 0.5. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font property used as a reference for paddings. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} If True, draw a box around this artists. Defaults to True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyworded arguments to pass to {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} To display blue and red circles of different sizes in the upper right of an axes \sphinxstyleemphasis{ax}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ada} \PYG{o}{=} \PYG{n}{AnchoredDrawingArea}\PYG{p}{(}\PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{20}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{loc}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ada}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{b}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ada}\PYG{o}{.}\PYG{n}{drawing\PYGZus{}area}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{Circle}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{30}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{fc}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{ada}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{drawing\_area}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.DrawingArea}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.DrawingArea}}}}}{]} A container for artists to display. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredDrawingArea}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea:examples-using-mpl-toolkits-axes-grid1-anchored-artists-anchoreddrawingarea}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_userdemo\_anchored\_box02.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredEllipse} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:mpl-toolkits-axes-grid1-anchored-artists-anchoredellipse}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse::doc}}\index{AnchoredEllipse (class in mpl\_toolkits.axes\_grid1.anchored\_artists)@\spxentry{AnchoredEllipse}\spxextra{class in mpl\_toolkits.axes\_grid1.anchored\_artists}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.}}\sphinxbfcode{\sphinxupquote{AnchoredEllipse}}}{\emph{transform}, \emph{width}, \emph{height}, \emph{angle}, \emph{loc}, \emph{pad=0.1}, \emph{borderpad=0.1}, \emph{prop=None}, \emph{frameon=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} Draw an anchored ellipse of a given size. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transformation object for the coordinate system in use, i.e., \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.transData}}. \item[{\sphinxstylestrong{width, height}}] \leavevmode{[}int or float{]} Width and height of the ellipse, given in coordinates of \sphinxstyleemphasis{transform}. \item[{\sphinxstylestrong{angle}}] \leavevmode{[}int or float{]} Rotation of the ellipse, in degrees, anti-clockwise. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int{]} Location of this size bar. Valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}int or float, optional{]} Padding around the ellipse, in fraction of the font size. Defaults to 0.1. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}int or float, optional{]} Border padding, in fraction of the font size. Defaults to 0.1. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} If True, draw a box around the ellipse. Defaults to True. \item[{\sphinxstylestrong{prop}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font property used as a reference for paddings. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyworded arguments to pass to {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}}. \end{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ellipse}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Ellipse:matplotlib.patches.Ellipse}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Ellipse}}}}}{]} Ellipse patch drawn. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredEllipse}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse:examples-using-mpl-toolkits-axes-grid1-anchored-artists-anchoredellipse}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredSizeBar} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:mpl-toolkits-axes-grid1-anchored-artists-anchoredsizebar}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar::doc}}\index{AnchoredSizeBar (class in mpl\_toolkits.axes\_grid1.anchored\_artists)@\spxentry{AnchoredSizeBar}\spxextra{class in mpl\_toolkits.axes\_grid1.anchored\_artists}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.}}\sphinxbfcode{\sphinxupquote{AnchoredSizeBar}}}{\emph{transform}, \emph{size}, \emph{label}, \emph{loc}, \emph{pad=0.1}, \emph{borderpad=0.1}, \emph{sep=2}, \emph{frameon=True}, \emph{size\_vertical=0}, \emph{color='black'}, \emph{label\_top=False}, \emph{fontproperties=None}, \emph{fill\_bar=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} Draw a horizontal scale bar with a center-aligned label underneath. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}{]} The transformation object for the coordinate system in use, i.e., \sphinxcode{\sphinxupquote{matplotlib.axes.Axes.transData}}. \item[{\sphinxstylestrong{size}}] \leavevmode{[}int or float{]} Horizontal length of the size bar, given in coordinates of \sphinxstyleemphasis{transform}. \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Label to display. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int{]} Location of this size bar. Valid location codes are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}int or float, optional{]} Padding around the label and size bar, in fraction of the font size. Defaults to 0.1. \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}int or float, optional{]} Border padding, in fraction of the font size. Defaults to 0.1. \item[{\sphinxstylestrong{sep}}] \leavevmode{[}int or float, optional{]} Separation between the label and the size bar, in points. Defaults to 2. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} If True, draw a box around the horizontal bar and label. Defaults to True. \item[{\sphinxstylestrong{size\_vertical}}] \leavevmode{[}int or float, optional{]} Vertical length of the size bar, given in coordinates of \sphinxstyleemphasis{transform}. Defaults to 0. \item[{\sphinxstylestrong{color}}] \leavevmode{[}str, optional{]} Color for the size bar and label. Defaults to black. \item[{\sphinxstylestrong{label\_top}}] \leavevmode{[}bool, optional{]} If True, the label will be over the size bar. Defaults to False. \item[{\sphinxstylestrong{fontproperties}}] \leavevmode{[}{\hyperref[\detokenize{api/font_manager_api:matplotlib.font_manager.FontProperties}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.font\_manager.FontProperties}}}}}, optional{]} Font properties for the label text. \item[{\sphinxstylestrong{fill\_bar}}] \leavevmode{[}bool, optional{]} If True and if size\_vertical is nonzero, the size bar will be filled in with the color specified by the size bar. Defaults to True if \sphinxcode{\sphinxupquote{size\_vertical}} is greater than zero and False otherwise. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Keyworded arguments to pass to {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}}. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If \sphinxstyleemphasis{prop} is passed as a keyworded argument, but \sphinxstyleemphasis{fontproperties} is not, then \sphinxstyleemphasis{prop} is be assumed to be the intended \sphinxstyleemphasis{fontproperties}. Using both \sphinxstyleemphasis{prop} and \sphinxstyleemphasis{fontproperties} is not supported. \subsubsection*{Examples} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{from} \PYG{n+nn}{mpl\PYGZus{}toolkits}\PYG{n+nn}{.}\PYG{n+nn}{axes\PYGZus{}grid1}\PYG{n+nn}{.}\PYG{n+nn}{anchored\PYGZus{}artists} \PYG{k}{import} \PYG{p}{(} \PYG{g+gp}{... } \PYG{n}{AnchoredSizeBar}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{random}\PYG{p}{(}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{,}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{bar} \PYG{o}{=} \PYG{n}{AnchoredSizeBar}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3 data units}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax}\PYG{o}{.}\PYG{n}{add\PYGZus{}artist}\PYG{p}{(}\PYG{n}{bar}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} Using all the optional parameters \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{font\PYGZus{}manager} \PYG{k}{as} \PYG{n+nn}{fm} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{fontprops} \PYG{o}{=} \PYG{n}{fm}\PYG{o}{.}\PYG{n}{FontProperties}\PYG{p}{(}\PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{14}\PYG{p}{,} \PYG{n}{family}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{monospace}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{bar} \PYG{o}{=} \PYG{n}{AnchoredSizeBar}\PYG{p}{(}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transData}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{3 units}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{n}{pad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{sep}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{,} \PYG{n}{borderpad}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{frameon}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{size\PYGZus{}vertical}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{n}{color}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{white}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{fontproperties}\PYG{o}{=}\PYG{n}{fontprops}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{size\_bar}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AuxTransformBox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AuxTransformBox}}}}}{]} Container for the size bar. \item[{\sphinxstylestrong{txt\_label}}] \leavevmode{[}{\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.TextArea}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.TextArea}}}}}{]} Container for the label of the size bar. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.anchored\_artists.AnchoredSizeBar}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:examples-using-mpl-toolkits-axes-grid1-anchored-artists-anchoredsizebar}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_anchored\_artists.py} \end{itemize} \subsubsection{mpl\_toolkits.axes\_grid1.axes\_divider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:module-mpl_toolkits.axes_grid1.axes_divider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:mpl-toolkits-axes-grid1-axes-divider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider::doc}}\index{mpl\_toolkits.axes\_grid1.axes\_divider (module)@\spxentry{mpl\_toolkits.axes\_grid1.axes\_divider}\spxextra{module}} The axes\_divider module provides helper classes to adjust the positions of multiple axes at drawing time. \begin{quote} \begin{description} \item[{Divider: this is the class that is used to calculate the axes}] \leavevmode position. It divides the given rectangular area into several sub rectangles. You initialize the divider by setting the horizontal and vertical lists of sizes that the division will be based on. You then use the new\_locator method, whose return value is a callable object that can be used to set the axes\_locator of the axes. \end{description} \end{quote} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Axes:mpl_toolkits.axes_grid1.axes_divider.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesDivider}}}}}(axes{[}, xref, yref{]}) & Divider based on the pre-existing axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesLocator:mpl_toolkits.axes_grid1.axes_divider.AxesLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesLocator}}}}}(axes\_divider, nx, ny{[}, nx1, ny1{]}) & A simple callable object, initialized with AxesDivider class, returns the position and size of the given cell. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Divider}}}}}(fig, pos, horizontal, vertical{[}, ...{]}) & This class calculates the axes position. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl_toolkits.axes_grid1.axes_divider.HBoxDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HBoxDivider}}}}}(fig, *args, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxes:mpl_toolkits.axes_grid1.axes_divider.LocatableAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatableAxes}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase:mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatableAxesBase}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SubplotDivider}}}}}(fig, *args{[}, horizontal, ...{]}) & The Divider class whose rectangle area is specified as a subplot geometry. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider:mpl_toolkits.axes_grid1.axes_divider.VBoxDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{VBoxDivider}}}}}(fig, *args, **kwargs) & The Divider class whose rectangle area is specified as a subplot geometry. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.Axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Axes:mpl-toolkits-axes-grid1-axes-divider-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Axes::doc}}\index{Axes (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{Axes}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Axes:mpl_toolkits.axes_grid1.axes_divider.Axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{Axes}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl-toolkits-axes-grid1-axes-divider-axesdivider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider::doc}}\index{AxesDivider (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{AxesDivider}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{AxesDivider}}}{\emph{axes}, \emph{xref=None}, \emph{yref=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.Divider}}}}} Divider based on the pre-existing axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} \item[{\sphinxstylestrong{xref}}] \leavevmode \item[{\sphinxstylestrong{yref}}] \leavevmode \end{description} \end{description}\end{quote} \index{append\_axes() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{append\_axes()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.append_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{append\_axes}}}{\emph{self}, \emph{position}, \emph{size}, \emph{pad=None}, \emph{add\_to\_figure=True}, \emph{**kwargs}}{} create an axes at the given \sphinxstyleemphasis{position} with the same height (or width) of the main axes. \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{position}}] \leavevmode {[}"left"\textbar{}"right"\textbar{}"bottom"\textbar{}"top"{]} \end{description} \sphinxstyleemphasis{size} and \sphinxstyleemphasis{pad} should be axes\_grid.axes\_size compatible. \end{quote} \end{fulllineitems} \index{get\_anchor() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{get\_anchor()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.get_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_anchor}}}{\emph{self}}{} return the anchor \end{fulllineitems} \index{get\_aspect() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{get\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.get_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aspect}}}{\emph{self}}{} return aspect \end{fulllineitems} \index{get\_position() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{get\_position()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} return the position of the rectangle. \end{fulllineitems} \index{get\_subplotspec() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{get\_subplotspec()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.get_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplotspec}}}{\emph{self}}{}~ \end{fulllineitems} \index{new\_horizontal() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{new\_horizontal()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.new_horizontal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_horizontal}}}{\emph{self}, \emph{size}, \emph{pad=None}, \emph{pack\_start=False}, \emph{**kwargs}}{} Add a new axes on the right (or left) side of the main axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{size}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_size}} or float or string{]} A width of the axes. If float or string is given, \sphinxstyleemphasis{from\_any} function is used to create the size, with \sphinxstyleemphasis{ref\_size} set to AxesX instance of the current axes. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_size}} or float or string{]} Pad between the axes. It takes same argument as \sphinxstyleemphasis{size}. \item[{\sphinxstylestrong{pack\_start}}] \leavevmode{[}bool{]} If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes. \item[{\sphinxstylestrong{kwargs}}] \leavevmode All extra keywords arguments are passed to the created axes. If \sphinxstyleemphasis{axes\_class} is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{new\_vertical() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method)@\spxentry{new\_vertical()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesDivider:mpl_toolkits.axes_grid1.axes_divider.AxesDivider.new_vertical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_vertical}}}{\emph{self}, \emph{size}, \emph{pad=None}, \emph{pack\_start=False}, \emph{**kwargs}}{} Add a new axes on the top (or bottom) side of the main axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{size}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_size}} or float or string{]} A height of the axes. If float or string is given, \sphinxstyleemphasis{from\_any} function is used to create the size, with \sphinxstyleemphasis{ref\_size} set to AxesX instance of the current axes. \item[{\sphinxstylestrong{pad}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_size}} or float or string{]} Pad between the axes. It takes same argument as \sphinxstyleemphasis{size}. \item[{\sphinxstylestrong{pack\_start}}] \leavevmode{[}bool{]} If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes. \item[{\sphinxstylestrong{kwargs}}] \leavevmode All extra keywords arguments are passed to the created axes. If \sphinxstyleemphasis{axes\_class} is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.AxesLocator} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesLocator:mpl-toolkits-axes-grid1-axes-divider-axeslocator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesLocator::doc}}\index{AxesLocator (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{AxesLocator}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesLocator:mpl_toolkits.axes_grid1.axes_divider.AxesLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{AxesLocator}}}{\emph{axes\_divider}, \emph{nx}, \emph{ny}, \emph{nx1=None}, \emph{ny1=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A simple callable object, initialized with AxesDivider class, returns the position and size of the given cell. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes\_divider}}] \leavevmode{[}AxesDivider{]} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \end{description} \end{description}\end{quote} \index{get\_subplotspec() (mpl\_toolkits.axes\_grid1.axes\_divider.AxesLocator method)@\spxentry{get\_subplotspec()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.AxesLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.AxesLocator:mpl_toolkits.axes_grid1.axes_divider.AxesLocator.get_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplotspec}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.Divider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl-toolkits-axes-grid1-axes-divider-divider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider::doc}}\index{Divider (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{Divider}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{Divider}}}{\emph{fig}, \emph{pos}, \emph{horizontal}, \emph{vertical}, \emph{aspect=None}, \emph{anchor='C'}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} This class calculates the axes position. It divides the given rectangular area into several sub-rectangles. You initialize the divider by setting the horizontal and vertical lists of sizes (\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid.axes\_size}}) that the division will be based on. You then use the new\_locator method to create a callable object that can be used as the axes\_locator of the axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}Figure{]} \item[{\sphinxstylestrong{pos}}] \leavevmode{[}tuple of 4 floats{]} position of the rectangle that will be divided \item[{\sphinxstylestrong{horizontal}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{axes\_size}}{]} sizes for horizontal division \item[{\sphinxstylestrong{vertical}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{axes\_size}}{]} sizes for vertical division \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}bool{]} if True, the overall rectangular area is reduced so that the relative part of the horizontal and vertical scales have the same scale. \item[{\sphinxstylestrong{anchor}}] \leavevmode{[}\{'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'\}{]} placement of the reduced rectangle when \sphinxstyleemphasis{aspect} is True \end{description} \end{description}\end{quote} \index{add\_auto\_adjustable\_area() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{add\_auto\_adjustable\_area()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.add_auto_adjustable_area}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_auto\_adjustable\_area}}}{\emph{self}, \emph{use\_axes}, \emph{pad=0.1}, \emph{adjust\_dirs=None}}{}~ \end{fulllineitems} \index{append\_size() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{append\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.append_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{append\_size}}}{\emph{self}, \emph{position}, \emph{size}}{}~ \end{fulllineitems} \index{get\_anchor() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_anchor()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_anchor}}}{\emph{self}}{} return the anchor \end{fulllineitems} \index{get\_aspect() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aspect}}}{\emph{self}}{} return aspect \end{fulllineitems} \index{get\_horizontal() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_horizontal()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_horizontal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_horizontal}}}{\emph{self}}{} return horizontal sizes \end{fulllineitems} \index{get\_horizontal\_sizes() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_horizontal\_sizes()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_horizontal_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_horizontal\_sizes}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_locator() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_locator}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_position() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_position()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} return the position of the rectangle. \end{fulllineitems} \index{get\_position\_runtime() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_position\_runtime()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_position_runtime}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position\_runtime}}}{\emph{self}, \emph{ax}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_vertical() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_vertical()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_vertical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vertical}}}{\emph{self}}{} return vertical sizes \end{fulllineitems} \index{get\_vertical\_sizes() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_vertical\_sizes()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_vertical_sizes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vertical\_sizes}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_vsize\_hsize() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{get\_vsize\_hsize()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.get_vsize_hsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vsize\_hsize}}}{\emph{self}}{}~ \end{fulllineitems} \index{locate() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{locate()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.locate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locate}}}{\emph{self}, \emph{nx}, \emph{ny}, \emph{nx1=None}, \emph{ny1=None}, \emph{axes=None}, \emph{renderer=None}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \item[{\sphinxstylestrong{axes}}] \leavevmode \item[{\sphinxstylestrong{renderer}}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{new\_locator() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{new\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.new_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_locator}}}{\emph{self}, \emph{nx}, \emph{ny}, \emph{nx1=None}, \emph{ny1=None}}{} Returns a new locator (\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid.axes\_divider.AxesLocator}}) for specified cell. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_anchor() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_anchor()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_anchor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_anchor}}}{\emph{self}, \emph{anchor}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{anchor}}] \leavevmode{[}\{'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'\}{]}\begin{quote} anchor position \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily value &\sphinxstyletheadfamily description \\ \hline 'C' & Center \\ \hline 'SW' & bottom left \\ \hline 'S' & bottom \\ \hline 'SE' & bottom right \\ \hline 'E' & right \\ \hline 'NE' & top right \\ \hline 'N' & top \\ \hline 'NW' & top left \\ \hline 'W' & left \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_aspect() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aspect}}}{\emph{self}, \emph{aspect=False}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_horizontal() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_horizontal()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_horizontal}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_horizontal}}}{\emph{self}, \emph{h}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{h}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{axes\_size}}{]} sizes for horizontal division \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_locator() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locator}}}{\emph{self}, \emph{\_locator}}{}~ \end{fulllineitems} \index{set\_position() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_position()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_position}}}{\emph{self}, \emph{pos}}{} set the position of the rectangle. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pos}}] \leavevmode{[}tuple of 4 floats{]} position of the rectangle that will be divided \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_vertical() (mpl\_toolkits.axes\_grid1.axes\_divider.Divider method)@\spxentry{set\_vertical()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.Divider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider.set_vertical}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_vertical}}}{\emph{self}, \emph{v}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{v}}] \leavevmode{[}list of \sphinxcode{\sphinxupquote{axes\_size}}{]} sizes for vertical division \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl-toolkits-axes-grid1-axes-divider-hboxdivider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider::doc}}\index{HBoxDivider (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{HBoxDivider}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl_toolkits.axes_grid1.axes_divider.HBoxDivider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{HBoxDivider}}}{\emph{fig}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider}}}}} \index{locate() (mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider method)@\spxentry{locate()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl_toolkits.axes_grid1.axes_divider.HBoxDivider.locate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locate}}}{\emph{self}, \emph{nx}, \emph{ny}, \emph{nx1=None}, \emph{ny1=None}, \emph{axes=None}, \emph{renderer=None}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes\_divider}}] \leavevmode{[}AxesDivider{]} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \item[{\sphinxstylestrong{axes}}] \leavevmode \item[{\sphinxstylestrong{renderer}}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{new\_locator() (mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider method)@\spxentry{new\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl_toolkits.axes_grid1.axes_divider.HBoxDivider.new_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_locator}}}{\emph{self}, \emph{nx}, \emph{nx1=None}}{} returns a new locator (\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid.axes\_divider.AxesLocator}}) for specified cell. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:examples-using-mpl-toolkits-axes-grid1-axes-divider-hboxdivider}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.LocatableAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxes:mpl-toolkits-axes-grid1-axes-divider-locatableaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxes::doc}}\index{LocatableAxes (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{LocatableAxes}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxes:mpl_toolkits.axes_grid1.axes_divider.LocatableAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{LocatableAxes}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.LocatableAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase:mpl-toolkits-axes-grid1-axes-divider-locatableaxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase::doc}}\index{LocatableAxesBase (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{LocatableAxesBase}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase:mpl_toolkits.axes_grid1.axes_divider.LocatableAxesBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{LocatableAxesBase}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl-toolkits-axes-grid1-axes-divider-subplotdivider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider::doc}}\index{SubplotDivider (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{SubplotDivider}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{SubplotDivider}}}{\emph{fig}, \emph{*args}, \emph{horizontal=None}, \emph{vertical=None}, \emph{aspect=None}, \emph{anchor='C'}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.Divider:mpl_toolkits.axes_grid1.axes_divider.Divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.Divider}}}}} The Divider class whose rectangle area is specified as a subplot geometry. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} \item[{\sphinxstylestrong{*args}}] \leavevmode{[}tuple (\sphinxstyleemphasis{numRows}, \sphinxstyleemphasis{numCols}, \sphinxstyleemphasis{plotNum}){]} The array of subplots in the figure has dimensions \sphinxstyleemphasis{numRows}, \sphinxstyleemphasis{numCols}, and \sphinxstyleemphasis{plotNum} is the number of the subplot being created. \sphinxstyleemphasis{plotNum} starts at 1 in the upper left corner and increases to the right. If \sphinxstyleemphasis{numRows} \textless{}= \sphinxstyleemphasis{numCols} \textless{}= \sphinxstyleemphasis{plotNum} \textless{} 10, \sphinxstyleemphasis{args} can be the decimal integer \sphinxstyleemphasis{numRows} * 100 + \sphinxstyleemphasis{numCols} * 10 + \sphinxstyleemphasis{plotNum}. \end{description} \end{description}\end{quote} \index{change\_geometry() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{change\_geometry()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.change_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{change\_geometry}}}{\emph{self}, \emph{numrows}, \emph{numcols}, \emph{num}}{} change subplot geometry, e.g., from 1,1,1 to 2,2,3 \end{fulllineitems} \index{get\_geometry() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{get\_geometry()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.get_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_geometry}}}{\emph{self}}{} get the subplot geometry, e.g., 2,2,3 \end{fulllineitems} \index{get\_position() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{get\_position()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.get_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_position}}}{\emph{self}}{} return the bounds of the subplot box \end{fulllineitems} \index{get\_subplotspec() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{get\_subplotspec()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.get_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_subplotspec}}}{\emph{self}}{} get the SubplotSpec instance \end{fulllineitems} \index{set\_subplotspec() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{set\_subplotspec()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.set_subplotspec}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_subplotspec}}}{\emph{self}, \emph{subplotspec}}{} set the SubplotSpec instance \end{fulllineitems} \index{update\_params() (mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method)@\spxentry{update\_params()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.SubplotDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.SubplotDivider:mpl_toolkits.axes_grid1.axes_divider.SubplotDivider.update_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_params}}}{\emph{self}}{} update the subplot position from fig.subplotpars \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.VBoxDivider} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider:mpl-toolkits-axes-grid1-axes-divider-vboxdivider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider::doc}}\index{VBoxDivider (class in mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{VBoxDivider}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider:mpl_toolkits.axes_grid1.axes_divider.VBoxDivider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{VBoxDivider}}}{\emph{fig}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.HBoxDivider:mpl_toolkits.axes_grid1.axes_divider.HBoxDivider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.HBoxDivider}}}}} The Divider class whose rectangle area is specified as a subplot geometry. \index{locate() (mpl\_toolkits.axes\_grid1.axes\_divider.VBoxDivider method)@\spxentry{locate()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.VBoxDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider:mpl_toolkits.axes_grid1.axes_divider.VBoxDivider.locate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locate}}}{\emph{self}, \emph{nx}, \emph{ny}, \emph{nx1=None}, \emph{ny1=None}, \emph{axes=None}, \emph{renderer=None}}{}~\begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes\_divider}}] \leavevmode{[}AxesDivider{]} \item[{\sphinxstylestrong{nx, nx1}}] \leavevmode{[}int{]} Integers specifying the column-position of the cell. When \sphinxstyleemphasis{nx1} is None, a single \sphinxstyleemphasis{nx}-th column is specified. Otherwise location of columns spanning between \sphinxstyleemphasis{nx} to \sphinxstyleemphasis{nx1} (but excluding \sphinxstyleemphasis{nx1}-th column) is specified. \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Same as \sphinxstyleemphasis{nx} and \sphinxstyleemphasis{nx1}, but for row positions. \item[{\sphinxstylestrong{axes}}] \leavevmode \item[{\sphinxstylestrong{renderer}}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{new\_locator() (mpl\_toolkits.axes\_grid1.axes\_divider.VBoxDivider method)@\spxentry{new\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_divider.VBoxDivider method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.VBoxDivider:mpl_toolkits.axes_grid1.axes_divider.VBoxDivider.new_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_locator}}}{\emph{self}, \emph{ny}, \emph{ny1=None}}{} returns a new locator (\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid.axes\_divider.AxesLocator}}) for specified cell. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{ny, ny1}}] \leavevmode{[}int{]} Integers specifying the row-position of the cell. When \sphinxstyleemphasis{ny1} is None, a single \sphinxstyleemphasis{ny}-th row is specified. Otherwise location of rows spanning between \sphinxstyleemphasis{ny} to \sphinxstyleemphasis{ny1} (but excluding \sphinxstyleemphasis{ny1}-th row) is specified. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory:mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{locatable\_axes\_factory}}}}}(axes\_class) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable:mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes\_area\_auto\_adjustable}}}}}(ax{[}, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable:mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes\_locatable}}}}}(axes) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.locatable\_axes\_factory} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory:mpl-toolkits-axes-grid1-axes-divider-locatable-axes-factory}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory::doc}}\index{locatable\_axes\_factory() (in module mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{locatable\_axes\_factory()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory:mpl_toolkits.axes_grid1.axes_divider.locatable_axes_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{locatable\_axes\_factory}}}{\emph{axes\_class}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.make\_axes\_area\_auto\_adjustable} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable:mpl-toolkits-axes-grid1-axes-divider-make-axes-area-auto-adjustable}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable::doc}}\index{make\_axes\_area\_auto\_adjustable() (in module mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{make\_axes\_area\_auto\_adjustable()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable:mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{make\_axes\_area\_auto\_adjustable}}}{\emph{ax}, \emph{use\_axes=None}, \emph{pad=0.1}, \emph{adjust\_dirs=None}}{}~ \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.make\_axes\_area\_auto\_adjustable}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable:examples-using-mpl-toolkits-axes-grid1-axes-divider-make-axes-area-auto-adjustable}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_make\_room\_for\_ylabel\_using\_axesgrid.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_divider.make\_axes\_locatable} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable:mpl-toolkits-axes-grid1-axes-divider-make-axes-locatable}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable::doc}}\index{make\_axes\_locatable() (in module mpl\_toolkits.axes\_grid1.axes\_divider)@\spxentry{make\_axes\_locatable()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable:mpl_toolkits.axes_grid1.axes_divider.make_axes_locatable}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_divider.}}\sphinxbfcode{\sphinxupquote{make\_axes\_locatable}}}{\emph{axes}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.axes\_grid1.axes\_grid} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:module-mpl_toolkits.axes_grid1.axes_grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:mpl-toolkits-axes-grid1-axes-grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid::doc}}\index{mpl\_toolkits.axes\_grid1.axes\_grid (module)@\spxentry{mpl\_toolkits.axes\_grid1.axes\_grid}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.AxesGrid:mpl_toolkits.axes_grid1.axes_grid.AxesGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesGrid}}}}} & alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl_toolkits.axes_grid1.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.ImageGrid}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxes:mpl_toolkits.axes_grid1.axes_grid.CbarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CbarAxes}}}}}(*args, orientation, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CbarAxesBase}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Grid}}}}}(fig, rect, nrows\_ncols{[}, ngrids, ...{]}) & A class that creates a grid of Axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl_toolkits.axes_grid1.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageGrid}}}}}(fig, rect, nrows\_ncols{[}, ngrids, ...{]}) & A class that creates a grid of Axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_grid.AxesGrid} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.AxesGrid:mpl-toolkits-axes-grid1-axes-grid-axesgrid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.AxesGrid::doc}}\index{AxesGrid (in module mpl\_toolkits.axes\_grid1.axes\_grid)@\spxentry{AxesGrid}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.AxesGrid:mpl_toolkits.axes_grid1.axes_grid.AxesGrid}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.}}\sphinxbfcode{\sphinxupquote{AxesGrid}}} alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl_toolkits.axes_grid1.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.ImageGrid}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxes:mpl-toolkits-axes-grid1-axes-grid-cbaraxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxes::doc}}\index{CbarAxes (class in mpl\_toolkits.axes\_grid1.axes\_grid)@\spxentry{CbarAxes}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxes:mpl_toolkits.axes_grid1.axes_grid.CbarAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.}}\sphinxbfcode{\sphinxupquote{CbarAxes}}}{\emph{*args}, \emph{orientation}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}}}} \index{cla() (mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxes method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxes:mpl_toolkits.axes_grid1.axes_grid.CbarAxes.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl-toolkits-axes-grid1-axes-grid-cbaraxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase::doc}}\index{CbarAxesBase (class in mpl\_toolkits.axes\_grid1.axes\_grid)@\spxentry{CbarAxesBase}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.}}\sphinxbfcode{\sphinxupquote{CbarAxesBase}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{colorbar() (mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase method)@\spxentry{colorbar()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase.colorbar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{colorbar}}}{\emph{self}, \emph{mappable}, \emph{*}, \emph{locator=None}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{toggle\_label() (mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase method)@\spxentry{toggle\_label()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase.toggle_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toggle\_label}}}{\emph{self}, \emph{b}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_grid.Grid} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl-toolkits-axes-grid1-axes-grid-grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid::doc}}\index{Grid (class in mpl\_toolkits.axes\_grid1.axes\_grid)@\spxentry{Grid}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.}}\sphinxbfcode{\sphinxupquote{Grid}}}{\emph{fig}, \emph{rect}, \emph{nrows\_ncols}, \emph{ngrids=None}, \emph{direction='row'}, \emph{axes\_pad=0.02}, \emph{add\_all=True}, \emph{share\_all=False}, \emph{share\_x=True}, \emph{share\_y=True}, \emph{label\_mode='L'}, \emph{axes\_class=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} A class that creates a grid of Axes. In matplotlib, the axes location (and size) is specified in the normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio. For example, displaying images of a same size with some fixed padding between them cannot be easily done in matplotlib. AxesGrid is used in such case. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The parent figure. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}(float, float, float, float) or int{]} The axes position, as a \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} tuple or as a three-digit subplot position code (e.g., "121"). \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{"row", "column"\}, default: "row"{]} \item[{\sphinxstylestrong{axes\_pad}}] \leavevmode{[}float or (float, float), default: 0.02{]} Padding or (horizontal padding, vertical padding) between axes, in inches. \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_all}}] \leavevmode{[}bool, default: False{]} \item[{\sphinxstylestrong{share\_x}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_y}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{label\_mode}}] \leavevmode{[}\{"L", "1", "all"\}, default: "L"{]} Determines which axes will get tick labels: \begin{itemize} \item {} "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. \item {} "1": Only the bottom left axes is labelled. \item {} "all": all axes are labelled. \end{itemize} \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}a type that is a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}, default: None{]} \end{description} \end{description}\end{quote} \index{get\_aspect() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aspect}}}{\emph{self}}{} Return the aspect of the SubplotDivider. \end{fulllineitems} \index{get\_axes\_locator() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_axes\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_axes_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axes\_locator}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_axes\_pad() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_axes\_pad()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_axes_pad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axes\_pad}}}{\emph{self}}{} Return the axes padding. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{hpad, vpad}] \leavevmode Padding (horizontal pad, vertical pad) in inches. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_divider() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_divider()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_divider}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_divider}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_geometry() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_geometry()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_geometry}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_geometry}}}{\emph{self}}{} Return the number of rows and columns of the grid as (nrows, ncols). \end{fulllineitems} \index{get\_vsize\_hsize() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{get\_vsize\_hsize()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.get_vsize_hsize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vsize\_hsize}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_aspect() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{set\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.set_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_aspect}}}{\emph{self}, \emph{aspect}}{} Set the aspect of the SubplotDivider. \end{fulllineitems} \index{set\_axes\_locator() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{set\_axes\_locator()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.set_axes_locator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axes\_locator}}}{\emph{self}, \emph{locator}}{}~ \end{fulllineitems} \index{set\_axes\_pad() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{set\_axes\_pad()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.set_axes_pad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axes\_pad}}}{\emph{self}, \emph{axes\_pad}}{} Set the padding between the axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes\_pad}}] \leavevmode{[}(float, float){]} The padding (horizontal pad, vertical pad) in inches. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_label\_mode() (mpl\_toolkits.axes\_grid1.axes\_grid.Grid method)@\spxentry{set\_label\_mode()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_grid.Grid method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid.set_label_mode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label\_mode}}}{\emph{self}, \emph{mode}}{} Define which axes have tick labels. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{mode}}] \leavevmode{[}\{"L", "1", "all"\}{]} The label mode: \begin{itemize} \item {} "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. \item {} "1": Only the bottom left axes is labelled. \item {} "all": all axes are labelled. \end{itemize} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_grid.ImageGrid} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl-toolkits-axes-grid1-axes-grid-imagegrid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid::doc}}\index{ImageGrid (class in mpl\_toolkits.axes\_grid1.axes\_grid)@\spxentry{ImageGrid}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl_toolkits.axes_grid1.axes_grid.ImageGrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.}}\sphinxbfcode{\sphinxupquote{ImageGrid}}}{\emph{fig}, \emph{rect}, \emph{nrows\_ncols}, \emph{ngrids=None}, \emph{direction='row'}, \emph{axes\_pad=0.02}, \emph{add\_all=True}, \emph{share\_all=False}, \emph{aspect=True}, \emph{label\_mode='L'}, \emph{cbar\_mode=None}, \emph{cbar\_location='right'}, \emph{cbar\_pad=None}, \emph{cbar\_size='5\%'}, \emph{cbar\_set\_cax=True}, \emph{axes\_class=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.Grid}}}}} A class that creates a grid of Axes. In matplotlib, the axes location (and size) is specified in the normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio. For example, displaying images of a same size with some fixed padding between them cannot be easily done in matplotlib. ImageGrid is used in such case. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The parent figure. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}(float, float, float, float) or int{]} The axes position, as a \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} tuple or as a three-digit subplot position code (e.g., "121"). \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{"row", "column"\}, default: "row"{]} \item[{\sphinxstylestrong{axes\_pad}}] \leavevmode{[}float or (float, float), default: 0.02{]} Padding or (horizontal padding, vertical padding) between axes, in inches. \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_all}}] \leavevmode{[}bool, default: False{]} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{label\_mode}}] \leavevmode{[}\{"L", "1", "all"\}, default: "L"{]} Determines which axes will get tick labels: \begin{itemize} \item {} "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. \item {} "1": Only the bottom left axes is labelled. \item {} "all": all axes are labelled. \end{itemize} \item[{\sphinxstylestrong{cbar\_mode}}] \leavevmode{[}\{"each", "single", "edge", None \}, default: None{]} \item[{\sphinxstylestrong{cbar\_location}}] \leavevmode{[}\{"left", "right", "bottom", "top"\}, default: "right"{]} \item[{\sphinxstylestrong{cbar\_pad}}] \leavevmode{[}float, default: None{]} \item[{\sphinxstylestrong{cbar\_size}}] \leavevmode{[}size specification (see \sphinxcode{\sphinxupquote{Size.from\_any}}), default: "5\%"{]} \item[{\sphinxstylestrong{cbar\_set\_cax}}] \leavevmode{[}bool, default: True{]} If True, each axes in the grid has a \sphinxstyleemphasis{cax} attribute that is bound to associated \sphinxstyleemphasis{cbar\_axes}. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}a type that is a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}, default: None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{mpl\_toolkits.axes\_grid1.axes\_rgb} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:module-mpl_toolkits.axes_grid1.axes_rgb}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:mpl-toolkits-axes-grid1-axes-rgb}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb::doc}}\index{mpl\_toolkits.axes\_grid1.axes\_rgb (module)@\spxentry{mpl\_toolkits.axes\_grid1.axes\_rgb}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxes:mpl_toolkits.axes_grid1.axes_rgb.RGBAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RGBAxes}}}}}(*args{[}, pad, add\_all{]}) & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RGBAxesBase}}}}}(*args{[}, pad, add\_all{]}) & base class for a 4-panel imshow (RGB, R, G, B) \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxes:mpl-toolkits-axes-grid1-axes-rgb-rgbaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxes::doc}}\index{RGBAxes (class in mpl\_toolkits.axes\_grid1.axes\_rgb)@\spxentry{RGBAxes}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_rgb}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxes:mpl_toolkits.axes_grid1.axes_rgb.RGBAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.}}\sphinxbfcode{\sphinxupquote{RGBAxes}}}{\emph{*args}, \emph{pad=0}, \emph{add\_all=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} fraction of the axes height to put as padding. defaults to 0.0 \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool{]} True: Add the \{rgb, r, g, b\} axes to the figure defaults to True. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}matplotlib.axes.Axes{]} \item[{\sphinxstylestrong{*args}}] \leavevmode Unpacked into axes\_class() init for RGB \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Unpacked into axes\_class() init for RGB, R, G, B axes \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxes}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxes:examples-using-mpl-toolkits-axes-grid1-axes-rgb-rgbaxes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_pyplots\_whats\_new\_99\_axes\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_rgb.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_rgb.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl-toolkits-axes-grid1-axes-rgb-rgbaxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase::doc}}\index{RGBAxesBase (class in mpl\_toolkits.axes\_grid1.axes\_rgb)@\spxentry{RGBAxesBase}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_rgb}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.}}\sphinxbfcode{\sphinxupquote{RGBAxesBase}}}{\emph{*args}, \emph{pad=0}, \emph{add\_all=True}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} base class for a 4-panel imshow (RGB, R, G, B) Layout: +---------------+-----+ \textbar{} \textbar{} R \textbar{} + +-----+ \textbar{} RGB \textbar{} G \textbar{} + +-----+ \textbar{} \textbar{} B \textbar{} +---------------+-----+ \begin{quote}\begin{description} \item[{Attributes}] \leavevmode\begin{description} \item[{\sphinxstylestrong{\_defaultAxesClass}}] \leavevmode{[}matplotlib.axes.Axes{]} defaults to 'Axes' in RGBAxes child class. No default in abstract base class \item[{\sphinxstylestrong{RGB}}] \leavevmode{[}\_defaultAxesClass{]} The axes object for the three-channel imshow \item[{\sphinxstylestrong{R}}] \leavevmode{[}\_defaultAxesClass{]} The axes object for the red channel imshow \item[{\sphinxstylestrong{G}}] \leavevmode{[}\_defaultAxesClass{]} The axes object for the green channel imshow \item[{\sphinxstylestrong{B}}] \leavevmode{[}\_defaultAxesClass{]} The axes object for the blue channel imshow \end{description} \end{description}\end{quote} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} fraction of the axes height to put as padding. defaults to 0.0 \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool{]} True: Add the \{rgb, r, g, b\} axes to the figure defaults to True. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}matplotlib.axes.Axes{]} \item[{\sphinxstylestrong{*args}}] \leavevmode Unpacked into axes\_class() init for RGB \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Unpacked into axes\_class() init for RGB, R, G, B axes \end{description} \end{description}\end{quote} \index{add\_RGB\_to\_figure() (mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase method)@\spxentry{add\_RGB\_to\_figure()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase.add_RGB_to_figure}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_RGB\_to\_figure}}}{\emph{self}}{} Add the red, green and blue axes to the RGB composite's axes figure \end{fulllineitems} \index{imshow\_rgb() (mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase method)@\spxentry{imshow\_rgb()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase.imshow_rgb}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{imshow\_rgb}}}{\emph{self}, \emph{r}, \emph{g}, \emph{b}, \emph{**kwargs}}{} Create the four images \{rgb, r, g, b\} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{r}}] \leavevmode{[}array-like{]} The red array \item[{\sphinxstylestrong{g}}] \leavevmode{[}array-like{]} The green array \item[{\sphinxstylestrong{b}}] \leavevmode{[}array-like{]} The blue array \item[{\sphinxstylestrong{kwargs}}] \leavevmode{[}imshow kwargs{]} kwargs get unpacked into the imshow calls for the four images \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rgb}}] \leavevmode{[}matplotlib.image.AxesImage{]} \item[{\sphinxstylestrong{r}}] \leavevmode{[}matplotlib.image.AxesImage{]} \item[{\sphinxstylestrong{g}}] \leavevmode{[}matplotlib.image.AxesImage{]} \item[{\sphinxstylestrong{b}}] \leavevmode{[}matplotlib.image.AxesImage{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb:mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{imshow\_rgb}}}}}(ax, r, g, b, \textbackslash{}*\textbackslash{}*kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes:mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_rgb\_axes}}}}}(ax{[}, pad, axes\_class, add\_all{]}) & pad : fraction of the axes height. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_rgb.imshow\_rgb} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb:mpl-toolkits-axes-grid1-axes-rgb-imshow-rgb}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb::doc}}\index{imshow\_rgb() (in module mpl\_toolkits.axes\_grid1.axes\_rgb)@\spxentry{imshow\_rgb()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_rgb}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb:mpl_toolkits.axes_grid1.axes_rgb.imshow_rgb}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.}}\sphinxbfcode{\sphinxupquote{imshow\_rgb}}}{\emph{ax}, \emph{r}, \emph{g}, \emph{b}, \emph{**kwargs}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_rgb.make\_rgb\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes:mpl-toolkits-axes-grid1-axes-rgb-make-rgb-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes::doc}}\index{make\_rgb\_axes() (in module mpl\_toolkits.axes\_grid1.axes\_rgb)@\spxentry{make\_rgb\_axes()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_rgb}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes:mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.}}\sphinxbfcode{\sphinxupquote{make\_rgb\_axes}}}{\emph{ax}, \emph{pad=0.01}, \emph{axes\_class=None}, \emph{add\_all=True}}{} pad : fraction of the axes height. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.make\_rgb\_axes}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes:examples-using-mpl-toolkits-axes-grid1-axes-rgb-make-rgb-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_rgb.py} \end{itemize} \subsubsection{mpl\_toolkits.axes\_grid1.axes\_size} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:mpl-toolkits-axes-grid1-axes-size}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size::doc}}\index{mpl\_toolkits.axes\_grid1.axes\_size (module)@\spxentry{mpl\_toolkits.axes\_grid1.axes\_size}\spxextra{module}} Provides classes of simple units that will be used with AxesDivider class (or others) to determine the size of each axes. The unit classes define \sphinxcode{\sphinxupquote{get\_size}} method that returns a tuple of two floats, meaning relative and absolute sizes, respectively. Note that this class is nothing more than a simple tuple of two floats. Take a look at the Divider class to see how these two values are used. \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Add:mpl_toolkits.axes_grid1.axes_size.Add}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Add}}}}}(a, b) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AddList:mpl_toolkits.axes_grid1.axes_size.AddList}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AddList}}}}}(add\_list) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX:mpl_toolkits.axes_grid1.axes_size.AxesX}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesX}}}}}(axes{[}, aspect, ref\_ax{]}) & Scaled size whose relative part corresponds to the data width of the \sphinxstyleemphasis{axes} multiplied by the \sphinxstyleemphasis{aspect}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY:mpl_toolkits.axes_grid1.axes_size.AxesY}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesY}}}}}(axes{[}, aspect, ref\_ax{]}) & Scaled size whose relative part corresponds to the data height of the \sphinxstyleemphasis{axes} multiplied by the \sphinxstyleemphasis{aspect}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed:mpl_toolkits.axes_grid1.axes_size.Fixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Fixed}}}}}(fixed\_size) & Simple fixed size with absolute part = \sphinxstyleemphasis{fixed\_size} and relative part = 0. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fraction:mpl_toolkits.axes_grid1.axes_size.Fraction}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Fraction}}}}}(fraction, ref\_size) & An instance whose size is a \sphinxstyleemphasis{fraction} of the \sphinxstyleemphasis{ref\_size}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper:mpl_toolkits.axes_grid1.axes_size.GetExtentHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GetExtentHelper}}}}}(ax, direction) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent:mpl_toolkits.axes_grid1.axes_size.MaxExtent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxExtent}}}}}(artist\_list, w\_or\_h) & Size whose absolute part is the largest width (or height) of the given \sphinxstyleemphasis{artist\_list}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight:mpl_toolkits.axes_grid1.axes_size.MaxHeight}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxHeight}}}}}(artist\_list) & Size whose absolute part is the largest height of the given \sphinxstyleemphasis{artist\_list}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth:mpl_toolkits.axes_grid1.axes_size.MaxWidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxWidth}}}}}(artist\_list) & Size whose absolute part is the largest width of the given \sphinxstyleemphasis{artist\_list}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Padded:mpl_toolkits.axes_grid1.axes_size.Padded}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Padded}}}}}(size, pad) & Return a instance where the absolute part of \sphinxstyleemphasis{size} is increase by the amount of \sphinxstyleemphasis{pad}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scalable:mpl_toolkits.axes_grid1.axes_size.Scalable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Scalable}}}}} & alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl_toolkits.axes_grid1.axes_size.Scaled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.Scaled}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl_toolkits.axes_grid1.axes_size.Scaled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Scaled}}}}}(scalable\_size) & Simple scaled(?) size with absolute part = 0 and relative part = \sphinxstyleemphasis{scalable\_size}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:mpl_toolkits.axes_grid1.axes_size.SizeFromFunc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SizeFromFunc}}}}}(func) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Add} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Add:mpl-toolkits-axes-grid1-axes-size-add}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Add::doc}}\index{Add (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Add}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Add:mpl_toolkits.axes_grid1.axes_size.Add}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Add}}}{\emph{a}, \emph{b}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.Add method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.Add method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Add:mpl_toolkits.axes_grid1.axes_size.Add.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.AddList} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AddList:mpl-toolkits-axes-grid1-axes-size-addlist}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AddList::doc}}\index{AddList (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{AddList}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AddList:mpl_toolkits.axes_grid1.axes_size.AddList}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{AddList}}}{\emph{add\_list}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.AddList method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.AddList method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AddList:mpl_toolkits.axes_grid1.axes_size.AddList.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.AxesX} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX:mpl-toolkits-axes-grid1-axes-size-axesx}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX::doc}}\index{AxesX (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{AxesX}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX:mpl_toolkits.axes_grid1.axes_size.AxesX}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{AxesX}}}{\emph{axes}, \emph{aspect=1.0}, \emph{ref\_ax=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Scaled size whose relative part corresponds to the data width of the \sphinxstyleemphasis{axes} multiplied by the \sphinxstyleemphasis{aspect}. \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.AxesX method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.AxesX method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX:mpl_toolkits.axes_grid1.axes_size.AxesX.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.AxesX}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesX:examples-using-mpl-toolkits-axes-grid1-axes-size-axesx}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider3.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.AxesY} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY:mpl-toolkits-axes-grid1-axes-size-axesy}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY::doc}}\index{AxesY (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{AxesY}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY:mpl_toolkits.axes_grid1.axes_size.AxesY}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{AxesY}}}{\emph{axes}, \emph{aspect=1.0}, \emph{ref\_ax=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Scaled size whose relative part corresponds to the data height of the \sphinxstyleemphasis{axes} multiplied by the \sphinxstyleemphasis{aspect}. \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.AxesY method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.AxesY method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY:mpl_toolkits.axes_grid1.axes_size.AxesY.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.AxesY}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.AxesY:examples-using-mpl-toolkits-axes-grid1-axes-size-axesy}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider3.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Fixed} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed:mpl-toolkits-axes-grid1-axes-size-fixed}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed::doc}}\index{Fixed (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Fixed}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed:mpl_toolkits.axes_grid1.axes_size.Fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Fixed}}}{\emph{fixed\_size}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Simple fixed size with absolute part = \sphinxstyleemphasis{fixed\_size} and relative part = 0. \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.Fixed method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed:mpl_toolkits.axes_grid1.axes_size.Fixed.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.Fixed}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fixed:examples-using-mpl-toolkits-axes-grid1-axes-size-fixed}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider3.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Fraction} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fraction:mpl-toolkits-axes-grid1-axes-size-fraction}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fraction::doc}}\index{Fraction (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Fraction}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fraction:mpl_toolkits.axes_grid1.axes_size.Fraction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Fraction}}}{\emph{fraction}, \emph{ref\_size}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} An instance whose size is a \sphinxstyleemphasis{fraction} of the \sphinxstyleemphasis{ref\_size}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{s} \PYG{o}{=} \PYG{n}{Fraction}\PYG{p}{(}\PYG{l+m+mf}{0.3}\PYG{p}{,} \PYG{n}{AxesX}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.Fraction method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.Fraction method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Fraction:mpl_toolkits.axes_grid1.axes_size.Fraction.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.GetExtentHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper:mpl-toolkits-axes-grid1-axes-size-getextenthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper::doc}}\index{GetExtentHelper (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{GetExtentHelper}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.GetExtentHelper:mpl_toolkits.axes_grid1.axes_size.GetExtentHelper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{GetExtentHelper}}}{\emph{ax}, \emph{direction}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.MaxExtent} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent:mpl-toolkits-axes-grid1-axes-size-maxextent}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent::doc}}\index{MaxExtent (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{MaxExtent}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent:mpl_toolkits.axes_grid1.axes_size.MaxExtent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{MaxExtent}}}{\emph{artist\_list}, \emph{w\_or\_h}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Size whose absolute part is the largest width (or height) of the given \sphinxstyleemphasis{artist\_list}. \index{add\_artist() (mpl\_toolkits.axes\_grid1.axes\_size.MaxExtent method)@\spxentry{add\_artist()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxExtent method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent:mpl_toolkits.axes_grid1.axes_size.MaxExtent.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{}~ \end{fulllineitems} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.MaxExtent method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxExtent method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxExtent:mpl_toolkits.axes_grid1.axes_size.MaxExtent.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.MaxHeight} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight:mpl-toolkits-axes-grid1-axes-size-maxheight}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight::doc}}\index{MaxHeight (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{MaxHeight}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight:mpl_toolkits.axes_grid1.axes_size.MaxHeight}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{MaxHeight}}}{\emph{artist\_list}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Size whose absolute part is the largest height of the given \sphinxstyleemphasis{artist\_list}. \index{add\_artist() (mpl\_toolkits.axes\_grid1.axes\_size.MaxHeight method)@\spxentry{add\_artist()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxHeight method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight:mpl_toolkits.axes_grid1.axes_size.MaxHeight.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{}~ \end{fulllineitems} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.MaxHeight method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxHeight method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxHeight:mpl_toolkits.axes_grid1.axes_size.MaxHeight.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.MaxWidth} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth:mpl-toolkits-axes-grid1-axes-size-maxwidth}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth::doc}}\index{MaxWidth (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{MaxWidth}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth:mpl_toolkits.axes_grid1.axes_size.MaxWidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{MaxWidth}}}{\emph{artist\_list}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Size whose absolute part is the largest width of the given \sphinxstyleemphasis{artist\_list}. \index{add\_artist() (mpl\_toolkits.axes\_grid1.axes\_size.MaxWidth method)@\spxentry{add\_artist()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxWidth method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth:mpl_toolkits.axes_grid1.axes_size.MaxWidth.add_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_artist}}}{\emph{self}, \emph{a}}{}~ \end{fulllineitems} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.MaxWidth method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.MaxWidth method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.MaxWidth:mpl_toolkits.axes_grid1.axes_size.MaxWidth.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Padded} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Padded:mpl-toolkits-axes-grid1-axes-size-padded}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Padded::doc}}\index{Padded (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Padded}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Padded:mpl_toolkits.axes_grid1.axes_size.Padded}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Padded}}}{\emph{size}, \emph{pad}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Return a instance where the absolute part of \sphinxstyleemphasis{size} is increase by the amount of \sphinxstyleemphasis{pad}. \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.Padded method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.Padded method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Padded:mpl_toolkits.axes_grid1.axes_size.Padded.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Scalable} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scalable:mpl-toolkits-axes-grid1-axes-size-scalable}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scalable::doc}}\index{Scalable (in module mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Scalable}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scalable:mpl_toolkits.axes_grid1.axes_size.Scalable}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Scalable}}} alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl_toolkits.axes_grid1.axes_size.Scaled}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.Scaled}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.Scaled} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl-toolkits-axes-grid1-axes-size-scaled}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled::doc}}\index{Scaled (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{Scaled}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl_toolkits.axes_grid1.axes_size.Scaled}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{Scaled}}}{\emph{scalable\_size}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} Simple scaled(?) size with absolute part = 0 and relative part = \sphinxstyleemphasis{scalable\_size}. \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.Scaled method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.Scaled method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:mpl_toolkits.axes_grid1.axes_size.Scaled.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.Scaled}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.Scaled:examples-using-mpl-toolkits-axes-grid1-axes-size-scaled}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_hbox\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_simple\_axes\_divider2.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.SizeFromFunc} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:mpl-toolkits-axes-grid1-axes-size-sizefromfunc}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.SizeFromFunc::doc}}\index{SizeFromFunc (class in mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{SizeFromFunc}\spxextra{class in mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:mpl_toolkits.axes_grid1.axes_size.SizeFromFunc}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{SizeFromFunc}}}{\emph{func}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.\_Base}} \index{get\_size() (mpl\_toolkits.axes\_grid1.axes\_size.SizeFromFunc method)@\spxentry{get\_size()}\spxextra{mpl\_toolkits.axes\_grid1.axes\_size.SizeFromFunc method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:mpl_toolkits.axes_grid1.axes_size.SizeFromFunc.get_size}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_size}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.from_any:mpl_toolkits.axes_grid1.axes_size.from_any}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{from\_any}}}}}(size{[}, fraction\_ref{]}) & Creates Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with \%. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.axes\_size.from\_any} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.from_any:mpl-toolkits-axes-grid1-axes-size-from-any}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.from_any::doc}}\index{from\_any() (in module mpl\_toolkits.axes\_grid1.axes\_size)@\spxentry{from\_any()}\spxextra{in module mpl\_toolkits.axes\_grid1.axes\_size}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size.from_any:mpl_toolkits.axes_grid1.axes_size.from_any}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_size.}}\sphinxbfcode{\sphinxupquote{from\_any}}}{\emph{size}, \emph{fraction\_ref=None}}{} Creates Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with \%. The second argument is only meaningful when Fraction unit is created.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{a} \PYG{o}{=} \PYG{n}{Size}\PYG{o}{.}\PYG{n}{from\PYGZus{}any}\PYG{p}{(}\PYG{l+m+mf}{1.2}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} =\PYGZgt{} Size.Fixed(1.2)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{Size}\PYG{o}{.}\PYG{n}{from\PYGZus{}any}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{50}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{a}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} =\PYGZgt{} Size.Fraction(0.5, a)} \end{sphinxVerbatim} \end{fulllineitems} \subsubsection{mpl\_toolkits.axes\_grid1.colorbar} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl-toolkits-axes-grid1-colorbar}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar::doc}}\phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:module-mpl_toolkits.axes_grid1.colorbar}}\index{mpl\_toolkits.axes\_grid1.colorbar (module)@\spxentry{mpl\_toolkits.axes\_grid1.colorbar}\spxextra{module}} Colorbar toolkit with two classes and a function: \begin{quote} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}}] \leavevmode the base class with full colorbar drawing functionality. It can be used as-is to make a colorbar for a given colormap; a mappable object (e.g., image) is not needed. \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}}] \leavevmode the derived class for use with images or contour plots. \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.make_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes()}}}}}}] \leavevmode a function for resizing an axes and adding a second axes suitable for a colorbar \end{description} \end{quote} The {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method uses {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.make_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{make\_axes()}}}}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}}; the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} function is a thin wrapper over {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}}. \index{CbarAxesLocator (class in mpl\_toolkits.axes\_grid1.colorbar)@\spxentry{CbarAxesLocator}\spxextra{class in mpl\_toolkits.axes\_grid1.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.CbarAxesLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.colorbar.}}\sphinxbfcode{\sphinxupquote{CbarAxesLocator}}}{\emph{locator=None}, \emph{extend='neither'}, \emph{orientation='vertical'}}{} CbarAxesLocator is a axes\_locator for colorbar axes. It adjust the position of the axes to make a room for extended ends, i.e., the extended ends are located outside the axes area. \begin{description} \item[{\sphinxstyleemphasis{locator}}] \leavevmode{[}the bbox returned from the locator is used as a{]} initial axes location. If None, axes.bbox is used. \end{description} \sphinxstyleemphasis{extend} : same as in ColorbarBase \sphinxstyleemphasis{orientation} : same as in ColorbarBase \index{get\_end\_vertices() (mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method)@\spxentry{get\_end\_vertices()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.CbarAxesLocator.get_end_vertices}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_end\_vertices}}}{\emph{self}}{} return a tuple of two vertices for the colorbar extended ends. The first vertices is for the minimum end, and the second is for the maximum end. \end{fulllineitems} \index{get\_original\_position() (mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method)@\spxentry{get\_original\_position()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.CbarAxesLocator.get_original_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_original\_position}}}{\emph{self}, \emph{axes}, \emph{renderer}}{} get the original position of the axes. \end{fulllineitems} \index{get\_path\_ends() (mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method)@\spxentry{get\_path\_ends()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.CbarAxesLocator.get_path_ends}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_ends}}}{\emph{self}}{} get the paths for extended ends \end{fulllineitems} \index{get\_path\_patch() (mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method)@\spxentry{get\_path\_patch()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.CbarAxesLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.CbarAxesLocator.get_path_patch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path\_patch}}}{\emph{self}}{} get the path for axes patch \end{fulllineitems} \end{fulllineitems} \index{Colorbar (class in mpl\_toolkits.axes\_grid1.colorbar)@\spxentry{Colorbar}\spxextra{class in mpl\_toolkits.axes\_grid1.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.colorbar.}}\sphinxbfcode{\sphinxupquote{Colorbar}}}{\emph{ax}, \emph{mappable}, \emph{**kw}}{}~\index{add\_lines() (mpl\_toolkits.axes\_grid1.colorbar.Colorbar method)@\spxentry{add\_lines()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar.add_lines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_lines}}}{\emph{self}, \emph{CS}}{} Add the lines from a non-filled {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}} to the colorbar. \end{fulllineitems} \index{update\_bruteforce() (mpl\_toolkits.axes\_grid1.colorbar.Colorbar method)@\spxentry{update\_bruteforce()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.Colorbar method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar.update_bruteforce}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_bruteforce}}}{\emph{self}, \emph{mappable}}{} Update the colorbar artists to reflect the change of the associated mappable. \end{fulllineitems} \end{fulllineitems} \index{ColorbarBase (class in mpl\_toolkits.axes\_grid1.colorbar)@\spxentry{ColorbarBase}\spxextra{class in mpl\_toolkits.axes\_grid1.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.colorbar.}}\sphinxbfcode{\sphinxupquote{ColorbarBase}}}{\emph{ax}, \emph{cmap=None}, \emph{norm=None}, \emph{alpha=1.0}, \emph{values=None}, \emph{boundaries=None}, \emph{orientation='vertical'}, \emph{extend='neither'}, \emph{spacing='uniform'}, \emph{ticks=None}, \emph{format=None}, \emph{drawedges=False}, \emph{filled=True}}{} Draw a colorbar in an existing axes. This is a base class for the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}} class, which is the basis for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method and pyplot function. It is also useful by itself for showing a colormap. If the \sphinxstyleemphasis{cmap} kwarg is given but \sphinxstyleemphasis{boundaries} and \sphinxstyleemphasis{values} are left as None, then the colormap will be displayed on a 0-1 scale. To show the under- and over-value colors, specify the \sphinxstyleemphasis{norm} as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{colors}\PYG{o}{.}\PYG{n}{Normalize}\PYG{p}{(}\PYG{n}{clip}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} To show the colors versus index instead of on the 0-1 scale, use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{norm}\PYG{o}{=}\PYG{n}{colors}\PYG{o}{.}\PYG{n}{NoNorm}\PYG{o}{.} \end{sphinxVerbatim} Useful attributes: \begin{quote} \begin{description} \item[{\sphinxcode{\sphinxupquote{ax}}}] \leavevmode the Axes instance in which the colorbar is drawn \item[{\sphinxcode{\sphinxupquote{lines}}}] \leavevmode a LineCollection if lines were drawn, otherwise None \item[{\sphinxcode{\sphinxupquote{dividers}}}] \leavevmode a LineCollection if \sphinxstyleemphasis{drawedges} is True, otherwise None \end{description} \end{quote} Useful public methods are \sphinxcode{\sphinxupquote{set\_label()}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase.add_lines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{add\_lines()}}}}}. \index{add\_lines() (mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method)@\spxentry{add\_lines()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase.add_lines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_lines}}}{\emph{self}, \emph{levels}, \emph{colors}, \emph{linewidths}}{} Draw lines on the colorbar. It deletes preexisting lines. \end{fulllineitems} \index{set\_alpha() (mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method)@\spxentry{set\_alpha()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} set alpha value. \end{fulllineitems} \index{set\_label\_text() (mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method)@\spxentry{set\_label\_text()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase.set_label_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label\_text}}}{\emph{self}, \emph{label}, \emph{**kw}}{} Label the long axis of the colorbar \end{fulllineitems} \index{update\_artists() (mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method)@\spxentry{update\_artists()}\spxextra{mpl\_toolkits.axes\_grid1.colorbar.ColorbarBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.ColorbarBase.update_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_artists}}}{\emph{self}}{} Update the colorbar associated artists, \sphinxstyleemphasis{filled} and \sphinxstyleemphasis{ends}. Note that \sphinxstyleemphasis{lines} are not updated. This needs to be called whenever clim of associated image changes. \end{fulllineitems} \end{fulllineitems} \index{colorbar() (in module mpl\_toolkits.axes\_grid1.colorbar)@\spxentry{colorbar()}\spxextra{in module mpl\_toolkits.axes\_grid1.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.colorbar}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.colorbar.}}\sphinxbfcode{\sphinxupquote{colorbar}}}{\emph{mappable}, \emph{cax=None}, \emph{ax=None}, \emph{**kw}}{}~\begin{quote} Create a colorbar for a ScalarMappable instance. Documentation for the pyplot thin wrapper: \end{quote} Add a colorbar to a plot. Function signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot:module-matplotlib.pyplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot}}}}} interface; all but the first are also method signatures for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{colorbar}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{cax}\PYG{o}{=}\PYG{n}{cax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{colorbar}\PYG{p}{(}\PYG{n}{mappable}\PYG{p}{,} \PYG{n}{ax}\PYG{o}{=}\PYG{n}{ax}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{mappable}}] \leavevmode the \sphinxcode{\sphinxupquote{Image}}, {\hyperref[\detokenize{api/contour_api:matplotlib.contour.ContourSet}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ContourSet}}}}}, etc. to which the colorbar applies; this argument is mandatory for the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} method but optional for the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.colorbar:matplotlib.pyplot.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{colorbar()}}}}} function, which sets the default to the current image. \end{description} \end{quote} keyword arguments: \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{cax}}] \leavevmode None \textbar{} axes object into which the colorbar will be drawn \item[{\sphinxstyleemphasis{ax}}] \leavevmode None \textbar{} parent axes object from which space for a new colorbar axes will be stolen \end{description} \end{quote} Additional keyword arguments are of two kinds: \begin{quote} axes properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to shrink the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} colorbar properties: \begin{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{extend} & {[} 'neither' \textbar{} 'both' \textbar{} 'min' \textbar{} 'max' {]} If not 'neither', make pointed end(s) for out-of- range values. These are set for a given colormap using the colormap set\_under and set\_over methods. \\ \hline \sphinxstyleemphasis{spacing} & {[} 'uniform' \textbar{} 'proportional' {]} Uniform spacing gives each discrete color the same space; proportional makes the space proportional to the data interval. \\ \hline \sphinxstyleemphasis{ticks} & {[} None \textbar{} list of ticks \textbar{} Locator object {]} If None, ticks are determined automatically from the input. \\ \hline \sphinxstyleemphasis{format} & {[} None \textbar{} format string \textbar{} Formatter object {]} If None, the {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.ScalarFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarFormatter}}}}} is used. If a format string is given, e.g., '\%.3f', that is used. An alternative {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.Formatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Formatter}}}}} object may be given instead. \\ \hline \sphinxstyleemphasis{drawedges} & bool Whether to draw lines at color boundaries. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} The following will probably be useful only in the context of indexed colors (that is, when the mappable has norm=NoNorm()), or other unusual circumstances. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{boundaries} & None or a sequence \\ \hline \sphinxstyleemphasis{values} & None or a sequence which must be of length 1 less than the sequence of \sphinxstyleemphasis{boundaries}. For each region delimited by adjacent entries in \sphinxstyleemphasis{boundaries}, the color mapped to the corresponding value in values will be used. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \end{quote} \end{quote} If \sphinxstyleemphasis{mappable} is a \sphinxcode{\sphinxupquote{ContourSet}}, its \sphinxstyleemphasis{extend} kwarg is included automatically. Note that the \sphinxstyleemphasis{shrink} kwarg provides a simple way to keep a vertical colorbar, for example, from being taller than the axes of the mappable to which the colorbar is attached; but it is a manual method requiring some trial and error. If the colorbar is too tall (or a horizontal colorbar is too wide) use a smaller value of \sphinxstyleemphasis{shrink}. For more precise control, you can manually specify the positions of the axes objects in which the mappable and the colorbar are drawn. In this case, do not use any of the axes properties kwargs. It is known that some vector graphics viewer (svg and pdf) renders white gaps between segments of the colorbar. This is due to bugs in the viewers not matplotlib. As a workaround the colorbar can be rendered with overlapping segments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cbar} \PYG{o}{=} \PYG{n}{colorbar}\PYG{p}{(}\PYG{p}{)} \PYG{n}{cbar}\PYG{o}{.}\PYG{n}{solids}\PYG{o}{.}\PYG{n}{set\PYGZus{}edgecolor}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{face}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{draw}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} However this has negative consequences in other circumstances. Particularly with semi transparent images (alpha \textless{} 1) and colorbar extensions and is not enabled by default see (issue \#1188). \begin{description} \item[{returns:}] \leavevmode {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.Colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colorbar}}}}} instance; see also its base class, {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ColorbarBase}}}}}. Call the {\hyperref[\detokenize{api/colorbar_api:matplotlib.colorbar.ColorbarBase.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_label()}}}}} method to label the colorbar. \end{description} The transData of the \sphinxstyleemphasis{cax} is adjusted so that the limits in the longest axis actually corresponds to the limits in colorbar range. On the other hand, the shortest axis has a data limits of {[}1,2{]}, whose unconventional value is to prevent underflow when log scale is used. \end{fulllineitems} \index{make\_axes() (in module mpl\_toolkits.axes\_grid1.colorbar)@\spxentry{make\_axes()}\spxextra{in module mpl\_toolkits.axes\_grid1.colorbar}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:mpl_toolkits.axes_grid1.colorbar.make_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.colorbar.}}\sphinxbfcode{\sphinxupquote{make\_axes}}}{\emph{parent}, \emph{*}, \emph{fraction=0.15}, \emph{shrink=1.0}, \emph{aspect=20}, \emph{**kw}}{} Resize and reposition a parent axes, and return a child axes suitable for a colorbar \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{cax}\PYG{p}{,} \PYG{n}{kw} \PYG{o}{=} \PYG{n}{make\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kw}\PYG{p}{)} \end{sphinxVerbatim} Keyword arguments may include the following (with defaults): \begin{quote} \begin{description} \item[{\sphinxstyleemphasis{orientation}}] \leavevmode 'vertical' or 'horizontal' \end{description} \end{quote} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \sphinxstyleemphasis{orientation} & vertical or horizontal \\ \hline \sphinxstyleemphasis{fraction} & 0.15; fraction of original axes to use for colorbar \\ \hline \sphinxstyleemphasis{pad} & 0.05 if vertical, 0.15 if horizontal; fraction of original axes between colorbar and new image axes \\ \hline \sphinxstyleemphasis{shrink} & 1.0; fraction by which to shrink the colorbar \\ \hline \sphinxstyleemphasis{aspect} & 20; ratio of long to short dimensions \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} All but the first of these are stripped from the input kw set. Returns (cax, kw), the child axes and the reduced kw dictionary. \end{fulllineitems} \subsubsection{mpl\_toolkits.axes\_grid1.inset\_locator} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:module-mpl_toolkits.axes_grid1.inset_locator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:mpl-toolkits-axes-grid1-inset-locator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator::doc}}\index{mpl\_toolkits.axes\_grid1.inset\_locator (module)@\spxentry{mpl\_toolkits.axes\_grid1.inset\_locator}\spxextra{module}} A collection of functions and objects for creating or placing inset axes. \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredLocatorBase}}}}}(bbox\_to\_anchor, ...{[}, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredSizeLocator}}}}}(bbox\_to\_anchor, x\_size, ...) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AnchoredZoomLocator}}}}}(parent\_axes, zoom, loc) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxConnector}}}}}(bbox1, bbox2, loc1{[}, loc2{]}) & Connect two bboxes with a straight line. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch:mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxConnectorPatch}}}}}(bbox1, bbox2, loc1a, ...) & Connect two bboxes with a quadrilateral. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch:mpl_toolkits.axes_grid1.inset_locator.BboxPatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BboxPatch}}}}}(bbox, **kwargs) & Patch showing the shape bounded by a Bbox. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.InsetPosition:mpl_toolkits.axes_grid1.inset_locator.InsetPosition}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{InsetPosition}}}}}(parent, lbwh) & An object for positioning an inset axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredLocatorBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl-toolkits-axes-grid1-inset-locator-anchoredlocatorbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase::doc}}\index{AnchoredLocatorBase (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{AnchoredLocatorBase}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{AnchoredLocatorBase}}}{\emph{bbox\_to\_anchor}, \emph{offsetbox}, \emph{loc}, \emph{borderpad=0.5}, \emph{bbox\_transform=None}}{} Bases: {\hyperref[\detokenize{api/offsetbox_api:matplotlib.offsetbox.AnchoredOffsetbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.offsetbox.AnchoredOffsetbox}}}}} \index{draw() (mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredLocatorBase method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredLocatorBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} draw the artist \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredSizeLocator} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator:mpl-toolkits-axes-grid1-inset-locator-anchoredsizelocator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator::doc}}\index{AnchoredSizeLocator (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{AnchoredSizeLocator}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{AnchoredSizeLocator}}}{\emph{bbox\_to\_anchor}, \emph{x\_size}, \emph{y\_size}, \emph{loc}, \emph{borderpad=0.5}, \emph{bbox\_transform=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredLocatorBase}}}}} \index{get\_extent() (mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredSizeLocator method)@\spxentry{get\_extent()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredSizeLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} return the extent of the artist. The extent of the child added with the pad is returned \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredZoomLocator} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator:mpl-toolkits-axes-grid1-inset-locator-anchoredzoomlocator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator::doc}}\index{AnchoredZoomLocator (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{AnchoredZoomLocator}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{AnchoredZoomLocator}}}{\emph{parent\_axes}, \emph{zoom}, \emph{loc}, \emph{borderpad=0.5}, \emph{bbox\_to\_anchor=None}, \emph{bbox\_transform=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase:mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredLocatorBase}}}}} \index{get\_extent() (mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredZoomLocator method)@\spxentry{get\_extent()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.AnchoredZoomLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator:mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator.get_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_extent}}}{\emph{self}, \emph{renderer}}{} return the extent of the artist. The extent of the child added with the pad is returned \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl-toolkits-axes-grid1-inset-locator-bboxconnector}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector::doc}}\index{BboxConnector (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{BboxConnector}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{BboxConnector}}}{\emph{bbox1}, \emph{bbox2}, \emph{loc1}, \emph{loc2=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} Connect two bboxes with a straight line. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox1, bbox2}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}}{]} Bounding boxes to connect. \item[{\sphinxstylestrong{loc1}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corner of \sphinxstyleemphasis{bbox1} to draw the line. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc2}}] \leavevmode{[}\{1, 2, 3, 4\}, optional{]} Corner of \sphinxstyleemphasis{bbox2} to draw the line. If None, defaults to \sphinxstyleemphasis{loc1}. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Patch properties for the line drawn. Valid arguments include: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \index{connect\_bbox() (mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector static method)@\spxentry{connect\_bbox()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector.connect_bbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{connect\_bbox}}}{\emph{bbox1}, \emph{bbox2}, \emph{loc1}, \emph{loc2=None}}{} Helper function to obtain a Path from one bbox to another. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox1, bbox2}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}}{]} Bounding boxes to connect. \item[{\sphinxstylestrong{loc1}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corner of \sphinxstyleemphasis{bbox1} to use. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc2}}] \leavevmode{[}\{1, 2, 3, 4\}, optional{]} Corner of \sphinxstyleemphasis{bbox2} to use. If None, defaults to \sphinxstyleemphasis{loc1}. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{path}}] \leavevmode{[}{\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.path.Path}}}}}{]} A line segment from the \sphinxstyleemphasis{loc1} corner of \sphinxstyleemphasis{bbox1} to the \sphinxstyleemphasis{loc2} corner of \sphinxstyleemphasis{bbox2}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_bbox\_edge\_pos() (mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector static method)@\spxentry{get\_bbox\_edge\_pos()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector static method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector.get_bbox_edge_pos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{static }}\sphinxbfcode{\sphinxupquote{get\_bbox\_edge\_pos}}}{\emph{bbox}, \emph{loc}}{} Helper function to obtain the location of a corner of a bbox \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}}{]} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corner of \sphinxstyleemphasis{bbox}. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}float{]} Coordinates of the corner specified by \sphinxstyleemphasis{loc}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_path() (mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector method)@\spxentry{get\_path()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:examples-using-mpl-toolkits-axes-grid1-inset-locator-bboxconnector}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnectorPatch} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch:mpl-toolkits-axes-grid1-inset-locator-bboxconnectorpatch}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch::doc}}\index{BboxConnectorPatch (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{BboxConnectorPatch}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch:mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{BboxConnectorPatch}}}{\emph{bbox1}, \emph{bbox2}, \emph{loc1a}, \emph{loc2a}, \emph{loc1b}, \emph{loc2b}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnector:mpl_toolkits.axes_grid1.inset_locator.BboxConnector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnector}}}}} Connect two bboxes with a quadrilateral. The quadrilateral is specified by two lines that start and end at corners of the bboxes. The four sides of the quadrilateral are defined by the two lines given, the line between the two corners specified in \sphinxstyleemphasis{bbox1} and the line between the two corners specified in \sphinxstyleemphasis{bbox2}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox1, bbox2}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}}{]} Bounding boxes to connect. \item[{\sphinxstylestrong{loc1a, loc2a}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corners of \sphinxstyleemphasis{bbox1} and \sphinxstyleemphasis{bbox2} to draw the first line. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc1b, loc2b}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corners of \sphinxstyleemphasis{bbox1} and \sphinxstyleemphasis{bbox2} to draw the second line. Valid values are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4} \end{sphinxVerbatim} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Patch properties for the line drawn: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \index{get\_path() (mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnectorPatch method)@\spxentry{get\_path()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnectorPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch:mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.BboxConnectorPatch}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch:examples-using-mpl-toolkits-axes-grid1-inset-locator-bboxconnectorpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.BboxPatch} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch:mpl-toolkits-axes-grid1-inset-locator-bboxpatch}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch::doc}}\index{BboxPatch (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{BboxPatch}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch:mpl_toolkits.axes_grid1.inset_locator.BboxPatch}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{BboxPatch}}}{\emph{bbox}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} Patch showing the shape bounded by a Bbox. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Bbox}}}}}{]} Bbox to use for the extents of this patch. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Patch properties. Valid arguments include: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \end{description}\end{quote} \index{get\_path() (mpl\_toolkits.axes\_grid1.inset\_locator.BboxPatch method)@\spxentry{get\_path()}\spxextra{mpl\_toolkits.axes\_grid1.inset\_locator.BboxPatch method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch:mpl_toolkits.axes_grid1.inset_locator.BboxPatch.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.BboxPatch}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.BboxPatch:examples-using-mpl-toolkits-axes-grid1-inset-locator-bboxpatch}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_subplots\_axes\_and\_figures\_axes\_zoom\_effect.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.InsetPosition} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.InsetPosition:mpl-toolkits-axes-grid1-inset-locator-insetposition}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.InsetPosition::doc}}\index{InsetPosition (class in mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{InsetPosition}\spxextra{class in mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.InsetPosition:mpl_toolkits.axes_grid1.inset_locator.InsetPosition}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{InsetPosition}}}{\emph{parent}, \emph{lbwh}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} An object for positioning an inset axes. This is created by specifying the normalized coordinates in the axes, instead of the figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parent}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} Axes to use for normalizing coordinates. \item[{\sphinxstylestrong{lbwh}}] \leavevmode{[}iterable of four floats{]} The left edge, bottom edge, width, and height of the inset axes, in units of the normalized coordinate of the \sphinxstyleemphasis{parent} axes. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_axes\_locator()}}}}}}] \leavevmode \end{description} \subsubsection*{Examples} The following bounds the inset axes to a box with 20\% of the parent axes's height and 40\% of the width. The size of the axes specified ({[}0, 0, 1, 1{]}) ensures that the axes completely fills the bounding box: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{parent\PYGZus{}axes} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{gca}\PYG{p}{(}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax\PYGZus{}ins} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ip} \PYG{o}{=} \PYG{n}{InsetPosition}\PYG{p}{(}\PYG{n}{ax}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.1}\PYG{p}{,} \PYG{l+m+mf}{0.4}\PYG{p}{,} \PYG{l+m+mf}{0.2}\PYG{p}{]}\PYG{p}{)} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{ax\PYGZus{}ins}\PYG{o}{.}\PYG{n}{set\PYGZus{}axes\PYGZus{}locator}\PYG{p}{(}\PYG{n}{ip}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:mpl_toolkits.axes_grid1.inset_locator.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inset\_axes}}}}}(parent\_axes, width, height{[}, ...{]}) & Create an inset axes with a given width and height. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.mark_inset:mpl_toolkits.axes_grid1.inset_locator.mark_inset}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mark\_inset}}}}}(parent\_axes, inset\_axes, loc1, ...) & Draw a box to mark the location of an area represented by an inset axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes:mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zoomed\_inset\_axes}}}}}(parent\_axes, zoom{[}, loc, ...{]}) & Create an anchored inset axes by scaling a parent axes. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.inset\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:mpl-toolkits-axes-grid1-inset-locator-inset-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes::doc}}\index{inset\_axes() (in module mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{inset\_axes()}\spxextra{in module mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:mpl_toolkits.axes_grid1.inset_locator.inset_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{inset\_axes}}}{\emph{parent\_axes}, \emph{width}, \emph{height}, \emph{loc='upper right'}, \emph{bbox\_to\_anchor=None}, \emph{bbox\_transform=None}, \emph{axes\_class=None}, \emph{axes\_kwargs=None}, \emph{borderpad=0.5}}{} Create an inset axes with a given width and height. Both sizes used can be specified either in inches or percentage. For example,: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent\PYGZus{}axes}\PYG{p}{,} \PYG{n}{width}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{40}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{height}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{30}\PYG{l+s+s1}{\PYGZpc{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{loc}\PYG{o}{=}\PYG{l+m+mi}{3}\PYG{p}{)} \end{sphinxVerbatim} creates in inset axes in the lower left corner of \sphinxstyleemphasis{parent\_axes} which spans over 30\% in height and 40\% in width of the \sphinxstyleemphasis{parent\_axes}. Since the usage of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:mpl_toolkits.axes_grid1.inset_locator.inset_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{inset\_axes}}}}} may become slightly tricky when exceeding such standard cases, it is recommended to read \DUrole{xref,std,std-doc}{the examples}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parent\_axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} Axes to place the inset axes. \item[{\sphinxstylestrong{width, height}}] \leavevmode{[}float or str{]} Size of the inset axes to create. If a float is provided, it is the size in inches, e.g. \sphinxstyleemphasis{width=1.3}. If a string is provided, it is the size in relative units, e.g. \sphinxstyleemphasis{width='40\%'}. By default, i.e. if neither \sphinxstyleemphasis{bbox\_to\_anchor} nor \sphinxstyleemphasis{bbox\_transform} are specified, those are relative to the parent\_axes. Otherwise they are to be understood relative to the bounding box provided via \sphinxstyleemphasis{bbox\_to\_anchor}. \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int or string, optional, default to 1{]} Location to place the inset axes. The valid locations are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxBase}}}}}, optional{]} Bbox that the inset axes will be anchored to. If None, a tuple of (0, 0, 1, 1) is used if \sphinxstyleemphasis{bbox\_transform} is set to \sphinxstyleemphasis{parent\_axes.transAxes} or \sphinxstyleemphasis{parent\_axes.figure.transFigure}. Otherwise, \sphinxstyleemphasis{parent\_axes.bbox} is used. If a tuple, can be either {[}left, bottom, width, height{]}, or {[}left, bottom{]}. If the kwargs \sphinxstyleemphasis{width} and/or \sphinxstyleemphasis{height} are specified in relative units, the 2-tuple {[}left, bottom{]} cannot be used. Note that, unless \sphinxstyleemphasis{bbox\_transform} is set, the units of the bounding box are interpreted in the pixel coordinate. When using \sphinxstyleemphasis{bbox\_to\_anchor} with tuple, it almost always makes sense to also specify a \sphinxstyleemphasis{bbox\_transform}. This might often be the axes transform \sphinxstyleemphasis{parent\_axes.transAxes}. \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}, optional{]} Transformation for the bbox that contains the inset axes. If None, a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transforms.IdentityTransform}}}}} is used. The value of \sphinxstyleemphasis{bbox\_to\_anchor} (or the return value of its get\_points method) is transformed by the \sphinxstyleemphasis{bbox\_transform} and then interpreted as points in the pixel coordinate (which is dpi dependent). You may provide \sphinxstyleemphasis{bbox\_to\_anchor} in some normalized coordinate, and give an appropriate transform (e.g., \sphinxstyleemphasis{parent\_axes.transAxes}). \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} type, optional{]} If specified, the inset axes created will be created with this class's constructor. \item[{\sphinxstylestrong{axes\_kwargs}}] \leavevmode{[}dict, optional{]} Keyworded arguments to pass to the constructor of the inset axes. Valid arguments include: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float, optional{]} Padding between inset axes and the bbox\_to\_anchor. Defaults to 0.5. The units are axes font size, i.e. for a default font size of 10 points \sphinxstyleemphasis{borderpad = 0.5} is equivalent to a padding of 5 points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{inset\_axes}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_class}}{]} Inset axes object created. \end{description} \end{description}\end{quote} \subsubsection*{Notes} The meaning of \sphinxstyleemphasis{bbox\_to\_anchor} and \sphinxstyleemphasis{bbox\_to\_transform} is interpreted differently from that of legend. The value of bbox\_to\_anchor (or the return value of its get\_points method; the default is \sphinxstyleemphasis{parent\_axes.bbox}) is transformed by the bbox\_transform (the default is Identity transform) and then interpreted as points in the pixel coordinate (which is dpi dependent). Thus, following three calls are identical and creates an inset axes with respect to the \sphinxstyleemphasis{parent\_axes}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axins} \PYG{o}{=} \PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent\PYGZus{}axes}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{40}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \PYG{n}{axins} \PYG{o}{=} \PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent\PYGZus{}axes}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{40}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{n}{parent\PYGZus{}axes}\PYG{o}{.}\PYG{n}{bbox}\PYG{p}{)} \PYG{n}{axins} \PYG{o}{=} \PYG{n}{inset\PYGZus{}axes}\PYG{p}{(}\PYG{n}{parent\PYGZus{}axes}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{30}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{40}\PYG{l+s+s2}{\PYGZpc{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}to\PYGZus{}anchor}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{)}\PYG{p}{,} \PYG{n}{bbox\PYGZus{}transform}\PYG{o}{=}\PYG{n}{parent\PYGZus{}axes}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.inset\_axes}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.inset_axes:examples-using-mpl-toolkits-axes-grid1-inset-locator-inset-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_with\_inset\_locator.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo.py} \end{itemize} \begin{itemize} \item {} {\hyperref[\detokenize{tutorials/toolkits/axes_grid:sphx-glr-tutorials-toolkits-axes-grid-py}]{\sphinxcrossref{\DUrole{std,std-ref}{Overview of axes\_grid1 toolkit}}}} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.mark\_inset} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.mark_inset:mpl-toolkits-axes-grid1-inset-locator-mark-inset}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.mark_inset::doc}}\index{mark\_inset() (in module mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{mark\_inset()}\spxextra{in module mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.mark_inset:mpl_toolkits.axes_grid1.inset_locator.mark_inset}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{mark\_inset}}}{\emph{parent\_axes}, \emph{inset\_axes}, \emph{loc1}, \emph{loc2}, \emph{**kwargs}}{} Draw a box to mark the location of an area represented by an inset axes. This function draws a box in \sphinxstyleemphasis{parent\_axes} at the bounding box of \sphinxstyleemphasis{inset\_axes}, and shows a connection with the inset axes by drawing lines at the corners, giving a "zoomed in" effect. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parent\_axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} Axes which contains the area of the inset axes. \item[{\sphinxstylestrong{inset\_axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} The inset axes. \item[{\sphinxstylestrong{loc1, loc2}}] \leavevmode{[}\{1, 2, 3, 4\}{]} Corners to use for connecting the inset axes and the area in the parent axes. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Patch properties for the lines and box drawn: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_antialiased}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{antialiased}}}}} or aa & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_capstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{capstyle}}}}} & \{'butt', 'round', 'projecting'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{color}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_edgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{edgecolor}}}}} or ec & color or None or 'auto' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} or fc & color or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_figure:matplotlib.artist.Artist.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_fill}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fill}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_hatch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hatch}}}}} & \{'/', '\textbackslash{}', '\textbar{}', '-', '+', 'x', 'o', 'O', '.', '*'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_joinstyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{joinstyle}}}}} & \{'miter', 'round', 'bevel'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linestyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linestyle}}}}} or ls & \{'-', '--', '-.', ':', '', (offset, on-off-seq), ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch.set_linewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{linewidth}}}}} or lw & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pp}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}}{]} The patch drawn to represent the area of the inset axes. \item[{\sphinxstylestrong{p1, p2}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}}{]} The patches connecting two corners of the inset axes and its area. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.mark\_inset}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.mark_inset:examples-using-mpl-toolkits-axes-grid1-inset-locator-mark-inset}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.inset\_locator.zoomed\_inset\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes:mpl-toolkits-axes-grid1-inset-locator-zoomed-inset-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes::doc}}\index{zoomed\_inset\_axes() (in module mpl\_toolkits.axes\_grid1.inset\_locator)@\spxentry{zoomed\_inset\_axes()}\spxextra{in module mpl\_toolkits.axes\_grid1.inset\_locator}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes:mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.}}\sphinxbfcode{\sphinxupquote{zoomed\_inset\_axes}}}{\emph{parent\_axes}, \emph{zoom}, \emph{loc='upper right'}, \emph{bbox\_to\_anchor=None}, \emph{bbox\_transform=None}, \emph{axes\_class=None}, \emph{axes\_kwargs=None}, \emph{borderpad=0.5}}{} Create an anchored inset axes by scaling a parent axes. For usage, also see \DUrole{xref,std,std-doc}{the examples}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{parent\_axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}{]} Axes to place the inset axes. \item[{\sphinxstylestrong{zoom}}] \leavevmode{[}float{]} Scaling factor of the data axes. \sphinxstyleemphasis{zoom} \textgreater{} 1 will enlargen the coordinates (i.e., "zoomed in"), while \sphinxstyleemphasis{zoom} \textless{} 1 will shrink the coordinates (i.e., "zoomed out"). \item[{\sphinxstylestrong{loc}}] \leavevmode{[}int or string, optional, default to 1{]} Location to place the inset axes. The valid locations are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{2}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center left}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{6}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center right}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{7}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{lower center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{8}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{upper center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{9}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{l+m+mi}{10} \end{sphinxVerbatim} \item[{\sphinxstylestrong{bbox\_to\_anchor}}] \leavevmode{[}tuple or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.BboxBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.BboxBase}}}}}, optional{]} Bbox that the inset axes will be anchored to. If None, \sphinxstyleemphasis{parent\_axes.bbox} is used. If a tuple, can be either {[}left, bottom, width, height{]}, or {[}left, bottom{]}. If the kwargs \sphinxstyleemphasis{width} and/or \sphinxstyleemphasis{height} are specified in relative units, the 2-tuple {[}left, bottom{]} cannot be used. Note that the units of the bounding box are determined through the transform in use. When using \sphinxstyleemphasis{bbox\_to\_anchor} it almost always makes sense to also specify a \sphinxstyleemphasis{bbox\_transform}. This might often be the axes transform \sphinxstyleemphasis{parent\_axes.transAxes}. \item[{\sphinxstylestrong{bbox\_transform}}] \leavevmode{[}{\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.transforms.Transform}}}}}, optional{]} Transformation for the bbox that contains the inset axes. If None, a {\hyperref[\detokenize{api/transformations:matplotlib.transforms.IdentityTransform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transforms.IdentityTransform}}}}} is used (i.e. pixel coordinates). This is useful when not providing any argument to \sphinxstyleemphasis{bbox\_to\_anchor}. When using \sphinxstyleemphasis{bbox\_to\_anchor} it almost always makes sense to also specify a \sphinxstyleemphasis{bbox\_transform}. This might often be the axes transform \sphinxstyleemphasis{parent\_axes.transAxes}. Inversely, when specifying the axes- or figure-transform here, be aware that not specifying \sphinxstyleemphasis{bbox\_to\_anchor} will use \sphinxstyleemphasis{parent\_axes.bbox}, the units of which are in display (pixel) coordinates. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} type, optional{]} If specified, the inset axes created will be created with this class's constructor. \item[{\sphinxstylestrong{axes\_kwargs}}] \leavevmode{[}dict, optional{]} Keyworded arguments to pass to the constructor of the inset axes. Valid arguments include: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \item[{\sphinxstylestrong{borderpad}}] \leavevmode{[}float, optional{]} Padding between inset axes and the bbox\_to\_anchor. Defaults to 0.5. The units are axes font size, i.e. for a default font size of 10 points \sphinxstyleemphasis{borderpad = 0.5} is equivalent to a padding of 5 points. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{inset\_axes}}] \leavevmode{[}\sphinxcode{\sphinxupquote{axes\_class}}{]} Inset axes object created. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.inset\_locator.zoomed\_inset\_axes}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes:examples-using-mpl-toolkits-axes-grid1-inset-locator-zoomed-inset-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_colorbar\_of\_inset\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_inset\_locator\_demo2.py} \end{itemize} \subsubsection{mpl\_toolkits.axes\_grid1.mpl\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:module-mpl_toolkits.axes_grid1.mpl_axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:mpl-toolkits-axes-grid1-mpl-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes::doc}}\index{mpl\_toolkits.axes\_grid1.mpl\_axes (module)@\spxentry{mpl\_toolkits.axes\_grid1.mpl\_axes}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}(fig, rect{[}, facecolor, frameon, ...{]}) & Build an axes in a figure. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimpleAxisArtist}}}}}(axis, axisnum, spine) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects:mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimpleChainedObjects}}}}}(objects) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl-toolkits-axes-grid1-mpl-axes-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes::doc}}\index{Axes (class in mpl\_toolkits.axes\_grid1.mpl\_axes)@\spxentry{Axes}\spxextra{class in mpl\_toolkits.axes\_grid1.mpl\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.}}\sphinxbfcode{\sphinxupquote{Axes}}}{\emph{fig}, \emph{rect}, \emph{facecolor=None}, \emph{frameon=True}, \emph{sharex=None}, \emph{sharey=None}, \emph{label=''}, \emph{xscale=None}, \emph{yscale=None}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.axes.\_axes.Axes}} Build an axes in a figure. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The axes is build in the {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \sphinxstyleemphasis{fig}. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}{[}left, bottom, width, height{]}{]} The axes is build in the rectangle \sphinxstyleemphasis{rect}. \sphinxstyleemphasis{rect} is in {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} coordinates. \item[{\sphinxstylestrong{sharex, sharey}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}, optional{]} The x or y {\hyperref[\detokenize{api/axis_api:module-matplotlib.axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis}}}}} is shared with the x or y axis in the input {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}. \item[{\sphinxstylestrong{frameon}}] \leavevmode{[}bool, optional{]} True means that the axes frame is visible. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other optional keyword arguments: \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{|l|l|} \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \sphinxstyletheadfamily Property &\sphinxstyletheadfamily Description \\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_adjustable:matplotlib.axes.Axes.set_adjustable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{adjustable}}}}} & \{'box', 'datalim'\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_agg_filter:matplotlib.artist.Artist.set_agg_filter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{agg\_filter}}}}} & a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_alpha:matplotlib.artist.Artist.set_alpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{alpha}}}}} & float \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_anchor:matplotlib.axes.Axes.set_anchor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{anchor}}}}} & 2-tuple of floats or \{'C', 'SW', 'S', 'SE', ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_animated:matplotlib.artist.Artist.set_animated}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{animated}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_aspect:matplotlib.axes.Axes.set_aspect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{aspect}}}}} & \{'auto', 'equal'\} or num \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscale_on:matplotlib.axes.Axes.set_autoscale_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscalex_on:matplotlib.axes.Axes.set_autoscalex_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscalex\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_autoscaley_on:matplotlib.axes.Axes.set_autoscaley_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscaley\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axes_locator:matplotlib.axes.Axes.set_axes_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_locator}}}}} & Callable{[}{[}Axes, Renderer{]}, Bbox{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_axisbelow:matplotlib.axes.Axes.set_axisbelow}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisbelow}}}}} & bool or 'line' \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_box:matplotlib.artist.Artist.set_clip_box}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_box}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_on:matplotlib.artist.Artist.set_clip_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_clip_path:matplotlib.artist.Artist.set_clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_path}}}}} & {[}({\hyperref[\detokenize{api/path_api:matplotlib.path.Path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path}}}}}, {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}}) \textbar{} {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch}}}}} \textbar{} None{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_contains:matplotlib.artist.Artist.set_contains}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{contains}}}}} & callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_facecolor:matplotlib.axes.Axes.set_facecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{facecolor}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_fc:matplotlib.axes.Axes.set_fc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{fc}}}}} & color \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_figure:matplotlib.axes.Axes.set_figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{figure}}}}} & {\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_frame_on:matplotlib.axes.Axes.set_frame_on}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{frame\_on}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_gid:matplotlib.artist.Artist.set_gid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{gid}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_in_layout:matplotlib.artist.Artist.set_in_layout}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{in\_layout}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_label:matplotlib.artist.Artist.set_label}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{label}}}}} & object \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate:matplotlib.axes.Axes.set_navigate}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_navigate_mode:matplotlib.axes.Axes.set_navigate_mode}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{navigate\_mode}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_path_effects:matplotlib.artist.Artist.set_path_effects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{path\_effects}}}}} & {\hyperref[\detokenize{api/patheffects_api:matplotlib.patheffects.AbstractPathEffect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AbstractPathEffect}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_picker:matplotlib.artist.Artist.set_picker}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{picker}}}}} & None or bool or float or callable \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_position:matplotlib.axes.Axes.set_position}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{position}}}}} & {[}left, bottom, width, height{]} or {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Bbox}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Bbox}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_rasterization_zorder:matplotlib.axes.Axes.set_rasterization_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterization\_zorder}}}}} & float or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_rasterized:matplotlib.artist.Artist.set_rasterized}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{rasterized}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_sketch_params:matplotlib.artist.Artist.set_sketch_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{sketch\_params}}}}} & (scale: float, length: float, randomness: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_snap:matplotlib.artist.Artist.set_snap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{snap}}}}} & bool or None \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_title:matplotlib.axes.Axes.set_title}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{title}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_transform:matplotlib.artist.Artist.set_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{transform}}}}} & {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_url:matplotlib.artist.Artist.set_url}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{url}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_visible:matplotlib.artist.Artist.set_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{visible}}}}} & bool \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xbound:matplotlib.axes.Axes.set_xbound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xbound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlabel:matplotlib.axes.Axes.set_xlabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xlim}}}}} & (left: float, right: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xmargin:matplotlib.axes.Axes.set_xmargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xmargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticklabels:matplotlib.axes.Axes.set_xticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xticks:matplotlib.axes.Axes.set_xticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{xticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ybound:matplotlib.axes.Axes.set_ybound}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ybound}}}}} & unknown \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylabel:matplotlib.axes.Axes.set_ylabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylabel}}}}} & str \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ylim}}}}} & (bottom: float, top: float) \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ymargin:matplotlib.axes.Axes.set_ymargin}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ymargin}}}}} & float greater than -0.5 \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yscale}}}}} & \{"linear", "log", "symlog", "logit", ...\} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticklabels}}}}} & List{[}str{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{yticks}}}}} & list \\ \hline {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.set_zorder:matplotlib.artist.Artist.set_zorder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{zorder}}}}} & float \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{axes}}] \leavevmode{[}{\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}{]} The new {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}} object. \end{description} \end{description}\end{quote} \index{Axes.AxisDict (class in mpl\_toolkits.axes\_grid1.mpl\_axes)@\spxentry{Axes.AxisDict}\spxextra{class in mpl\_toolkits.axes\_grid1.mpl\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes.AxisDict}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{AxisDict}}}{\emph{) -\textgreater{} new empty dictionary dict(mapping) -\textgreater{} new dictionary initialized from a mapping object's (key}, \emph{value) pairs dict(iterable) -\textgreater{} new dictionary initialized as if via: d = \{\} for k}, \emph{v in iterable: d{[}k{]} = v dict(**kwargs) -\textgreater{} new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1}, \emph{two=2}}{} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}} \end{fulllineitems} \index{axis (mpl\_toolkits.axes\_grid1.mpl\_axes.Axes attribute)@\spxentry{axis}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes.axis}}\pysigline{\sphinxbfcode{\sphinxupquote{axis}}} Convenience method to get or set some axis properties. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{]}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{n}{option}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float, optional{]} The axis limits to be set. Either none or all of the limits must be given. \item[{\sphinxstylestrong{option}}] \leavevmode{[}bool or str{]} If a bool, turns axis lines and labels on or off. If a string, possible values are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'on' & Turn on axis lines and labels. Same as \sphinxcode{\sphinxupquote{True}}. \\ \hline 'off' & Turn off axis lines and labels. Same as \sphinxcode{\sphinxupquote{False}}. \\ \hline 'equal' & Set equal scaling (i.e., make circles circular) by changing axis limits. \\ \hline 'scaled' & Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. \\ \hline 'tight' & Set limits just large enough to show all data. \\ \hline 'auto' & Automatic scaling (fill plot box with data). \\ \hline 'normal' & Same as 'auto'; deprecated. \\ \hline 'image' & 'scaled' with axis limits equal to data limits. \\ \hline 'square' & Square plot; similar to 'scaled', but initially forcing \sphinxcode{\sphinxupquote{xmax-xmin = ymax-ymin}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether observers are notified of the axis limit change. This option is passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float{]} The axis limits. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{cla() (mpl\_toolkits.axes\_grid1.mpl\_axes.Axes method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:mpl_toolkits.axes_grid1.mpl_axes.Axes.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.Axes}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.Axes:examples-using-mpl-toolkits-axes-grid1-mpl-axes-axes}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_axes\_divider.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axes\_grid1\_demo\_fixed\_size\_axes.py} \end{itemize} \subparagraph{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl-toolkits-axes-grid1-mpl-axes-simpleaxisartist}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist::doc}}\index{SimpleAxisArtist (class in mpl\_toolkits.axes\_grid1.mpl\_axes)@\spxentry{SimpleAxisArtist}\spxextra{class in mpl\_toolkits.axes\_grid1.mpl\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.}}\sphinxbfcode{\sphinxupquote{SimpleAxisArtist}}}{\emph{axis}, \emph{axisnum}, \emph{spine}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} \index{label (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute)@\spxentry{label}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.label}}\pysigline{\sphinxbfcode{\sphinxupquote{label}}}~ \end{fulllineitems} \index{major\_ticklabels (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute)@\spxentry{major\_ticklabels}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.major_ticklabels}}\pysigline{\sphinxbfcode{\sphinxupquote{major\_ticklabels}}}~ \end{fulllineitems} \index{major\_ticks (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute)@\spxentry{major\_ticks}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.major_ticks}}\pysigline{\sphinxbfcode{\sphinxupquote{major\_ticks}}}~ \end{fulllineitems} \index{set\_label() (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method)@\spxentry{set\_label()}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{txt}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_visible() (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method)@\spxentry{set\_visible()}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.set_visible}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_visible}}}{\emph{self}, \emph{b}}{} Set the artist's visibility. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toggle() (mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method)@\spxentry{toggle()}\spxextra{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleAxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist:mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.toggle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toggle}}}{\emph{self}, \emph{all=None}, \emph{ticks=None}, \emph{ticklabels=None}, \emph{label=None}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.mpl\_axes.SimpleChainedObjects} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects:mpl-toolkits-axes-grid1-mpl-axes-simplechainedobjects}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects::doc}}\index{SimpleChainedObjects (class in mpl\_toolkits.axes\_grid1.mpl\_axes)@\spxentry{SimpleChainedObjects}\spxextra{class in mpl\_toolkits.axes\_grid1.mpl\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects:mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.mpl\_axes.}}\sphinxbfcode{\sphinxupquote{SimpleChainedObjects}}}{\emph{objects}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \subsubsection{mpl\_toolkits.axes\_grid1.parasite\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:module-mpl_toolkits.axes_grid1.parasite_axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:mpl-toolkits-axes-grid1-parasite-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes::doc}}\index{mpl\_toolkits.axes\_grid1.parasite\_axes (module)@\spxentry{mpl\_toolkits.axes\_grid1.parasite\_axes}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxes:mpl_toolkits.axes_grid1.parasite_axes.HostAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HostAxes}}}}} & alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesHostAxes}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{HostAxesBase}}}}}(*args, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ParasiteAxes}}}}} & alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesParasite}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ParasiteAxesAuxTrans}}}}} & alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesParasiteParasiteAuxTrans}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ParasiteAxesAuxTransBase}}}}}(parent\_axes, ...{[}, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ParasiteAxesBase}}}}}(parent\_axes, **kwargs) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxes:mpl-toolkits-axes-grid1-parasite-axes-hostaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxes::doc}}\index{HostAxes (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{HostAxes}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxes:mpl_toolkits.axes_grid1.parasite_axes.HostAxes}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{HostAxes}}} alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesHostAxes}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl-toolkits-axes-grid1-parasite-axes-hostaxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase::doc}}\index{HostAxesBase (class in mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{HostAxesBase}\spxextra{class in mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{HostAxesBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{cla() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{}~ \end{fulllineitems} \index{draw() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_aux\_axes() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{get\_aux\_axes()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.get_aux_axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_aux\_axes}}}{\emph{self}, \emph{tr}, \emph{viewlim\_mode='equal'}, \emph{axes\_class=None}}{}~ \end{fulllineitems} \index{get\_tightbbox() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{get\_tightbbox()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}, \emph{call\_axes\_locator=True}, \emph{bbox\_extra\_artists=None}}{}~ \end{fulllineitems} \index{pick() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{pick()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{}~ \end{fulllineitems} \index{twin() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{twin()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{twin}}}{\emph{self}, \emph{aux\_trans=None}, \emph{axes\_class=None}}{} create a twin of Axes for generating a plot with a sharex x-axis but independent y axis. The y-axis of self will have ticks on left and the returned axes will have ticks on the right \end{fulllineitems} \index{twinx() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{twinx()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twinx}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{twinx}}}{\emph{self}, \emph{axes\_class=None}}{} create a twin of Axes for generating a plot with a sharex x-axis but independent y axis. The y-axis of self will have ticks on left and the returned axes will have ticks on the right \end{fulllineitems} \index{twiny() (mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method)@\spxentry{twiny()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.HostAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase:mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twiny}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{twiny}}}{\emph{self}, \emph{axes\_class=None}}{} create a twin of Axes for generating a plot with a shared y-axis but independent x axis. The x-axis of self will have ticks on bottom and the returned axes will have ticks on the top \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes:mpl-toolkits-axes-grid1-parasite-axes-parasiteaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes::doc}}\index{ParasiteAxes (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{ParasiteAxes}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{ParasiteAxes}}} alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesParasite}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTrans} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans:mpl-toolkits-axes-grid1-parasite-axes-parasiteaxesauxtrans}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans::doc}}\index{ParasiteAxesAuxTrans (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{ParasiteAxesAuxTrans}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{ParasiteAxesAuxTrans}}} alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.AxesParasiteParasiteAuxTrans}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl-toolkits-axes-grid1-parasite-axes-parasiteaxesauxtransbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase::doc}}\index{ParasiteAxesAuxTransBase (class in mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{ParasiteAxesAuxTransBase}\spxextra{class in mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{ParasiteAxesAuxTransBase}}}{\emph{parent\_axes}, \emph{aux\_transform}, \emph{viewlim\_mode=None}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{apply\_aspect() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{apply\_aspect()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.apply_aspect}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{apply\_aspect}}}{\emph{self}, \emph{position=None}}{}~ \end{fulllineitems} \index{contour() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{contour()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.contour}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contour}}}{\emph{self}, \emph{*XYCL}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{contourf() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{contourf()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.contourf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contourf}}}{\emph{self}, \emph{*XYCL}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{get\_viewlim\_mode() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{get\_viewlim\_mode()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.get_viewlim_mode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_viewlim\_mode}}}{\emph{self}}{}~ \end{fulllineitems} \index{pcolor() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{pcolor()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.pcolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pcolor}}}{\emph{self}, \emph{*XYC}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{pcolormesh() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{pcolormesh()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.pcolormesh}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pcolormesh}}}{\emph{self}, \emph{*XYC}, \emph{**kwargs}}{}~ \end{fulllineitems} \index{set\_viewlim\_mode() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{set\_viewlim\_mode()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.set_viewlim_mode}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_viewlim\_mode}}}{\emph{self}, \emph{mode}}{}~ \end{fulllineitems} \index{update\_viewlim() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method)@\spxentry{update\_viewlim()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesAuxTransBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.update_viewlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_viewlim}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl-toolkits-axes-grid1-parasite-axes-parasiteaxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase::doc}}\index{ParasiteAxesBase (class in mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{ParasiteAxesBase}\spxextra{class in mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{ParasiteAxesBase}}}{\emph{parent\_axes}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{cla() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_images\_artists() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method)@\spxentry{get\_images\_artists()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.get_images_artists}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_images\_artists}}}{\emph{self}}{}~ \end{fulllineitems} \index{pick() (mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method)@\spxentry{pick()}\spxextra{mpl\_toolkits.axes\_grid1.parasite\_axes.ParasiteAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase:mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.pick}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{pick}}}{\emph{self}, \emph{mouseevent}}{}~ \end{fulllineitems} \end{fulllineitems} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_axes:mpl_toolkits.axes_grid1.parasite_axes.host_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{host\_axes}}}}}(\textbackslash{}*args{[}, axes\_class, figure{]}) & Create axes that can act as a hosts to parasitic axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot:mpl_toolkits.axes_grid1.parasite_axes.host_subplot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{host\_subplot}}}}}(\textbackslash{}*args{[}, axes\_class, figure{]}) & Create a subplot that can act as a host to parasitic axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory:mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{host\_subplot\_class\_factory}}}}}(axes\_class) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.host\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_axes:mpl-toolkits-axes-grid1-parasite-axes-host-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_axes::doc}}\index{host\_axes() (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{host\_axes()}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_axes:mpl_toolkits.axes_grid1.parasite_axes.host_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{host\_axes}}}{\emph{*args}, \emph{axes\_class=None}, \emph{figure=None}, \emph{**kwargs}}{} Create axes that can act as a hosts to parasitic axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} Figure to which the axes will be added. Defaults to the current figure \sphinxcode{\sphinxupquote{pyplot.gcf()}}. \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Will be passed on to the underlying \sphinxcode{\sphinxupquote{Axes}} object creation. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.host\_subplot} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot:mpl-toolkits-axes-grid1-parasite-axes-host-subplot}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot::doc}}\index{host\_subplot() (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{host\_subplot()}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot:mpl_toolkits.axes_grid1.parasite_axes.host_subplot}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{host\_subplot}}}{\emph{*args}, \emph{axes\_class=None}, \emph{figure=None}, \emph{**kwargs}}{} Create a subplot that can act as a host to parasitic axes. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{figure}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.figure.Figure}}}}}{]} Figure to which the subplot will be added. Defaults to the current figure \sphinxcode{\sphinxupquote{pyplot.gcf()}}. \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Will be passed on to the underlying \sphinxcode{\sphinxupquote{Axes}} object creation. \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{mpl\_toolkits.axes\_grid1.parasite\_axes.host\_subplot\_class\_factory} \label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory:mpl-toolkits-axes-grid1-parasite-axes-host-subplot-class-factory}}\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory::doc}}\index{host\_subplot\_class\_factory() (in module mpl\_toolkits.axes\_grid1.parasite\_axes)@\spxentry{host\_subplot\_class\_factory()}\spxextra{in module mpl\_toolkits.axes\_grid1.parasite\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory:mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.parasite\_axes.}}\sphinxbfcode{\sphinxupquote{host\_subplot\_class\_factory}}}{\emph{axes\_class}}{}~ \end{fulllineitems} \subsection{Matplotlib axisartist Toolkit} \label{\detokenize{api/toolkits/index:matplotlib-axisartist-toolkit}}\label{\detokenize{api/toolkits/index:toolkit-axisartist-incl}} The \sphinxstyleemphasis{axisartist} namespace includes a derived Axes implementation ( \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.Axes}}). The biggest difference is that the artists that are responsible for drawing axis lines, ticks, ticklabels, and axis labels are separated out from the mpl's Axis class. This change was strongly motivated to support curvilinear grid. You can find a tutorial describing usage of axisartist at the {\hyperref[\detokenize{tutorials/toolkits/axisartist:axisartist-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{axisartist}}}} user guide. \begin{figure}[htbp] \centering \sphinxhref{../../gallery/axisartist/demo\_curvelinear\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_curvelinear_grid_001}.png}} \end{figure} \sphinxstylestrong{The submodules of the axisartist API are:} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:module-mpl_toolkits.axisartist.angle_helper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.angle\_helper}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider:module-mpl_toolkits.axisartist.axes_divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_divider}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid:module-mpl_toolkits.axisartist.axes_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_grid}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:module-mpl_toolkits.axisartist.axes_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_rgb}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:module-mpl_toolkits.axisartist.axis_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axis\_artist}}}}} & axis\_artist.py module provides axis-related artists. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style:module-mpl_toolkits.axisartist.axisline_style}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axisline\_style}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines:module-mpl_toolkits.axisartist.axislines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axislines}}}}} & Axislines includes modified implementation of the Axes class. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path:module-mpl_toolkits.axisartist.clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.clip\_path}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes:module-mpl_toolkits.axisartist.floating_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.floating\_axes}}}}} & An experimental support for curvilinear grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder:module-mpl_toolkits.axisartist.grid_finder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.grid\_finder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:module-mpl_toolkits.axisartist.grid_helper_curvelinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.grid\_helper\_curvelinear}}}}} & An experimental support for curvilinear grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.parasite_axes:module-mpl_toolkits.axisartist.parasite_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.parasite\_axes}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.axisartist.angle\_helper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:module-mpl_toolkits.axisartist.angle_helper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:mpl-toolkits-axisartist-angle-helper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper::doc}}\index{mpl\_toolkits.axisartist.angle\_helper (module)@\spxentry{mpl\_toolkits.axisartist.angle\_helper}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle:mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ExtremeFinderCycle}}}}}(nx, ny{[}, lon\_cycle, ...{]}) & When there is a cycle, e.g., longitude goes from 0-360. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FormatterDMS}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FormatterHMS}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorBase}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorD:mpl_toolkits.axisartist.angle_helper.LocatorD}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorD}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDM:mpl_toolkits.axisartist.angle_helper.LocatorDM}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorDM}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDMS:mpl_toolkits.axisartist.angle_helper.LocatorDMS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorDMS}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorH:mpl_toolkits.axisartist.angle_helper.LocatorH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorH}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHM:mpl_toolkits.axisartist.angle_helper.LocatorHM}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorHM}}}}}(den{[}, include\_last{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHMS:mpl_toolkits.axisartist.angle_helper.LocatorHMS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatorHMS}}}}}(den{[}, include\_last{]}) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.ExtremeFinderCycle} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle:mpl-toolkits-axisartist-angle-helper-extremefindercycle}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle::doc}}\index{ExtremeFinderCycle (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{ExtremeFinderCycle}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle:mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{ExtremeFinderCycle}}}{\emph{nx}, \emph{ny}, \emph{lon\_cycle=360.0}, \emph{lat\_cycle=None}, \emph{lon\_minmax=None}, \emph{lat\_minmax=(-90}, \emph{90)}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple:mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.ExtremeFinderSimple}}}}} When there is a cycle, e.g., longitude goes from 0-360. \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.ExtremeFinderCycle}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.ExtremeFinderCycle:examples-using-mpl-toolkits-axisartist-angle-helper-extremefindercycle}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl-toolkits-axisartist-angle-helper-formatterdms}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS::doc}}\index{FormatterDMS (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{FormatterDMS}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{FormatterDMS}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{deg\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{deg\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.deg_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{deg\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}'}}} \end{fulllineitems} \index{fmt\_d (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_d}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d}}\sphinxbfcode{\sphinxupquote{ = '\$\%d\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}\$'}}} \end{fulllineitems} \index{fmt\_d\_m (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_d\_m}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_m}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_m}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}\textbackslash{}\textbackslash{},\%02d\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\}\$'}}} \end{fulllineitems} \index{fmt\_d\_m\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_d\_m\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_m_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_m\_partial}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}\textbackslash{}\textbackslash{},\%02d\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\}\textbackslash{}\textbackslash{},'}}} \end{fulllineitems} \index{fmt\_d\_ms (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_d\_ms}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_d_ms}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_ms}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}\textbackslash{}\textbackslash{},\%02d.\%s\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\}\$'}}} \end{fulllineitems} \index{fmt\_ds (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_ds}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_ds}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_ds}}\sphinxbfcode{\sphinxupquote{ = '\$\%d.\%s\textasciicircum{}\{\textbackslash{}\textbackslash{}circ\}\$'}}} \end{fulllineitems} \index{fmt\_s\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_s\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_s_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_s\_partial}}\sphinxbfcode{\sphinxupquote{ = '\%02d\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\textbackslash{}\textbackslash{}prime\}\$'}}} \end{fulllineitems} \index{fmt\_ss\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{fmt\_ss\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.fmt_ss_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_ss\_partial}}\sphinxbfcode{\sphinxupquote{ = '\%02d.\%s\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\textbackslash{}\textbackslash{}prime\}\$'}}} \end{fulllineitems} \index{min\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{min\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.min_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{min\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\}'}}} \end{fulllineitems} \index{sec\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute)@\spxentry{sec\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS.sec_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{sec\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\{\textbackslash{}\textbackslash{}prime\textbackslash{}\textbackslash{}prime\}'}}} \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:examples-using-mpl-toolkits-axisartist-angle-helper-formatterdms}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl-toolkits-axisartist-angle-helper-formatterhms}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS::doc}}\index{FormatterHMS (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{FormatterHMS}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{FormatterHMS}}} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterDMS:mpl_toolkits.axisartist.angle_helper.FormatterDMS}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.FormatterDMS}}}}} \index{deg\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{deg\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.deg_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{deg\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}'}}} \end{fulllineitems} \index{fmt\_d (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_d}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d}}\sphinxbfcode{\sphinxupquote{ = '\$\%d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}\$'}}} \end{fulllineitems} \index{fmt\_d\_m (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_d\_m}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_m}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_m}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}\textbackslash{}\textbackslash{},\%02d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{m\}\$'}}} \end{fulllineitems} \index{fmt\_d\_m\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_d\_m\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_m_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_m\_partial}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}\textbackslash{}\textbackslash{},\%02d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{m\}\textbackslash{}\textbackslash{},'}}} \end{fulllineitems} \index{fmt\_d\_ms (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_d\_ms}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_d_ms}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_d\_ms}}\sphinxbfcode{\sphinxupquote{ = '\$\%s\%d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}\textbackslash{}\textbackslash{},\%02d.\%s\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{m\}\$'}}} \end{fulllineitems} \index{fmt\_ds (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_ds}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_ds}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_ds}}\sphinxbfcode{\sphinxupquote{ = '\$\%d.\%s\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{h\}\$'}}} \end{fulllineitems} \index{fmt\_s\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_s\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_s_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_s\_partial}}\sphinxbfcode{\sphinxupquote{ = '\%02d\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{s\}\$'}}} \end{fulllineitems} \index{fmt\_ss\_partial (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{fmt\_ss\_partial}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.fmt_ss_partial}}\pysigline{\sphinxbfcode{\sphinxupquote{fmt\_ss\_partial}}\sphinxbfcode{\sphinxupquote{ = '\%02d.\%s\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{s\}\$'}}} \end{fulllineitems} \index{min\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{min\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.min_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{min\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{m\}'}}} \end{fulllineitems} \index{sec\_mark (mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute)@\spxentry{sec\_mark}\spxextra{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:mpl_toolkits.axisartist.angle_helper.FormatterHMS.sec_mark}}\pysigline{\sphinxbfcode{\sphinxupquote{sec\_mark}}\sphinxbfcode{\sphinxupquote{ = '\textasciicircum{}\textbackslash{}\textbackslash{}mathrm\{s\}'}}} \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.FormatterHMS}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.FormatterHMS:examples-using-mpl-toolkits-axisartist-angle-helper-formatterhms}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl-toolkits-axisartist-angle-helper-locatorbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase::doc}}\index{LocatorBase (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorBase}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorBase}}}{\emph{den}, \emph{include\_last=True}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{nbins (mpl\_toolkits.axisartist.angle\_helper.LocatorBase attribute)@\spxentry{nbins}\spxextra{mpl\_toolkits.axisartist.angle\_helper.LocatorBase attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase.nbins}}\pysigline{\sphinxbfcode{\sphinxupquote{nbins}}}~ \end{fulllineitems} \index{set\_params() (mpl\_toolkits.axisartist.angle\_helper.LocatorBase method)@\spxentry{set\_params()}\spxextra{mpl\_toolkits.axisartist.angle\_helper.LocatorBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase.set_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_params}}}{\emph{self}, \emph{nbins=None}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorD} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorD:mpl-toolkits-axisartist-angle-helper-locatord}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorD::doc}}\index{LocatorD (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorD}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorD:mpl_toolkits.axisartist.angle_helper.LocatorD}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorD}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorDM} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDM:mpl-toolkits-axisartist-angle-helper-locatordm}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDM::doc}}\index{LocatorDM (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorDM}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDM:mpl_toolkits.axisartist.angle_helper.LocatorDM}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorDM}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorDMS} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDMS:mpl-toolkits-axisartist-angle-helper-locatordms}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDMS::doc}}\index{LocatorDMS (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorDMS}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDMS:mpl_toolkits.axisartist.angle_helper.LocatorDMS}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorDMS}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorDMS}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorDMS:examples-using-mpl-toolkits-axisartist-angle-helper-locatordms}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axis.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorH} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorH:mpl-toolkits-axisartist-angle-helper-locatorh}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorH::doc}}\index{LocatorH (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorH}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorH:mpl_toolkits.axisartist.angle_helper.LocatorH}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorH}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorHM} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHM:mpl-toolkits-axisartist-angle-helper-locatorhm}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHM::doc}}\index{LocatorHM (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorHM}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHM:mpl_toolkits.axisartist.angle_helper.LocatorHM}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorHM}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.LocatorHMS} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHMS:mpl-toolkits-axisartist-angle-helper-locatorhms}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHMS::doc}}\index{LocatorHMS (class in mpl\_toolkits.axisartist.angle\_helper)@\spxentry{LocatorHMS}\spxextra{class in mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHMS:mpl_toolkits.axisartist.angle_helper.LocatorHMS}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{LocatorHMS}}}{\emph{den}, \emph{include\_last=True}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorBase:mpl_toolkits.axisartist.angle_helper.LocatorBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorBase}}}}} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.LocatorHMS}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.LocatorHMS:examples-using-mpl-toolkits-axisartist-angle-helper-locatorhms}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step:mpl_toolkits.axisartist.angle_helper.select_step}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step}}}}}(v1, v2, nv{[}, hour, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step24:mpl_toolkits.axisartist.angle_helper.select_step24}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step24}}}}}(v1, v2, nv{[}, include\_last, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step360:mpl_toolkits.axisartist.angle_helper.select_step360}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step360}}}}}(v1, v2, nv{[}, include\_last, ...{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_degree:mpl_toolkits.axisartist.angle_helper.select_step_degree}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step\_degree}}}}}(dv) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_hour:mpl_toolkits.axisartist.angle_helper.select_step_hour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step\_hour}}}}}(dv) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_sub:mpl_toolkits.axisartist.angle_helper.select_step_sub}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{select\_step\_sub}}}}}(dv) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step:mpl-toolkits-axisartist-angle-helper-select-step}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step::doc}}\index{select\_step() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step:mpl_toolkits.axisartist.angle_helper.select_step}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step}}}{\emph{v1}, \emph{v2}, \emph{nv}, \emph{hour=False}, \emph{include\_last=True}, \emph{threshold\_factor=3600.0}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step24} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step24:mpl-toolkits-axisartist-angle-helper-select-step24}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step24::doc}}\index{select\_step24() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step24()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step24:mpl_toolkits.axisartist.angle_helper.select_step24}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step24}}}{\emph{v1}, \emph{v2}, \emph{nv}, \emph{include\_last=True}, \emph{threshold\_factor=3600}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step360} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step360:mpl-toolkits-axisartist-angle-helper-select-step360}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step360::doc}}\index{select\_step360() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step360()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step360:mpl_toolkits.axisartist.angle_helper.select_step360}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step360}}}{\emph{v1}, \emph{v2}, \emph{nv}, \emph{include\_last=True}, \emph{threshold\_factor=3600}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step\_degree} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_degree:mpl-toolkits-axisartist-angle-helper-select-step-degree}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_degree::doc}}\index{select\_step\_degree() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step\_degree()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_degree:mpl_toolkits.axisartist.angle_helper.select_step_degree}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step\_degree}}}{\emph{dv}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step\_hour} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_hour:mpl-toolkits-axisartist-angle-helper-select-step-hour}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_hour::doc}}\index{select\_step\_hour() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step\_hour()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_hour:mpl_toolkits.axisartist.angle_helper.select_step_hour}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step\_hour}}}{\emph{dv}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.angle\_helper.select\_step\_sub} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_sub:mpl-toolkits-axisartist-angle-helper-select-step-sub}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_sub::doc}}\index{select\_step\_sub() (in module mpl\_toolkits.axisartist.angle\_helper)@\spxentry{select\_step\_sub()}\spxextra{in module mpl\_toolkits.axisartist.angle\_helper}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper.select_step_sub:mpl_toolkits.axisartist.angle_helper.select_step_sub}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.angle\_helper.}}\sphinxbfcode{\sphinxupquote{select\_step\_sub}}}{\emph{dv}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axes\_divider} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider:module-mpl_toolkits.axisartist.axes_divider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider:mpl-toolkits-axisartist-axes-divider}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider::doc}}\index{mpl\_toolkits.axisartist.axes\_divider (module)@\spxentry{mpl\_toolkits.axisartist.axes\_divider}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.Axes:mpl_toolkits.axisartist.axes_divider.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.LocatableAxes:mpl_toolkits.axisartist.axes_divider.LocatableAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LocatableAxes}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axes\_divider.Axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.Axes:mpl-toolkits-axisartist-axes-divider-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.Axes::doc}}\index{Axes (class in mpl\_toolkits.axisartist.axes\_divider)@\spxentry{Axes}\spxextra{class in mpl\_toolkits.axisartist.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.Axes:mpl_toolkits.axisartist.axes_divider.Axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_divider.}}\sphinxbfcode{\sphinxupquote{Axes}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axes\_divider.LocatableAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.LocatableAxes:mpl-toolkits-axisartist-axes-divider-locatableaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.LocatableAxes::doc}}\index{LocatableAxes (class in mpl\_toolkits.axisartist.axes\_divider)@\spxentry{LocatableAxes}\spxextra{class in mpl\_toolkits.axisartist.axes\_divider}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider.LocatableAxes:mpl_toolkits.axisartist.axes_divider.LocatableAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_divider.}}\sphinxbfcode{\sphinxupquote{LocatableAxes}}}{\emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.0: } \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axes\_grid} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid:module-mpl_toolkits.axisartist.axes_grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid:mpl-toolkits-axisartist-axes-grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid::doc}}\index{mpl\_toolkits.axisartist.axes\_grid (module)@\spxentry{mpl\_toolkits.axisartist.axes\_grid}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.AxesGrid:mpl_toolkits.axisartist.axes_grid.AxesGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesGrid}}}}} & alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid:mpl_toolkits.axisartist.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.ImageGrid}}}}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.CbarAxes:mpl_toolkits.axisartist.axes_grid.CbarAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{CbarAxes}}}}}(*args, orientation, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.Grid:mpl_toolkits.axisartist.axes_grid.Grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Grid}}}}}(fig, rect, nrows\_ncols{[}, ngrids, ...{]}) & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid:mpl_toolkits.axisartist.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ImageGrid}}}}}(fig, rect, nrows\_ncols{[}, ngrids, ...{]}) & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axes\_grid.AxesGrid} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.AxesGrid:mpl-toolkits-axisartist-axes-grid-axesgrid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.AxesGrid::doc}}\index{AxesGrid (in module mpl\_toolkits.axisartist.axes\_grid)@\spxentry{AxesGrid}\spxextra{in module mpl\_toolkits.axisartist.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.AxesGrid:mpl_toolkits.axisartist.axes_grid.AxesGrid}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.}}\sphinxbfcode{\sphinxupquote{AxesGrid}}} alias of {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid:mpl_toolkits.axisartist.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.ImageGrid}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axes\_grid.CbarAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.CbarAxes:mpl-toolkits-axisartist-axes-grid-cbaraxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.CbarAxes::doc}}\index{CbarAxes (class in mpl\_toolkits.axisartist.axes\_grid)@\spxentry{CbarAxes}\spxextra{class in mpl\_toolkits.axisartist.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.CbarAxes:mpl_toolkits.axisartist.axes_grid.CbarAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.}}\sphinxbfcode{\sphinxupquote{CbarAxes}}}{\emph{*args}, \emph{orientation}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase:mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.CbarAxesBase}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} \index{cla() (mpl\_toolkits.axisartist.axes\_grid.CbarAxes method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axisartist.axes\_grid.CbarAxes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.CbarAxes:mpl_toolkits.axisartist.axes_grid.CbarAxes.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axes\_grid.Grid} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.Grid:mpl-toolkits-axisartist-axes-grid-grid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.Grid::doc}}\index{Grid (class in mpl\_toolkits.axisartist.axes\_grid)@\spxentry{Grid}\spxextra{class in mpl\_toolkits.axisartist.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.Grid:mpl_toolkits.axisartist.axes_grid.Grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.}}\sphinxbfcode{\sphinxupquote{Grid}}}{\emph{fig}, \emph{rect}, \emph{nrows\_ncols}, \emph{ngrids=None}, \emph{direction='row'}, \emph{axes\_pad=0.02}, \emph{add\_all=True}, \emph{share\_all=False}, \emph{share\_x=True}, \emph{share\_y=True}, \emph{label\_mode='L'}, \emph{axes\_class=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.Grid:mpl_toolkits.axes_grid1.axes_grid.Grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.Grid}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The parent figure. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}(float, float, float, float) or int{]} The axes position, as a \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} tuple or as a three-digit subplot position code (e.g., "121"). \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{"row", "column"\}, default: "row"{]} \item[{\sphinxstylestrong{axes\_pad}}] \leavevmode{[}float or (float, float), default: 0.02{]} Padding or (horizontal padding, vertical padding) between axes, in inches. \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_all}}] \leavevmode{[}bool, default: False{]} \item[{\sphinxstylestrong{share\_x}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_y}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{label\_mode}}] \leavevmode{[}\{"L", "1", "all"\}, default: "L"{]} Determines which axes will get tick labels: \begin{itemize} \item {} "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. \item {} "1": Only the bottom left axes is labelled. \item {} "all": all axes are labelled. \end{itemize} \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}a type that is a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}, default: None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axes\_grid.ImageGrid} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid:mpl-toolkits-axisartist-axes-grid-imagegrid}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid::doc}}\index{ImageGrid (class in mpl\_toolkits.axisartist.axes\_grid)@\spxentry{ImageGrid}\spxextra{class in mpl\_toolkits.axisartist.axes\_grid}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid.ImageGrid:mpl_toolkits.axisartist.axes_grid.ImageGrid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_grid.}}\sphinxbfcode{\sphinxupquote{ImageGrid}}}{\emph{fig}, \emph{rect}, \emph{nrows\_ncols}, \emph{ngrids=None}, \emph{direction='row'}, \emph{axes\_pad=0.02}, \emph{add\_all=True}, \emph{share\_all=False}, \emph{aspect=True}, \emph{label\_mode='L'}, \emph{cbar\_mode=None}, \emph{cbar\_location='right'}, \emph{cbar\_pad=None}, \emph{cbar\_size='5\%'}, \emph{cbar\_set\_cax=True}, \emph{axes\_class=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid.ImageGrid:mpl_toolkits.axes_grid1.axes_grid.ImageGrid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_grid.ImageGrid}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.figure.Figure:matplotlib.figure.Figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Figure}}}}}{]} The parent figure. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}(float, float, float, float) or int{]} The axes position, as a \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} tuple or as a three-digit subplot position code (e.g., "121"). \item[{\sphinxstylestrong{direction}}] \leavevmode{[}\{"row", "column"\}, default: "row"{]} \item[{\sphinxstylestrong{axes\_pad}}] \leavevmode{[}float or (float, float), default: 0.02{]} Padding or (horizontal padding, vertical padding) between axes, in inches. \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{share\_all}}] \leavevmode{[}bool, default: False{]} \item[{\sphinxstylestrong{aspect}}] \leavevmode{[}bool, default: True{]} \item[{\sphinxstylestrong{label\_mode}}] \leavevmode{[}\{"L", "1", "all"\}, default: "L"{]} Determines which axes will get tick labels: \begin{itemize} \item {} "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. \item {} "1": Only the bottom left axes is labelled. \item {} "all": all axes are labelled. \end{itemize} \item[{\sphinxstylestrong{cbar\_mode}}] \leavevmode{[}\{"each", "single", "edge", None \}, default: None{]} \item[{\sphinxstylestrong{cbar\_location}}] \leavevmode{[}\{"left", "right", "bottom", "top"\}, default: "right"{]} \item[{\sphinxstylestrong{cbar\_pad}}] \leavevmode{[}float, default: None{]} \item[{\sphinxstylestrong{cbar\_size}}] \leavevmode{[}size specification (see \sphinxcode{\sphinxupquote{Size.from\_any}}), default: "5\%"{]} \item[{\sphinxstylestrong{cbar\_set\_cax}}] \leavevmode{[}bool, default: True{]} If True, each axes in the grid has a \sphinxstyleemphasis{cax} attribute that is bound to associated \sphinxstyleemphasis{cbar\_axes}. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}a type that is a subclass of {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}}, default: None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axes\_rgb} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:module-mpl_toolkits.axisartist.axes_rgb}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:mpl-toolkits-axisartist-axes-rgb}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb::doc}}\index{mpl\_toolkits.axisartist.axes\_rgb (module)@\spxentry{mpl\_toolkits.axisartist.axes\_rgb}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb.RGBAxes:mpl_toolkits.axisartist.axes_rgb.RGBAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RGBAxes}}}}}(*args{[}, pad, add\_all{]}) & \begin{quote}\begin{description} \item[{Parameters}] \leavevmode \end{description}\end{quote} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axes\_rgb.RGBAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb.RGBAxes:mpl-toolkits-axisartist-axes-rgb-rgbaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb.RGBAxes::doc}}\index{RGBAxes (class in mpl\_toolkits.axisartist.axes\_rgb)@\spxentry{RGBAxes}\spxextra{class in mpl\_toolkits.axisartist.axes\_rgb}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb.RGBAxes:mpl_toolkits.axisartist.axes_rgb.RGBAxes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axes\_rgb.}}\sphinxbfcode{\sphinxupquote{RGBAxes}}}{\emph{*args}, \emph{pad=0}, \emph{add\_all=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase:mpl_toolkits.axes_grid1.axes_rgb.RGBAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1.axes\_rgb.RGBAxesBase}}}}} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} fraction of the axes height to put as padding. defaults to 0.0 \item[{\sphinxstylestrong{add\_all}}] \leavevmode{[}bool{]} True: Add the \{rgb, r, g, b\} axes to the figure defaults to True. \item[{\sphinxstylestrong{axes\_class}}] \leavevmode{[}matplotlib.axes.Axes{]} \item[{\sphinxstylestrong{*args}}] \leavevmode Unpacked into axes\_class() init for RGB \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Unpacked into axes\_class() init for RGB, R, G, B axes \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axis\_artist} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:module-mpl_toolkits.axisartist.axis_artist}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:mpl-toolkits-axisartist-axis-artist}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist::doc}}\index{mpl\_toolkits.axisartist.axis\_artist (module)@\spxentry{mpl\_toolkits.axisartist.axis\_artist}\spxextra{module}} axis\_artist.py module provides axis-related artists. They are \begin{itemize} \item {} axis line \item {} tick lines \item {} tick labels \item {} axis label \item {} grid lines \end{itemize} The main artist classes are {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}} and {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridlinesCollection}}}}}. While {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridlinesCollection}}}}} is responsible for drawing grid lines, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}} is responsible for all other artists. {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}} has attributes that are associated with each type of artists: \begin{itemize} \item {} line: axis line \item {} major\_ticks: major tick lines \item {} major\_ticklabels: major tick labels \item {} minor\_ticks: minor tick lines \item {} minor\_ticklabels: minor tick labels \item {} label: axis label \end{itemize} Typically, the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}} associated with an axes will be accessed with the \sphinxstyleemphasis{axis} dictionary of the axes, i.e., the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}} for the bottom axis is \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]} \end{sphinxVerbatim} where \sphinxstyleemphasis{ax} is an instance of \sphinxcode{\sphinxupquote{mpl\_toolkits.axislines.Axes}}. Thus, \sphinxcode{\sphinxupquote{ax.axis{[}"bottom"{]}.line}} is an artist associated with the axis line, and \sphinxcode{\sphinxupquote{ax.axis{[}"bottom"{]}.major\_ticks}} is an artist associated with the major tick lines. You can change the colors, fonts, line widths, etc. of these artists by calling suitable set method. For example, to change the color of the major ticks of the bottom axis to red, use \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticks}\PYG{o}{.}\PYG{n}{set\PYGZus{}color}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} However, things like the locations of ticks, and their ticklabels need to be changed from the side of the grid\_helper. \paragraph{axis\_direction} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:axis-direction}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisLabel}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TickLabels}}}}} have an \sphinxstyleemphasis{axis\_direction} attribute, which adjusts the location, angle, etc.,. The \sphinxstyleemphasis{axis\_direction} must be one of "left", "right", "bottom", "top", and follows the Matplotlib convention for rectangular axis. For example, for the \sphinxstyleemphasis{bottom} axis (the left and right is relative to the direction of the increasing coordinate), \begin{itemize} \item {} ticklabels and axislabel are on the right \item {} ticklabels and axislabel have text angle of 0 \item {} ticklabels are baseline, center-aligned \item {} axislabel is top, center-aligned \end{itemize} The text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|} \hline \sphinxstyletheadfamily Parameter &\sphinxstyletheadfamily left &\sphinxstyletheadfamily bottom &\sphinxstyletheadfamily right &\sphinxstyletheadfamily top \\ \hline ticklabels location & left & right & right & left \\ \hline axislabel location & left & right & right & left \\ \hline ticklabels angle & 90 & 0 & -90 & 180 \\ \hline axislabel angle & 180 & 0 & 0 & 180 \\ \hline ticklabel va & center & baseline & center & baseline \\ \hline axislabel va & center & top & center & bottom \\ \hline ticklabel ha & right & center & right & center \\ \hline axislabel ha & right & center & right & center \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Ticks are by default direct opposite side of the ticklabels. To make ticks to the same side of the ticklabels, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ax}\PYG{o}{.}\PYG{n}{axis}\PYG{p}{[}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{bottom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{]}\PYG{o}{.}\PYG{n}{major\PYGZus{}ticks}\PYG{o}{.}\PYG{n}{set\PYGZus{}ticks\PYGZus{}out}\PYG{p}{(}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} The following attributes can be customized (use the \sphinxcode{\sphinxupquote{set\_xxx}} methods): \begin{itemize} \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ticks}}}}}: ticksize, tick\_out \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TickLabels}}}}}: pad \item {} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisLabel}}}}}: pad \end{itemize} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AttributeCopier}}}}}(ref\_artist{[}, klass{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtist}}}}}(axes, helper{[}, offset, ...{]}) & An artist which draws axis (a line along which the n-th axes coord is constant) line, ticks, ticklabels, and axis label. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisLabel}}}}}(*args{[}, axis\_direction, axis{]}) & Axis Label. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl_toolkits.axisartist.axis_artist.BezierPath}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{BezierPath}}}}}(path, *args, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridlinesCollection}}}}}(*args{[}, which, axis{]}) & \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LabelBase}}}}}(*args, **kwargs) & A base class for AxisLabel and TickLabels. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TickLabels}}}}}(*{[}, axis\_direction{]}) & Tick Labels. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Ticks}}}}}(ticksize{[}, tick\_out, axis{]}) & Ticks are derived from Line2D, and note that ticks themselves are markers. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl-toolkits-axisartist-axis-artist-attributecopier}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier::doc}}\index{AttributeCopier (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{AttributeCopier}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{AttributeCopier}}}{\emph{ref\_artist}, \emph{klass=\textless{}class 'matplotlib.artist.Artist'\textgreater{}}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{get\_attribute\_from\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method)@\spxentry{get\_attribute\_from\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier.get_attribute_from_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_attribute\_from\_ref\_artist}}}{\emph{self}, \emph{attr\_name}, \emph{default\_value}}{}~ \end{fulllineitems} \index{get\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method)@\spxentry{get\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier.get_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ref\_artist}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method)@\spxentry{set\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier.set_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ref\_artist}}}{\emph{self}, \emph{artist}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.AxisArtist} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl-toolkits-axisartist-axis-artist-axisartist}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist::doc}}\index{AxisArtist (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{AxisArtist}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{AxisArtist}}}{\emph{axes}, \emph{helper}, \emph{offset=None}, \emph{axis\_direction='bottom'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist}}}}} An artist which draws axis (a line along which the n-th axes coord is constant) line, ticks, ticklabels, and axis label. \sphinxstyleemphasis{axes} : axes \sphinxstyleemphasis{helper} : an AxisArtistHelper instance. \index{LABELPAD (mpl\_toolkits.axisartist.axis\_artist.AxisArtist attribute)@\spxentry{LABELPAD}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.LABELPAD}}\pysigline{\sphinxbfcode{\sphinxupquote{LABELPAD}}}~ \end{fulllineitems} \index{ZORDER (mpl\_toolkits.axisartist.axis\_artist.AxisArtist attribute)@\spxentry{ZORDER}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.ZORDER}}\pysigline{\sphinxbfcode{\sphinxupquote{ZORDER}}\sphinxbfcode{\sphinxupquote{ = 2.5}}} \end{fulllineitems} \index{draw() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the axis lines, tick lines and labels \end{fulllineitems} \index{get\_axisline\_style() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{get\_axisline\_style()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.get_axisline_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axisline\_style}}}{\emph{self}}{} return the current axisline style. \end{fulllineitems} \index{get\_helper() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{get\_helper()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.get_helper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_helper}}}{\emph{self}}{} Return axis artist helper instance. \end{fulllineitems} \index{get\_tightbbox() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{get\_tightbbox()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_transform() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{get\_transform()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.get_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_transform}}}{\emph{self}}{} Return the {\hyperref[\detokenize{api/transformations:matplotlib.transforms.Transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Transform}}}}} instance used by this artist. \end{fulllineitems} \index{invert\_ticklabel\_direction() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{invert\_ticklabel\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.invert_ticklabel_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invert\_ticklabel\_direction}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_axis\_direction() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{set\_axis\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axis_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis\_direction}}}{\emph{self}, \emph{axis\_direction}}{} Adjust the direction, text angle, text alignment of ticklabels, labels following the matplotlib convention for the rectangle axes. The \sphinxstyleemphasis{axis\_direction} must be one of {[}left, right, bottom, top{]}. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|} \hline \sphinxstyletheadfamily property &\sphinxstyletheadfamily left &\sphinxstyletheadfamily bottom &\sphinxstyletheadfamily right &\sphinxstyletheadfamily top \\ \hline ticklabels location & "-" & "+" & "+" & "-" \\ \hline axislabel location & "-" & "+" & "+" & "-" \\ \hline ticklabels angle & 90 & 0 & -90 & 180 \\ \hline ticklabel va & center & baseline & center & baseline \\ \hline ticklabel ha & right & center & right & center \\ \hline axislabel angle & 180 & 0 & 0 & 180 \\ \hline axislabel va & center & top & center & bottom \\ \hline axislabel ha & right & center & right & center \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Note that the direction "+" and "-" are relative to the direction of the increasing coordinate. Also, the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. \end{fulllineitems} \index{set\_axislabel\_direction() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{set\_axislabel\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axislabel_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axislabel\_direction}}}{\emph{self}, \emph{label\_direction}}{} Adjust the direction of the axislabel. Note that the \sphinxstyleemphasis{label\_direction}s '+' and '-' are relative to the direction of the increasing coordinate. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tick\_direction}}] \leavevmode{[}\{"+", "-"\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_axisline\_style() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{set\_axisline\_style()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.set_axisline_style}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axisline\_style}}}{\emph{self}, \emph{axisline\_style=None}, \emph{**kwargs}}{} Set the axisline style. \begin{description} \item[{\sphinxstyleemphasis{axisline\_style} can be a string with axisline style name with optional}] \leavevmode comma-separated attributes. Alternatively, the attrs can be provided as keywords. set\_axisline\_style("-\textgreater{},size=1.5") set\_axisline\_style("-\textgreater{}", size=1.5) \end{description} Old attrs simply are forgotten. Without argument (or with arrowstyle=None), return available styles as a list of strings. \end{fulllineitems} \index{set\_label() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{set\_label()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.set_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_label}}}{\emph{self}, \emph{s}}{} Set a label that will be displayed in the legend. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{s}}] \leavevmode{[}object{]} \sphinxstyleemphasis{s} will be converted to a string by calling \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#str}{\sphinxcode{\sphinxupquote{str}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_ticklabel\_direction() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{set\_ticklabel\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.set_ticklabel_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ticklabel\_direction}}}{\emph{self}, \emph{tick\_direction}}{} Adjust the direction of the ticklabel. Note that the \sphinxstyleemphasis{label\_direction}s '+' and '-' are relative to the direction of the increasing coordinate. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{tick\_direction}}] \leavevmode{[}\{"+", "-"\}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{toggle() (mpl\_toolkits.axisartist.axis\_artist.AxisArtist method)@\spxentry{toggle()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisArtist method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisArtist:mpl_toolkits.axisartist.axis_artist.AxisArtist.toggle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toggle}}}{\emph{self}, \emph{all=None}, \emph{ticks=None}, \emph{ticklabels=None}, \emph{label=None}}{} Toggle visibility of ticks, ticklabels, and (axis) label. To turn all off, \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} To turn all off but ticks on \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{n}{ticks}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \end{sphinxVerbatim} To turn all on but (axis) label off \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axis}\PYG{o}{.}\PYG{n}{toggle}\PYG{p}{(}\PYG{n+nb}{all}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.AxisLabel} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl-toolkits-axisartist-axis-artist-axislabel}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel::doc}}\index{AxisLabel (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{AxisLabel}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{AxisLabel}}}{\emph{*args}, \emph{axis\_direction='bottom'}, \emph{axis=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.LabelBase}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier}}}}} Axis Label. Derived from Text. The position of the text is updated in the fly, so changing text position has no effect. Otherwise, the properties can be changed as a normal Text. To change the pad between ticklabels and axis label, use set\_pad. \index{draw() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draws the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_color() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{get\_color()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{} Return the color of the text \end{fulllineitems} \index{get\_pad() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{get\_pad()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_pad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_pad}}}{\emph{self}}{} return pad in points. See set\_pad for more details. \end{fulllineitems} \index{get\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{get\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ref\_artist}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_text() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{get\_text()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_text}}}{\emph{self}}{} Get the text as string \end{fulllineitems} \index{get\_window\_extent() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{get\_window\_extent()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Return the \sphinxcode{\sphinxupquote{Bbox}} bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}Renderer, optional{]} A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent}}}}} before the first {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}}. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure). \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float, optional{]} The dpi value for computing the bbox, defaults to \sphinxcode{\sphinxupquote{self.figure.dpi}} (\sphinxstyleemphasis{not} the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_axis\_direction() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{set\_axis\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.set_axis_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis\_direction}}}{\emph{self}, \emph{d}}{} Adjust the text angle and text alignment of axis label according to the matplotlib convention. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|} \hline \sphinxstyletheadfamily property &\sphinxstyletheadfamily left &\sphinxstyletheadfamily bottom &\sphinxstyletheadfamily right &\sphinxstyletheadfamily top \\ \hline axislabel angle & 180 & 0 & 0 & 180 \\ \hline axislabel va & center & top & center & bottom \\ \hline axislabel ha & right & center & right & center \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Note that the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. \end{fulllineitems} \index{set\_default\_alignment() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{set\_default\_alignment()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.set_default_alignment}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_alignment}}}{\emph{self}, \emph{d}}{}~ \end{fulllineitems} \index{set\_default\_angle() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{set\_default\_angle()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.set_default_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_default\_angle}}}{\emph{self}, \emph{d}}{}~ \end{fulllineitems} \index{set\_pad() (mpl\_toolkits.axisartist.axis\_artist.AxisLabel method)@\spxentry{set\_pad()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.AxisLabel method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel.set_pad}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pad}}}{\emph{self}, \emph{pad}}{} Set the pad in points. Note that the actual pad will be the sum of the internal pad and the external pad (that are set automatically by the AxisArtist), and it only set the internal pad \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.BezierPath} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl-toolkits-axisartist-axis-artist-bezierpath}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath::doc}}\index{BezierPath (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{BezierPath}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl_toolkits.axisartist.axis_artist.BezierPath}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{BezierPath}}}{\emph{path}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} \index{draw() (mpl\_toolkits.axisartist.axis\_artist.BezierPath method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.BezierPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl_toolkits.axisartist.axis_artist.BezierPath.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{recache() (mpl\_toolkits.axisartist.axis\_artist.BezierPath method)@\spxentry{recache()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.BezierPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl_toolkits.axisartist.axis_artist.BezierPath.recache}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{recache}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_path() (mpl\_toolkits.axisartist.axis\_artist.BezierPath method)@\spxentry{set\_path()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.BezierPath method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.BezierPath:mpl_toolkits.axisartist.axis_artist.BezierPath.set_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_path}}}{\emph{self}, \emph{path}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl-toolkits-axisartist-axis-artist-gridlinescollection}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection::doc}}\index{GridlinesCollection (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{GridlinesCollection}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{GridlinesCollection}}}{\emph{*args}, \emph{which='major'}, \emph{axis='both'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \index{draw() (mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_axis() (mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method)@\spxentry{set\_axis()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis}}}{\emph{self}, \emph{axis}}{}~ \end{fulllineitems} \index{set\_grid\_helper() (mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method)@\spxentry{set\_grid\_helper()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_grid_helper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_grid\_helper}}}{\emph{self}, \emph{grid\_helper}}{}~ \end{fulllineitems} \index{set\_which() (mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method)@\spxentry{set\_which()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.GridlinesCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.GridlinesCollection:mpl_toolkits.axisartist.axis_artist.GridlinesCollection.set_which}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_which}}}{\emph{self}, \emph{which}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.LabelBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl-toolkits-axisartist-axis-artist-labelbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase::doc}}\index{LabelBase (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{LabelBase}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{LabelBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} A base class for AxisLabel and TickLabels. The position and angle of the text are calculated by to offset\_ref\_angle, text\_ref\_angle, and offset\_radius attributes. \index{draw() (mpl\_toolkits.axisartist.axis\_artist.LabelBase method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.LabelBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draws the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_window\_extent() (mpl\_toolkits.axisartist.axis\_artist.LabelBase method)@\spxentry{get\_window\_extent()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.LabelBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase.get_window_extent}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extent}}}{\emph{self}, \emph{renderer}}{} Return the \sphinxcode{\sphinxupquote{Bbox}} bounding the text, in display units. In addition to being used internally, this is useful for specifying clickable regions in a png file on a web page. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}Renderer, optional{]} A renderer is needed to compute the bounding box. If the artist has already been drawn, the renderer is cached; thus, it is only necessary to pass this argument when calling {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase.get_window_extent}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_window\_extent}}}}} before the first {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.LabelBase:mpl_toolkits.axisartist.axis_artist.LabelBase.draw}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{draw}}}}}. In practice, it is usually easier to trigger a draw first (e.g. by saving the figure). \item[{\sphinxstylestrong{dpi}}] \leavevmode{[}float, optional{]} The dpi value for computing the bbox, defaults to \sphinxcode{\sphinxupquote{self.figure.dpi}} (\sphinxstyleemphasis{not} the renderer dpi); should be set e.g. if to match regions with a figure saved with a custom dpi value. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.TickLabels} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl-toolkits-axisartist-axis-artist-ticklabels}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels::doc}}\index{TickLabels (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{TickLabels}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{TickLabels}}}{\emph{*}, \emph{axis\_direction='bottom'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AxisLabel:mpl_toolkits.axisartist.axis_artist.AxisLabel}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.AxisLabel}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier}}}}} Tick Labels. While derived from Text, this single artist draws all ticklabels. As in AxisLabel, the position of the text is updated in the fly, so changing text position has no effect. Otherwise, the properties can be changed as a normal Text. Unlike the ticklabels of the mainline matplotlib, properties of single ticklabel alone cannot modified. To change the pad between ticks and ticklabels, use set\_pad. \index{draw() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draws the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{get\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.get_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ref\_artist}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_texts\_widths\_heights\_descents() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{get\_texts\_widths\_heights\_descents()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.get_texts_widths_heights_descents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_texts\_widths\_heights\_descents}}}{\emph{self}, \emph{renderer}}{} return a list of width, height, descent for ticklabels. \end{fulllineitems} \index{get\_window\_extents() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{get\_window\_extents()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.get_window_extents}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_window\_extents}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{invert\_axis\_direction() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{invert\_axis\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.invert_axis_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invert\_axis\_direction}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_axis\_direction() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{set\_axis\_direction()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.set_axis_direction}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis\_direction}}}{\emph{self}, \emph{label\_direction}}{} Adjust the text angle and text alignment of ticklabels according to the matplotlib convention. The \sphinxstyleemphasis{label\_direction} must be one of {[}left, right, bottom, top{]}. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|T|} \hline \sphinxstyletheadfamily property &\sphinxstyletheadfamily left &\sphinxstyletheadfamily bottom &\sphinxstyletheadfamily right &\sphinxstyletheadfamily top \\ \hline ticklabels angle & 90 & 0 & -90 & 180 \\ \hline ticklabel va & center & baseline & center & baseline \\ \hline ticklabel ha & right & center & right & center \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Note that the text angles are actually relative to (90 + angle of the direction to the ticklabel), which gives 0 for bottom axis. \end{fulllineitems} \index{set\_locs\_angles\_labels() (mpl\_toolkits.axisartist.axis\_artist.TickLabels method)@\spxentry{set\_locs\_angles\_labels()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.TickLabels method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.TickLabels:mpl_toolkits.axisartist.axis_artist.TickLabels.set_locs_angles_labels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locs\_angles\_labels}}}{\emph{self}, \emph{locs\_angles\_labels}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axis\_artist.Ticks} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl-toolkits-axisartist-axis-artist-ticks}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks::doc}}\index{Ticks (class in mpl\_toolkits.axisartist.axis\_artist)@\spxentry{Ticks}\spxextra{class in mpl\_toolkits.axisartist.axis\_artist}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.}}\sphinxbfcode{\sphinxupquote{Ticks}}}{\emph{ticksize}, \emph{tick\_out=False}, \emph{*}, \emph{axis=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}}, {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.AttributeCopier:mpl_toolkits.axisartist.axis_artist.AttributeCopier}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axis\_artist.AttributeCopier}}}}} Ticks are derived from Line2D, and note that ticks themselves are markers. Thus, you should use set\_mec, set\_mew, etc. To change the tick size (length), you need to use set\_ticksize. To change the direction of the ticks (ticks are in opposite direction of ticklabels by default), use set\_tick\_out(False). \index{draw() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{draw()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_color() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_color()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_color}}}{\emph{self}}{} Return the line color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_color}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_color}}}}}. \end{fulllineitems} \index{get\_markeredgecolor() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_markeredgecolor()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_markeredgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markeredgecolor}}}{\emph{self}}{} Return the marker edge color. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgecolor}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgecolor}}}}}. \end{fulllineitems} \index{get\_markeredgewidth() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_markeredgewidth()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_markeredgewidth}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_markeredgewidth}}}{\emph{self}}{} Return the marker edge width in points. See also {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D.set_markeredgewidth}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_markeredgewidth}}}}}. \end{fulllineitems} \index{get\_ref\_artist() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_ref\_artist()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_ref_artist}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ref\_artist}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_tick\_out() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_tick\_out()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_tick_out}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_out}}}{\emph{self}}{} Return True if the tick will be rotated by 180 degree. \end{fulllineitems} \index{get\_ticksize() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{get\_ticksize()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.get_ticksize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ticksize}}}{\emph{self}}{} Return length of the ticks in points. \end{fulllineitems} \index{set\_locs\_angles() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{set\_locs\_angles()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.set_locs_angles}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_locs\_angles}}}{\emph{self}, \emph{locs\_angles}}{}~ \end{fulllineitems} \index{set\_tick\_out() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{set\_tick\_out()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.set_tick_out}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_tick\_out}}}{\emph{self}, \emph{b}}{} set True if tick need to be rotated by 180 degree. \end{fulllineitems} \index{set\_ticksize() (mpl\_toolkits.axisartist.axis\_artist.Ticks method)@\spxentry{set\_ticksize()}\spxextra{mpl\_toolkits.axisartist.axis\_artist.Ticks method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist.Ticks:mpl_toolkits.axisartist.axis_artist.Ticks.set_ticksize}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ticksize}}}{\emph{self}, \emph{ticksize}}{} set length of the ticks in points. \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axisline\_style} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style:module-mpl_toolkits.axisartist.axisline_style}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style:mpl-toolkits-axisartist-axisline-style}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style::doc}}\index{mpl\_toolkits.axisartist.axisline\_style (module)@\spxentry{mpl\_toolkits.axisartist.axisline\_style}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxislineStyle}}}}} & {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxislineStyle}}}}} is a container class which defines style classes for AxisArtists. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axisline\_style.AxislineStyle} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl-toolkits-axisartist-axisline-style-axislinestyle}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle::doc}}\index{AxislineStyle (class in mpl\_toolkits.axisartist.axisline\_style)@\spxentry{AxislineStyle}\spxextra{class in mpl\_toolkits.axisartist.axisline\_style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axisline\_style.}}\sphinxbfcode{\sphinxupquote{AxislineStyle}}} Bases: \sphinxcode{\sphinxupquote{matplotlib.patches.\_Style}} {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxislineStyle}}}}} is a container class which defines style classes for AxisArtists. An instance of any axisline style class is an callable object, whose call signature is \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nf+fm}{\PYGZus{}\PYGZus{}call\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axis\PYGZus{}artist}\PYG{p}{,} \PYG{n}{path}\PYG{p}{,} \PYG{n}{transform}\PYG{p}{)} \end{sphinxVerbatim} When called, this should return a mpl artist with following methods implemented. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}path}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{path}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} set the path for axisline.} \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}line\PYGZus{}mutation\PYGZus{}scale}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{scale}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} set the scale} \PYG{k}{def} \PYG{n+nf}{draw}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} draw} \end{sphinxVerbatim} return the instance of the subclass with the given style name. \index{AxislineStyle.FilledArrow (class in mpl\_toolkits.axisartist.axisline\_style)@\spxentry{AxislineStyle.FilledArrow}\spxextra{class in mpl\_toolkits.axisartist.axisline\_style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle.FilledArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{FilledArrow}}}{\emph{size=1}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axisline\_style.SimpleArrow}} \begin{description} \item[{\sphinxstyleemphasis{size}}] \leavevmode size of the arrow as a fraction of the ticklabel size. \end{description} \index{ArrowAxisClass (mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.FilledArrow attribute)@\spxentry{ArrowAxisClass}\spxextra{mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.FilledArrow attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle.FilledArrow.ArrowAxisClass}}\pysigline{\sphinxbfcode{\sphinxupquote{ArrowAxisClass}}} alias of \sphinxcode{\sphinxupquote{\_FancyAxislineStyle.FilledArrow}} \end{fulllineitems} \end{fulllineitems} \index{AxislineStyle.SimpleArrow (class in mpl\_toolkits.axisartist.axisline\_style)@\spxentry{AxislineStyle.SimpleArrow}\spxextra{class in mpl\_toolkits.axisartist.axisline\_style}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle.SimpleArrow}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{SimpleArrow}}}{\emph{size=1}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axisline\_style.\_Base}} A simple arrow. \begin{description} \item[{\sphinxstyleemphasis{size}}] \leavevmode size of the arrow as a fraction of the ticklabel size. \end{description} \index{ArrowAxisClass (mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.SimpleArrow attribute)@\spxentry{ArrowAxisClass}\spxextra{mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.SimpleArrow attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle.SimpleArrow.ArrowAxisClass}}\pysigline{\sphinxbfcode{\sphinxupquote{ArrowAxisClass}}} alias of \sphinxcode{\sphinxupquote{\_FancyAxislineStyle.SimpleArrow}} \end{fulllineitems} \index{new\_line() (mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.SimpleArrow method)@\spxentry{new\_line()}\spxextra{mpl\_toolkits.axisartist.axisline\_style.AxislineStyle.SimpleArrow method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style.AxislineStyle:mpl_toolkits.axisartist.axisline_style.AxislineStyle.SimpleArrow.new_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_line}}}{\emph{self}, \emph{axis\_artist}, \emph{transform}}{}~ \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.axislines} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines:module-mpl_toolkits.axisartist.axislines}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines:mpl-toolkits-axisartist-axislines}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines::doc}}\index{mpl\_toolkits.axisartist.axislines (module)@\spxentry{mpl\_toolkits.axisartist.axislines}\spxextra{module}} Axislines includes modified implementation of the Axes class. The biggest difference is that the artists responsible for drawing the axis spine, ticks, ticklabels and axis labels are separated out from mpl's Axis class. Originally, this change was motivated to support curvilinear grid. Here are a few reasons that I came up with a new axes class: \begin{itemize} \item {} "top" and "bottom" x-axis (or "left" and "right" y-axis) can have different ticks (tick locations and labels). This is not possible with the current mpl, although some twin axes trick can help. \item {} Curvilinear grid. \item {} angled ticks. \end{itemize} In the new axes class, xaxis and yaxis is set to not visible by default, and new set of artist (AxisArtist) are defined to draw axis line, ticks, ticklabels and axis label. Axes.axis attribute serves as a dictionary of these artists, i.e., ax.axis{[}"left"{]} is a AxisArtist instance responsible to draw left y-axis. The default Axes.axis contains "bottom", "left", "top" and "right". AxisArtist can be considered as a container artist and has following children artists which will draw ticks, labels, etc. \begin{itemize} \item {} line \item {} major\_ticks, major\_ticklabels \item {} minor\_ticks, minor\_ticklabels \item {} offsetText \item {} label \end{itemize} Note that these are separate artists from Axis class of the original mpl, thus most of tick-related command in the original mpl won't work, although some effort has made to work with. For example, color and markerwidth of the ax.axis{[}"bottom"{]}.major\_ticks will follow those of Axes.xaxis unless explicitly specified. In addition to AxisArtist, the Axes will have \sphinxstyleemphasis{gridlines} attribute, which obviously draws grid lines. The gridlines needs to be separated from the axis as some gridlines can never pass any axis. \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes}}}}}(*args{[}, grid\_helper{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxesZero:mpl_toolkits.axisartist.axislines.AxesZero}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxesZero}}}}}(*args{[}, grid\_helper{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtistHelper}}}}} & AxisArtistHelper should define following method with given APIs. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{AxisArtistHelperRectlinear}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridHelperBase}}}}}() & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl_toolkits.axisartist.axislines.GridHelperRectlinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridHelperRectlinear}}}}}(axes) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects:mpl_toolkits.axisartist.axislines.SimpleChainedObjects}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{SimpleChainedObjects}}}}}(**kwargs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.axislines.Axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl-toolkits-axisartist-axislines-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes::doc}}\index{Axes (class in mpl\_toolkits.axisartist.axislines)@\spxentry{Axes}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{Axes}}}{\emph{*args}, \emph{grid\_helper=None}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.axes.\_axes.Axes}} \index{Axes.AxisDict (class in mpl\_toolkits.axisartist.axislines)@\spxentry{Axes.AxisDict}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.AxisDict}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{AxisDict}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/stdtypes.html\#dict}{\sphinxcode{\sphinxupquote{dict}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{axis (mpl\_toolkits.axisartist.axislines.Axes attribute)@\spxentry{axis}\spxextra{mpl\_toolkits.axisartist.axislines.Axes attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.axis}}\pysigline{\sphinxbfcode{\sphinxupquote{axis}}} Convenience method to get or set some axis properties. Call signatures: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{p}{[}\PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax}\PYG{p}{]}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{n}{option}\PYG{p}{)} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{ymin}\PYG{p}{,} \PYG{n}{ymax} \PYG{o}{=} \PYG{n}{axis}\PYG{p}{(}\PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float, optional{]} The axis limits to be set. Either none or all of the limits must be given. \item[{\sphinxstylestrong{option}}] \leavevmode{[}bool or str{]} If a bool, turns axis lines and labels on or off. If a string, possible values are: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxstyletheadfamily Value &\sphinxstyletheadfamily Description \\ \hline 'on' & Turn on axis lines and labels. Same as \sphinxcode{\sphinxupquote{True}}. \\ \hline 'off' & Turn off axis lines and labels. Same as \sphinxcode{\sphinxupquote{False}}. \\ \hline 'equal' & Set equal scaling (i.e., make circles circular) by changing axis limits. \\ \hline 'scaled' & Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. \\ \hline 'tight' & Set limits just large enough to show all data. \\ \hline 'auto' & Automatic scaling (fill plot box with data). \\ \hline 'normal' & Same as 'auto'; deprecated. \\ \hline 'image' & 'scaled' with axis limits equal to data limits. \\ \hline 'square' & Square plot; similar to 'scaled', but initially forcing \sphinxcode{\sphinxupquote{xmax-xmin = ymax-ymin}}. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \item[{\sphinxstylestrong{emit}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether observers are notified of the axis limit change. This option is passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xmin, xmax, ymin, ymax}}] \leavevmode{[}float{]} The axis limits. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim}}}}}}] \leavevmode \item[{{\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim}}}}}}] \leavevmode \end{description} \end{fulllineitems} \index{cla() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear the current axes. \end{fulllineitems} \index{get\_children() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{get\_children()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.get_children}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_children}}}{\emph{self}}{} Return a list of the child {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}s of this {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}}. \end{fulllineitems} \index{get\_grid\_helper() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{get\_grid\_helper()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.get_grid_helper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_grid\_helper}}}{\emph{self}}{}~ \end{fulllineitems} \index{grid() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{grid()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=None}, \emph{which='major'}, \emph{axis='both'}, \emph{**kwargs}}{} Toggle the gridlines, and optionally set the properties of the lines. \end{fulllineitems} \index{invalidate\_grid\_helper() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{invalidate\_grid\_helper()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.invalidate_grid_helper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invalidate\_grid\_helper}}}{\emph{self}}{}~ \end{fulllineitems} \index{new\_fixed\_axis() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{new\_fixed\_axis()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.new_fixed_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_fixed\_axis}}}{\emph{self}, \emph{loc}, \emph{offset=None}}{}~ \end{fulllineitems} \index{new\_floating\_axis() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{new\_floating\_axis()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.new_floating_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_floating\_axis}}}{\emph{self}, \emph{nth\_coord}, \emph{value}, \emph{axis\_direction='bottom'}}{}~ \end{fulllineitems} \index{new\_gridlines() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{new\_gridlines()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.new_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gridlines}}}{\emph{self}, \emph{grid\_helper=None}}{} Create and return a new GridlineCollection instance. \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{toggle\_axisline() (mpl\_toolkits.axisartist.axislines.Axes method)@\spxentry{toggle\_axisline()}\spxextra{mpl\_toolkits.axisartist.axislines.Axes method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes.toggle_axisline}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{toggle\_axisline}}}{\emph{self}, \emph{b=None}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.AxesZero} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxesZero:mpl-toolkits-axisartist-axislines-axeszero}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxesZero::doc}}\index{AxesZero (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxesZero}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxesZero:mpl_toolkits.axisartist.axislines.AxesZero}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{AxesZero}}}{\emph{*args}, \emph{grid\_helper=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.Axes:mpl_toolkits.axisartist.axislines.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Axes}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.AxisArtistHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl-toolkits-axisartist-axislines-axisartisthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper::doc}}\index{AxisArtistHelper (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelper}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{AxisArtistHelper}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} AxisArtistHelper should define following method with given APIs. Note that the first axes argument will be axes attribute of the caller artist.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} LINE (spinal line?)} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}line}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} path : Path} \PYG{k}{return} \PYG{n}{path} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}line\PYGZus{}transform}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} ...} \PYG{c+c1}{\PYGZsh{} trans : transform} \PYG{k}{return} \PYG{n}{trans} \PYG{c+c1}{\PYGZsh{} LABEL} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}label\PYGZus{}pos}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} x, y : position} \PYG{k}{return} \PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{)}\PYG{p}{,} \PYG{n}{trans} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}label\PYGZus{}offset\PYGZus{}transform}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{,} \PYG{n}{pad\PYGZus{}points}\PYG{p}{,} \PYG{n}{fontprops}\PYG{p}{,} \PYG{n}{renderer}\PYG{p}{,} \PYG{n}{bboxes}\PYG{p}{,} \PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} va : vertical alignment} \PYG{c+c1}{\PYGZsh{} ha : horizontal alignment} \PYG{c+c1}{\PYGZsh{} a : angle} \PYG{k}{return} \PYG{n}{trans}\PYG{p}{,} \PYG{n}{va}\PYG{p}{,} \PYG{n}{ha}\PYG{p}{,} \PYG{n}{a} \PYG{c+c1}{\PYGZsh{} TICK} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}tick\PYGZus{}transform}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{)}\PYG{p}{:} \PYG{k}{return} \PYG{n}{trans} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}tick\PYGZus{}iterators}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{axes}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} iter : iterable object that yields (c, angle, l) where} \PYG{c+c1}{\PYGZsh{} c, angle, l is position, tick angle, and label} \PYG{k}{return} \PYG{n}{iter\PYGZus{}major}\PYG{p}{,} \PYG{n}{iter\PYGZus{}minor} \end{sphinxVerbatim} \index{AxisArtistHelper.Fixed (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelper.Fixed}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Fixed}}}{\emph{loc}, \emph{nth\_coord=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.\_Base}} Helper class for a fixed (in the axes coordinate) axis. nth\_coord = along which coordinate value varies in 2d, nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \index{get\_axislabel\_pos\_angle() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_axislabel\_pos\_angle()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_axislabel_pos_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_pos\_angle}}}{\emph{self}, \emph{axes}}{} label reference position in transAxes. get\_label\_transform() returns a transform of (transAxes+offset) \end{fulllineitems} \index{get\_axislabel\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_axislabel\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_axislabel_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_line()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_line\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_line_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_nth\_coord() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_nth\_coord()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_nth_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_nth\_coord}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_tick\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method)@\spxentry{get\_tick\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Fixed.get_tick_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \end{fulllineitems} \index{AxisArtistHelper.Floating (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelper.Floating}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Floating}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Floating}}}{\emph{nth\_coord}, \emph{value}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.\_Base}} \index{get\_line() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Floating method)@\spxentry{get\_line()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Floating.get_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_nth\_coord() (mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Floating method)@\spxentry{get\_nth\_coord()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelper.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelper:mpl_toolkits.axisartist.axislines.AxisArtistHelper.Floating.get_nth_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_nth\_coord}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl-toolkits-axisartist-axislines-axisartisthelperrectlinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear::doc}}\index{AxisArtistHelperRectlinear (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelperRectlinear}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{AxisArtistHelperRectlinear}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{AxisArtistHelperRectlinear.Fixed (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelperRectlinear.Fixed}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Fixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Fixed}}}{\emph{axes}, \emph{loc}, \emph{nth\_coord=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Fixed}} nth\_coord = along which coordinate value varies in 2d, nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \index{get\_tick\_iterators() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Fixed method)@\spxentry{get\_tick\_iterators()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Fixed method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Fixed.get_tick_iterators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterators}}}{\emph{self}, \emph{axes}}{} tick\_loc, tick\_angle, tick\_label \end{fulllineitems} \end{fulllineitems} \index{AxisArtistHelperRectlinear.Floating (class in mpl\_toolkits.axisartist.axislines)@\spxentry{AxisArtistHelperRectlinear.Floating}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxbfcode{\sphinxupquote{Floating}}}{\emph{axes}, \emph{nth\_coord}, \emph{passingthrough\_point}, \emph{axis\_direction='bottom'}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Floating}} \index{get\_axislabel\_pos\_angle() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_axislabel\_pos\_angle()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_axislabel_pos_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_pos\_angle}}}{\emph{self}, \emph{axes}}{} label reference position in transAxes. get\_label\_transform() returns a transform of (transAxes+offset) \end{fulllineitems} \index{get\_axislabel\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_axislabel\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_axislabel_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_line()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_line\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_line_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_tick\_iterators() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_tick\_iterators()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_tick_iterators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterators}}}{\emph{self}, \emph{axes}}{} tick\_loc, tick\_angle, tick\_label \end{fulllineitems} \index{get\_tick\_transform() (mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method)@\spxentry{get\_tick\_transform()}\spxextra{mpl\_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear:mpl_toolkits.axisartist.axislines.AxisArtistHelperRectlinear.Floating.get_tick_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.GridHelperBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl-toolkits-axisartist-axislines-gridhelperbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase::doc}}\index{GridHelperBase (class in mpl\_toolkits.axisartist.axislines)@\spxentry{GridHelperBase}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase}}\pysigline{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{GridHelperBase}}} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{get\_gridlines() (mpl\_toolkits.axisartist.axislines.GridHelperBase method)@\spxentry{get\_gridlines()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase.get_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}, \emph{which}, \emph{axis}}{} Return list of grid lines as a list of paths (list of points). \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{invalidate() (mpl\_toolkits.axisartist.axislines.GridHelperBase method)@\spxentry{invalidate()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase.invalidate}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invalidate}}}{\emph{self}}{}~ \end{fulllineitems} \index{new\_gridlines() (mpl\_toolkits.axisartist.axislines.GridHelperBase method)@\spxentry{new\_gridlines()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase.new_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_gridlines}}}{\emph{self}, \emph{ax}}{} Create and return a new GridlineCollection instance. \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{update\_lim() (mpl\_toolkits.axisartist.axislines.GridHelperBase method)@\spxentry{update\_lim()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase.update_lim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_lim}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{valid() (mpl\_toolkits.axisartist.axislines.GridHelperBase method)@\spxentry{valid()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase.valid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{valid}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.GridHelperRectlinear} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl-toolkits-axisartist-axislines-gridhelperrectlinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear::doc}}\index{GridHelperRectlinear (class in mpl\_toolkits.axisartist.axislines)@\spxentry{GridHelperRectlinear}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl_toolkits.axisartist.axislines.GridHelperRectlinear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{GridHelperRectlinear}}}{\emph{axes}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.GridHelperBase}}}}} \index{get\_gridlines() (mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method)@\spxentry{get\_gridlines()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl_toolkits.axisartist.axislines.GridHelperRectlinear.get_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}, \emph{which='major'}, \emph{axis='both'}}{} return list of gridline coordinates in data coordinates. \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{new\_fixed\_axis() (mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method)@\spxentry{new\_fixed\_axis()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl_toolkits.axisartist.axislines.GridHelperRectlinear.new_fixed_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_fixed\_axis}}}{\emph{self}, \emph{loc}, \emph{nth\_coord=None}, \emph{axis\_direction=None}, \emph{offset=None}, \emph{axes=None}}{}~ \end{fulllineitems} \index{new\_floating\_axis() (mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method)@\spxentry{new\_floating\_axis()}\spxextra{mpl\_toolkits.axisartist.axislines.GridHelperRectlinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperRectlinear:mpl_toolkits.axisartist.axislines.GridHelperRectlinear.new_floating_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_floating\_axis}}}{\emph{self}, \emph{nth\_coord}, \emph{value}, \emph{axis\_direction='bottom'}, \emph{axes=None}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.axislines.SimpleChainedObjects} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects:mpl-toolkits-axisartist-axislines-simplechainedobjects}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects::doc}}\index{SimpleChainedObjects (class in mpl\_toolkits.axisartist.axislines)@\spxentry{SimpleChainedObjects}\spxextra{class in mpl\_toolkits.axisartist.axislines}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.SimpleChainedObjects:mpl_toolkits.axisartist.axislines.SimpleChainedObjects}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.}}\sphinxbfcode{\sphinxupquote{SimpleChainedObjects}}}{\emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.clip\_path} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path:module-mpl_toolkits.axisartist.clip_path}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path:mpl-toolkits-axisartist-clip-path}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path::doc}}\index{mpl\_toolkits.axisartist.clip\_path (module)@\spxentry{mpl\_toolkits.axisartist.clip\_path}\spxextra{module}} \paragraph{Functions} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path:functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.atan2:mpl_toolkits.axisartist.clip_path.atan2}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{atan2}}}}}(dy, dx) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip:mpl_toolkits.axisartist.clip_path.clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip}}}}}(xlines, ylines, x0{[}, clip, xdir, ydir{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip_line_to_rect:mpl_toolkits.axisartist.clip_path.clip_line_to_rect}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{clip\_line\_to\_rect}}}}}(xline, yline, bbox) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.clip\_path.atan2} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.atan2:mpl-toolkits-axisartist-clip-path-atan2}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.atan2::doc}}\index{atan2() (in module mpl\_toolkits.axisartist.clip\_path)@\spxentry{atan2()}\spxextra{in module mpl\_toolkits.axisartist.clip\_path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.atan2:mpl_toolkits.axisartist.clip_path.atan2}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.clip\_path.}}\sphinxbfcode{\sphinxupquote{atan2}}}{\emph{dy}, \emph{dx}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.clip\_path.clip} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip:mpl-toolkits-axisartist-clip-path-clip}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip::doc}}\index{clip() (in module mpl\_toolkits.axisartist.clip\_path)@\spxentry{clip()}\spxextra{in module mpl\_toolkits.axisartist.clip\_path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip:mpl_toolkits.axisartist.clip_path.clip}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.clip\_path.}}\sphinxbfcode{\sphinxupquote{clip}}}{\emph{xlines}, \emph{ylines}, \emph{x0}, \emph{clip='right'}, \emph{xdir=True}, \emph{ydir=True}}{}~ \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.clip\_path.clip\_line\_to\_rect} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip_line_to_rect:mpl-toolkits-axisartist-clip-path-clip-line-to-rect}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip_line_to_rect::doc}}\index{clip\_line\_to\_rect() (in module mpl\_toolkits.axisartist.clip\_path)@\spxentry{clip\_line\_to\_rect()}\spxextra{in module mpl\_toolkits.axisartist.clip\_path}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path.clip_line_to_rect:mpl_toolkits.axisartist.clip_path.clip_line_to_rect}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.clip\_path.}}\sphinxbfcode{\sphinxupquote{clip\_line\_to\_rect}}}{\emph{xline}, \emph{yline}, \emph{bbox}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.floating\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes:module-mpl_toolkits.axisartist.floating_axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes:mpl-toolkits-axisartist-floating-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes::doc}}\index{mpl\_toolkits.axisartist.floating\_axes (module)@\spxentry{mpl\_toolkits.axisartist.floating\_axes}\spxextra{module}} An experimental support for curvilinear grid. \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed:mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ExtremeFinderFixed}}}}}(extremes) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedAxisArtistHelper}}}}}(grid\_helper, side{[}, ...{]}) & nth\_coord = along which coordinate value varies. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxes:mpl_toolkits.axisartist.floating_axes.FloatingAxes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FloatingAxes}}}}} & alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.Floating AxesHostAxes}} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase:mpl_toolkits.axisartist.floating_axes.FloatingAxesBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FloatingAxesBase}}}}}(*args, **kwargs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FloatingAxisArtistHelper}}}}}(grid\_helper, ...{[}, ...{]}) & nth\_coord = along which coordinate value varies. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridHelperCurveLinear}}}}}(aux\_trans, extremes{[}, ...{]}) & aux\_trans : a transform from the source (curved) coordinate to target (rectilinear) coordinate. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.ExtremeFinderFixed} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed:mpl-toolkits-axisartist-floating-axes-extremefinderfixed}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed::doc}}\index{ExtremeFinderFixed (class in mpl\_toolkits.axisartist.floating\_axes)@\spxentry{ExtremeFinderFixed}\spxextra{class in mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed:mpl_toolkits.axisartist.floating_axes.ExtremeFinderFixed}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{ExtremeFinderFixed}}}{\emph{extremes}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple:mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.ExtremeFinderSimple}}}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl-toolkits-axisartist-floating-axes-fixedaxisartisthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper::doc}}\index{FixedAxisArtistHelper (class in mpl\_toolkits.axisartist.floating\_axes)@\spxentry{FixedAxisArtistHelper}\spxextra{class in mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{FixedAxisArtistHelper}}}{\emph{grid\_helper}, \emph{side}, \emph{nth\_coord\_ticks=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper}}}}} \begin{description} \item[{nth\_coord = along which coordinate value varies.}] \leavevmode nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \end{description} \index{get\_axislabel\_pos\_angle() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{get\_axislabel\_pos\_angle()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.get_axislabel_pos_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_pos\_angle}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{get\_line()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.get_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line\_transform() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{get\_line\_transform()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.get_line_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_tick\_iterators() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{get\_tick\_iterators()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.get_tick_iterators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterators}}}{\emph{self}, \emph{axes}}{} tick\_loc, tick\_angle, tick\_label, (optionally) tick\_label \end{fulllineitems} \index{get\_tick\_transform() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{get\_tick\_transform()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.get_tick_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{update\_lim() (mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method)@\spxentry{update\_lim()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FixedAxisArtistHelper.update_lim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_lim}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.FloatingAxes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxes:mpl-toolkits-axisartist-floating-axes-floatingaxes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxes::doc}}\index{FloatingAxes (in module mpl\_toolkits.axisartist.floating\_axes)@\spxentry{FloatingAxes}\spxextra{in module mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxes:mpl_toolkits.axisartist.floating_axes.FloatingAxes}}\pysigline{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{FloatingAxes}}} alias of \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.Floating AxesHostAxes}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.FloatingAxesBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase:mpl-toolkits-axisartist-floating-axes-floatingaxesbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase::doc}}\index{FloatingAxesBase (class in mpl\_toolkits.axisartist.floating\_axes)@\spxentry{FloatingAxesBase}\spxextra{class in mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase:mpl_toolkits.axisartist.floating_axes.FloatingAxesBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{FloatingAxesBase}}}{\emph{*args}, \emph{**kwargs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{adjust\_axes\_lim() (mpl\_toolkits.axisartist.floating\_axes.FloatingAxesBase method)@\spxentry{adjust\_axes\_lim()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FloatingAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase:mpl_toolkits.axisartist.floating_axes.FloatingAxesBase.adjust_axes_lim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{adjust\_axes\_lim}}}{\emph{self}}{}~ \end{fulllineitems} \index{cla() (mpl\_toolkits.axisartist.floating\_axes.FloatingAxesBase method)@\spxentry{cla()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.FloatingAxesBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxesBase:mpl_toolkits.axisartist.floating_axes.FloatingAxesBase.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.FloatingAxisArtistHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper:mpl-toolkits-axisartist-floating-axes-floatingaxisartisthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper::doc}}\index{FloatingAxisArtistHelper (class in mpl\_toolkits.axisartist.floating\_axes)@\spxentry{FloatingAxisArtistHelper}\spxextra{class in mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper:mpl_toolkits.axisartist.floating_axes.FloatingAxisArtistHelper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{FloatingAxisArtistHelper}}}{\emph{grid\_helper}, \emph{nth\_coord}, \emph{value}, \emph{axis\_direction=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper}}}}} \begin{description} \item[{nth\_coord = along which coordinate value varies.}] \leavevmode nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \end{description} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl-toolkits-axisartist-floating-axes-gridhelpercurvelinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear::doc}}\index{GridHelperCurveLinear (class in mpl\_toolkits.axisartist.floating\_axes)@\spxentry{GridHelperCurveLinear}\spxextra{class in mpl\_toolkits.axisartist.floating\_axes}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.}}\sphinxbfcode{\sphinxupquote{GridHelperCurveLinear}}}{\emph{aux\_trans}, \emph{extremes}, \emph{grid\_locator1=None}, \emph{grid\_locator2=None}, \emph{tick\_formatter1=None}, \emph{tick\_formatter2=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear}}}}} aux\_trans : a transform from the source (curved) coordinate to target (rectilinear) coordinate. An instance of MPL's Transform (inverse transform should be defined) or a tuple of two callable objects which defines the transform and its inverse. The callables need take two arguments of array of source coordinates and should return two target coordinates: e.g., \sphinxstyleemphasis{x2, y2 = trans(x1, y1)} \index{get\_boundary() (mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method)@\spxentry{get\_boundary()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear.get_boundary}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_boundary}}}{\emph{self}}{} return Nx2 array of x,y coordinate of the boundary \end{fulllineitems} \index{get\_data\_boundary() (mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method)@\spxentry{get\_data\_boundary()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear.get_data_boundary}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data\_boundary}}}{\emph{self}, \emph{side}}{} return v= 0 , nth=1 \end{fulllineitems} \index{get\_gridlines() (mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method)@\spxentry{get\_gridlines()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear.get_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}, \emph{which='major'}, \emph{axis='both'}}{} Return list of grid lines as a list of paths (list of points). \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{new\_fixed\_axis() (mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method)@\spxentry{new\_fixed\_axis()}\spxextra{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear.new_fixed_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_fixed\_axis}}}{\emph{self}, \emph{loc}, \emph{nth\_coord=None}, \emph{axis\_direction=None}, \emph{offset=None}, \emph{axes=None}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.floating\_axes.GridHelperCurveLinear}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes.GridHelperCurveLinear:examples-using-mpl-toolkits-axisartist-floating-axes-gridhelpercurvelinear}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \subsubsection{mpl\_toolkits.axisartist.grid\_finder} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder:module-mpl_toolkits.axisartist.grid_finder}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder:mpl-toolkits-axisartist-grid-finder}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder::doc}}\index{mpl\_toolkits.axisartist.grid\_finder (module)@\spxentry{mpl\_toolkits.axisartist.grid\_finder}\spxextra{module}} \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.DictFormatter:mpl_toolkits.axisartist.grid_finder.DictFormatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{DictFormatter}}}}}(format\_dict{[}, formatter{]}) & format\_dict : dictionary for format strings to be used. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple:mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ExtremeFinderSimple}}}}}(nx, ny) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator:mpl_toolkits.axisartist.grid_finder.FixedLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedLocator}}}}}(locs) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint:mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FormatterPrettyPrint}}}}}({[}useMathText{]}) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinder:mpl_toolkits.axisartist.grid_finder.GridFinder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridFinder}}}}}(transform{[}, extreme\_finder, ...{]}) & transform : transform from the image coordinate (which will be the transData of the axes to the world coordinate. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridFinderBase}}}}}(extreme\_finder, ...{[}, ...{]}) & the transData of the axes to the world coordinate. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator:mpl_toolkits.axisartist.grid_finder.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MaxNLocator}}}}}({[}nbins, steps, trim, integer, ...{]}) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.DictFormatter} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.DictFormatter:mpl-toolkits-axisartist-grid-finder-dictformatter}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.DictFormatter::doc}}\index{DictFormatter (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{DictFormatter}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.DictFormatter:mpl_toolkits.axisartist.grid_finder.DictFormatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{DictFormatter}}}{\emph{format\_dict}, \emph{formatter=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} format\_dict : dictionary for format strings to be used. formatter : fall-back formatter \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.DictFormatter}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.DictFormatter:examples-using-mpl-toolkits-axisartist-grid-finder-dictformatter}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.ExtremeFinderSimple} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple:mpl-toolkits-axisartist-grid-finder-extremefindersimple}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple::doc}}\index{ExtremeFinderSimple (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{ExtremeFinderSimple}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple:mpl_toolkits.axisartist.grid_finder.ExtremeFinderSimple}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{ExtremeFinderSimple}}}{\emph{nx}, \emph{ny}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.FixedLocator} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator:mpl-toolkits-axisartist-grid-finder-fixedlocator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator::doc}}\index{FixedLocator (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{FixedLocator}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator:mpl_toolkits.axisartist.grid_finder.FixedLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{FixedLocator}}}{\emph{locs}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \index{set\_factor() (mpl\_toolkits.axisartist.grid\_finder.FixedLocator method)@\spxentry{set\_factor()}\spxextra{mpl\_toolkits.axisartist.grid\_finder.FixedLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator:mpl_toolkits.axisartist.grid_finder.FixedLocator.set_factor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_factor}}}{\emph{self}, \emph{f}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.FixedLocator}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FixedLocator:examples-using-mpl-toolkits-axisartist-grid-finder-fixedlocator}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.FormatterPrettyPrint} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint:mpl-toolkits-axisartist-grid-finder-formatterprettyprint}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint::doc}}\index{FormatterPrettyPrint (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{FormatterPrettyPrint}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint:mpl_toolkits.axisartist.grid_finder.FormatterPrettyPrint}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{FormatterPrettyPrint}}}{\emph{useMathText=True}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.GridFinder} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinder:mpl-toolkits-axisartist-grid-finder-gridfinder}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinder::doc}}\index{GridFinder (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{GridFinder}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinder:mpl_toolkits.axisartist.grid_finder.GridFinder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{GridFinder}}}{\emph{transform}, \emph{extreme\_finder=None}, \emph{grid\_locator1=None}, \emph{grid\_locator2=None}, \emph{tick\_formatter1=None}, \emph{tick\_formatter2=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.GridFinderBase}}}}} transform : transform from the image coordinate (which will be the transData of the axes to the world coordinate. or transform = (transform\_xy, inv\_transform\_xy) locator1, locator2 : grid locator for 1st and 2nd axis. \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.GridFinderBase} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl-toolkits-axisartist-grid-finder-gridfinderbase}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase::doc}}\index{GridFinderBase (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{GridFinderBase}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{GridFinderBase}}}{\emph{extreme\_finder}, \emph{grid\_locator1}, \emph{grid\_locator2}, \emph{tick\_formatter1=None}, \emph{tick\_formatter2=None}}{} Bases: \sphinxhref{https://docs.python.org/3/library/functions.html\#object}{\sphinxcode{\sphinxupquote{object}}} the transData of the axes to the world coordinate. locator1, locator2 : grid locator for 1st and 2nd axis. Derived must define "transform\_xy, inv\_transform\_xy" (may use update\_transform) \index{get\_grid\_info() (mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method)@\spxentry{get\_grid\_info()}\spxextra{mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase.get_grid_info}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_grid\_info}}}{\emph{self}, \emph{x1}, \emph{y1}, \emph{x2}, \emph{y2}}{}~\begin{description} \item[{lon\_values, lat\_values}] \leavevmode{[}list of grid values. if integer is given,{]} rough number of grids in each direction. \end{description} \end{fulllineitems} \index{update() (mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method)@\spxentry{update()}\spxextra{mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase.update}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update}}}{\emph{self}, \emph{**kw}}{}~ \end{fulllineitems} \index{update\_transform() (mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method)@\spxentry{update\_transform()}\spxextra{mpl\_toolkits.axisartist.grid\_finder.GridFinderBase method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.GridFinderBase:mpl_toolkits.axisartist.grid_finder.GridFinderBase.update_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_transform}}}{\emph{self}, \emph{aux\_trans}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_finder.MaxNLocator} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator:mpl-toolkits-axisartist-grid-finder-maxnlocator}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator::doc}}\index{MaxNLocator (class in mpl\_toolkits.axisartist.grid\_finder)@\spxentry{MaxNLocator}\spxextra{class in mpl\_toolkits.axisartist.grid\_finder}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator:mpl_toolkits.axisartist.grid_finder.MaxNLocator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.}}\sphinxbfcode{\sphinxupquote{MaxNLocator}}}{\emph{nbins=10}, \emph{steps=None}, \emph{trim=True}, \emph{integer=False}, \emph{symmetric=False}, \emph{prune=None}}{} Bases: {\hyperref[\detokenize{api/ticker_api:matplotlib.ticker.MaxNLocator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.ticker.MaxNLocator}}}}} \index{set\_factor() (mpl\_toolkits.axisartist.grid\_finder.MaxNLocator method)@\spxentry{set\_factor()}\spxextra{mpl\_toolkits.axisartist.grid\_finder.MaxNLocator method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator:mpl_toolkits.axisartist.grid_finder.MaxNLocator.set_factor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_factor}}}{\emph{self}, \emph{f}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.axisartist.grid\_finder.MaxNLocator}}} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder.MaxNLocator:examples-using-mpl-toolkits-axisartist-grid-finder-maxnlocator}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_axis\_direction.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_curvelinear\_grid2.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_demo\_floating\_axes.py} \end{itemize} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_axisartist\_simple\_axis\_pad.py} \end{itemize} \subsubsection{mpl\_toolkits.axisartist.grid\_helper\_curvelinear} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:module-mpl_toolkits.axisartist.grid_helper_curvelinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:mpl-toolkits-axisartist-grid-helper-curvelinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear::doc}}\index{mpl\_toolkits.axisartist.grid\_helper\_curvelinear (module)@\spxentry{mpl\_toolkits.axisartist.grid\_helper\_curvelinear}\spxextra{module}} An experimental support for curvilinear grid. \paragraph{Classes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:classes}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FixedAxisArtistHelper}}}}}(grid\_helper, side{[}, ...{]}) & Helper class for a fixed axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FloatingAxisArtistHelper}}}}}(grid\_helper, ...{[}, ...{]}) & nth\_coord = along which coordinate value varies. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{GridHelperCurveLinear}}}}}(aux\_trans{[}, ...{]}) & aux\_trans : a transform from the source (curved) coordinate to target (rectilinear) coordinate. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subparagraph{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl-toolkits-axisartist-grid-helper-curvelinear-fixedaxisartisthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper::doc}}\index{FixedAxisArtistHelper (class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear)@\spxentry{FixedAxisArtistHelper}\spxextra{class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.}}\sphinxbfcode{\sphinxupquote{FixedAxisArtistHelper}}}{\emph{grid\_helper}, \emph{side}, \emph{nth\_coord\_ticks=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Fixed}} Helper class for a fixed axis. \begin{description} \item[{nth\_coord = along which coordinate value varies.}] \leavevmode nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \end{description} \index{change\_tick\_coord() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method)@\spxentry{change\_tick\_coord()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper.change_tick_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{change\_tick\_coord}}}{\emph{self}, \emph{coord\_number=None}}{}~ \end{fulllineitems} \index{get\_tick\_iterators() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method)@\spxentry{get\_tick\_iterators()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper.get_tick_iterators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterators}}}{\emph{self}, \emph{axes}}{} tick\_loc, tick\_angle, tick\_label \end{fulllineitems} \index{get\_tick\_transform() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method)@\spxentry{get\_tick\_transform()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper.get_tick_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{update\_lim() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method)@\spxentry{update\_lim()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FixedAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FixedAxisArtistHelper.update_lim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_lim}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl-toolkits-axisartist-grid-helper-curvelinear-floatingaxisartisthelper}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper::doc}}\index{FloatingAxisArtistHelper (class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear)@\spxentry{FloatingAxisArtistHelper}\spxextra{class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.}}\sphinxbfcode{\sphinxupquote{FloatingAxisArtistHelper}}}{\emph{grid\_helper}, \emph{nth\_coord}, \emph{value}, \emph{axis\_direction=None}}{} Bases: \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.Floating}} \begin{description} \item[{nth\_coord = along which coordinate value varies.}] \leavevmode nth\_coord = 0 -\textgreater{} x axis, nth\_coord = 1 -\textgreater{} y axis \end{description} \index{get\_axislabel\_pos\_angle() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_axislabel\_pos\_angle()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_axislabel_pos_angle}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_pos\_angle}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_axislabel\_transform() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_axislabel\_transform()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_axislabel_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axislabel\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_line()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_line}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_line\_transform() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_line\_transform()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_line_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_line\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{get\_tick\_iterators() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_tick\_iterators()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_tick_iterators}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterators}}}{\emph{self}, \emph{axes}}{} tick\_loc, tick\_angle, tick\_label, (optionally) tick\_label \end{fulllineitems} \index{get\_tick\_transform() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{get\_tick\_transform()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.get_tick_transform}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_transform}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \index{set\_extremes() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{set\_extremes()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.set_extremes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_extremes}}}{\emph{self}, \emph{e1}, \emph{e2}}{}~ \end{fulllineitems} \index{update\_lim() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method)@\spxentry{update\_lim()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.FloatingAxisArtistHelper method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper:mpl_toolkits.axisartist.grid_helper_curvelinear.FloatingAxisArtistHelper.update_lim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_lim}}}{\emph{self}, \emph{axes}}{}~ \end{fulllineitems} \end{fulllineitems} \subparagraph{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl-toolkits-axisartist-grid-helper-curvelinear-gridhelpercurvelinear}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear::doc}}\index{GridHelperCurveLinear (class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear)@\spxentry{GridHelperCurveLinear}\spxextra{class in mpl\_toolkits.axisartist.grid\_helper\_curvelinear}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.}}\sphinxbfcode{\sphinxupquote{GridHelperCurveLinear}}}{\emph{aux\_trans}, \emph{extreme\_finder=None}, \emph{grid\_locator1=None}, \emph{grid\_locator2=None}, \emph{tick\_formatter1=None}, \emph{tick\_formatter2=None}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines.GridHelperBase:mpl_toolkits.axisartist.axislines.GridHelperBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.axislines.GridHelperBase}}}}} aux\_trans : a transform from the source (curved) coordinate to target (rectilinear) coordinate. An instance of MPL's Transform (inverse transform should be defined) or a tuple of two callable objects which defines the transform and its inverse. The callables need take two arguments of array of source coordinates and should return two target coordinates. e.g., \sphinxcode{\sphinxupquote{x2, y2 = trans(x1, y1)}} \index{get\_gridlines() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method)@\spxentry{get\_gridlines()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear.get_gridlines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_gridlines}}}{\emph{self}, \emph{which='major'}, \emph{axis='both'}}{} Return list of grid lines as a list of paths (list of points). \sphinxstyleemphasis{which} : "major" or "minor" \sphinxstyleemphasis{axis} : "both", "x" or "y" \end{fulllineitems} \index{get\_tick\_iterator() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method)@\spxentry{get\_tick\_iterator()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear.get_tick_iterator}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_iterator}}}{\emph{self}, \emph{nth\_coord}, \emph{axis\_side}, \emph{minor=False}}{}~ \end{fulllineitems} \index{new\_fixed\_axis() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method)@\spxentry{new\_fixed\_axis()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear.new_fixed_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_fixed\_axis}}}{\emph{self}, \emph{loc}, \emph{nth\_coord=None}, \emph{axis\_direction=None}, \emph{offset=None}, \emph{axes=None}}{}~ \end{fulllineitems} \index{new\_floating\_axis() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method)@\spxentry{new\_floating\_axis()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear.new_floating_axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{new\_floating\_axis}}}{\emph{self}, \emph{nth\_coord}, \emph{value}, \emph{axes=None}, \emph{axis\_direction='bottom'}}{}~ \end{fulllineitems} \index{update\_grid\_finder() (mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method)@\spxentry{update\_grid\_finder()}\spxextra{mpl\_toolkits.axisartist.grid\_helper\_curvelinear.GridHelperCurveLinear method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear:mpl_toolkits.axisartist.grid_helper_curvelinear.GridHelperCurveLinear.update_grid_finder}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_grid\_finder}}}{\emph{self}, \emph{aux\_trans=None}, \emph{**kw}}{}~ \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.axisartist.parasite\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.parasite_axes:module-mpl_toolkits.axisartist.parasite_axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.parasite_axes:mpl-toolkits-axisartist-parasite-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.axisartist.parasite_axes::doc}}\index{mpl\_toolkits.axisartist.parasite\_axes (module)@\spxentry{mpl\_toolkits.axisartist.parasite\_axes}\spxextra{module}} \subsection{Matplotlib axes\_grid Toolkit} \label{\detokenize{api/toolkits/index:matplotlib-axes-grid-toolkit}}\label{\detokenize{api/toolkits/index:toolkit-axes-grid-incl}} \begin{sphinxadmonition}{note}{Note:} AxesGrid toolkit has been a part of matplotlib since v 0.99. Originally, the toolkit had a single namespace of \sphinxstyleemphasis{axes\_grid}. In more recent version, the toolkit has divided into two separate namespace (\sphinxstyleemphasis{axes\_grid1} and \sphinxstyleemphasis{axisartist}). While \sphinxstyleemphasis{axes\_grid} namespace is maintained for the backward compatibility, use of \sphinxstyleemphasis{axes\_grid1} and \sphinxstyleemphasis{axisartist} is recommended. For the documentation on \sphinxcode{\sphinxupquote{axes\_grid}}, see the \sphinxhref{https://matplotlib.org/2.0.1/mpl\_toolkits/axes\_grid/index.html\#toolkit-axesgrid-index}{previous version of the docs}. \end{sphinxadmonition} \subsubsection{Matplotlib axes\_grid1 Toolkit} \label{\detokenize{api/toolkits/axes_grid1:matplotlib-axes-grid1-toolkit}}\label{\detokenize{api/toolkits/axes_grid1:toolkit-axesgrid1-index}}\label{\detokenize{api/toolkits/axes_grid1::doc}} The matplotlib \sphinxcode{\sphinxupquote{mpl\_toolkits.axes\_grid1}} toolkit is a collection of helper classes to ease displaying multiple images in matplotlib. While the aspect parameter in matplotlib adjust the position of the single axes, axes\_grid1 toolkit provides a framework to adjust the position of multiple axes according to their aspects. See {\hyperref[\detokenize{tutorials/toolkits/axes_grid:axes-grid1-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{What is axes\_grid1 toolkit?}}}} for a guide on the usage of axes\_grid1. \begin{figure}[htbp] \centering \sphinxhref{../../gallery/axes\_grid1/demo\_axes\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_axes_grid_001}.png}} \end{figure} \sphinxstylestrong{The submodules of the axes\_grid1 API are:} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:module-mpl_toolkits.axes_grid1.anchored_artists}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.anchored\_artists}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:module-mpl_toolkits.axes_grid1.axes_divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_divider}}}}} & The axes\_divider module provides helper classes to adjust the positions of multiple axes at drawing time. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:module-mpl_toolkits.axes_grid1.axes_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_grid}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:module-mpl_toolkits.axes_grid1.axes_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_rgb}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:module-mpl_toolkits.axes_grid1.axes_size}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.axes\_size}}}}} & Provides classes of simple units that will be used with AxesDivider class (or others) to determine the size of each axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:module-mpl_toolkits.axes_grid1.colorbar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.colorbar}}}}} & Colorbar toolkit with two classes and a function: \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:module-mpl_toolkits.axes_grid1.inset_locator}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.inset\_locator}}}}} & A collection of functions and objects for creating or placing inset axes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:module-mpl_toolkits.axes_grid1.mpl_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.mpl\_axes}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:module-mpl_toolkits.axes_grid1.parasite_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes\_grid1.parasite\_axes}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{Matplotlib axisartist Toolkit} \label{\detokenize{api/toolkits/axisartist:matplotlib-axisartist-toolkit}}\label{\detokenize{api/toolkits/axisartist:toolkit-axisartist-index}}\label{\detokenize{api/toolkits/axisartist::doc}} The \sphinxstyleemphasis{axisartist} namespace includes a derived Axes implementation ( \sphinxcode{\sphinxupquote{mpl\_toolkits.axisartist.Axes}}). The biggest difference is that the artists that are responsible for drawing axis lines, ticks, ticklabels, and axis labels are separated out from the mpl's Axis class. This change was strongly motivated to support curvilinear grid. You can find a tutorial describing usage of axisartist at the {\hyperref[\detokenize{tutorials/toolkits/axisartist:axisartist-users-guide-index}]{\sphinxcrossref{\DUrole{std,std-ref}{axisartist}}}} user guide. \begin{figure}[htbp] \centering \sphinxhref{../../gallery/axisartist/demo\_curvelinear\_grid.html}{\sphinxincludegraphics[scale=0.5]{{sphx_glr_demo_curvelinear_grid_001}.png}} \end{figure} \sphinxstylestrong{The submodules of the axisartist API are:} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.angle_helper:module-mpl_toolkits.axisartist.angle_helper}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.angle\_helper}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_divider:module-mpl_toolkits.axisartist.axes_divider}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_divider}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_grid:module-mpl_toolkits.axisartist.axes_grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_grid}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:module-mpl_toolkits.axisartist.axes_rgb}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axes\_rgb}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axis_artist:module-mpl_toolkits.axisartist.axis_artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axis\_artist}}}}} & axis\_artist.py module provides axis-related artists. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axisline_style:module-mpl_toolkits.axisartist.axisline_style}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axisline\_style}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.axislines:module-mpl_toolkits.axisartist.axislines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.axislines}}}}} & Axislines includes modified implementation of the Axes class. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.clip_path:module-mpl_toolkits.axisartist.clip_path}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.clip\_path}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.floating_axes:module-mpl_toolkits.axisartist.floating_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.floating\_axes}}}}} & An experimental support for curvilinear grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_finder:module-mpl_toolkits.axisartist.grid_finder}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.grid\_finder}}}}} & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:module-mpl_toolkits.axisartist.grid_helper_curvelinear}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.grid\_helper\_curvelinear}}}}} & An experimental support for curvilinear grid. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.axisartist.parasite_axes:module-mpl_toolkits.axisartist.parasite_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axisartist.parasite\_axes}}}}} & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \section{mplot3d API} \label{\detokenize{api/toolkits/mplot3d:mplot3d-api}}\label{\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-api}}\label{\detokenize{api/toolkits/mplot3d::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id1}}{\hyperref[\detokenize{api/toolkits/mplot3d:mplot3d-api}]{\sphinxcrossref{mplot3d API}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id2}}{\hyperref[\detokenize{api/toolkits/mplot3d:axes3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes3d}}}}} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id3}}{\hyperref[\detokenize{api/toolkits/mplot3d:axis3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis3d}}}}} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id4}}{\hyperref[\detokenize{api/toolkits/mplot3d:art3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d}}}}} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id5}}{\hyperref[\detokenize{api/toolkits/mplot3d:art3d-utility-functions}]{\sphinxcrossref{Art3D Utility Functions}}} \item {} \phantomsection\label{\detokenize{api/toolkits/mplot3d:id6}}{\hyperref[\detokenize{api/toolkits/mplot3d:proj3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d}}}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \phantomsection\label{\detokenize{api/toolkits/mplot3d:module-mpl_toolkits.mplot3d}}\index{mpl\_toolkits.mplot3d (module)@\spxentry{mpl\_toolkits.mplot3d}\spxextra{module}} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{axes3d}}} \label{\detokenize{api/toolkits/mplot3d:axes3d}}\label{\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-axesapi}} \begin{sphinxadmonition}{note}{Note:} Significant effort went into bringing axes3d to feature-parity with regular axes objects for version 1.1.0. However, more work remains. Please report any functions that do not behave as expected as a bug. In addition, help and patches would be greatly appreciated! \end{sphinxadmonition} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axes3d.Axes3D}}}}}(fig{[}, rect, azim, elev, ...{]}) & 3D axes object. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.mplot3d.axes3d.Axes3D} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl-toolkits-mplot3d-axes3d-axes3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D::doc}}\index{Axes3D (class in mpl\_toolkits.mplot3d.axes3d)@\spxentry{Axes3D}\spxextra{class in mpl\_toolkits.mplot3d.axes3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.axes3d.}}\sphinxbfcode{\sphinxupquote{Axes3D}}}{\emph{fig}, \emph{rect=None}, \emph{*args}, \emph{azim=-60}, \emph{elev=30}, \emph{zscale=None}, \emph{sharez=None}, \emph{proj\_type='persp'}, \emph{**kwargs}}{} Bases: \sphinxcode{\sphinxupquote{matplotlib.axes.\_axes.Axes}} 3D axes object. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{fig}}] \leavevmode{[}Figure{]} The parent figure. \item[{\sphinxstylestrong{rect}}] \leavevmode{[}(float, float, float, float){]} The \sphinxcode{\sphinxupquote{(left, bottom, width, height)}} axes position. \item[{\sphinxstylestrong{azim}}] \leavevmode{[}float, optional{]} Azimuthal viewing angle, defaults to -60. \item[{\sphinxstylestrong{elev}}] \leavevmode{[}float, optional{]} Elevation viewing angle, defaults to 30. \item[{\sphinxstylestrong{zscale}}] \leavevmode{[}{[}'function' \textbar{} 'functionlog' \textbar{} 'linear' \textbar{} 'log' \textbar{} 'logit' \textbar{} 'symlog'{]}, optional{]} The z scale. Note that currently, only a linear scale is supported. \item[{\sphinxstylestrong{sharez}}] \leavevmode{[}Axes3D, optional{]} Other axes to share z-limits with. \item[{\sphinxstylestrong{proj\_type}}] \leavevmode{[}\{'persp', 'ortho'\}{]} The projection type, default 'persp'. \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{New in version 1.2.1: }The \sphinxstyleemphasis{sharez} parameter. \index{add\_collection3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{add\_collection3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.add_collection3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_collection3d}}}{\emph{self}, \emph{col}, \emph{zs=0}, \emph{zdir='z'}}{} Add a 3D collection object to the plot. 2D collection types are converted to a 3D version by modifying the object and adding z coordinate information. \begin{description} \item[{Supported are:}] \leavevmode\begin{itemize} \item {} PolyCollection \item {} LineCollection \item {} PatchCollection \end{itemize} \end{description} \end{fulllineitems} \index{add\_contour\_set() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{add\_contour\_set()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.add_contour_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_contour\_set}}}{\emph{self}, \emph{cset}, \emph{extend3d=False}, \emph{stride=5}, \emph{zdir='z'}, \emph{offset=None}}{}~ \end{fulllineitems} \index{add\_contourf\_set() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{add\_contourf\_set()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.add_contourf_set}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{add\_contourf\_set}}}{\emph{self}, \emph{cset}, \emph{zdir='z'}, \emph{offset=None}}{}~ \end{fulllineitems} \index{auto\_scale\_xyz() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{auto\_scale\_xyz()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.auto_scale_xyz}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{auto\_scale\_xyz}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z=None}, \emph{had\_data=None}}{}~ \end{fulllineitems} \index{autoscale() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{autoscale()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.autoscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale}}}{\emph{self}, \emph{enable=True}, \emph{axis='both'}, \emph{tight=None}}{} Convenience method for simple axis view autoscaling. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale:matplotlib.axes.Axes.autoscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.autoscale()}}}}} for full explanation. Note that this function behaves the same, but for all three axes. Therefore, 'z' can be passed for \sphinxstyleemphasis{axis}, and 'both' applies to all three axes. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{autoscale\_view() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{autoscale\_view()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.autoscale_view}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{autoscale\_view}}}{\emph{self}, \emph{tight=None}, \emph{scalex=True}, \emph{scaley=True}, \emph{scalez=True}}{} Autoscale the view limits using the data limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.autoscale_view:matplotlib.axes.Axes.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.autoscale\_view()}}}}} for documentation. Note that this function applies to the 3D axes, and as such adds the \sphinxstyleemphasis{scalez} to the function arguments. \DUrole{versionmodified}{Changed in version 1.1.0: }Function signature was changed to better match the 2D version. \sphinxstyleemphasis{tight} is now explicitly a kwarg and placed first. \DUrole{versionmodified}{Changed in version 1.2.1: }This is now fully functional. \end{fulllineitems} \index{bar() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{bar()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.bar}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{bar}}}{\emph{self}, \emph{left}, \emph{height}, \emph{zs=0}, \emph{zdir='z'}, \emph{*args}, \emph{**kwargs}}{} Add 2D bar(s). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left}}] \leavevmode{[}1D array-like{]} The x coordinates of the left sides of the bars. \item[{\sphinxstylestrong{height}}] \leavevmode{[}1D array-like{]} The height of the bars. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}scalar or 1D array-like{]} Z coordinate of bars; if a single value is specified, it will be used for all bars. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} When plotting 2D data, the direction to use as z ('x', 'y' or 'z'); defaults to 'z'. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.bar:matplotlib.axes.Axes.bar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.bar}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{mpl\_toolkits.mplot3d.art3d.Patch3DCollection}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{bar3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{bar3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.bar3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{bar3d}}}{\emph{self}, \emph{x}, \emph{y}, \emph{z}, \emph{dx}, \emph{dy}, \emph{dz}, \emph{color=None}, \emph{zsort='average'}, \emph{shade=True}, \emph{*args}, \emph{**kwargs}}{} Generate a 3D barplot. This method creates three dimensional barplot where the width, depth, height, and color of the bars can all be uniquely set. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y, z}}] \leavevmode{[}array-like{]} The coordinates of the anchor point of the bars. \item[{\sphinxstylestrong{dx, dy, dz}}] \leavevmode{[}scalar or array-like{]} The width, depth, and height of the bars, respectively. \item[{\sphinxstylestrong{color}}] \leavevmode{[}sequence of valid color specifications, optional{]} The color of the bars can be specified globally or individually. This parameter can be: \begin{itemize} \item {} A single color value, to color all bars the same color. \item {} An array of colors of length N bars, to color each bar independently. \item {} An array of colors of length 6, to color the faces of the bars similarly. \item {} An array of colors of length 6 * N bars, to color each face independently. \end{itemize} When coloring the faces of the boxes specifically, this is the order of the coloring: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} -Z (bottom of box) \item {} +Z (top of box) \item {} -Y \item {} +Y \item {} -X \item {} +X \end{enumerate} \item[{\sphinxstylestrong{zsort}}] \leavevmode{[}str, optional{]} The z-axis sorting scheme passed onto {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}} \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool, optional (default = True){]} When true, this shades the dark sides of the bars (relative to the plot's source of light). \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Any additional keyword arguments are passed onto {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{collection}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}}{]} A collection of three dimensional polygons representing the bars. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{can\_pan() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{can\_pan()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.can_pan}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{can\_pan}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports the pan/zoom button functionality. 3D axes objects do not use the pan/zoom button. \end{fulllineitems} \index{can\_zoom() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{can\_zoom()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.can_zoom}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{can\_zoom}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if this axes supports the zoom box button functionality. 3D axes objects do not use the zoom box button. \end{fulllineitems} \index{cla() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{cla()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.cla}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{cla}}}{\emph{self}}{} Clear axes \end{fulllineitems} \index{clabel() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{clabel()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.clabel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{clabel}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} This function is currently not implemented for 3D axes. Returns \sphinxstyleemphasis{None}. \end{fulllineitems} \index{contour() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{contour()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.contour}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contour}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{extend3d=False}, \emph{stride=5}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{extend3d}}] \leavevmode{[}bool{]} Whether to extend contour in 3D; defaults to False. \item[{\sphinxstylestrong{stride}}] \leavevmode{[}int{]} Step size for extending contour. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contour}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{contour3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{contour3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.contour3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contour3D}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{extend3d=False}, \emph{stride=5}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{extend3d}}] \leavevmode{[}bool{]} Whether to extend contour in 3D; defaults to False. \item[{\sphinxstylestrong{stride}}] \leavevmode{[}int{]} Step size for extending contour. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contour:matplotlib.axes.Axes.contour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contour}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{contourf() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{contourf()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.contourf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contourf}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D filled contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contourf}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{New in version 1.1.0: }The \sphinxstyleemphasis{zdir} and \sphinxstyleemphasis{offset} parameters. \end{fulllineitems} \index{contourf3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{contourf3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.contourf3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{contourf3D}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D filled contour plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.contourf:matplotlib.axes.Axes.contourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.contourf}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.contour.QuadContourSet}] \leavevmode \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{New in version 1.1.0: }The \sphinxstyleemphasis{zdir} and \sphinxstyleemphasis{offset} parameters. \end{fulllineitems} \index{convert\_zunits() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{convert\_zunits()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.convert_zunits}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{convert\_zunits}}}{\emph{self}, \emph{z}}{} For artists in an axes, if the zaxis has units support, convert \sphinxstyleemphasis{z} using zaxis unit type \DUrole{versionmodified}{New in version 1.2.1.} \end{fulllineitems} \index{disable\_mouse\_rotation() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{disable\_mouse\_rotation()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.disable_mouse_rotation}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{disable\_mouse\_rotation}}}{\emph{self}}{} Disable mouse button callbacks. \end{fulllineitems} \index{draw() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{draw()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw everything (plot lines, axes, labels) \end{fulllineitems} \index{format\_coord() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{format\_coord()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.format_coord}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_coord}}}{\emph{self}, \emph{xd}, \emph{yd}}{} Given the 2D view coordinates attempt to guess a 3D coordinate. Looks for the nearest edge to the point and then assumes that the point is at the same z location as the nearest point on the edge. \end{fulllineitems} \index{format\_zdata() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{format\_zdata()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.format_zdata}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{format\_zdata}}}{\emph{self}, \emph{z}}{} Return \sphinxstyleemphasis{z} string formatted. This function will use the \sphinxcode{\sphinxupquote{fmt\_zdata}} attribute if it is callable, else will fall back on the zaxis major formatter \end{fulllineitems} \index{get\_autoscale\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_autoscale\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_autoscale_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_autoscale\_on}}}{\emph{self}}{} Get whether autoscaling is applied for all axes on plot commands \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{get\_autoscalez\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_autoscalez\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_autoscalez_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_autoscalez\_on}}}{\emph{self}}{} Get whether autoscaling for the z-axis is applied on plot commands \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{get\_axis\_position() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_axis\_position()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_axis_position}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_axis\_position}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_frame\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_frame\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_frame_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_frame\_on}}}{\emph{self}}{} Get whether the 3D axes panels are drawn. \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{get\_proj() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_proj()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_proj}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_proj}}}{\emph{self}}{} Create the projection matrix from the current viewing position. elev stores the elevation angle in the z plane azim stores the azimuth angle in the x,y plane dist is the distance of the eye viewing point from the object point. \end{fulllineitems} \index{get\_w\_lims() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_w\_lims()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_w_lims}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_w\_lims}}}{\emph{self}}{} Get 3D world limits. \end{fulllineitems} \index{get\_xlim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_xlim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xlim}}}{\emph{self}}{} Return the x-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left, right}}] \leavevmode{[}(float, float){]} The current x-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{set\_xbound}}, \sphinxcode{\sphinxupquote{get\_xbound}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{invert\_xaxis}}, \sphinxcode{\sphinxupquote{xaxis\_inverted}}}] \leavevmode \end{description} \subsubsection*{Notes} The x-axis may be inverted, in which case the \sphinxstyleemphasis{left} value will be greater than the \sphinxstyleemphasis{right} value. \DUrole{versionmodified}{Changed in version 1.1.0: }This function now correctly refers to the 3D x-limits \end{fulllineitems} \index{get\_xlim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_xlim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_xlim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_xlim3d}}}{\emph{self}}{} Return the x-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{left, right}}] \leavevmode{[}(float, float){]} The current x-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xlim}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{set\_xbound}}, \sphinxcode{\sphinxupquote{get\_xbound}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{invert\_xaxis}}, \sphinxcode{\sphinxupquote{xaxis\_inverted}}}] \leavevmode \end{description} \subsubsection*{Notes} The x-axis may be inverted, in which case the \sphinxstyleemphasis{left} value will be greater than the \sphinxstyleemphasis{right} value. \DUrole{versionmodified}{Changed in version 1.1.0: }This function now correctly refers to the 3D x-limits \end{fulllineitems} \index{get\_ylim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_ylim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ylim}}}{\emph{self}}{} Return the y-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom, top}}] \leavevmode{[}(float, float){]} The current y-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{set\_ybound}}, \sphinxcode{\sphinxupquote{get\_ybound}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{invert\_yaxis}}, \sphinxcode{\sphinxupquote{yaxis\_inverted}}}] \leavevmode \end{description} \subsubsection*{Notes} The y-axis may be inverted, in which case the \sphinxstyleemphasis{bottom} value will be greater than the \sphinxstyleemphasis{top} value. \DUrole{versionmodified}{Changed in version 1.1.0: }This function now correctly refers to the 3D y-limits. \end{fulllineitems} \index{get\_ylim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_ylim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_ylim3d}}}{\emph{self}}{} Return the y-axis view limits. \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bottom, top}}] \leavevmode{[}(float, float){]} The current y-axis limits in data coordinates. \end{description} \end{description}\end{quote} \sphinxstrong{See also:} \begin{description} \item[{{\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_ylim}}}}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{set\_ybound}}, \sphinxcode{\sphinxupquote{get\_ybound}}}] \leavevmode \item[{\sphinxcode{\sphinxupquote{invert\_yaxis}}, \sphinxcode{\sphinxupquote{yaxis\_inverted}}}] \leavevmode \end{description} \subsubsection*{Notes} The y-axis may be inverted, in which case the \sphinxstyleemphasis{bottom} value will be greater than the \sphinxstyleemphasis{top} value. \DUrole{versionmodified}{Changed in version 1.1.0: }This function now correctly refers to the 3D y-limits. \end{fulllineitems} \index{get\_zaxis() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zaxis()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zaxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zaxis}}}{\emph{self}}{} Return the \sphinxcode{\sphinxupquote{ZAxis}} ({\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axis}}}}}) instance. \end{fulllineitems} \index{get\_zbound() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zbound()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zbound}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zbound}}}{\emph{self}}{} Returns the z-axis numerical bounds where: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{lowerBound} \PYG{o}{\PYGZlt{}} \PYG{n}{upperBound} \end{sphinxVerbatim} \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{get\_zlabel() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zlabel()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zlabel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zlabel}}}{\emph{self}}{} Get the z-label text string. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{get\_zlim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zlim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zlim}}}{\emph{self}}{} Get 3D z limits. \end{fulllineitems} \index{get\_zlim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zlim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zlim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zlim3d}}}{\emph{self}}{} Get 3D z limits. \end{fulllineitems} \index{get\_zmajorticklabels() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zmajorticklabels()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zmajorticklabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zmajorticklabels}}}{\emph{self}}{} Get the ztick labels as a list of Text instances \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{get\_zminorticklabels() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zminorticklabels()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zminorticklabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zminorticklabels}}}{\emph{self}}{} Get the ztick labels as a list of Text instances \begin{sphinxadmonition}{note}{Note:} Minor ticks are not supported. This function was added only for completeness. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{get\_zscale() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zscale()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zscale}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_zticklabels() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zticklabels()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zticklabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zticklabels}}}{\emph{self}, \emph{minor=False}}{} Get ztick labels as a list of Text instances. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticklabels:matplotlib.axes.Axes.get_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_yticklabels()}}}}} for more details. \begin{sphinxadmonition}{note}{Note:} Minor ticks are not supported. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{get\_zticklines() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zticklines()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zticklines}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zticklines}}}{\emph{self}}{} Get ztick lines as a list of Line2D instances. Note that this function is provided merely for completeness. These lines are re-calculated as the display changes. \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{get\_zticks() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{get\_zticks()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.get_zticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_zticks}}}{\emph{self}, \emph{minor=False}}{} Return the z ticks as a list of locations See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.get_yticks:matplotlib.axes.Axes.get_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.get\_yticks()}}}}} for more details. \begin{sphinxadmonition}{note}{Note:} Minor ticks are not supported. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{grid() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{grid()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.grid}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{grid}}}{\emph{self}, \emph{b=True}, \emph{**kwargs}}{} Set / unset 3D grid. \begin{sphinxadmonition}{note}{Note:} Currently, this function does not behave the same as {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.grid:matplotlib.axes.Axes.grid}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.grid()}}}}}, but it is intended to eventually support that behavior. \end{sphinxadmonition} \DUrole{versionmodified}{Changed in version 1.1.0: }This function was changed, but not tested. Please report any bugs. \end{fulllineitems} \index{have\_units() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{have\_units()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.have_units}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{have\_units}}}{\emph{self}}{} Return \sphinxstyleemphasis{True} if units are set on the \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y}, or \sphinxstyleemphasis{z} axes \end{fulllineitems} \index{invert\_zaxis() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{invert\_zaxis()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.invert_zaxis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{invert\_zaxis}}}{\emph{self}}{} Invert the z-axis. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{locator\_params() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{locator\_params()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.locator_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{locator\_params}}}{\emph{self}, \emph{axis='both'}, \emph{tight=None}, \emph{**kwargs}}{} Convenience method for controlling tick locators. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.locator_params:matplotlib.axes.Axes.locator_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.locator\_params()}}}}} for full documentation. Note that this is for Axes3D objects, therefore, setting \sphinxstyleemphasis{axis} to 'both' will result in the parameters being set for all three axes. Also, \sphinxstyleemphasis{axis} can also take a value of 'z' to apply parameters to the z axis. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{margins() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{margins()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.margins}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{margins}}}{\emph{self}, \emph{*margins}, \emph{x=None}, \emph{y=None}, \emph{z=None}, \emph{tight=True}}{} Convenience method to set or retrieve autoscaling margins. \begin{description} \item[{signatures::}] \leavevmode margins() \end{description} returns xmargin, ymargin, zmargin \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{margins}\PYG{p}{(}\PYG{n}{margin}\PYG{p}{)} \PYG{n}{margins}\PYG{p}{(}\PYG{n}{xmargin}\PYG{p}{,} \PYG{n}{ymargin}\PYG{p}{,} \PYG{n}{zmargin}\PYG{p}{)} \PYG{n}{margins}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{n}{xmargin}\PYG{p}{,} \PYG{n}{y}\PYG{o}{=}\PYG{n}{ymargin}\PYG{p}{,} \PYG{n}{z}\PYG{o}{=}\PYG{n}{zmargin}\PYG{p}{)} \PYG{n}{margins}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{tight}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \end{sphinxVerbatim} All forms above set the xmargin, ymargin and zmargin parameters. All keyword parameters are optional. A single positional argument specifies xmargin, ymargin and zmargin. Passing both positional and keyword arguments for xmargin, ymargin, and/or zmargin is invalid. The \sphinxstyleemphasis{tight} parameter is passed to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.autoscale_view}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{autoscale\_view()}}}}}, which is executed after a margin is changed; the default here is \sphinxstyleemphasis{True}, on the assumption that when margins are specified, no additional padding to match tick marks is usually desired. Setting \sphinxstyleemphasis{tight} to \sphinxstyleemphasis{None} will preserve the previous setting. Specifying any margin changes only the autoscaling; for example, if \sphinxstyleemphasis{xmargin} is not None, then \sphinxstyleemphasis{xmargin} times the X data interval will be added to each end of that interval before it is used in autoscaling. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{mouse\_init() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{mouse\_init()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.mouse_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{mouse\_init}}}{\emph{self}, \emph{rotate\_btn=1}, \emph{zoom\_btn=3}}{} Initializes mouse button callbacks to enable 3D rotation of the axes. Also optionally sets the mouse buttons for 3D rotation and zooming. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{rotate\_btn}}] \leavevmode{[}int or list of int{]} The mouse button or buttons to use for 3D rotation of the axes; defaults to 1. \item[{\sphinxstylestrong{zoom\_btn}}] \leavevmode{[}int or list of int{]} The mouse button or buttons to use to zoom the 3D axes; defaults to 3. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{name (mpl\_toolkits.mplot3d.axes3d.Axes3D attribute)@\spxentry{name}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D attribute}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.name}}\pysigline{\sphinxbfcode{\sphinxupquote{name}}\sphinxbfcode{\sphinxupquote{ = '3d'}}} \end{fulllineitems} \index{plot() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{plot()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{plot}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{*args}, \emph{zdir='z'}, \emph{**kwargs}}{} Plot 2D or 3D data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs}}] \leavevmode{[}1D array-like{]} x coordinates of vertices. \item[{\sphinxstylestrong{ys}}] \leavevmode{[}1D array-like{]} y coordinates of vertices. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}scalar or 1D array-like{]} z coordinates of vertices; either one for all points or one for each point. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} When plotting 2D data, the direction to use as z ('x', 'y' or 'z'); defaults to 'z'. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{plot3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{plot3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{plot3D}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{*args}, \emph{zdir='z'}, \emph{**kwargs}}{} Plot 2D or 3D data. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs}}] \leavevmode{[}1D array-like{]} x coordinates of vertices. \item[{\sphinxstylestrong{ys}}] \leavevmode{[}1D array-like{]} y coordinates of vertices. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}scalar or 1D array-like{]} z coordinates of vertices; either one for all points or one for each point. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} When plotting 2D data, the direction to use as z ('x', 'y' or 'z'); defaults to 'z'. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.plot}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{plot\_surface() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{plot\_surface()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{plot\_surface}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{lightsource=None}, \emph{**kwargs}}{} Create a surface plot. By default it will be colored in shades of a solid color, but it also supports color mapping by supplying the \sphinxstyleemphasis{cmap} argument. \begin{sphinxadmonition}{note}{Note:} The \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount} kwargs, which both default to 50, determine the maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}2d arrays{]} Data values. \item[{\sphinxstylestrong{rcount, ccount}}] \leavevmode{[}int{]} Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 50. \DUrole{versionmodified}{New in version 2.0.} \item[{\sphinxstylestrong{rstride, cstride}}] \leavevmode{[}int{]} Downsampling stride in each direction. These arguments are mutually exclusive with \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount}. If only one of \sphinxstyleemphasis{rstride} or \sphinxstyleemphasis{cstride} is set, the other defaults to 10. 'classic' mode uses a default of \sphinxcode{\sphinxupquote{rstride = cstride = 10}} instead of the new default of \sphinxcode{\sphinxupquote{rcount = ccount = 50}}. \item[{\sphinxstylestrong{color}}] \leavevmode{[}color-like{]} Color of the surface patches. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}Colormap{]} Colormap of the surface patches. \item[{\sphinxstylestrong{facecolors}}] \leavevmode{[}array-like of colors.{]} Colors of each individual patch. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize{]} Normalization for the colormap. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}float{]} Bounds for the normalization. \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool{]} Whether to shade the facecolors. Defaults to True. Shading is always disabled when \sphinxcode{\sphinxupquote{cmap}} is specified. \item[{\sphinxstylestrong{lightsource}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}{]} The lightsource to use when \sphinxcode{\sphinxupquote{shade}} is True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{plot\_trisurf() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{plot\_trisurf()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{plot\_trisurf}}}{\emph{self}, \emph{*args}, \emph{color=None}, \emph{norm=None}, \emph{vmin=None}, \emph{vmax=None}, \emph{lightsource=None}, \emph{**kwargs}}{} Plot a triangulated surface. The (optional) triangulation can be specified in one of two ways; either: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{triangulation}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} where triangulation is a {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} object, or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{triangles}\PYG{o}{=}\PYG{n}{triangles}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} in which case a Triangulation object will be created. See {\hyperref[\detokenize{api/tri_api:matplotlib.tri.Triangulation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Triangulation}}}}} for a explanation of these possibilities. The remaining arguments are: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot\PYGZus{}trisurf}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{Z}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxstyleemphasis{Z} is the array of values to contour, one per point in the triangulation. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-like{]} Data values as 1D arrays. \item[{\sphinxstylestrong{color}}] \leavevmode Color of the surface patches. \item[{\sphinxstylestrong{cmap}}] \leavevmode A colormap for the surface patches. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize{]} An instance of Normalize to map values to colors. \item[{\sphinxstylestrong{vmin, vmax}}] \leavevmode{[}scalar, optional, default: None{]} Minimum and maximum value to map. \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool{]} Whether to shade the facecolors. Defaults to True. Shading is always disabled when \sphinxstyleemphasis{cmap} is specified. \item[{\sphinxstylestrong{lightsource}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}{]} The lightsource to use when \sphinxstyleemphasis{shade} is True. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other arguments are passed on to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection}}}}} \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{trisurf3d}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{trisurf3d_2}.pdf} \end{figure} \DUrole{versionmodified}{New in version 1.2.0: }This plotting function was added for the v1.2.0 release. \end{fulllineitems} \index{plot\_wireframe() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{plot\_wireframe()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{plot\_wireframe}}}{\emph{self}, \emph{X}, \emph{Y}, \emph{Z}, \emph{*args}, \emph{**kwargs}}{} Plot a 3D wireframe. \begin{sphinxadmonition}{note}{Note:} The \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount} kwargs, which both default to 50, determine the maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}2d arrays{]} Data values. \item[{\sphinxstylestrong{rcount, ccount}}] \leavevmode{[}int{]} Maximum number of samples used in each direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Setting a count to zero causes the data to be not sampled in the corresponding direction, producing a 3D line plot rather than a wireframe plot. Defaults to 50. \DUrole{versionmodified}{New in version 2.0.} \item[{\sphinxstylestrong{rstride, cstride}}] \leavevmode{[}int{]} Downsampling stride in each direction. These arguments are mutually exclusive with \sphinxstyleemphasis{rcount} and \sphinxstyleemphasis{ccount}. If only one of \sphinxstyleemphasis{rstride} or \sphinxstyleemphasis{cstride} is set, the other defaults to 1. Setting a stride to zero causes the data to be not sampled in the corresponding direction, producing a 3D line plot rather than a wireframe plot. 'classic' mode uses a default of \sphinxcode{\sphinxupquote{rstride = cstride = 1}} instead of the new default of \sphinxcode{\sphinxupquote{rcount = ccount = 50}}. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line3DCollection}}}}}. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{quiver() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{quiver()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.quiver}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{quiver}}}{\emph{X}, \emph{Y}, \emph{Z}, \emph{U}, \emph{V}, \emph{W}, \emph{/}, \emph{length=1}, \emph{arrow\_length\_ratio=.3}, \emph{pivot='tail'}, \emph{normalize=False}, \emph{**kwargs}}{} Plot a 3D field of arrows. The arguments could be array-like or scalars, so long as they they can be broadcast together. The arguments can also be masked arrays. If an element in any of argument is masked, then that corresponding quiver element will not be plotted. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-like{]} The x, y and z coordinates of the arrow locations (default is tail of arrow; see \sphinxstyleemphasis{pivot} kwarg) \item[{\sphinxstylestrong{U, V, W}}] \leavevmode{[}array-like{]} The x, y and z components of the arrow vectors \item[{\sphinxstylestrong{length}}] \leavevmode{[}float{]} The length of each quiver, default to 1.0, the unit is the same with the axes \item[{\sphinxstylestrong{arrow\_length\_ratio}}] \leavevmode{[}float{]} The ratio of the arrow head with respect to the quiver, default to 0.3 \item[{\sphinxstylestrong{pivot}}] \leavevmode{[}\{'tail', 'middle', 'tip'\}{]} The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name \sphinxstyleemphasis{pivot}. Default is 'tail' \item[{\sphinxstylestrong{normalize}}] \leavevmode{[}bool{]} When True, all of the arrows will be the same length. This defaults to False, where the arrows will be different lengths depending on the values of u,v,w. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Any additional keyword arguments are delegated to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{quiver3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{quiver3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.quiver3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{quiver3D}}}{\emph{X}, \emph{Y}, \emph{Z}, \emph{U}, \emph{V}, \emph{W}, \emph{/}, \emph{length=1}, \emph{arrow\_length\_ratio=.3}, \emph{pivot='tail'}, \emph{normalize=False}, \emph{**kwargs}}{} Plot a 3D field of arrows. The arguments could be array-like or scalars, so long as they they can be broadcast together. The arguments can also be masked arrays. If an element in any of argument is masked, then that corresponding quiver element will not be plotted. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-like{]} The x, y and z coordinates of the arrow locations (default is tail of arrow; see \sphinxstyleemphasis{pivot} kwarg) \item[{\sphinxstylestrong{U, V, W}}] \leavevmode{[}array-like{]} The x, y and z components of the arrow vectors \item[{\sphinxstylestrong{length}}] \leavevmode{[}float{]} The length of each quiver, default to 1.0, the unit is the same with the axes \item[{\sphinxstylestrong{arrow\_length\_ratio}}] \leavevmode{[}float{]} The ratio of the arrow head with respect to the quiver, default to 0.3 \item[{\sphinxstylestrong{pivot}}] \leavevmode{[}\{'tail', 'middle', 'tip'\}{]} The part of the arrow that is at the grid point; the arrow rotates about this point, hence the name \sphinxstyleemphasis{pivot}. Default is 'tail' \item[{\sphinxstylestrong{normalize}}] \leavevmode{[}bool{]} When True, all of the arrows will be the same length. This defaults to False, where the arrows will be different lengths depending on the values of u,v,w. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Any additional keyword arguments are delegated to {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{scatter() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{scatter()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.scatter}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scatter}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{zs=0}, \emph{zdir='z'}, \emph{s=20}, \emph{c=None}, \emph{depthshade=True}, \emph{*args}, \emph{**kwargs}}{} Create a scatter plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs, ys}}] \leavevmode{[}array-like{]} The data positions. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}float or array-like, optional, default: 0{]} The z-positions. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to place all points in the same plane. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z', '-x', '-y', '-z'\}, optional, default: 'z'{]} The axis direction for the \sphinxstyleemphasis{zs}. This is useful when plotting 2D data on a 3D Axes. The data must be passed as \sphinxstyleemphasis{xs}, \sphinxstyleemphasis{ys}. Setting \sphinxstyleemphasis{zdir} to 'y' then plots the data to the x-z-plane. See also \DUrole{xref,std,std-doc}{/gallery/mplot3d/2dcollections3d}. \item[{\sphinxstylestrong{s}}] \leavevmode{[}scalar or array-like, optional, default: 20{]} The marker size in points**2. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to make all markers the same size. \item[{\sphinxstylestrong{c}}] \leavevmode{[}color, sequence, or sequence of color, optional{]} The marker color. Possible values: \begin{itemize} \item {} A single color format string. \item {} A sequence of color specifications of length n. \item {} A sequence of n numbers to be mapped to colors using \sphinxstyleemphasis{cmap} and \sphinxstyleemphasis{norm}. \item {} A 2-D array in which the rows are RGB or RGBA. \end{itemize} For more details see the \sphinxstyleemphasis{c} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \item[{\sphinxstylestrong{depthshade}}] \leavevmode{[}bool, optional, default: True{]} Whether to shade the scatter markers to give the appearance of depth. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other arguments are passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{paths}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{scatter3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{scatter3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.scatter3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{scatter3D}}}{\emph{self}, \emph{xs}, \emph{ys}, \emph{zs=0}, \emph{zdir='z'}, \emph{s=20}, \emph{c=None}, \emph{depthshade=True}, \emph{*args}, \emph{**kwargs}}{} Create a scatter plot. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xs, ys}}] \leavevmode{[}array-like{]} The data positions. \item[{\sphinxstylestrong{zs}}] \leavevmode{[}float or array-like, optional, default: 0{]} The z-positions. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to place all points in the same plane. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z', '-x', '-y', '-z'\}, optional, default: 'z'{]} The axis direction for the \sphinxstyleemphasis{zs}. This is useful when plotting 2D data on a 3D Axes. The data must be passed as \sphinxstyleemphasis{xs}, \sphinxstyleemphasis{ys}. Setting \sphinxstyleemphasis{zdir} to 'y' then plots the data to the x-z-plane. See also \DUrole{xref,std,std-doc}{/gallery/mplot3d/2dcollections3d}. \item[{\sphinxstylestrong{s}}] \leavevmode{[}scalar or array-like, optional, default: 20{]} The marker size in points**2. Either an array of the same length as \sphinxstyleemphasis{xs} and \sphinxstyleemphasis{ys} or a single value to make all markers the same size. \item[{\sphinxstylestrong{c}}] \leavevmode{[}color, sequence, or sequence of color, optional{]} The marker color. Possible values: \begin{itemize} \item {} A single color format string. \item {} A sequence of color specifications of length n. \item {} A sequence of n numbers to be mapped to colors using \sphinxstyleemphasis{cmap} and \sphinxstyleemphasis{norm}. \item {} A 2-D array in which the rows are RGB or RGBA. \end{itemize} For more details see the \sphinxstyleemphasis{c} argument of {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \item[{\sphinxstylestrong{depthshade}}] \leavevmode{[}bool, optional, default: True{]} Whether to shade the scatter markers to give the appearance of depth. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other arguments are passed on to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.scatter:matplotlib.axes.Axes.scatter}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{scatter}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{paths}}] \leavevmode{[}{\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_autoscale\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_autoscale\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_autoscale_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_autoscale\_on}}}{\emph{self}, \emph{b}}{} Set whether autoscaling is applied on plot commands \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_autoscalez\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_autoscalez\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_autoscalez_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_autoscalez\_on}}}{\emph{self}, \emph{b}}{} Set whether autoscaling for the z-axis is applied on plot commands \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_axis\_off() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_axis\_off()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_axis_off}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis\_off}}}{\emph{self}}{} Turn the x- and y-axis off. This affects the axis lines, ticks, ticklabels, grid and axis labels. \end{fulllineitems} \index{set\_axis\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_axis\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_axis_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_axis\_on}}}{\emph{self}}{} Turn the x- and y-axis on. This affects the axis lines, ticks, ticklabels, grid and axis labels. \end{fulllineitems} \index{set\_frame\_on() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_frame\_on()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_frame_on}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_frame\_on}}}{\emph{self}, \emph{b}}{} Set whether the 3D axes panels are drawn. \DUrole{versionmodified}{New in version 1.1.0.} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{b}}] \leavevmode{[}bool{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_proj\_type() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_proj\_type()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_proj_type}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_proj\_type}}}{\emph{self}, \emph{proj\_type}}{} Set the projection type. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{proj\_type}}] \leavevmode{[}str{]} Type of projection, accepts 'persp' and 'ortho'. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_title() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_title()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_title}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_title}}}{\emph{self}, \emph{label}, \emph{fontdict=None}, \emph{loc='center'}, \emph{**kwargs}}{} Set a title for the axes. Set one of the three available axes titles. The available titles are positioned above the axes in the center, flush with the left edge, and flush with the right edge. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{label}}] \leavevmode{[}str{]} Text to use for the title \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dict{]} A dictionary controlling the appearance of the title text, the default \sphinxcode{\sphinxupquote{fontdict}} is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{\PYGZob{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontsize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titlesize}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{fontweight}\PYG{l+s+s1}{\PYGZsq{}} \PYG{p}{:} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{axes.titleweight}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{verticalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{baseline}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{horizontalalignment}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{loc}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} \item[{\sphinxstylestrong{loc}}] \leavevmode{[}\{'center', 'left', 'right'\}, str, optional{]} Which title to set, defaults to 'center' \item[{\sphinxstylestrong{pad}}] \leavevmode{[}float{]} The offset of the title from the top of the axes, in points. Default is \sphinxcode{\sphinxupquote{None}} to use rcParams{[}'axes.titlepad'{]}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The matplotlib text instance representing the title \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties{]} Other keyword arguments are text properties, see {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} for a list of valid text properties. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_top\_view() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_top\_view()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_top_view}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_top\_view}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_xlim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_xlim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_xlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xlim}}}{\emph{self}, \emph{left=None}, \emph{right=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{xmin=None}, \emph{xmax=None}}{} Set 3D x limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim()}}}}} for full documentation. \end{fulllineitems} \index{set\_xlim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_xlim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_xlim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xlim3d}}}{\emph{self}, \emph{left=None}, \emph{right=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{xmin=None}, \emph{xmax=None}}{} Set 3D x limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xlim:matplotlib.axes.Axes.set_xlim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_xlim()}}}}} for full documentation. \end{fulllineitems} \index{set\_xscale() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_xscale()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_xscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_xscale}}}{\emph{self}, \emph{value}, \emph{**kwargs}}{} Set the x-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{set\_ylim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_ylim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_ylim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ylim}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{ymin=None}, \emph{ymax=None}}{} Set 3D y limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}} for full documentation. \end{fulllineitems} \index{set\_ylim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_ylim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_ylim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_ylim3d}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{ymin=None}, \emph{ymax=None}}{} Set 3D y limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}} for full documentation. \end{fulllineitems} \index{set\_yscale() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_yscale()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_yscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_yscale}}}{\emph{self}, \emph{value}, \emph{**kwargs}}{} Set the y-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales can then also be used here. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{set\_zbound() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zbound()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zbound}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zbound}}}{\emph{self}, \emph{lower=None}, \emph{upper=None}}{} Set the lower and upper numerical bounds of the z-axis. This method will honor axes inversion regardless of parameter order. It will not change the \sphinxcode{\sphinxupquote{\_autoscaleZon}} attribute. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{set\_zlabel() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zlabel()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zlabel}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zlabel}}}{\emph{self}, \emph{zlabel}, \emph{fontdict=None}, \emph{labelpad=None}, \emph{**kwargs}}{} Set zlabel. See doc for \sphinxcode{\sphinxupquote{set\_ylabel()}} for description. \end{fulllineitems} \index{set\_zlim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zlim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zlim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zlim}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{zmin=None}, \emph{zmax=None}}{} Set 3D z limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}} for full documentation \end{fulllineitems} \index{set\_zlim3d() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zlim3d()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zlim3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zlim3d}}}{\emph{self}, \emph{bottom=None}, \emph{top=None}, \emph{emit=True}, \emph{auto=False}, \emph{*}, \emph{zmin=None}, \emph{zmax=None}}{} Set 3D z limits. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_ylim:matplotlib.axes.Axes.set_ylim}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_ylim()}}}}} for full documentation \end{fulllineitems} \index{set\_zmargin() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zmargin()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zmargin}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zmargin}}}{\emph{self}, \emph{m}}{} Set padding of Z data limits prior to autoscaling. \sphinxstyleemphasis{m} times the data interval will be added to each end of that interval before it is used in autoscaling. accepts: float in range 0 to 1 \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{set\_zscale() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zscale()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zscale}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zscale}}}{\emph{self}, \emph{value}, \emph{**kwargs}}{} Set the z-axis scale. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{value}}] \leavevmode{[}\{"linear", "log", "symlog", "logit", ...\}{]} The axis scale type to apply. \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Different keyword arguments are accepted, depending on the scale. See the respective class keyword arguments: \begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LinearScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LinearScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.SymmetricalLogScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.SymmetricalLogScale}}}}} \item {} {\hyperref[\detokenize{api/scale_api:matplotlib.scale.LogitScale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.LogitScale}}}}} \end{itemize} \end{description} \end{description}\end{quote} \subsubsection*{Notes} Currently, Axes3D objects only supports linear scales. Other scales may or may not work, and support for these is improving with each release. By default, Matplotlib supports the above mentioned scales. Additionally, custom scales may be registered using {\hyperref[\detokenize{api/scale_api:matplotlib.scale.register_scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.register\_scale}}}}}. These scales may then also be used here as support is added. \end{fulllineitems} \index{set\_zticklabels() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zticklabels()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zticklabels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zticklabels}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Set z-axis tick labels. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticklabels:matplotlib.axes.Axes.set_yticklabels}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_yticklabels()}}}}} for more details. \begin{sphinxadmonition}{note}{Note:} Minor ticks are not supported by Axes3D objects. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{set\_zticks() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{set\_zticks()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.set_zticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zticks}}}{\emph{self}, \emph{*args}, \emph{**kwargs}}{} Set z-axis tick locations. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yticks:matplotlib.axes.Axes.set_yticks}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.set\_yticks()}}}}} for more details. \begin{sphinxadmonition}{note}{Note:} Minor ticks are not supported. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0.} \end{fulllineitems} \index{text() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{text()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.text}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{text}}}{\emph{self}, \emph{x}, \emph{y}, \emph{z}, \emph{s}, \emph{zdir=None}, \emph{**kwargs}}{} Add text to the plot. kwargs will be passed on to Axes.text, except for the \sphinxcode{\sphinxupquote{zdir}} keyword, which sets the direction to be used as the z direction. \end{fulllineitems} \index{text2D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{text2D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.text2D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{text2D}}}{\emph{self}, \emph{x}, \emph{y}, \emph{s}, \emph{fontdict=None}, \emph{withdash=\textless{}deprecated parameter\textgreater{}}, \emph{**kwargs}}{} Add text to the axes. Add the text \sphinxstyleemphasis{s} to the axes at location \sphinxstyleemphasis{x}, \sphinxstyleemphasis{y} in data coordinates. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y}}] \leavevmode{[}scalars{]} The position to place the text. By default, this is in data coordinates. The coordinate system can be changed using the \sphinxstyleemphasis{transform} parameter. \item[{\sphinxstylestrong{s}}] \leavevmode{[}str{]} The text. \item[{\sphinxstylestrong{fontdict}}] \leavevmode{[}dictionary, optional, default: None{]} A dictionary to override the default text properties. If fontdict is None, the defaults are determined by your rc parameters. \item[{\sphinxstylestrong{withdash}}] \leavevmode{[}boolean, optional, default: False{]} Creates a {\hyperref[\detokenize{api/text_api:matplotlib.text.TextWithDash}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{TextWithDash}}}}} instance instead of a {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{text}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}{]} The created {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} instance. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode{[}{\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} properties.{]} Other miscellaneous text parameters. \end{description} \end{description}\end{quote} \subsubsection*{Examples} Individual keyword arguments can be used to override any given parameter: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{fontsize}\PYG{o}{=}\PYG{l+m+mi}{12}\PYG{p}{)} \end{sphinxVerbatim} The default transform specifies that text is in data coords, alternatively, you can specify text in axis coords (0,0 is lower-left and 1,1 is upper-right). The example below places text in the center of the axes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+m+mf}{0.5}\PYG{p}{,} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{matplotlib}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{horizontalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{g+gp}{... } \PYG{n}{verticalalignment}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{center}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{transform}\PYG{o}{=}\PYG{n}{ax}\PYG{o}{.}\PYG{n}{transAxes}\PYG{p}{)} \end{sphinxVerbatim} You can put a rectangular box around the text instance (e.g., to set a background color) by using the keyword \sphinxcode{\sphinxupquote{bbox}}. \sphinxcode{\sphinxupquote{bbox}} is a dictionary of {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Rectangle:matplotlib.patches.Rectangle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Rectangle}}}}} properties. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{text}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{bbox}\PYG{o}{=}\PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{facecolor}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{red}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} \end{fulllineitems} \index{text3D() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{text3D()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.text3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{text3D}}}{\emph{self}, \emph{x}, \emph{y}, \emph{z}, \emph{s}, \emph{zdir=None}, \emph{**kwargs}}{} Add text to the plot. kwargs will be passed on to Axes.text, except for the \sphinxcode{\sphinxupquote{zdir}} keyword, which sets the direction to be used as the z direction. \end{fulllineitems} \index{tick\_params() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{tick\_params()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tick_params}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tick\_params}}}{\emph{self}, \emph{axis='both'}, \emph{**kwargs}}{} Convenience method for changing the appearance of ticks and tick labels. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tick_params:matplotlib.axes.Axes.tick_params}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tick\_params()}}}}} for more complete documentation. The only difference is that setting \sphinxstyleemphasis{axis} to 'both' will mean that the settings are applied to all three axes. Also, the \sphinxstyleemphasis{axis} parameter also accepts a value of 'z', which would mean to apply to only the z-axis. Also, because of how Axes3D objects are drawn very differently from regular 2D axes, some of these settings may have ambiguous meaning. For simplicity, the 'z' axis will accept settings as if it was like the 'y' axis. \begin{sphinxadmonition}{note}{Note:} While this function is currently implemented, the core part of the Axes3D object may ignore some of these settings. Future releases will fix this. Priority will be given to those who file bugs. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{ticklabel\_format() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{ticklabel\_format()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.ticklabel_format}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{ticklabel\_format}}}{\emph{self}, \emph{*}, \emph{style=''}, \emph{scilimits=None}, \emph{useOffset=None}, \emph{axis='both'}}{} Convenience method for manipulating the ScalarFormatter used by default for linear axes in Axed3D objects. See {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.ticklabel_format:matplotlib.axes.Axes.ticklabel_format}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.ticklabel\_format()}}}}} for full documentation. Note that this version applies to all three axes of the Axes3D object. Therefore, the \sphinxstyleemphasis{axis} argument will also accept a value of 'z' and the value of 'both' will apply to all three axes. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{tricontour() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{tricontour()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tricontour}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tricontour}}}{\emph{self}, \emph{*args}, \emph{extend3d=False}, \emph{stride=5}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D contour plot. \DUrole{versionmodified}{Changed in version 1.3.0: }Added support for custom triangulations \begin{sphinxadmonition}{note}{Note:} This method currently produces incorrect output due to a longstanding bug in 3D PolyCollection rendering. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{extend3d}}] \leavevmode{[}bool{]} Whether to extend contour in 3D; defaults to False. \item[{\sphinxstylestrong{stride}}] \leavevmode{[}int{]} Step size for extending contour. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontour:matplotlib.axes.Axes.tricontour}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tricontour}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.tri.tricontour.TriContourSet}] \leavevmode \end{description} \end{description}\end{quote} \end{fulllineitems} \index{tricontourf() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{tricontourf()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tricontourf}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tricontourf}}}{\emph{self}, \emph{*args}, \emph{zdir='z'}, \emph{offset=None}, \emph{**kwargs}}{} Create a 3D filled contour plot. \begin{sphinxadmonition}{note}{Note:} This method currently produces incorrect output due to a longstanding bug in 3D PolyCollection rendering. \end{sphinxadmonition} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{X, Y, Z}}] \leavevmode{[}array-likes{]} Input data. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z'\}{]} The direction to use; defaults to 'z'. \item[{\sphinxstylestrong{offset}}] \leavevmode{[}scalar{]} If specified, plot a projection of the contour lines at this position in a plane normal to zdir \item[{\sphinxstylestrong{*args, **kwargs}}] \leavevmode Other arguments are forwarded to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.tricontourf:matplotlib.axes.Axes.tricontourf}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.tricontourf}}}}}. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{matplotlib.tri.tricontour.TriContourSet}] \leavevmode \end{description} \end{description}\end{quote} \subsubsection*{Notes} \DUrole{versionmodified}{New in version 1.1.0: }The \sphinxstyleemphasis{zdir} and \sphinxstyleemphasis{offset} parameters. \DUrole{versionmodified}{Changed in version 1.3.0: }Added support for custom triangulations \end{fulllineitems} \index{tunit\_cube() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{tunit\_cube()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_cube}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tunit\_cube}}}{\emph{self}, \emph{vals=None}, \emph{M=None}}{}~ \end{fulllineitems} \index{tunit\_edges() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{tunit\_edges()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.tunit_edges}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{tunit\_edges}}}{\emph{self}, \emph{vals=None}, \emph{M=None}}{}~ \end{fulllineitems} \index{unit\_cube() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{unit\_cube()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.unit_cube}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{unit\_cube}}}{\emph{self}, \emph{vals=None}}{}~ \end{fulllineitems} \index{update\_datalim() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{update\_datalim()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.update_datalim}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{update\_datalim}}}{\emph{self}, \emph{xys}, \emph{**kwargs}}{} Extend the \sphinxcode{\sphinxupquote{dataLim}} BBox to include the given points. If no data is set currently, the BBox will ignore its limits and set the bound to be the bounds of the xydata (\sphinxstyleemphasis{xys}). Otherwise, it will compute the bounds of the union of its current data and the data in \sphinxstyleemphasis{xys}. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{xys}}] \leavevmode{[}2D array-like{]} The points to include in the data limits BBox. This can be either a list of (x, y) tuples or a Nx2 array. \item[{\sphinxstylestrong{updatex, updatey}}] \leavevmode{[}bool, optional, default \sphinxstyleemphasis{True}{]} Whether to update the x/y limits. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{view\_init() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{view\_init()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.view_init}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{view\_init}}}{\emph{self}, \emph{elev=None}, \emph{azim=None}}{} Set the elevation and azimuth of the axes. This can be used to rotate the axes programmatically. 'elev' stores the elevation angle in the z plane. 'azim' stores the azimuth angle in the x,y plane. if elev or azim are None (default), then the initial value is used which was specified in the {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes3D}}}}} constructor. \end{fulllineitems} \index{voxels() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{voxels()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.voxels}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{voxels}}}{\sphinxoptional{\emph{x}, \emph{y}, \emph{z}}, \emph{/}, \emph{filled}, \emph{facecolors=None}, \emph{edgecolors=None}, \emph{**kwargs}}{} Plot a set of filled voxels All voxels are plotted as 1x1x1 cubes on the axis, with filled{[}0,0,0{]} placed with its lower corner at the origin. Occluded faces are not plotted. \DUrole{versionmodified}{New in version 2.1.} \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{filled}}] \leavevmode{[}3D np.array of bool{]} A 3d array of values, with truthy values indicating which voxels to fill \item[{\sphinxstylestrong{x, y, z}}] \leavevmode{[}3D np.array, optional{]} The coordinates of the corners of the voxels. This should broadcast to a shape one larger in every dimension than the shape of \sphinxcode{\sphinxupquote{filled}}. These can be used to plot non-cubic voxels. If not specified, defaults to increasing integers along each axis, like those returned by \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.indices.html\#numpy.indices}{\sphinxcode{\sphinxupquote{indices()}}}. As indicated by the \sphinxcode{\sphinxupquote{/}} in the function signature, these arguments can only be passed positionally. \item[{\sphinxstylestrong{facecolors, edgecolors}}] \leavevmode{[}array\_like, optional{]} The color to draw the faces and edges of the voxels. Can only be passed as keyword arguments. This parameter can be: \begin{itemize} \item {} A single color value, to color all voxels the same color. This can be either a string, or a 1D rgb/rgba array \item {} \sphinxcode{\sphinxupquote{None}}, the default, to use a single color for the faces, and the style default for the edges. \item {} A 3D ndarray of color names, with each item the color for the corresponding voxel. The size must match the voxels. \item {} A 4D ndarray of rgb/rgba data, with the components along the last axis. \end{itemize} \item[{\sphinxstylestrong{shade}}] \leavevmode{[}bool{]} Whether to shade the facecolors. Defaults to True. Shading is always disabled when \sphinxstyleemphasis{cmap} is specified. \DUrole{versionmodified}{New in version 3.1.} \item[{\sphinxstylestrong{lightsource}}] \leavevmode{[}{\hyperref[\detokenize{api/_as_gen/matplotlib.colors.LightSource:matplotlib.colors.LightSource}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LightSource}}}}}{]} The lightsource to use when \sphinxstyleemphasis{shade} is True. \DUrole{versionmodified}{New in version 3.1.} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode Additional keyword arguments to pass onto {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Poly3DCollection()}}}}} \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{faces}}] \leavevmode{[}dict{]} A dictionary indexed by coordinate, where \sphinxcode{\sphinxupquote{faces{[}i,j,k{]}}} is a \sphinxcode{\sphinxupquote{Poly3DCollection}} of the faces drawn for the voxel \sphinxcode{\sphinxupquote{filled{[}i,j,k{]}}}. If no faces were drawn for a given voxel, either because it was not asked to be drawn, or it is fully occluded, then \sphinxcode{\sphinxupquote{(i,j,k) not in faces}}. \end{description} \end{description}\end{quote} \subsubsection*{Examples} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{voxels}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{voxels_rgb}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{voxels_torus}.pdf} \end{figure} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{voxels_numpy_logo}.pdf} \end{figure} \end{fulllineitems} \index{zaxis\_date() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{zaxis\_date()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.zaxis_date}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zaxis\_date}}}{\emph{self}, \emph{tz=None}}{} Sets up z-axis ticks and labels that treat the z data as dates. \sphinxstyleemphasis{tz} is a timezone string or \sphinxcode{\sphinxupquote{tzinfo}} instance. Defaults to rc value. \begin{sphinxadmonition}{note}{Note:} This function is merely provided for completeness. Axes3D objects do not officially support dates for ticks, and so this may or may not work as expected. \end{sphinxadmonition} \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \index{zaxis\_inverted() (mpl\_toolkits.mplot3d.axes3d.Axes3D method)@\spxentry{zaxis\_inverted()}\spxextra{mpl\_toolkits.mplot3d.axes3d.Axes3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D:mpl_toolkits.mplot3d.axes3d.Axes3D.zaxis_inverted}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{zaxis\_inverted}}}{\emph{self}}{} Returns True if the z-axis is inverted. \DUrole{versionmodified}{New in version 1.1.0: }This function was added, but not tested. Please report any bugs. \end{fulllineitems} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{axis3d}}} \label{\detokenize{api/toolkits/mplot3d:axis3d}}\label{\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-axisapi}} \begin{sphinxadmonition}{note}{Note:} See \sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.axis3d.\_axinfo}} for a dictionary containing constants that may be modified for controlling the look and feel of mplot3d axes (e.g., label spacing, font colors and panel colors). Historically, axis3d has suffered from having hard-coded constants that precluded user adjustments, and this dictionary was implemented in version 1.1 as a stop-gap measure. \end{sphinxadmonition} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{axis3d.Axis}}}}}(adir, v\_intervalx, d\_intervalx, ...) & An Axis class for the 3D plots. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.mplot3d.axis3d.Axis} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl-toolkits-mplot3d-axis3d-axis}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis::doc}}\index{Axis (class in mpl\_toolkits.mplot3d.axis3d)@\spxentry{Axis}\spxextra{class in mpl\_toolkits.mplot3d.axis3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.axis3d.}}\sphinxbfcode{\sphinxupquote{Axis}}}{\emph{adir}, \emph{v\_intervalx}, \emph{d\_intervalx}, \emph{axes}, \emph{*args}, \emph{rotate\_label=None}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/axis_api:matplotlib.axis.XAxis}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axis.XAxis}}}}} An Axis class for the 3D plots. \index{draw() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{draw()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the axis lines, grid lines, tick lines and labels \end{fulllineitems} \index{draw\_pane() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{draw\_pane()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.draw_pane}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw\_pane}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_major\_ticks() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{get\_major\_ticks()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_major_ticks}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_major\_ticks}}}{\emph{self}, \emph{numticks=None}}{} Get the tick instances; grow as necessary. \end{fulllineitems} \index{get\_rotate\_label() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{get\_rotate\_label()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_rotate_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_rotate\_label}}}{\emph{self}, \emph{text}}{}~ \end{fulllineitems} \index{get\_tick\_positions() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{get\_tick\_positions()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_tick_positions}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tick\_positions}}}{\emph{self}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \index{get\_tightbbox() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{get\_tightbbox()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Return a bounding box that encloses the axis. It only accounts tick labels, axis label, and offsetText. \end{fulllineitems} \index{get\_view\_interval() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{get\_view\_interval()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.get_view_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_view\_interval}}}{\emph{self}}{} Return the Interval instance for this axis view limits. \end{fulllineitems} \index{init3d() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{init3d()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.init3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{init3d}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_pane\_color() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{set\_pane\_color()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.set_pane_color}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pane\_color}}}{\emph{self}, \emph{color}}{} Set pane color to a RGBA tuple. \end{fulllineitems} \index{set\_pane\_pos() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{set\_pane\_pos()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.set_pane_pos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_pane\_pos}}}{\emph{self}, \emph{xys}}{}~ \end{fulllineitems} \index{set\_rotate\_label() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{set\_rotate\_label()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.set_rotate_label}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_rotate\_label}}}{\emph{self}, \emph{val}}{} Whether to rotate the axis label: True, False or None. If set to None the label will be rotated if longer than 4 chars. \end{fulllineitems} \index{set\_view\_interval() (mpl\_toolkits.mplot3d.axis3d.Axis method)@\spxentry{set\_view\_interval()}\spxextra{mpl\_toolkits.mplot3d.axis3d.Axis method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.axis3d.Axis:mpl_toolkits.mplot3d.axis3d.Axis.set_view_interval}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_view\_interval}}}{\emph{self}, \emph{vmin}, \emph{vmax}, \emph{ignore=False}}{} Set the axis view limits. This method is for internal use; Matplotlib users should typically use e.g. \sphinxcode{\sphinxupquote{set\_xlim}} and \sphinxcode{\sphinxupquote{set\_ylim}}. If \sphinxstyleemphasis{ignore} is False (the default), this method will never reduce the preexisting view limits, only expand them if \sphinxstyleemphasis{vmin} or \sphinxstyleemphasis{vmax} are not within them. Moreover, the order of \sphinxstyleemphasis{vmin} and \sphinxstyleemphasis{vmax} does not matter; the orientation of the axis will not change. If \sphinxstyleemphasis{ignore} is True, the view limits will be set exactly to \sphinxcode{\sphinxupquote{(vmin, vmax)}} in that order. \end{fulllineitems} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{art3d}}} \label{\detokenize{api/toolkits/mplot3d:art3d}}\label{\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-artapi}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Line3D}}}}}(xs, ys, zs, *args, **kwargs) & 3D line object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Line3DCollection}}}}}(segments{[}, ...{]}) & A collection of 3D lines. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Patch3D}}}}}(*args{[}, zs, zdir{]}) & 3D patch object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Patch3DCollection}}}}}(*args{[}, zs, zdir, ...{]}) & A collection of 3D patches. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Path3DCollection}}}}}(*args{[}, zs, zdir, ...{]}) & A collection of 3D paths. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D:mpl_toolkits.mplot3d.art3d.PathPatch3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.PathPatch3D}}}}}(path, *{[}, zs, zdir{]}) & 3D PathPatch object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Poly3DCollection}}}}}(verts, *args{[}, zsort{]}) & A collection of 3D polygons. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl_toolkits.mplot3d.art3d.Text3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.Text3D}}}}}({[}x, y, z, text, zdir{]}) & Text object with 3D position and direction. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.mplot3d.art3d.Line3D} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl-toolkits-mplot3d-art3d-line3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D::doc}}\index{Line3D (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Line3D}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Line3D}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{*args}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines.Line2D}}}}} 3D line object. Keyword arguments are passed onto {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D()}}}}}. \index{draw() (mpl\_toolkits.mplot3d.art3d.Line3D method)@\spxentry{draw()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{get\_data\_3d() (mpl\_toolkits.mplot3d.art3d.Line3D method)@\spxentry{get\_data\_3d()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.get_data_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_data\_3d}}}{\emph{self}}{} Get the current data \begin{quote}\begin{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{verts3d}}] \leavevmode{[}length-3 tuple or array\_likes{]} The current data as a tuple or array\_likes \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Line3D method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{zs=0}, \emph{zdir='z'}}{}~ \end{fulllineitems} \index{set\_data\_3d() (mpl\_toolkits.mplot3d.art3d.Line3D method)@\spxentry{set\_data\_3d()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3D:mpl_toolkits.mplot3d.art3d.Line3D.set_data_3d}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_data\_3d}}}{\emph{self}, \emph{*args}}{} Set the x, y and z data \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x}}] \leavevmode{[}array\_like{]} The x-data to be plotted \item[{\sphinxstylestrong{y}}] \leavevmode{[}array\_like{]} The y-data to be plotted \item[{\sphinxstylestrong{z}}] \leavevmode{[}array\_like{]} The z-data to be plotted \end{description} \end{description}\end{quote} \subsubsection*{Notes} Accepts x, y, z arguments or a single array\_like (x, y, z) \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Line3DCollection} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl-toolkits-mplot3d-art3d-line3dcollection}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection::doc}}\index{Line3DCollection (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Line3DCollection}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Line3DCollection}}}{\emph{segments}, \emph{linewidths=None}, \emph{colors=None}, \emph{antialiaseds=None}, \emph{linestyles='solid'}, \emph{offsets=None}, \emph{transOffset=None}, \emph{norm=None}, \emph{cmap=None}, \emph{pickradius=5}, \emph{zorder=2}, \emph{facecolors='none'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}} A collection of 3D lines. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{segments}}] \leavevmode A sequence of (\sphinxstyleemphasis{line0}, \sphinxstyleemphasis{line1}, \sphinxstyleemphasis{line2}), where: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{linen} \PYG{o}{=} \PYG{p}{(}\PYG{n}{x0}\PYG{p}{,} \PYG{n}{y0}\PYG{p}{)}\PYG{p}{,} \PYG{p}{(}\PYG{n}{x1}\PYG{p}{,} \PYG{n}{y1}\PYG{p}{)}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{p}{(}\PYG{n}{xm}\PYG{p}{,} \PYG{n}{ym}\PYG{p}{)} \end{sphinxVerbatim} or the equivalent numpy array with two columns. Each line can be a different length. \item[{\sphinxstylestrong{colors}}] \leavevmode{[}sequence, optional{]} A sequence of RGBA tuples (e.g., arbitrary color strings, etc, not allowed). \item[{\sphinxstylestrong{antialiaseds}}] \leavevmode{[}sequence, optional{]} A sequence of ones or zeros. \item[{\sphinxstylestrong{linestyles}}] \leavevmode{[}string, tuple, optional{]} Either one of {[} 'solid' \textbar{} 'dashed' \textbar{} 'dashdot' \textbar{} 'dotted' {]}, or a dash tuple. The dash tuple is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n}{offset}\PYG{p}{,} \PYG{n}{onoffseq}\PYG{p}{)} \end{sphinxVerbatim} where \sphinxcode{\sphinxupquote{onoffseq}} is an even length tuple of on and off ink in points. \item[{\sphinxstylestrong{norm}}] \leavevmode{[}Normalize, optional{]} {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Normalize:matplotlib.colors.Normalize}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Normalize}}}}} instance. \item[{\sphinxstylestrong{cmap}}] \leavevmode{[}string or Colormap, optional{]} Colormap name or {\hyperref[\detokenize{api/_as_gen/matplotlib.colors.Colormap:matplotlib.colors.Colormap}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Colormap}}}}} instance. \item[{\sphinxstylestrong{pickradius}}] \leavevmode{[}float, optional{]} The tolerance in points for mouse clicks picking a line. Default is 5 pt. \item[{\sphinxstylestrong{zorder}}] \leavevmode{[}int, optional{]} zorder of the LineCollection. Default is 2. \item[{\sphinxstylestrong{facecolors}}] \leavevmode{[}optional{]} The facecolors of the LineCollection. Default is 'none'. Setting to a value other than 'none' will lead to a filled polygon being drawn between points on each line. \end{description} \end{description}\end{quote} \subsubsection*{Notes} If \sphinxstyleemphasis{linewidths}, \sphinxstyleemphasis{colors}, or \sphinxstyleemphasis{antialiaseds} is None, they default to their rcParams setting, in sequence form. If \sphinxstyleemphasis{offsets} and \sphinxstyleemphasis{transOffset} are not None, then \sphinxstyleemphasis{offsets} are transformed by \sphinxstyleemphasis{transOffset} and applied after the segments have been transformed to display coordinates. If \sphinxstyleemphasis{offsets} is not None but \sphinxstyleemphasis{transOffset} is None, then the \sphinxstyleemphasis{offsets} are added to the segments before any transformation. In this case, a single offset can be specified as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{offsets}\PYG{o}{=}\PYG{p}{(}\PYG{n}{xo}\PYG{p}{,}\PYG{n}{yo}\PYG{p}{)} \end{sphinxVerbatim} and this value will be added cumulatively to each successive segment, so as to produce a set of successively offset curves. The use of {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} is optional. If the {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{ScalarMappable}}}}} array \sphinxcode{\sphinxupquote{\_A}} is not None (i.e., a call to {\hyperref[\detokenize{api/cm_api:matplotlib.cm.ScalarMappable.set_array}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_array()}}}}} has been made), at draw time a call to scalar mappable will be made to set the colors. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.Line3DCollection method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{} Project the points according to renderer matrix. \end{fulllineitems} \index{draw() (mpl\_toolkits.mplot3d.art3d.Line3DCollection method)@\spxentry{draw()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}, \emph{project=False}}{} Draw the Artist using the given renderer. This method will be overridden in the Artist subclasses. Typically, it is implemented to not have any effect if the Artist is not visible ({\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.get_visible:matplotlib.artist.Artist.get_visible}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist.get\_visible}}}}} is \sphinxstyleemphasis{False}). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} subclass.{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_segments() (mpl\_toolkits.mplot3d.art3d.Line3DCollection method)@\spxentry{set\_segments()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection.set_segments}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_segments}}}{\emph{self}, \emph{segments}}{} Set 3D segments. \end{fulllineitems} \index{set\_sort\_zpos() (mpl\_toolkits.mplot3d.art3d.Line3DCollection method)@\spxentry{set\_sort\_zpos()}\spxextra{mpl\_toolkits.mplot3d.art3d.Line3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Line3DCollection:mpl_toolkits.mplot3d.art3d.Line3DCollection.set_sort_zpos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sort\_zpos}}}{\emph{self}, \emph{val}}{} Set the position to use for z-sorting. \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Patch3D} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl-toolkits-mplot3d-art3d-patch3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D::doc}}\index{Patch3D (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Patch3D}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Patch3D}}}{\emph{*args}, \emph{zs=()}, \emph{zdir='z'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/matplotlib.patches.Patch:matplotlib.patches.Patch}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches.Patch}}}}} 3D patch object. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.Patch3D method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{get\_facecolor() (mpl\_toolkits.mplot3d.art3d.Patch3D method)@\spxentry{get\_facecolor()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{} Return the face color of the \sphinxcode{\sphinxupquote{Patch}}. \end{fulllineitems} \index{get\_path() (mpl\_toolkits.mplot3d.art3d.Patch3D method)@\spxentry{get\_path()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D.get_path}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_path}}}{\emph{self}}{} Return the path of this patch \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Patch3D method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{verts}, \emph{zs=0}, \emph{zdir='z'}}{}~ \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Patch3DCollection} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl-toolkits-mplot3d-art3d-patch3dcollection}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection::doc}}\index{Patch3DCollection (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Patch3DCollection}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Patch3DCollection}}}{\emph{*args}, \emph{zs=0}, \emph{zdir='z'}, \emph{depthshade=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PatchCollection}}}}} A collection of 3D patches. Create a collection of flat 3D patches with its normal vector pointed in \sphinxstyleemphasis{zdir} direction, and located at \sphinxstyleemphasis{zs} on the \sphinxstyleemphasis{zdir} axis. 'zs' can be a scalar or an array-like of the same length as the number of patches in the collection. Constructor arguments are the same as for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}}. In addition, keywords \sphinxstyleemphasis{zs=0} and \sphinxstyleemphasis{zdir='z'} are available. Also, the keyword argument "depthshade" is available to indicate whether or not to shade the patches in order to give the appearance of depth (default is \sphinxstyleemphasis{True}). This is typically desired in scatter plots. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.Patch3DCollection method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Patch3DCollection method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{zs}, \emph{zdir}}{}~ \end{fulllineitems} \index{set\_sort\_zpos() (mpl\_toolkits.mplot3d.art3d.Patch3DCollection method)@\spxentry{set\_sort\_zpos()}\spxextra{mpl\_toolkits.mplot3d.art3d.Patch3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection.set_sort_zpos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sort\_zpos}}}{\emph{self}, \emph{val}}{} Set the position to use for z-sorting. \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Path3DCollection} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl-toolkits-mplot3d-art3d-path3dcollection}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection::doc}}\index{Path3DCollection (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Path3DCollection}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Path3DCollection}}}{\emph{*args}, \emph{zs=0}, \emph{zdir='z'}, \emph{depthshade=True}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PathCollection}}}}} A collection of 3D paths. Create a collection of flat 3D paths with its normal vector pointed in \sphinxstyleemphasis{zdir} direction, and located at \sphinxstyleemphasis{zs} on the \sphinxstyleemphasis{zdir} axis. 'zs' can be a scalar or an array-like of the same length as the number of paths in the collection. Constructor arguments are the same as for {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}}. In addition, keywords \sphinxstyleemphasis{zs=0} and \sphinxstyleemphasis{zdir='z'} are available. Also, the keyword argument "depthshade" is available to indicate whether or not to shade the patches in order to give the appearance of depth (default is \sphinxstyleemphasis{True}). This is typically desired in scatter plots. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.Path3DCollection method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.Path3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Path3DCollection method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Path3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{zs}, \emph{zdir}}{}~ \end{fulllineitems} \index{set\_sort\_zpos() (mpl\_toolkits.mplot3d.art3d.Path3DCollection method)@\spxentry{set\_sort\_zpos()}\spxextra{mpl\_toolkits.mplot3d.art3d.Path3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection.set_sort_zpos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sort\_zpos}}}{\emph{self}, \emph{val}}{} Set the position to use for z-sorting. \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.PathPatch3D} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D:mpl-toolkits-mplot3d-art3d-pathpatch3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D::doc}}\index{PathPatch3D (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{PathPatch3D}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D:mpl_toolkits.mplot3d.art3d.PathPatch3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{PathPatch3D}}}{\emph{path}, \emph{*}, \emph{zs=()}, \emph{zdir='z'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3D:mpl_toolkits.mplot3d.art3d.Patch3D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.Patch3D}}}}} 3D PathPatch object. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.PathPatch3D method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.PathPatch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D:mpl_toolkits.mplot3d.art3d.PathPatch3D.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{}~ \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.PathPatch3D method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.PathPatch3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.PathPatch3D:mpl_toolkits.mplot3d.art3d.PathPatch3D.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{path}, \emph{zs=0}, \emph{zdir='z'}}{}~ \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Poly3DCollection} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl-toolkits-mplot3d-art3d-poly3dcollection}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection::doc}}\index{Poly3DCollection (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Poly3DCollection}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Poly3DCollection}}}{\emph{verts}, \emph{*args}, \emph{zsort='average'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PolyCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.PolyCollection}}}}} A collection of 3D polygons. Create a Poly3DCollection. \sphinxstyleemphasis{verts} should contain 3D coordinates. Keyword arguments: zsort, see set\_zsort for options. Note that this class does a bit of magic with the \_facecolors and \_edgecolors properties. \index{do\_3d\_projection() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{do\_3d\_projection()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.do_3d_projection}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{do\_3d\_projection}}}{\emph{self}, \emph{renderer}}{} Perform the 3D projection for this object. \end{fulllineitems} \index{get\_edgecolor() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{get\_edgecolor()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.get_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_edgecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_facecolor() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{get\_facecolor()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.get_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_facecolor}}}{\emph{self}}{}~ \end{fulllineitems} \index{get\_vector() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{get\_vector()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.get_vector}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_vector}}}{\emph{self}, \emph{segments3d}}{} Optimize points for projection. \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}}{}~ \end{fulllineitems} \index{set\_alpha() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_alpha()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_alpha}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_alpha}}}{\emph{self}, \emph{alpha}}{} Set the alpha transparencies of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{alpha}}] \leavevmode{[}float or None{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_edgecolor() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_edgecolor()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_edgecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_edgecolor}}}{\emph{self}, \emph{colors}}{} Set the edgecolor(s) of the collection. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors or 'face'{]} The collection edgecolor(s). If a sequence, the patches cycle through it. If 'face', match the facecolor. \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_facecolor() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_facecolor()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_facecolor}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_facecolor}}}{\emph{self}, \emph{colors}}{} Set the facecolor(s) of the collection. \sphinxstyleemphasis{c} can be a matplotlib color spec (all patches have same color), or a sequence of specs; if it is a sequence the patches will cycle through the sequence. If \sphinxstyleemphasis{c} is 'none', the patch will not be filled. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{c}}] \leavevmode{[}color or sequence of colors{]} \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_sort\_zpos() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_sort\_zpos()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_sort_zpos}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_sort\_zpos}}}{\emph{self}, \emph{val}}{} Set the position to use for z-sorting. \end{fulllineitems} \index{set\_verts() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_verts()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_verts}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts}}}{\emph{self}, \emph{verts}, \emph{closed=True}}{} Set 3D vertices. \end{fulllineitems} \index{set\_verts\_and\_codes() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_verts\_and\_codes()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_verts_and_codes}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_verts\_and\_codes}}}{\emph{self}, \emph{verts}, \emph{codes}}{} Sets 3D vertices with path codes. \end{fulllineitems} \index{set\_zsort() (mpl\_toolkits.mplot3d.art3d.Poly3DCollection method)@\spxentry{set\_zsort()}\spxextra{mpl\_toolkits.mplot3d.art3d.Poly3DCollection method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Poly3DCollection:mpl_toolkits.mplot3d.art3d.Poly3DCollection.set_zsort}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_zsort}}}{\emph{self}, \emph{zsort}}{} Sets the calculation method for the z-order. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{zsort}}] \leavevmode{[}\{'average', 'min', 'max'\}{]} The function applied on the z-coordinates of the vertices in the viewer's coordinate system, to determine the z-order. \sphinxstyleemphasis{True} is deprecated and equivalent to 'average'. \end{description} \end{description}\end{quote} \end{fulllineitems} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.Text3D} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl-toolkits-mplot3d-art3d-text3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D::doc}}\index{Text3D (class in mpl\_toolkits.mplot3d.art3d)@\spxentry{Text3D}\spxextra{class in mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl_toolkits.mplot3d.art3d.Text3D}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{Text3D}}}{\emph{x=0}, \emph{y=0}, \emph{z=0}, \emph{text=''}, \emph{zdir='z'}, \emph{**kwargs}}{} Bases: {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.text.Text}}}}} Text object with 3D position and direction. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y, z}}] \leavevmode The position of the text. \item[{\sphinxstylestrong{text}}] \leavevmode{[}str{]} The text string to display. \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z', None, 3-tuple\}{]} The direction of the text. See {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector:mpl_toolkits.mplot3d.art3d.get_dir_vector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{get\_dir\_vector}}}}} for a description of the values. \end{description} \item[{Other Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{**kwargs}}] \leavevmode All other parameters are passed on to {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}}. \end{description} \end{description}\end{quote} \index{draw() (mpl\_toolkits.mplot3d.art3d.Text3D method)@\spxentry{draw()}\spxextra{mpl\_toolkits.mplot3d.art3d.Text3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl_toolkits.mplot3d.art3d.Text3D.draw}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{draw}}}{\emph{self}, \emph{renderer}}{} Draws the {\hyperref[\detokenize{api/text_api:matplotlib.text.Text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Text}}}}} object to the given \sphinxstyleemphasis{renderer}. \end{fulllineitems} \index{get\_tightbbox() (mpl\_toolkits.mplot3d.art3d.Text3D method)@\spxentry{get\_tightbbox()}\spxextra{mpl\_toolkits.mplot3d.art3d.Text3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl_toolkits.mplot3d.art3d.Text3D.get_tightbbox}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{get\_tightbbox}}}{\emph{self}, \emph{renderer}}{} Like \sphinxcode{\sphinxupquote{Artist.get\_window\_extent}}, but includes any clipping. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{renderer}}] \leavevmode{[}{\hyperref[\detokenize{api/backend_bases_api:matplotlib.backend_bases.RendererBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{RendererBase}}}}} instance{]} renderer that will be used to draw the figures (i.e. \sphinxcode{\sphinxupquote{fig.canvas.get\_renderer()}}) \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{bbox}}] \leavevmode{[}\sphinxcode{\sphinxupquote{BBox}}{]} The enclosing bounding box (in figure pixel co-ordinates). \end{description} \end{description}\end{quote} \end{fulllineitems} \index{set\_3d\_properties() (mpl\_toolkits.mplot3d.art3d.Text3D method)@\spxentry{set\_3d\_properties()}\spxextra{mpl\_toolkits.mplot3d.art3d.Text3D method}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Text3D:mpl_toolkits.mplot3d.art3d.Text3D.set_3d_properties}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{set\_3d\_properties}}}{\emph{self}, \emph{z=0}, \emph{zdir='z'}}{}~ \end{fulllineitems} \end{fulllineitems} \subsection{Art3D Utility Functions} \label{\detokenize{api/toolkits/mplot3d:art3d-utility-functions}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors:mpl_toolkits.mplot3d.art3d.get_colors}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.get\_colors}}}}}(c, num) & {[}\sphinxstyleemphasis{Deprecated}{]} Stretch the color argument to provide the required number \sphinxstyleemphasis{num}. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector:mpl_toolkits.mplot3d.art3d.get_dir_vector}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.get\_dir\_vector}}}}}(zdir) & Return a direction vector. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts:mpl_toolkits.mplot3d.art3d.get_patch_verts}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.get\_patch\_verts}}}}}(patch) & {[}\sphinxstyleemphasis{Deprecated}{]} Return a list of vertices for the path of a patch. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.juggle_axes:mpl_toolkits.mplot3d.art3d.juggle_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.juggle\_axes}}}}}(xs, ys, zs, zdir) & Reorder coordinates so that 2D xs, ys can be plotted in the plane orthogonal to zdir. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_2d_to_3d:mpl_toolkits.mplot3d.art3d.line_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.line\_2d\_to\_3d}}}}}(line{[}, zs, zdir{]}) & Convert a 2D line to 3D. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.line\_collection\_2d\_to\_3d}}}}}(col{[}, zs, zdir{]}) & Convert a LineCollection to a Line3DCollection object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle:mpl_toolkits.mplot3d.art3d.norm_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.norm\_angle}}}}}(a) & {[}\sphinxstyleemphasis{Deprecated}{]} Return the given angle normalized to -180 \textless{} \sphinxstyleemphasis{a} \textless{}= 180 degrees. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle:mpl_toolkits.mplot3d.art3d.norm_text_angle}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.norm\_text\_angle}}}}}(a) & {[}\sphinxstyleemphasis{Deprecated}{]} Return the given angle normalized to -90 \textless{} \sphinxstyleemphasis{a} \textless{}= 90 degrees. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_2d_to_3d:mpl_toolkits.mplot3d.art3d.patch_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.patch\_2d\_to\_3d}}}}}(patch{[}, z, zdir{]}) & Convert a Patch to a Patch3D object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.patch\_collection\_2d\_to\_3d}}}}}(col{[}, zs, ...{]}) & Convert a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}} into a \sphinxcode{\sphinxupquote{Patch3DCollection}} object (or a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} into a \sphinxcode{\sphinxupquote{Path3DCollection}} object). \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment:mpl_toolkits.mplot3d.art3d.path_to_3d_segment}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.path\_to\_3d\_segment}}}}}(path{[}, zs, zdir{]}) & {[}\sphinxstyleemphasis{Deprecated}{]} Convert a path to a 3D segment. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes:mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.path\_to\_3d\_segment\_with\_codes}}}}}(path{[}, ...{]}) & {[}\sphinxstyleemphasis{Deprecated}{]} Convert a path to a 3D segment with path codes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d:mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.pathpatch\_2d\_to\_3d}}}}}(pathpatch{[}, z, zdir{]}) & Convert a PathPatch to a PathPatch3D object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.paths\_to\_3d\_segments}}}}}(paths{[}, zs, zdir{]}) & {[}\sphinxstyleemphasis{Deprecated}{]} Convert paths from a collection object to 3D segments. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.paths\_to\_3d\_segments\_with\_codes}}}}}(paths) & {[}\sphinxstyleemphasis{Deprecated}{]} Convert paths from a collection object to 3D segments with path codes. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.poly\_collection\_2d\_to\_3d}}}}}(col{[}, zs, zdir{]}) & Convert a PolyCollection to a Poly3DCollection object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.rotate_axes:mpl_toolkits.mplot3d.art3d.rotate_axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.rotate\_axes}}}}}(xs, ys, zs, zdir) & Reorder coordinates so that the axes are rotated with zdir along the original z axis. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.text_2d_to_3d:mpl_toolkits.mplot3d.art3d.text_2d_to_3d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.text\_2d\_to\_3d}}}}}(obj{[}, z, zdir{]}) & Convert a Text to a Text3D object. \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha:mpl_toolkits.mplot3d.art3d.zalpha}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{art3d.zalpha}}}}}(colors, zs) & {[}\sphinxstyleemphasis{Deprecated}{]} Modify the alphas of the color list according to depth. \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.mplot3d.art3d.get\_colors} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors:mpl-toolkits-mplot3d-art3d-get-colors}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors::doc}}\index{get\_colors() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{get\_colors()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_colors:mpl_toolkits.mplot3d.art3d.get_colors}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{get\_colors}}}{\emph{c}, \emph{num}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Stretch the color argument to provide the required number \sphinxstyleemphasis{num}. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.get\_dir\_vector} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector:mpl-toolkits-mplot3d-art3d-get-dir-vector}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector::doc}}\index{get\_dir\_vector() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{get\_dir\_vector()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_dir_vector:mpl_toolkits.mplot3d.art3d.get_dir_vector}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{get\_dir\_vector}}}{\emph{zdir}}{} Return a direction vector. \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{zdir}}] \leavevmode{[}\{'x', 'y', 'z', None, 3-tuple\}{]} The direction. Possible values are: - 'x': equivalent to (1, 0, 0) - 'y': equivalent to (0, 1, 0) - 'z': equivalent to (0, 0, 1) - \sphinxstyleemphasis{None}: equivalent to (0, 0, 0) - an iterable (x, y, z) is returned unchanged. \end{description} \item[{Returns}] \leavevmode\begin{description} \item[{\sphinxstylestrong{x, y, z}}] \leavevmode{[}array-like{]} The direction vector. This is either a numpy.array or \sphinxstyleemphasis{zdir} itself if \sphinxstyleemphasis{zdir} is already a length-3 iterable. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.get\_patch\_verts} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts:mpl-toolkits-mplot3d-art3d-get-patch-verts}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts::doc}}\index{get\_patch\_verts() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{get\_patch\_verts()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.get_patch_verts:mpl_toolkits.mplot3d.art3d.get_patch_verts}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{get\_patch\_verts}}}{\emph{patch}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return a list of vertices for the path of a patch. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.juggle\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.juggle_axes:mpl-toolkits-mplot3d-art3d-juggle-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.juggle_axes::doc}}\index{juggle\_axes() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{juggle\_axes()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.juggle_axes:mpl_toolkits.mplot3d.art3d.juggle_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{juggle\_axes}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{zdir}}{} Reorder coordinates so that 2D xs, ys can be plotted in the plane orthogonal to zdir. zdir is normally x, y or z. However, if zdir starts with a '-' it is interpreted as a compensation for rotate\_axes. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.line\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_2d_to_3d:mpl-toolkits-mplot3d-art3d-line-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_2d_to_3d::doc}}\index{line\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{line\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_2d_to_3d:mpl_toolkits.mplot3d.art3d.line_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{line\_2d\_to\_3d}}}{\emph{line}, \emph{zs=0}, \emph{zdir='z'}}{} Convert a 2D line to 3D. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.line\_collection\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d:mpl-toolkits-mplot3d-art3d-line-collection-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d::doc}}\index{line\_collection\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{line\_collection\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{line\_collection\_2d\_to\_3d}}}{\emph{col}, \emph{zs=0}, \emph{zdir='z'}}{} Convert a LineCollection to a Line3DCollection object. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.norm\_angle} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle:mpl-toolkits-mplot3d-art3d-norm-angle}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle::doc}}\index{norm\_angle() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{norm\_angle()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_angle:mpl_toolkits.mplot3d.art3d.norm_angle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{norm\_angle}}}{\emph{a}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return the given angle normalized to -180 \textless{} \sphinxstyleemphasis{a} \textless{}= 180 degrees. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.norm\_text\_angle} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle:mpl-toolkits-mplot3d-art3d-norm-text-angle}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle::doc}}\index{norm\_text\_angle() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{norm\_text\_angle()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.norm_text_angle:mpl_toolkits.mplot3d.art3d.norm_text_angle}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{norm\_text\_angle}}}{\emph{a}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return the given angle normalized to -90 \textless{} \sphinxstyleemphasis{a} \textless{}= 90 degrees. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.patch\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_2d_to_3d:mpl-toolkits-mplot3d-art3d-patch-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_2d_to_3d::doc}}\index{patch\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{patch\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_2d_to_3d:mpl_toolkits.mplot3d.art3d.patch_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{patch\_2d\_to\_3d}}}{\emph{patch}, \emph{z=0}, \emph{zdir='z'}}{} Convert a Patch to a Patch3D object. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.patch\_collection\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d:mpl-toolkits-mplot3d-art3d-patch-collection-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d::doc}}\index{patch\_collection\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{patch\_collection\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{patch\_collection\_2d\_to\_3d}}}{\emph{col}, \emph{zs=0}, \emph{zdir='z'}, \emph{depthshade=True}}{} Convert a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PatchCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PatchCollection}}}}} into a {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Patch3DCollection:mpl_toolkits.mplot3d.art3d.Patch3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Patch3DCollection}}}}} object (or a {\hyperref[\detokenize{api/collections_api:matplotlib.collections.PathCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PathCollection}}}}} into a {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.Path3DCollection:mpl_toolkits.mplot3d.art3d.Path3DCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Path3DCollection}}}}} object). \begin{quote}\begin{description} \item[{Parameters}] \leavevmode\begin{description} \item[{\sphinxstylestrong{za}}] \leavevmode The location or locations to place the patches in the collection along the \sphinxstyleemphasis{zdir} axis. Default: 0. \item[{\sphinxstylestrong{zdir}}] \leavevmode The axis in which to place the patches. Default: "z". \item[{\sphinxstylestrong{depthshade}}] \leavevmode Whether to shade the patches to give a sense of depth. Default: \sphinxstyleemphasis{True}. \end{description} \end{description}\end{quote} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment:mpl-toolkits-mplot3d-art3d-path-to-3d-segment}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment::doc}}\index{path\_to\_3d\_segment() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{path\_to\_3d\_segment()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment:mpl_toolkits.mplot3d.art3d.path_to_3d_segment}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{path\_to\_3d\_segment}}}{\emph{path}, \emph{zs=0}, \emph{zdir='z'}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert a path to a 3D segment. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.path\_to\_3d\_segment\_with\_codes} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes:mpl-toolkits-mplot3d-art3d-path-to-3d-segment-with-codes}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes::doc}}\index{path\_to\_3d\_segment\_with\_codes() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{path\_to\_3d\_segment\_with\_codes()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes:mpl_toolkits.mplot3d.art3d.path_to_3d_segment_with_codes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{path\_to\_3d\_segment\_with\_codes}}}{\emph{path}, \emph{zs=0}, \emph{zdir='z'}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert a path to a 3D segment with path codes. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.pathpatch\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d:mpl-toolkits-mplot3d-art3d-pathpatch-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d::doc}}\index{pathpatch\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{pathpatch\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d:mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{pathpatch\_2d\_to\_3d}}}{\emph{pathpatch}, \emph{z=0}, \emph{zdir='z'}}{} Convert a PathPatch to a PathPatch3D object. \end{fulllineitems} \paragraph{Examples using \sphinxstyleliteralintitle{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.pathpatch\_2d\_to\_3d}}} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d:examples-using-mpl-toolkits-mplot3d-art3d-pathpatch-2d-to-3d}} \begin{itemize} \item {} \DUrole{xref,std,std-ref}{sphx\_glr\_gallery\_mplot3d\_pathpatch3d.py} \end{itemize} \subsubsection{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments:mpl-toolkits-mplot3d-art3d-paths-to-3d-segments}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments::doc}}\index{paths\_to\_3d\_segments() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{paths\_to\_3d\_segments()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{paths\_to\_3d\_segments}}}{\emph{paths}, \emph{zs=0}, \emph{zdir='z'}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert paths from a collection object to 3D segments. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.paths\_to\_3d\_segments\_with\_codes} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes:mpl-toolkits-mplot3d-art3d-paths-to-3d-segments-with-codes}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes::doc}}\index{paths\_to\_3d\_segments\_with\_codes() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{paths\_to\_3d\_segments\_with\_codes()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes:mpl_toolkits.mplot3d.art3d.paths_to_3d_segments_with_codes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{paths\_to\_3d\_segments\_with\_codes}}}{\emph{paths}, \emph{zs=0}, \emph{zdir='z'}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Convert paths from a collection object to 3D segments with path codes. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.poly\_collection\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d:mpl-toolkits-mplot3d-art3d-poly-collection-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d::doc}}\index{poly\_collection\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{poly\_collection\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d:mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{poly\_collection\_2d\_to\_3d}}}{\emph{col}, \emph{zs=0}, \emph{zdir='z'}}{} Convert a PolyCollection to a Poly3DCollection object. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.rotate\_axes} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.rotate_axes:mpl-toolkits-mplot3d-art3d-rotate-axes}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.rotate_axes::doc}}\index{rotate\_axes() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{rotate\_axes()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.rotate_axes:mpl_toolkits.mplot3d.art3d.rotate_axes}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{rotate\_axes}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{zdir}}{} Reorder coordinates so that the axes are rotated with zdir along the original z axis. Prepending the axis with a '-' does the inverse transform, so zdir can be x, -x, y, -y, z or -z \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.text\_2d\_to\_3d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.text_2d_to_3d:mpl-toolkits-mplot3d-art3d-text-2d-to-3d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.text_2d_to_3d::doc}}\index{text\_2d\_to\_3d() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{text\_2d\_to\_3d()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.text_2d_to_3d:mpl_toolkits.mplot3d.art3d.text_2d_to_3d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{text\_2d\_to\_3d}}}{\emph{obj}, \emph{z=0}, \emph{zdir='z'}}{} Convert a Text to a Text3D object. \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.art3d.zalpha} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha:mpl-toolkits-mplot3d-art3d-zalpha}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha::doc}}\index{zalpha() (in module mpl\_toolkits.mplot3d.art3d)@\spxentry{zalpha()}\spxextra{in module mpl\_toolkits.mplot3d.art3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.art3d.zalpha:mpl_toolkits.mplot3d.art3d.zalpha}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.art3d.}}\sphinxbfcode{\sphinxupquote{zalpha}}}{\emph{colors}, \emph{zs}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Modify the alphas of the color list according to depth. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsection{\sphinxstyleliteralintitle{\sphinxupquote{proj3d}}} \label{\detokenize{api/toolkits/mplot3d:proj3d}}\label{\detokenize{api/toolkits/mplot3d:toolkit-mplot3d-projapi}} \begin{savenotes}\sphinxatlongtablestart\begin{longtable}{\X{1}{2}\X{1}{2}} \hline \endfirsthead \multicolumn{2}{c}% {\makebox[0pt]{\sphinxtablecontinued{\tablename\ \thetable{} -- continued from previous page}}}\\ \hline \endhead \hline \multicolumn{2}{r}{\makebox[0pt][r]{\sphinxtablecontinued{Continued on next page}}}\\ \endfoot \endlastfoot {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.inv_transform:mpl_toolkits.mplot3d.proj3d.inv_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.inv\_transform}}}}}(xs, ys, zs, M) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d:mpl_toolkits.mplot3d.proj3d.line2d}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.line2d}}}}}(p0, p1) & {[}\sphinxstyleemphasis{Deprecated}{]} Return 2D equation of line in the form ax+by+c = 0 \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist:mpl_toolkits.mplot3d.proj3d.line2d_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.line2d\_dist}}}}}(l, p) & {[}\sphinxstyleemphasis{Deprecated}{]} Distance from line to point line is a tuple of coefficients a, b, c \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist:mpl_toolkits.mplot3d.proj3d.line2d_seg_dist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.line2d\_seg\_dist}}}}}(p1, p2, p0) & {[}\sphinxstyleemphasis{Deprecated}{]} distance(s) from line defined by p1 - p2 to point(s) p0 \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod:mpl_toolkits.mplot3d.proj3d.mod}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.mod}}}}}(v) & {[}\sphinxstyleemphasis{Deprecated}{]} 3d vector length \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.persp_transformation:mpl_toolkits.mplot3d.proj3d.persp_transformation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.persp\_transformation}}}}}(zfront, zback) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_points:mpl_toolkits.mplot3d.proj3d.proj_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_points}}}}}(points, M) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points:mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_trans\_clip\_points}}}}}(points, M) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_points:mpl_toolkits.mplot3d.proj3d.proj_trans_points}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_trans\_points}}}}}(points, M) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform:mpl_toolkits.mplot3d.proj3d.proj_transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_transform}}}}}(xs, ys, zs, M) & Transform the points by the projection matrix \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_transform\_clip}}}}}(xs, ys, zs, M) & Transform the points by the projection matrix and return the clipping result returns txs,tys,tzs,tis \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec:mpl_toolkits.mplot3d.proj3d.proj_transform_vec}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_transform\_vec}}}}}(vec, M) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.proj\_transform\_vec\_clip}}}}}(vec, M) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.rot_x:mpl_toolkits.mplot3d.proj3d.rot_x}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.rot\_x}}}}}(V, alpha) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.transform:mpl_toolkits.mplot3d.proj3d.transform}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.transform}}}}}(xs, ys, zs, M) & Transform the points by the projection matrix \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones:mpl_toolkits.mplot3d.proj3d.vec_pad_ones}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.vec\_pad\_ones}}}}}(xs, ys, zs) & {[}\sphinxstyleemphasis{Deprecated}{]} \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.view_transformation:mpl_toolkits.mplot3d.proj3d.view_transformation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.view\_transformation}}}}}(E, R, V) & \\ \hline {\hyperref[\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.world_transformation:mpl_toolkits.mplot3d.proj3d.world_transformation}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{proj3d.world\_transformation}}}}}(xmin, xmax, ...) & \\ \hline \end{longtable}\sphinxatlongtableend\end{savenotes} \subsubsection{mpl\_toolkits.mplot3d.proj3d.inv\_transform} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.inv_transform:mpl-toolkits-mplot3d-proj3d-inv-transform}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.inv_transform::doc}}\index{inv\_transform() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{inv\_transform()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.inv_transform:mpl_toolkits.mplot3d.proj3d.inv_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{inv\_transform}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{M}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.line2d} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d:mpl-toolkits-mplot3d-proj3d-line2d}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d::doc}}\index{line2d() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{line2d()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d:mpl_toolkits.mplot3d.proj3d.line2d}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{line2d}}}{\emph{p0}, \emph{p1}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Return 2D equation of line in the form ax+by+c = 0 \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.line2d\_dist} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist:mpl-toolkits-mplot3d-proj3d-line2d-dist}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist::doc}}\index{line2d\_dist() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{line2d\_dist()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_dist:mpl_toolkits.mplot3d.proj3d.line2d_dist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{line2d\_dist}}}{\emph{l}, \emph{p}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Distance from line to point line is a tuple of coefficients a, b, c \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.line2d\_seg\_dist} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist:mpl-toolkits-mplot3d-proj3d-line2d-seg-dist}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist::doc}}\index{line2d\_seg\_dist() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{line2d\_seg\_dist()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.line2d_seg_dist:mpl_toolkits.mplot3d.proj3d.line2d_seg_dist}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{line2d\_seg\_dist}}}{\emph{p1}, \emph{p2}, \emph{p0}}{} {[}\sphinxstyleemphasis{Deprecated}{]} distance(s) from line defined by p1 - p2 to point(s) p0 p0{[}0{]} = x(s) p0{[}1{]} = y(s) intersection point p = p1 + u*(p2-p1) and intersection point lies within segment if u is between 0 and 1 \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.mod} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod:mpl-toolkits-mplot3d-proj3d-mod}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod::doc}}\index{mod() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{mod()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.mod:mpl_toolkits.mplot3d.proj3d.mod}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{mod}}}{\emph{v}}{} {[}\sphinxstyleemphasis{Deprecated}{]} 3d vector length \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.persp\_transformation} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.persp_transformation:mpl-toolkits-mplot3d-proj3d-persp-transformation}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.persp_transformation::doc}}\index{persp\_transformation() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{persp\_transformation()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.persp_transformation:mpl_toolkits.mplot3d.proj3d.persp_transformation}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{persp\_transformation}}}{\emph{zfront}, \emph{zback}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_points} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_points:mpl-toolkits-mplot3d-proj3d-proj-points}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_points::doc}}\index{proj\_points() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_points()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_points:mpl_toolkits.mplot3d.proj3d.proj_points}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_points}}}{\emph{points}, \emph{M}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_trans\_clip\_points} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points:mpl-toolkits-mplot3d-proj3d-proj-trans-clip-points}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points::doc}}\index{proj\_trans\_clip\_points() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_trans\_clip\_points()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points:mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_trans\_clip\_points}}}{\emph{points}, \emph{M}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_trans\_points} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_points:mpl-toolkits-mplot3d-proj3d-proj-trans-points}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_points::doc}}\index{proj\_trans\_points() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_trans\_points()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_trans_points:mpl_toolkits.mplot3d.proj3d.proj_trans_points}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_trans\_points}}}{\emph{points}, \emph{M}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_transform} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform:mpl-toolkits-mplot3d-proj3d-proj-transform}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform::doc}}\index{proj\_transform() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_transform()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform:mpl_toolkits.mplot3d.proj3d.proj_transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_transform}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{M}}{} Transform the points by the projection matrix \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_clip} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_clip:mpl-toolkits-mplot3d-proj3d-proj-transform-clip}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_clip::doc}}\index{proj\_transform\_clip() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_transform\_clip()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_clip}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_transform\_clip}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{M}}{} Transform the points by the projection matrix and return the clipping result returns txs,tys,tzs,tis \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec:mpl-toolkits-mplot3d-proj3d-proj-transform-vec}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec::doc}}\index{proj\_transform\_vec() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_transform\_vec()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec:mpl_toolkits.mplot3d.proj3d.proj_transform_vec}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_transform\_vec}}}{\emph{vec}, \emph{M}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.proj\_transform\_vec\_clip} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip:mpl-toolkits-mplot3d-proj3d-proj-transform-vec-clip}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip::doc}}\index{proj\_transform\_vec\_clip() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{proj\_transform\_vec\_clip()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip:mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{proj\_transform\_vec\_clip}}}{\emph{vec}, \emph{M}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.rot\_x} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.rot_x:mpl-toolkits-mplot3d-proj3d-rot-x}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.rot_x::doc}}\index{rot\_x() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{rot\_x()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.rot_x:mpl_toolkits.mplot3d.proj3d.rot_x}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{rot\_x}}}{\emph{V}, \emph{alpha}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.transform} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.transform:mpl-toolkits-mplot3d-proj3d-transform}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.transform::doc}}\index{transform() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{transform()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.transform:mpl_toolkits.mplot3d.proj3d.transform}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{transform}}}{\emph{xs}, \emph{ys}, \emph{zs}, \emph{M}}{} Transform the points by the projection matrix \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.vec\_pad\_ones} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones:mpl-toolkits-mplot3d-proj3d-vec-pad-ones}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones::doc}}\index{vec\_pad\_ones() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{vec\_pad\_ones()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.vec_pad_ones:mpl_toolkits.mplot3d.proj3d.vec_pad_ones}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{vec\_pad\_ones}}}{\emph{xs}, \emph{ys}, \emph{zs}}{} {[}\sphinxstyleemphasis{Deprecated}{]} \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1: } \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.view\_transformation} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.view_transformation:mpl-toolkits-mplot3d-proj3d-view-transformation}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.view_transformation::doc}}\index{view\_transformation() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{view\_transformation()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.view_transformation:mpl_toolkits.mplot3d.proj3d.view_transformation}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{view\_transformation}}}{\emph{E}, \emph{R}, \emph{V}}{}~ \end{fulllineitems} \subsubsection{mpl\_toolkits.mplot3d.proj3d.world\_transformation} \label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.world_transformation:mpl-toolkits-mplot3d-proj3d-world-transformation}}\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.world_transformation::doc}}\index{world\_transformation() (in module mpl\_toolkits.mplot3d.proj3d)@\spxentry{world\_transformation()}\spxextra{in module mpl\_toolkits.mplot3d.proj3d}} \begin{fulllineitems} \phantomsection\label{\detokenize{api/_as_gen/mpl_toolkits.mplot3d.proj3d.world_transformation:mpl_toolkits.mplot3d.proj3d.world_transformation}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{mpl\_toolkits.mplot3d.proj3d.}}\sphinxbfcode{\sphinxupquote{world\_transformation}}}{\emph{xmin}, \emph{xmax}, \emph{ymin}, \emph{ymax}, \emph{zmin}, \emph{zmax}}{}~ \end{fulllineitems} \section{Matplotlib axes\_grid Toolkit} \label{\detokenize{api/toolkits/axes_grid:matplotlib-axes-grid-toolkit}}\label{\detokenize{api/toolkits/axes_grid:axes-grid-api-index}}\label{\detokenize{api/toolkits/axes_grid::doc}} \begin{sphinxadmonition}{note}{Note:} AxesGrid toolkit has been a part of matplotlib since v 0.99. Originally, the toolkit had a single namespace of \sphinxstyleemphasis{axes\_grid}. In more recent version, the toolkit has divided into two separate namespace (\sphinxstyleemphasis{axes\_grid1} and \sphinxstyleemphasis{axisartist}). While \sphinxstyleemphasis{axes\_grid} namespace is maintained for the backward compatibility, use of \sphinxstyleemphasis{axes\_grid1} and \sphinxstyleemphasis{axisartist} is recommended. For the documentation on \sphinxcode{\sphinxupquote{axes\_grid}}, see the \sphinxhref{https://matplotlib.org/2.0.1/mpl\_toolkits/axes\_grid/index.html\#toolkit-axesgrid-index}{previous version of the docs}. \end{sphinxadmonition} \part{External Resources} \label{\detokenize{resources/index:external-resources}}\label{\detokenize{resources/index:resources-index}}\label{\detokenize{resources/index::doc}} \chapter{Books, Chapters and Articles} \label{\detokenize{resources/index:books-chapters-and-articles}}\begin{itemize} \item {} \sphinxhref{https://www.packtpub.com/big-data-and-business-intelligence/mastering-matplotlib}{Mastering matplotlib} by Duncan M. McGreggor \item {} \sphinxhref{https://www.packtpub.com/application-development/interactive-applications-using-matplotlib}{Interactive Applications Using Matplotlib} by Benjamin Root \item {} \sphinxhref{https://www.packtpub.com/application-development/matplotlib-python-developers}{Matplotlib for Python Developers} by Sandro Tosi \item {} \sphinxhref{http://www.aosabook.org/en/matplotlib.html}{Matplotlib chapter} by John Hunter and Michael Droettboom in The Architecture of Open Source Applications \item {} \sphinxhref{http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003833}{Ten Simple Rules for Better Figures} by Nicolas P. Rougier, Michael Droettboom and Philip E. Bourne \item {} \sphinxhref{http://scipython.com/book/chapter-7-matplotlib/}{Learning Scientific Programming with Python chapter 7} by Christian Hill \end{itemize} \chapter{Videos} \label{\detokenize{resources/index:videos}}\begin{itemize} \item {} \sphinxhref{https://www.youtube.com/watch?v=P7SVi0YTIuE}{Plotting with matplotlib} by Mike Müller \item {} \sphinxhref{https://www.youtube.com/watch?v=3Fp1zn5ao2M\&feature=plcp}{Introduction to NumPy and Matplotlib} by Eric Jones \item {} \sphinxhref{https://conference.scipy.org/scipy2013/tutorial\_detail.php?id=103}{Anatomy of Matplotlib} by Benjamin Root \item {} \sphinxhref{http://shop.oreilly.com/product/0636920046592.do}{Data Visualization Basics with Python (O'Reilly)} by Randal S. Olson \end{itemize} \chapter{Tutorials} \label{\detokenize{resources/index:tutorials}}\begin{itemize} \item {} \sphinxhref{http://www.labri.fr/perso/nrougier/teaching/matplotlib/}{Matplotlib tutorial} by Nicolas P. Rougier \item {} \sphinxhref{https://github.com/WeatherGod/AnatomyOfMatplotlib}{Anatomy of Matplotlib - IPython Notebooks} by Benjamin Root \end{itemize} \part{Third party packages} \label{\detokenize{thirdpartypackages/index:third-party-packages}}\label{\detokenize{thirdpartypackages/index:thirdparty-index}}\label{\detokenize{thirdpartypackages/index::doc}} Several external packages that extend or build on Matplotlib functionality are listed below. They are maintained and distributed separately from Matplotlib and thus need to be installed individually. Please submit an issue or pull request on Github if you have created a package that you would like to have included. We are also happy to host third party packages within the \sphinxhref{https://github.com/matplotlib}{Matplotlib Github Organization}. \chapter{Mapping toolkits} \label{\detokenize{thirdpartypackages/index:mapping-toolkits}} \section{Basemap} \label{\detokenize{thirdpartypackages/index:basemap}} \sphinxhref{http://matplotlib.org/basemap}{Basemap} plots data on map projections, with continental and political boundaries. \noindent\sphinxincludegraphics[height=400\sphinxpxdimen]{{basemap_contour1}.png} \section{Cartopy} \label{\detokenize{thirdpartypackages/index:cartopy}} \sphinxhref{http://scitools.org.uk/cartopy/docs/latest}{Cartopy} builds on top of Matplotlib to provide object oriented map projection definitions and close integration with Shapely for powerful yet easy-to-use vector data processing tools. An example plot from the \sphinxhref{http://scitools.org.uk/cartopy/docs/latest/gallery.html}{Cartopy gallery}: \noindent\sphinxincludegraphics[height=400\sphinxpxdimen]{{cartopy_hurricane_katrina_01_00}.png} \section{Ridge Map} \label{\detokenize{thirdpartypackages/index:ridge-map}} \sphinxhref{https://github.com/ColCarroll/ridge\_map}{ridge\_map} uses Matplotlib, SRTM.py, NumPy, and scikit-image to make ridge plots of your favorite ridges. \noindent\sphinxincludegraphics[height=364\sphinxpxdimen]{{ridge_map_white_mountains}.png} \chapter{Declarative libraries} \label{\detokenize{thirdpartypackages/index:declarative-libraries}} \section{ggplot} \label{\detokenize{thirdpartypackages/index:ggplot}} \sphinxhref{https://github.com/yhat/ggplot}{ggplot} is a port of the R ggplot2 package to python based on Matplotlib. \noindent\sphinxincludegraphics[height=195\sphinxpxdimen]{{ggplot}.png} \section{holoviews} \label{\detokenize{thirdpartypackages/index:holoviews}} \sphinxhref{http://holoviews.org}{holoviews} makes it easier to visualize data interactively, especially in a \sphinxhref{http://jupyter.org}{Jupyter notebook}, by providing a set of declarative plotting objects that store your data and associated metadata. Your data is then immediately visualizable alongside or overlaid with other data, either statically or with automatically provided widgets for parameter exploration. \noindent\sphinxincludegraphics[height=354\sphinxpxdimen]{{holoviews}.png} \section{plotnine} \label{\detokenize{thirdpartypackages/index:plotnine}} \sphinxhref{https://plotnine.readthedocs.io/en/stable/}{plotnine} implements a grammar of graphics, similar to R's \sphinxhref{https://ggplot2.tidyverse.org/}{ggplot2}. The grammar allows users to compose plots by explicitly mapping data to the visual objects that make up the plot. \noindent\sphinxincludegraphics{{plotnine}.png} \chapter{Specialty plots} \label{\detokenize{thirdpartypackages/index:specialty-plots}} \section{Broken Axes} \label{\detokenize{thirdpartypackages/index:broken-axes}} \sphinxhref{https://github.com/bendichter/brokenaxes}{brokenaxes} supplies an axes class that can have a visual break to indicate a discontinuous range. \noindent\sphinxincludegraphics{{brokenaxes}.png} \section{DeCiDa} \label{\detokenize{thirdpartypackages/index:decida}} \sphinxhref{https://pypi.python.org/pypi/DeCiDa}{DeCiDa} is a library of functions and classes for electron device characterization, electronic circuit design and general data visualization and analysis. \section{Matplotlib-Venn} \label{\detokenize{thirdpartypackages/index:matplotlib-venn}} \sphinxhref{https://github.com/konstantint/matplotlib-venn}{Matplotlib-Venn} provides a set of functions for plotting 2- and 3-set area-weighted (or unweighted) Venn diagrams. \section{mpl-probscale} \label{\detokenize{thirdpartypackages/index:mpl-probscale}} \sphinxhref{http://matplotlib.org/mpl-probscale/}{mpl-probscale} is a small extension that allows Matplotlib users to specify probabilty scales. Simply importing the \sphinxcode{\sphinxupquote{probscale}} module registers the scale with Matplotlib, making it accessible via e.g., \sphinxcode{\sphinxupquote{ax.set\_xscale('prob')}} or \sphinxcode{\sphinxupquote{plt.yscale('prob')}}. \noindent\sphinxincludegraphics{{probscale_demo}.png} \section{mpl-scatter-density} \label{\detokenize{thirdpartypackages/index:mpl-scatter-density}} \sphinxhref{https://github.com/astrofrog/mpl-scatter-density}{mpl-scatter-density} is a small package that makes it easy to make scatter plots of large numbers of points using a density map. The following example contains around 13 million points and the plotting (excluding reading in the data) took less than a second on an average laptop: \noindent\sphinxincludegraphics[height=400\sphinxpxdimen]{{mpl-scatter-density}.png} When used in interactive mode, the density map is downsampled on-the-fly while panning/zooming in order to provide a smooth interactive experience. \section{mplstereonet} \label{\detokenize{thirdpartypackages/index:mplstereonet}} \sphinxhref{https://github.com/joferkington/mplstereonet}{mplstereonet} provides stereonets for plotting and analyzing orientation data in Matplotlib. \section{Natgrid} \label{\detokenize{thirdpartypackages/index:natgrid}} \sphinxhref{https://github.com/matplotlib/natgrid}{mpl\_toolkits.natgrid} is an interface to the natgrid C library for gridding irregularly spaced data. \section{pyUpSet} \label{\detokenize{thirdpartypackages/index:pyupset}} \sphinxhref{https://github.com/ImSoErgodic/py-upset}{pyUpSet} is a static Python implementation of the \sphinxhref{http://www.caleydo.org/tools/upset/}{UpSet suite by Lex et al.} to explore complex intersections of sets and data frames. \section{seaborn} \label{\detokenize{thirdpartypackages/index:seaborn}} \sphinxhref{http://seaborn.pydata.org/}{seaborn} is a high level interface for drawing statistical graphics with Matplotlib. It aims to make visualization a central part of exploring and understanding complex datasets. \noindent\sphinxincludegraphics[height=157\sphinxpxdimen]{{seaborn}.png} \section{WCSAxes} \label{\detokenize{thirdpartypackages/index:wcsaxes}} The \sphinxhref{http://www.astropy.org}{Astropy} core package includes a submodule called WCSAxes (available at \sphinxhref{http://docs.astropy.org/en/stable/visualization/wcsaxes/index.html}{astropy.visualization.wcsaxes}) which adds Matplotlib projections for Astronomical image data. The following is an example of a plot made with WCSAxes which includes the original coordinate system of the image and an overlay of a different coordinate system: \noindent\sphinxincludegraphics[height=400\sphinxpxdimen]{{wcsaxes}.jpg} \section{Windrose} \label{\detokenize{thirdpartypackages/index:windrose}} \sphinxhref{https://github.com/scls19fr/windrose}{Windrose} is a Python Matplotlib, Numpy library to manage wind data, draw windroses (also known as polar rose plots), draw probability density functions and fit Weibull distributions. \section{Yellowbrick} \label{\detokenize{thirdpartypackages/index:yellowbrick}} \sphinxhref{https://www.scikit-yb.org/}{Yellowbrick} is a suite of visual diagnostic tools for machine learning that enables human steering of the model selection process. Yellowbrick combines scikit-learn with matplotlib using an estimator-based API called the \sphinxcode{\sphinxupquote{Visualizer}}, which wraps both sklearn models and matplotlib Axes. \sphinxcode{\sphinxupquote{Visualizer}} objects fit neatly into the machine learning workflow allowing data scientists to integrate visual diagnostic and model interpretation tools into experimentation without extra steps. \noindent\sphinxincludegraphics[height=400\sphinxpxdimen]{{yellowbrick}.png} \chapter{Interactivity} \label{\detokenize{thirdpartypackages/index:interactivity}} \section{mplcursors} \label{\detokenize{thirdpartypackages/index:mplcursors}} \sphinxhref{https://mplcursors.readthedocs.io}{mplcursors} provides interactive data cursors for Matplotlib. \section{MplDataCursor} \label{\detokenize{thirdpartypackages/index:mpldatacursor}} \sphinxhref{https://github.com/joferkington/mpldatacursor}{MplDataCursor} is a toolkit written by Joe Kington to provide interactive "data cursors" (clickable annotation boxes) for Matplotlib. \section{animatplot} \label{\detokenize{thirdpartypackages/index:animatplot}} \sphinxhref{https://animatplot.readthedocs.io/}{animatplot} is a library for producing interactive animated plots with the goal of making production of animated plots almost as easy as static ones. \noindent\sphinxincludegraphics{{animatplot}.png} For an animated version of the above picture and more examples, see the \sphinxhref{https://animatplot.readthedocs.io/en/stable/gallery.html}{animatplot gallery.} \chapter{Miscellaneous} \label{\detokenize{thirdpartypackages/index:miscellaneous}} \section{adjustText} \label{\detokenize{thirdpartypackages/index:adjusttext}} \sphinxhref{https://github.com/Phlya/adjustText}{adjustText} is a small library for automatically adjusting text position in Matplotlib plots to minimize overlaps between them, specified points and other objects. \noindent\sphinxincludegraphics{{adjustText}.png} \section{iTerm2 terminal backend} \label{\detokenize{thirdpartypackages/index:iterm2-terminal-backend}} \sphinxhref{https://github.com/oselivanov/matplotlib\_iterm2}{matplotlib\_iterm2} is an external Matplotlib backend using the iTerm2 nightly build inline image display feature. \noindent\sphinxincludegraphics{{matplotlib_iterm2_demo}.png} \section{mplcairo} \label{\detokenize{thirdpartypackages/index:mplcairo}} \sphinxhref{https://github.com/anntzer/mplcairo}{mplcairo} is a cairo backend for Matplotlib, with faster and more accurate marker drawing, support for a wider selection of font formats and complex text layout, and various other features. \section{mpl-template} \label{\detokenize{thirdpartypackages/index:mpl-template}} \sphinxhref{https://austinorr.github.io/mpl-template/index.html}{mpl-template} provides a customizable way to add engineering figure elements such as a title block, border, and logo. \noindent\sphinxincludegraphics[height=330\sphinxpxdimen]{{mpl_template_example}.png} \part{The Matplotlib Developers' Guide} \label{\detokenize{devel/index:the-matplotlib-developers-guide}}\label{\detokenize{devel/index:developers-guide-index}}\label{\detokenize{devel/index::doc}} \chapter{Contributing} \label{\detokenize{devel/contributing:contributing}}\label{\detokenize{devel/contributing:id1}}\label{\detokenize{devel/contributing::doc}} This project is a community effort, and everyone is welcome to contribute. The project is hosted on \sphinxurl{https://github.com/matplotlib/matplotlib} \section{Submitting a bug report} \label{\detokenize{devel/contributing:submitting-a-bug-report}} If you find a bug in the code or documentation, do not hesitate to submit a ticket to the \sphinxhref{https://github.com/matplotlib/matplotlib/issues}{Bug Tracker}. You are also welcome to post feature requests or pull requests. If you are reporting a bug, please do your best to include the following: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} A short, top-level summary of the bug. In most cases, this should be 1-2 sentences. \item {} A short, self-contained code snippet to reproduce the bug, ideally allowing a simple copy and paste to reproduce. Please do your best to reduce the code snippet to the minimum required. \item {} The actual outcome of the code snippet. \item {} The expected outcome of the code snippet. \item {} The Matplotlib version, Python version and platform that you are using. You can grab the version with the following commands: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{\PYGZus{}\PYGZus{}version\PYGZus{}\PYGZus{}} \PYG{g+go}{\PYGZsq{}1.5.3\PYGZsq{}} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k+kn}{import} \PYG{n+nn}{platform} \PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{platform}\PYG{o}{.}\PYG{n}{python\PYGZus{}version}\PYG{p}{(}\PYG{p}{)} \PYG{g+go}{\PYGZsq{}2.7.12\PYGZsq{}} \end{sphinxVerbatim} \end{enumerate} We have preloaded the issue creation page with a Markdown template that you can use to organize this information. Thank you for your help in keeping bug reports complete, targeted and descriptive. \section{Retrieving and installing the latest version of the code} \label{\detokenize{devel/contributing:retrieving-and-installing-the-latest-version-of-the-code}}\label{\detokenize{devel/contributing:installing-for-devs}} When developing Matplotlib, sources must be downloaded, built, and installed into a local environment on your machine. Follow the instructions detailed {\hyperref[\detokenize{users/installing:install-from-source}]{\sphinxcrossref{\DUrole{std,std-ref}{here}}}} to set up your environment to build Matplotlib from source. \begin{sphinxadmonition}{warning}{Warning:} When working on Matplotlib sources, having multiple versions installed by different methods into the same environment may not always work as expected. \end{sphinxadmonition} To work on Matplotlib sources, it is strongly recommended to set up an alternative development environment, using the something like \sphinxhref{http://docs.python-guide.org/en/latest/dev/virtualenvs/}{virtual environments in python}, or a \sphinxhref{https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html}{conda environment}. If you choose to use an already existing environment, and not a clean virtual or conda environment, uninstall the current version of Matplotlib in that environment using the same method used to install it. If working on Matplotlib documentation only, the above steps are \sphinxstyleemphasis{not} absolutely necessary. We use \sphinxhref{https://git-scm.com/}{Git} for version control and \sphinxhref{https://github.com/}{GitHub} for hosting our main repository. You can check out the latest sources with the command (see {\hyperref[\detokenize{devel/gitwash/set_up_fork:set-up-fork}]{\sphinxcrossref{\DUrole{std,std-ref}{Set up your fork}}}} for more details): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{clone} \PYG{n}{https}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{github}\PYG{o}{.}\PYG{n}{com}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{git} \end{sphinxVerbatim} and navigate to the \sphinxcode{\sphinxupquote{matplotlib}} directory. If you have the proper privileges, you can use \sphinxcode{\sphinxupquote{git@}} instead of \sphinxcode{\sphinxupquote{https://}}, which works through the ssh protocol and might be easier to use if you are using 2-factor authentication. \subsection{Building Matplotlib for image comparison tests} \label{\detokenize{devel/contributing:building-matplotlib-for-image-comparison-tests}} Matplotlib's test suite makes heavy use of image comparison tests, meaning the result of a plot is compared against a known good result. Unfortunately, different versions of FreeType produce differently formed characters, causing these image comparisons to fail. To make them reproducible, Matplotlib can be built with a special local copy of FreeType. This is recommended for all Matplotlib developers. Copy \sphinxcode{\sphinxupquote{setup.cfg.template}} to \sphinxcode{\sphinxupquote{setup.cfg}} and edit it to contain: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{test}\PYG{p}{]} \PYG{n}{local\PYGZus{}freetype} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{tests} \PYG{o}{=} \PYG{k+kc}{True} \end{sphinxVerbatim} or set the \sphinxcode{\sphinxupquote{MPLLOCALFREETYPE}} environmental variable to any true value. \subsection{Installing Matplotlib in developer mode} \label{\detokenize{devel/contributing:installing-matplotlib-in-developer-mode}} To install Matplotlib (and compile the C-extensions) run the following command from the top-level directory \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{ve} \PYG{o}{.} \end{sphinxVerbatim} This installs Matplotlib in 'editable/develop mode', i.e., builds everything and places the correct link entries in the install directory so that python will be able to import Matplotlib from the source directory. Thus, any changes to the \sphinxcode{\sphinxupquote{*.py}} files will be reflected the next time you import the library. If you change the C-extension source (which might happen if you change branches) you will need to run \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{n}{setup}\PYG{o}{.}\PYG{n}{py} \PYG{n}{build} \end{sphinxVerbatim} or re-run \sphinxcode{\sphinxupquote{python -mpip install -ve .}}. Alternatively, if you do \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{o}{\PYGZhy{}}\PYG{n}{v} \PYG{o}{.} \end{sphinxVerbatim} all of the files will be copied to the installation directory however, you will have to rerun this command every time the source is changed. Additionally you will need to copy \sphinxcode{\sphinxupquote{setup.cfg.template}} to \sphinxcode{\sphinxupquote{setup.cfg}} and edit it to contain \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{test}\PYG{p}{]} \PYG{n}{local\PYGZus{}freetype} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{tests} \PYG{o}{=} \PYG{k+kc}{True} \end{sphinxVerbatim} In either case you can then run the tests to check your work environment is set up properly: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \end{sphinxVerbatim} \begin{sphinxadmonition}{note}{Note:} \sphinxstylestrong{Additional dependencies for testing}: \sphinxhref{http://doc.pytest.org/en/latest/}{pytest} (version 3.6 or later), \sphinxhref{https://www.ghostscript.com/}{Ghostscript}, \sphinxhref{https://inkscape.org/}{Inkscape} \end{sphinxadmonition} \sphinxstrong{See also:} \begin{itemize} \item {} {\hyperref[\detokenize{devel/testing:testing}]{\sphinxcrossref{\DUrole{std,std-ref}{Developer's tips for testing}}}} \end{itemize} \section{Contributing code} \label{\detokenize{devel/contributing:contributing-code}} \subsection{How to contribute} \label{\detokenize{devel/contributing:how-to-contribute}} The preferred way to contribute to Matplotlib is to fork the \sphinxhref{https://github.com/matplotlib/matplotlib/}{main repository} on GitHub, then submit a "pull request" (PR). The best practices for using GitHub to make PRs to Matplotlib are documented in the {\hyperref[\detokenize{devel/gitwash/development_workflow:development-workflow}]{\sphinxcrossref{\DUrole{std,std-ref}{Development workflow}}}} section. A brief overview is: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxhref{https://github.com/join}{Create an account} on GitHub if you do not already have one. \item {} Fork the \sphinxhref{https://github.com/matplotlib/matplotlib}{project repository}: click on the 'Fork' button near the top of the page. This creates a copy of the code under your account on the GitHub server. \item {} Clone this copy to your local disk: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} git clone https://github.com/YourLogin/matplotlib.git \end{sphinxVerbatim} \item {} Create a branch to hold your changes: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} git checkout \PYGZhy{}b my\PYGZhy{}feature origin/master \end{sphinxVerbatim} and start making changes. Never work in the \sphinxcode{\sphinxupquote{master}} branch! \item {} Work on this copy, on your computer, using Git to do the version control. When you're done editing e.g., \sphinxcode{\sphinxupquote{lib/matplotlib/collections.py}}, do: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} git add lib/matplotlib/collections.py \PYGZdl{} git commit \end{sphinxVerbatim} to record your changes in Git, then push them to GitHub with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} git push \PYGZhy{}u origin my\PYGZhy{}feature \end{sphinxVerbatim} \end{enumerate} Finally, go to the web page of your fork of the Matplotlib repo, and click 'Pull request' to send your changes to the maintainers for review. You may want to consider sending an email to the mailing list for more visibility. \sphinxstrong{See also:} \begin{itemize} \item {} \sphinxhref{https://git-scm.com/documentation}{Git documentation} \item {} \sphinxhref{https://git-scm.com/book/en/v2/GitHub-Contributing-to-a-Project}{Git-Contributing to a Project} \item {} \sphinxhref{https://lab.github.com/githubtraining/introduction-to-github}{Introduction to Github} \item {} {\hyperref[\detokenize{devel/gitwash/development_workflow:development-workflow}]{\sphinxcrossref{\DUrole{std,std-ref}{Development workflow}}}}. \item {} {\hyperref[\detokenize{devel/gitwash/index:using-git}]{\sphinxcrossref{\DUrole{std,std-ref}{Working with Matplotlib source code}}}} \end{itemize} \subsection{Contributing pull requests} \label{\detokenize{devel/contributing:contributing-pull-requests}} It is recommended to check that your contribution complies with the following rules before submitting a pull request: \begin{itemize} \item {} If your pull request addresses an issue, please use the title to describe the issue and mention the issue number in the pull request description to ensure that a link is created to the original issue. \item {} All public methods should have informative docstrings with sample usage when appropriate. Use the \sphinxhref{https://numpydoc.readthedocs.io/en/latest/format.html}{numpy docstring standard}. \item {} Formatting should follow the recommendations of \sphinxhref{https://www.python.org/dev/peps/pep-0008/}{PEP8}. You should consider installing/enabling automatic PEP8 checking in your editor. Part of the test suite is checking PEP8 compliance, things go smoother if the code is mostly PEP8 compliant to begin with. \item {} Each high-level plotting function should have a simple example in the \sphinxcode{\sphinxupquote{Example}} section of the docstring. This should be as simple as possible to demonstrate the method. More complex examples should go in the \sphinxcode{\sphinxupquote{examples}} tree. \item {} Changes (both new features and bugfixes) should be tested. See {\hyperref[\detokenize{devel/testing:testing}]{\sphinxcrossref{\DUrole{std,std-ref}{Developer's tips for testing}}}} for more details. \item {} Import the following modules using the standard scipy conventions: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{numpy}\PYG{n+nn}{.}\PYG{n+nn}{ma} \PYG{k}{as} \PYG{n+nn}{ma} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{k}{as} \PYG{n+nn}{mpl} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{as} \PYG{n+nn}{cbook} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{patches} \PYG{k}{as} \PYG{n+nn}{mpatches} \end{sphinxVerbatim} \item {} If your change is a major new feature, add an entry to the \sphinxcode{\sphinxupquote{What's new}} section by adding a new file in \sphinxcode{\sphinxupquote{doc/users/next\_whats\_new}} (see \sphinxcode{\sphinxupquote{doc/users/next\_whats\_new/README.rst}} for more information). \item {} If you change the API in a backward-incompatible way, please document it in \sphinxcode{\sphinxupquote{doc/api/api\_changes}}, by adding a new file describing your changes (see \sphinxcode{\sphinxupquote{doc/api/api\_changes/README.rst}} for more information) \item {} See below for additional points about {\hyperref[\detokenize{devel/contributing:keyword-argument-processing}]{\sphinxcrossref{\DUrole{std,std-ref}{Keyword argument processing}}}}, if applicable for your pull request. \end{itemize} In addition, you can check for common programming errors with the following tools: \begin{itemize} \item {} Code with a good unittest coverage (at least 70\%, better 100\%), check with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{n}{coverage} \PYG{n}{pytest} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{cov}\PYG{o}{=}\PYG{n}{matplotlib} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{showlocals} \PYG{o}{\PYGZhy{}}\PYG{n}{v} \end{sphinxVerbatim} \item {} No pyflakes warnings, check with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{mpip} \PYG{n}{install} \PYG{n}{pyflakes} \PYG{n}{pyflakes} \PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{module}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} \end{itemize} \begin{sphinxadmonition}{note}{Note:} The current state of the Matplotlib code base is not compliant with all of those guidelines, but we expect that enforcing those constraints on all new contributions will move the overall code base quality in the right direction. \end{sphinxadmonition} \sphinxstrong{See also:} \begin{itemize} \item {} {\hyperref[\detokenize{devel/contributing:coding-guidelines}]{\sphinxcrossref{\DUrole{std,std-ref}{Coding guidelines}}}} \item {} {\hyperref[\detokenize{devel/testing:testing}]{\sphinxcrossref{\DUrole{std,std-ref}{Developer's tips for testing}}}} \item {} {\hyperref[\detokenize{devel/documenting_mpl:documenting-matplotlib}]{\sphinxcrossref{\DUrole{std,std-ref}{Writing documentation}}}} \end{itemize} \subsection{Issues for New Contributors} \label{\detokenize{devel/contributing:issues-for-new-contributors}}\label{\detokenize{devel/contributing:new-contributors}} New contributors should look for the following tags when looking for issues. We strongly recommend that new contributors tackle issues labeled \sphinxhref{https://github.com/matplotlib/matplotlib/labels/good\%20first\%20issue}{good first issue} as they are easy, well documented issues, that do not require an understanding of the different submodules of Matplotlib. This helps the contributor become familiar with the contribution workflow, and for the core devs to become acquainted with the contributor; besides which, we frequently underestimate how easy an issue is to solve! \section{Other ways to contribute} \label{\detokenize{devel/contributing:other-ways-to-contribute}}\label{\detokenize{devel/contributing:id2}} Code is not the only way to contribute to Matplotlib. For instance, documentation is also a very important part of the project and often doesn't get as much attention as it deserves. If you find a typo in the documentation, or have made improvements, do not hesitate to send an email to the mailing list or submit a GitHub pull request. Full documentation can be found under the doc/ directory. It also helps us if you spread the word: reference the project from your blog and articles or link to it from your website! \section{Coding guidelines} \label{\detokenize{devel/contributing:coding-guidelines}}\label{\detokenize{devel/contributing:id3}} \subsection{New modules and files: installation} \label{\detokenize{devel/contributing:new-modules-and-files-installation}}\begin{itemize} \item {} If you have added new files or directories, or reorganized existing ones, make sure the new files are included in the match patterns in \sphinxcode{\sphinxupquote{MANIFEST.in}}, and/or in \sphinxcode{\sphinxupquote{package\_data}} in \sphinxcode{\sphinxupquote{setup.py}}. \end{itemize} \subsection{C/C++ extensions} \label{\detokenize{devel/contributing:c-c-extensions}}\begin{itemize} \item {} Extensions may be written in C or C++. \item {} Code style should conform to PEP7 (understanding that PEP7 doesn't address C++, but most of its admonitions still apply). \item {} Python/C interface code should be kept separate from the core C/C++ code. The interface code should be named \sphinxcode{\sphinxupquote{FOO\_wrap.cpp}} or \sphinxcode{\sphinxupquote{FOO\_wrapper.cpp}}. \item {} Header file documentation (aka docstrings) should be in Numpydoc format. We don't plan on using automated tools for these docstrings, and the Numpydoc format is well understood in the scientific Python community. \end{itemize} \subsection{Keyword argument processing} \label{\detokenize{devel/contributing:keyword-argument-processing}}\label{\detokenize{devel/contributing:id4}} Matplotlib makes extensive use of \sphinxcode{\sphinxupquote{**kwargs}} for pass-through customizations from one function to another. A typical example is in {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.text:matplotlib.pyplot.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.pyplot.text()}}}}}. The definition of the pylab text function is a simple pass-through to {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.text()}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in pylab.py} \PYG{k}{def} \PYG{n+nf}{text}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ret} \PYG{o}{=} \PYG{n}{gca}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{text}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{n}{draw\PYGZus{}if\PYGZus{}interactive}\PYG{p}{(}\PYG{p}{)} \PYG{k}{return} \PYG{n}{ret} \end{sphinxVerbatim} {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.text:matplotlib.axes.Axes.text}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{text()}}}}} in simplified form looks like this, i.e., it just passes all \sphinxcode{\sphinxupquote{args}} and \sphinxcode{\sphinxupquote{kwargs}} on to \sphinxcode{\sphinxupquote{matplotlib.text.Text.\_\_init\_\_()}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in axes/\PYGZus{}axes.py} \PYG{k}{def} \PYG{n+nf}{text}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{fontdict}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{withdash}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{t} \PYG{o}{=} \PYG{n}{Text}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{o}{=}\PYG{n}{y}\PYG{p}{,} \PYG{n}{text}\PYG{o}{=}\PYG{n}{s}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} and \sphinxcode{\sphinxupquote{\_\_init\_\_()}} (again with liberties for illustration) just passes them on to the {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.Artist.update:matplotlib.artist.Artist.update}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.Artist.update()}}}}} method: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in text.py} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{x}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{y}\PYG{o}{=}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{text}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{Artist}\PYG{o}{.}\PYG{n+nf+fm}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{update}} does the work looking for methods named like \sphinxcode{\sphinxupquote{set\_property}} if \sphinxcode{\sphinxupquote{property}} is a keyword argument. i.e., no one looks at the keywords, they just get passed through the API to the artist constructor which looks for suitably named methods and calls them with the value. As a general rule, the use of \sphinxcode{\sphinxupquote{**kwargs}} should be reserved for pass-through keyword arguments, as in the example above. If all the keyword args are to be used in the function, and not passed on, use the key/value keyword args in the function definition rather than the \sphinxcode{\sphinxupquote{**kwargs}} idiom. In some cases, you may want to consume some keys in the local function, and let others pass through. Instead of poping arguments to use off \sphinxcode{\sphinxupquote{**kwargs}}, specify them as keyword-only arguments to the local function. This makes it obvious at a glance which arguments will be consumed in the function. For example, in {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot()}}}}}, \sphinxcode{\sphinxupquote{scalex}} and \sphinxcode{\sphinxupquote{scaley}} are local arguments and the rest are passed on as {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D()}}}}} keyword arguments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in axes/\PYGZus{}axes.py} \PYG{k}{def} \PYG{n+nf}{plot}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{n}{scalex}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{scaley}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n}{lines} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{line} \PYG{o+ow}{in} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{\PYGZus{}get\PYGZus{}lines}\PYG{p}{(}\PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{add\PYGZus{}line}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \PYG{n}{lines}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{line}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Using logging for debug messages} \label{\detokenize{devel/contributing:using-logging-for-debug-messages}}\label{\detokenize{devel/contributing:using-logging}} Matplotlib uses the standard python \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} library to write verbose warnings, information, and debug messages. Please use it! In all those places you write \sphinxhref{https://docs.python.org/3/library/functions.html\#print}{\sphinxcode{\sphinxupquote{print()}}} statements to do your debugging, try using \sphinxcode{\sphinxupquote{log.debug()}} instead! To include \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} in your module, at the top of the module, you need to \sphinxcode{\sphinxupquote{import logging}}. Then calls in your code like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{\PYGZus{}log} \PYG{o}{=} \PYG{n}{logging}\PYG{o}{.}\PYG{n}{getLogger}\PYG{p}{(}\PYG{n+nv+vm}{\PYGZus{}\PYGZus{}name\PYGZus{}\PYGZus{}}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} right after the imports} \PYG{c+c1}{\PYGZsh{} code} \PYG{c+c1}{\PYGZsh{} more code} \PYG{n}{\PYGZus{}log}\PYG{o}{.}\PYG{n}{info}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Here is some information}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{\PYGZus{}log}\PYG{o}{.}\PYG{n}{debug}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Here is some more detailed information}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} will log to a logger named \sphinxcode{\sphinxupquote{matplotlib.yourmodulename}}. If an end-user of Matplotlib sets up \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} to display at levels more verbose than \sphinxcode{\sphinxupquote{logger.WARNING}} in their code with the Matplotlib-provided helper: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{set\PYGZus{}loglevel}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{debug}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} or manually with \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{logging} \PYG{n}{logging}\PYG{o}{.}\PYG{n}{basicConfig}\PYG{p}{(}\PYG{n}{level}\PYG{o}{=}\PYG{n}{logging}\PYG{o}{.}\PYG{n}{DEBUG}\PYG{p}{)} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \end{sphinxVerbatim} Then they will receive messages like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{DEBUG}\PYG{p}{:}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{backends}\PYG{p}{:}\PYG{n}{backend} \PYG{n}{MacOSX} \PYG{n}{version} \PYG{n}{unknown} \PYG{n}{DEBUG}\PYG{p}{:}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{yourmodulename}\PYG{p}{:}\PYG{n}{Here} \PYG{o+ow}{is} \PYG{n}{some} \PYG{n}{information} \PYG{n}{DEBUG}\PYG{p}{:}\PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{yourmodulename}\PYG{p}{:}\PYG{n}{Here} \PYG{o+ow}{is} \PYG{n}{some} \PYG{n}{more} \PYG{n}{detailed} \PYG{n}{information} \end{sphinxVerbatim} \subsubsection{Which logging level to use?} \label{\detokenize{devel/contributing:which-logging-level-to-use}} There are five levels at which you can emit messages. \begin{itemize} \item {} \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.critical}{\sphinxcode{\sphinxupquote{logging.critical}}} and \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.error}{\sphinxcode{\sphinxupquote{logging.error}}} are really only there for errors that will end the use of the library but not kill the interpreter. \item {} \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.warning}{\sphinxcode{\sphinxupquote{logging.warning}}} and \sphinxcode{\sphinxupquote{cbook.\_warn\_external}} are used to warn the user, see below. \item {} \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.info}{\sphinxcode{\sphinxupquote{logging.info}}} is for information that the user may want to know if the program behaves oddly. They are not displayed by default. For instance, if an object isn't drawn because its position is \sphinxcode{\sphinxupquote{NaN}}, that can usually be ignored, but a mystified user could call \sphinxcode{\sphinxupquote{logging.basicConfig(level=logging.INFO)}} and get an error message that says why. \item {} \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.debug}{\sphinxcode{\sphinxupquote{logging.debug}}} is the least likely to be displayed, and hence can be the most verbose. "Expected" code paths (e.g., reporting normal intermediate steps of layouting or rendering) should only log at this level. \end{itemize} By default, \sphinxhref{https://docs.python.org/3/library/logging.html\#module-logging}{\sphinxcode{\sphinxupquote{logging}}} displays all log messages at levels higher than \sphinxcode{\sphinxupquote{logging.WARNING}} to \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.stderr}{\sphinxcode{\sphinxupquote{sys.stderr}}}. The \sphinxhref{https://docs.python.org/3/howto/logging.html\#logging-basic-tutorial}{logging tutorial} suggests that the difference between \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.warning}{\sphinxcode{\sphinxupquote{logging.warning}}} and \sphinxcode{\sphinxupquote{cbook.\_warn\_external}} (which uses \sphinxhref{https://docs.python.org/3/library/warnings.html\#warnings.warn}{\sphinxcode{\sphinxupquote{warnings.warn}}}) is that \sphinxcode{\sphinxupquote{cbook.\_warn\_external}} should be used for things the user must change to stop the warning (typically in the source), whereas \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.warning}{\sphinxcode{\sphinxupquote{logging.warning}}} can be more persistent. Moreover, note that \sphinxcode{\sphinxupquote{cbook.\_warn\_external}} will by default only emit a given warning \sphinxstyleemphasis{once} for each line of user code, whereas \sphinxhref{https://docs.python.org/3/library/logging.html\#logging.warning}{\sphinxcode{\sphinxupquote{logging.warning}}} will display the message every time it is called. By default, \sphinxhref{https://docs.python.org/3/library/warnings.html\#warnings.warn}{\sphinxcode{\sphinxupquote{warnings.warn}}} displays the line of code that has the \sphinxcode{\sphinxupquote{warn}} call. This usually isn't more informative than the warning message itself. Therefore, Matplotlib uses \sphinxcode{\sphinxupquote{cbook.\_warn\_external}} which uses \sphinxhref{https://docs.python.org/3/library/warnings.html\#warnings.warn}{\sphinxcode{\sphinxupquote{warnings.warn}}}, but goes up the stack and displays the first line of code outside of Matplotlib. For example, for the module: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in my\PYGZus{}matplotlib\PYGZus{}module.py} \PYG{k+kn}{import} \PYG{n+nn}{warnings} \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}range}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{bottom} \PYG{o}{==} \PYG{n}{top}\PYG{p}{:} \PYG{n}{warnings}\PYG{o}{.}\PYG{n}{warn}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Attempting to set identical bottom==top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} running the script: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{my\PYGZus{}matplotlib\PYGZus{}module} \PYG{n}{my\PYGZus{}matplotlib\PYGZus{}module}\PYG{o}{.}\PYG{n}{set\PYGZus{}range}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}set range} \end{sphinxVerbatim} will display: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+ne}{UserWarning}\PYG{p}{:} \PYG{n}{Attempting} \PYG{n}{to} \PYG{n+nb}{set} \PYG{n}{identical} \PYG{n}{bottom}\PYG{o}{==}\PYG{n}{top} \PYG{n}{warnings}\PYG{o}{.}\PYG{n}{warn}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Attempting to set identical bottom==top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} Modifying the module to use \sphinxcode{\sphinxupquote{cbook.\_warn\_external}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{cbook} \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}range}\PYG{p}{(}\PYG{n}{bottom}\PYG{p}{,} \PYG{n}{top}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{bottom} \PYG{o}{==} \PYG{n}{top}\PYG{p}{:} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{\PYGZus{}warn\PYGZus{}external}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Attempting to set identical bottom==top}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} and running the same script will display: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+ne}{UserWarning}\PYG{p}{:} \PYG{n}{Attempting} \PYG{n}{to} \PYG{n+nb}{set} \PYG{n}{identical} \PYG{n}{bottom}\PYG{o}{==}\PYG{n}{top} \PYG{n}{my\PYGZus{}matplotlib\PYGZus{}module}\PYG{o}{.}\PYG{n}{set\PYGZus{}range}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{0}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}set range} \end{sphinxVerbatim} \subsection{Developing a new backend} \label{\detokenize{devel/contributing:developing-a-new-backend}}\label{\detokenize{devel/contributing:custom-backend}} If you are working on a custom backend, the \sphinxstyleemphasis{backend} setting in \sphinxcode{\sphinxupquote{matplotlibrc}} ({\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}) supports an external backend via the \sphinxcode{\sphinxupquote{module}} directive. If \sphinxcode{\sphinxupquote{my\_backend.py}} is a Matplotlib backend in your \index{PYTHONPATH@\spxentry{PYTHONPATH}}\index{environment variable@\spxentry{environment variable}!PYTHONPATH@\spxentry{PYTHONPATH}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-PYTHONPATH}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{PYTHONPATH}}}}}, you can set it on one of several ways \begin{itemize} \item {} in \sphinxcode{\sphinxupquote{matplotlibrc}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{backend} \PYG{p}{:} \PYG{n}{module}\PYG{p}{:}\PYG{o}{/}\PYG{o}{/}\PYG{n}{my\PYGZus{}backend} \end{sphinxVerbatim} \item {} with the \index{MPLBACKEND@\spxentry{MPLBACKEND}}\index{environment variable@\spxentry{environment variable}!MPLBACKEND@\spxentry{MPLBACKEND}}{\hyperref[\detokenize{faq/environment_variables_faq:envvar-MPLBACKEND}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{MPLBACKEND}}}}} environment variable: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{\PYGZgt{}} \PYG{n}{export} \PYG{n}{MPLBACKEND}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{module://my\PYGZus{}backend}\PYG{l+s+s2}{\PYGZdq{}} \PYG{o}{\PYGZgt{}} \PYG{n}{python} \PYG{n}{simple\PYGZus{}plot}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} \item {} with the use directive in your script: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{use}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{module://my\PYGZus{}backend}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \end{itemize} \subsection{Writing examples} \label{\detokenize{devel/contributing:writing-examples}}\label{\detokenize{devel/contributing:sample-data}} We have hundreds of examples in subdirectories of \sphinxcode{\sphinxupquote{matplotlib/examples}}, and these are automatically generated when the website is built to show up in the \sphinxcode{\sphinxupquote{examples}} section of the website. Any sample data that the example uses should be kept small and distributed with Matplotlib in the \sphinxcode{\sphinxupquote{lib/matplotlib/mpl-data/sample\_data/}} directory. Then in your example code you can load it into a file handle with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{cbook} \PYG{k}{as} \PYG{n+nn}{cbook} \PYG{n}{fh} \PYG{o}{=} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{get\PYGZus{}sample\PYGZus{}data}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{mydata.dat}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \chapter{Developer's tips for testing} \label{\detokenize{devel/testing:developer-s-tips-for-testing}}\label{\detokenize{devel/testing:testing}}\label{\detokenize{devel/testing::doc}} Matplotlib's testing infrastructure depends on \sphinxhref{http://doc.pytest.org/en/latest/}{pytest}. The tests are in \sphinxcode{\sphinxupquote{lib/matplotlib/tests}}, and customizations to the pytest testing infrastructure are in {\hyperref[\detokenize{api/testing_api:module-matplotlib.testing}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.testing}}}}}. \section{Requirements} \label{\detokenize{devel/testing:requirements}} Install the latest version of Matplotlib as documented in {\hyperref[\detokenize{devel/contributing:installing-for-devs}]{\sphinxcrossref{\DUrole{std,std-ref}{Retrieving and installing the latest version of the code}}}} In particular, follow the instructions to use a local FreeType build. The following software is required to run the tests: \begin{itemize} \item {} \sphinxhref{http://doc.pytest.org/en/latest/}{pytest} (\textgreater{}=3.6) \item {} \sphinxhref{https://www.ghostscript.com/}{Ghostscript} (\textgreater{}= 9.0, to render PDF files) \item {} \sphinxhref{https://inkscape.org}{Inkscape} (to render SVG files) \end{itemize} Optionally you can install: \begin{itemize} \item {} \sphinxhref{https://pytest-cov.readthedocs.io/en/latest/}{pytest-cov} (\textgreater{}=2.3.1) to collect coverage information \item {} \sphinxhref{https://pypi.python.org/pypi/pytest-pep8}{pytest-pep8} to test coding standards \item {} \sphinxhref{https://pypi.python.org/pypi/pytest-timeout}{pytest-timeout} to limit runtime in case of stuck tests \item {} \sphinxhref{https://pypi.python.org/pypi/pytest-xdist}{pytest-xdist} to run tests in parallel \end{itemize} \section{Running the tests} \label{\detokenize{devel/testing:running-the-tests}} Running the tests is simple. Make sure you have pytest installed and run: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \end{sphinxVerbatim} or: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \PYG{o}{.} \end{sphinxVerbatim} in the root directory of the distribution. The script takes a set of commands, such as: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxcode{\sphinxupquote{-{-}pep8}} & Perform pep8 checks (requires \sphinxhref{https://pypi.python.org/pypi/pytest-pep8}{pytest-pep8}) \\ \hline \sphinxcode{\sphinxupquote{-m "not network"}} & Disable tests that require network access \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} Additional arguments are passed on to pytest. See the pytest documentation for \sphinxhref{http://doc.pytest.org/en/latest/usage.html}{supported arguments}. Some of the more important ones are given here: \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline \sphinxcode{\sphinxupquote{-{-}verbose}} & Be more verbose \\ \hline \sphinxcode{\sphinxupquote{-{-}n NUM}} & Run tests in parallel over NUM processes (requires \sphinxhref{https://pypi.python.org/pypi/pytest-xdist}{pytest-xdist}) \\ \hline \sphinxcode{\sphinxupquote{-{-}timeout=SECONDS}} & Set timeout for results from each test process (requires \sphinxhref{https://pypi.python.org/pypi/pytest-timeout}{pytest-timeout}) \\ \hline \sphinxcode{\sphinxupquote{-{-}capture=no}} or \sphinxcode{\sphinxupquote{-s}} & Do not capture stdout \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} To run a single test from the command line, you can provide a file path, optionally followed by the function separated by two colons, e.g., (tests do not need to be installed, but Matplotlib should be): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \PYG{n}{lib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{tests}\PYG{o}{/}\PYG{n}{test\PYGZus{}simplification}\PYG{o}{.}\PYG{n}{py}\PYG{p}{:}\PYG{p}{:}\PYG{n}{test\PYGZus{}clipping} \end{sphinxVerbatim} or, if tests are installed, a dot-separated path to the module, optionally followed by the function separated by two colons, such as: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{pyargs} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{tests}\PYG{o}{.}\PYG{n}{test\PYGZus{}simplification}\PYG{p}{:}\PYG{p}{:}\PYG{n}{test\PYGZus{}clipping} \end{sphinxVerbatim} If you want to run the full test suite, but want to save wall time try running the tests in parallel: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{pytest} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{verbose} \PYG{o}{\PYGZhy{}}\PYG{n}{n} \PYG{l+m+mi}{5} \end{sphinxVerbatim} Depending on your version of Python and pytest-xdist, you may need to set \sphinxcode{\sphinxupquote{PYTHONHASHSEED}} to a fixed value when running in parallel: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{PYTHONHASHSEED}\PYG{o}{=}\PYG{l+m+mi}{0} \PYG{n}{pytest} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{verbose} \PYG{o}{\PYGZhy{}}\PYG{n}{n} \PYG{l+m+mi}{5} \end{sphinxVerbatim} An alternative implementation that does not look at command line arguments and works from within Python is to run the tests from the Matplotlib library function \sphinxcode{\sphinxupquote{matplotlib.test()}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{matplotlib} \PYG{n}{matplotlib}\PYG{o}{.}\PYG{n}{test}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \section{Writing a simple test} \label{\detokenize{devel/testing:writing-a-simple-test}} Many elements of Matplotlib can be tested using standard tests. For example, here is a test from \sphinxcode{\sphinxupquote{matplotlib.tests.test\_basic}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{test\PYGZus{}simple}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ very simple example test} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{assert} \PYG{l+m+mi}{1} \PYG{o}{+} \PYG{l+m+mi}{1} \PYG{o}{==} \PYG{l+m+mi}{2} \end{sphinxVerbatim} Pytest determines which functions are tests by searching for files whose names begin with \sphinxcode{\sphinxupquote{"test\_"}} and then within those files for functions beginning with \sphinxcode{\sphinxupquote{"test"}} or classes beginning with \sphinxcode{\sphinxupquote{"Test"}}. Some tests have internal side effects that need to be cleaned up after their execution (such as created figures or modified rc params). The pytest fixture \sphinxcode{\sphinxupquote{mpl\_test\_settings()}} will automatically clean these up; there is no need to do anything further. \section{Random data in tests} \label{\detokenize{devel/testing:random-data-in-tests}} Random data is a very convenient way to generate data for examples, however the randomness is problematic for testing (as the tests must be deterministic!). To work around this set the seed in each test. For numpy use: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \end{sphinxVerbatim} and Python's random number generator: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{random} \PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{19680801}\PYG{p}{)} \end{sphinxVerbatim} The seed is John Hunter's birthday. \section{Writing an image comparison test} \label{\detokenize{devel/testing:writing-an-image-comparison-test}} Writing an image-based test is only slightly more difficult than a simple test. The main consideration is that you must specify the "baseline", or expected, images in the {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison}}}}} decorator. For example, this test generates a single image and automatically tests it: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{testing}\PYG{n+nn}{.}\PYG{n+nn}{decorators} \PYG{k}{import} \PYG{n}{image\PYGZus{}comparison} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n+nd}{@image\PYGZus{}comparison}\PYG{p}{(}\PYG{n}{baseline\PYGZus{}images}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{line\PYGZus{}dashes}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{,} \PYG{n}{remove\PYGZus{}text}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{extensions}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{test\PYGZus{}line\PYGZus{}dashes}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{,} \PYG{n}{linestyle}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{p}{(}\PYG{l+m+mi}{3}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{lw}\PYG{o}{=}\PYG{l+m+mi}{5}\PYG{p}{)} \end{sphinxVerbatim} The first time this test is run, there will be no baseline image to compare against, so the test will fail. Copy the output images (in this case \sphinxcode{\sphinxupquote{result\_images/test\_lines/test\_line\_dashes.png}}) to the correct subdirectory of \sphinxcode{\sphinxupquote{baseline\_images}} tree in the source directory (in this case \sphinxcode{\sphinxupquote{lib/matplotlib/tests/baseline\_images/test\_lines}}). Put this new file under source code revision control (with \sphinxcode{\sphinxupquote{git add}}). When rerunning the tests, they should now pass. Baseline images take a lot of space in the Matplotlib repository. An alternative approach for image comparison tests is to use the {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_figures\_equal}}}}} decorator, which should be used to decorate a function taking two \sphinxcode{\sphinxupquote{Figure}} parameters and draws the same images on the figures using two different methods (the tested method and the baseline method). The decorator will arrange for setting up the figures and then collect the drawn results and compare them. See the documentation of {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.image_comparison}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{image\_comparison}}}}} and {\hyperref[\detokenize{api/testing_api:matplotlib.testing.decorators.check_figures_equal}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{check\_figures\_equal}}}}} for additional information about their use. \section{Known failing tests} \label{\detokenize{devel/testing:known-failing-tests}} If you're writing a test, you may mark it as a known failing test with the \sphinxcode{\sphinxupquote{pytest.mark.xfail()}} decorator. This allows the test to be added to the test suite and run on the buildbots without causing undue alarm. For example, although the following test will fail, it is an expected failure: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{pytest} \PYG{n+nd}{@pytest}\PYG{o}{.}\PYG{n}{mark}\PYG{o}{.}\PYG{n}{xfail} \PYG{k}{def} \PYG{n+nf}{test\PYGZus{}simple\PYGZus{}fail}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZsq{}\PYGZsq{}\PYGZsq{}very simple example test that should fail\PYGZsq{}\PYGZsq{}\PYGZsq{}} \PYG{k}{assert} \PYG{l+m+mi}{1} \PYG{o}{+} \PYG{l+m+mi}{1} \PYG{o}{==} \PYG{l+m+mi}{3} \end{sphinxVerbatim} Note that the first argument to the \sphinxcode{\sphinxupquote{xfail()}} decorator is a fail condition, which can be a value such as True, False, or may be a dynamically evaluated expression. If a condition is supplied, then a reason must also be supplied with the \sphinxcode{\sphinxupquote{reason='message'}} keyword argument. \section{Creating a new module in matplotlib.tests} \label{\detokenize{devel/testing:creating-a-new-module-in-matplotlib-tests}} We try to keep the tests categorized by the primary module they are testing. For example, the tests related to the \sphinxcode{\sphinxupquote{mathtext.py}} module are in \sphinxcode{\sphinxupquote{test\_mathtext.py}}. \section{Using Travis CI} \label{\detokenize{devel/testing:using-travis-ci}} \sphinxhref{https://travis-ci.org/}{Travis CI} is a hosted CI system "in the cloud". Travis is configured to receive notifications of new commits to GitHub repos (via GitHub "service hooks") and to run builds or tests when it sees these new commits. It looks for a YAML file called \sphinxcode{\sphinxupquote{.travis.yml}} in the root of the repository to see how to test the project. Travis CI is already enabled for the \sphinxhref{https://github.com/matplotlib/matplotlib/}{main matplotlib GitHub repository} -- for example, see \sphinxhref{https://travis-ci.org/matplotlib/matplotlib}{its Travis page}. If you want to enable Travis CI for your personal Matplotlib GitHub repo, simply enable the repo to use Travis CI in either the Travis CI UI or the GitHub UI (Admin \textbar{} Service Hooks). For details, see \sphinxhref{https://docs.travis-ci.com/user/getting-started/}{the Travis CI Getting Started page}. This generally isn't necessary, since any pull request submitted against the main Matplotlib repository will be tested. Once this is configured, you can see the Travis CI results at \sphinxurl{https://travis-ci.org/your\_GitHub\_user\_name/matplotlib} -- here's \sphinxhref{https://travis-ci.org/msabramo/matplotlib}{an example}. \section{Using tox} \label{\detokenize{devel/testing:using-tox}} \sphinxhref{https://tox.readthedocs.io/en/latest/}{Tox} is a tool for running tests against multiple Python environments, including multiple versions of Python (e.g., 3.6, 3.7) and even different Python implementations altogether (e.g., CPython, PyPy, Jython, etc.), as long as all these versions are available on your system's \$PATH (consider using your system package manager, e.g. apt-get, yum, or Homebrew, to install them). tox makes it easy to determine if your working copy introduced any regressions before submitting a pull request. Here's how to use it: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} pip install tox \PYGZdl{} tox \end{sphinxVerbatim} You can also run tox on a subset of environments: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} tox \PYGZhy{}e py36,py37 \end{sphinxVerbatim} Tox processes everything serially so it can take a long time to test several environments. To speed it up, you might try using a new, parallelized version of tox called \sphinxcode{\sphinxupquote{detox}}. Give this a try: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{} pip install \PYGZhy{}U \PYGZhy{}i http://pypi.testrun.org detox \PYGZdl{} detox \end{sphinxVerbatim} Tox is configured using a file called \sphinxcode{\sphinxupquote{tox.ini}}. You may need to edit this file if you want to add new environments to test (e.g., \sphinxcode{\sphinxupquote{py33}}) or if you want to tweak the dependencies or the way the tests are run. For more info on the \sphinxcode{\sphinxupquote{tox.ini}} file, see the \sphinxhref{https://tox.readthedocs.io/en/latest/config.html}{Tox Configuration Specification}. \section{Building old versions of Matplotlib} \label{\detokenize{devel/testing:building-old-versions-of-matplotlib}} When running a \sphinxcode{\sphinxupquote{git bisect}} to see which commit introduced a certain bug, you may (rarely) need to build very old versions of Matplotlib. The following constraints need to be taken into account: \begin{itemize} \item {} Matplotlib 1.3 (or earlier) requires numpy 1.8 (or earlier). \end{itemize} \chapter{Writing documentation} \label{\detokenize{devel/documenting_mpl:writing-documentation}}\label{\detokenize{devel/documenting_mpl:documenting-matplotlib}}\label{\detokenize{devel/documenting_mpl::doc}} \begin{sphinxShadowBox} \sphinxstyletopictitle{Contents} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id7}}{\hyperref[\detokenize{devel/documenting_mpl:getting-started}]{\sphinxcrossref{Getting started}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id8}}{\hyperref[\detokenize{devel/documenting_mpl:general-file-structure}]{\sphinxcrossref{General file structure}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id9}}{\hyperref[\detokenize{devel/documenting_mpl:installing-dependencies}]{\sphinxcrossref{Installing dependencies}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id10}}{\hyperref[\detokenize{devel/documenting_mpl:building-the-docs}]{\sphinxcrossref{Building the docs}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id11}}{\hyperref[\detokenize{devel/documenting_mpl:writing-rest-pages}]{\sphinxcrossref{Writing ReST pages}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id12}}{\hyperref[\detokenize{devel/documenting_mpl:formatting-and-style-conventions}]{\sphinxcrossref{Formatting and style conventions}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id13}}{\hyperref[\detokenize{devel/documenting_mpl:section-name-formatting}]{\sphinxcrossref{Section name formatting}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id14}}{\hyperref[\detokenize{devel/documenting_mpl:function-arguments}]{\sphinxcrossref{Function arguments}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id15}}{\hyperref[\detokenize{devel/documenting_mpl:referring-to-other-documents-and-sections}]{\sphinxcrossref{Referring to other documents and sections}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id16}}{\hyperref[\detokenize{devel/documenting_mpl:referring-to-other-code}]{\sphinxcrossref{Referring to other code}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id17}}{\hyperref[\detokenize{devel/documenting_mpl:including-figures-and-files}]{\sphinxcrossref{Including figures and files}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id18}}{\hyperref[\detokenize{devel/documenting_mpl:writing-docstrings}]{\sphinxcrossref{Writing docstrings}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id19}}{\hyperref[\detokenize{devel/documenting_mpl:example-docstring}]{\sphinxcrossref{Example docstring}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id20}}{\hyperref[\detokenize{devel/documenting_mpl:formatting-conventions}]{\sphinxcrossref{Formatting conventions}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id21}}{\hyperref[\detokenize{devel/documenting_mpl:id4}]{\sphinxcrossref{Function arguments}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id22}}{\hyperref[\detokenize{devel/documenting_mpl:quotes-for-strings}]{\sphinxcrossref{Quotes for strings}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id23}}{\hyperref[\detokenize{devel/documenting_mpl:parameter-type-descriptions}]{\sphinxcrossref{Parameter type descriptions}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id24}}{\hyperref[\detokenize{devel/documenting_mpl:referencing-types}]{\sphinxcrossref{Referencing types}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id25}}{\hyperref[\detokenize{devel/documenting_mpl:see-also-sections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{See also}} sections}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id26}}{\hyperref[\detokenize{devel/documenting_mpl:wrapping-parameter-lists}]{\sphinxcrossref{Wrapping parameter lists}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id27}}{\hyperref[\detokenize{devel/documenting_mpl:rcparams}]{\sphinxcrossref{rcParams}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id28}}{\hyperref[\detokenize{devel/documenting_mpl:deprecated-formatting-conventions}]{\sphinxcrossref{Deprecated formatting conventions}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id29}}{\hyperref[\detokenize{devel/documenting_mpl:setters-and-getters}]{\sphinxcrossref{Setters and getters}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id30}}{\hyperref[\detokenize{devel/documenting_mpl:keyword-arguments}]{\sphinxcrossref{Keyword arguments}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id31}}{\hyperref[\detokenize{devel/documenting_mpl:inheriting-docstrings}]{\sphinxcrossref{Inheriting docstrings}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id32}}{\hyperref[\detokenize{devel/documenting_mpl:adding-figures}]{\sphinxcrossref{Adding figures}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id33}}{\hyperref[\detokenize{devel/documenting_mpl:writing-examples-and-tutorials}]{\sphinxcrossref{Writing examples and tutorials}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id34}}{\hyperref[\detokenize{devel/documenting_mpl:order-of-examples-in-the-gallery}]{\sphinxcrossref{Order of examples in the gallery}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id35}}{\hyperref[\detokenize{devel/documenting_mpl:miscellaneous}]{\sphinxcrossref{Miscellaneous}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id36}}{\hyperref[\detokenize{devel/documenting_mpl:adding-animations}]{\sphinxcrossref{Adding animations}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id37}}{\hyperref[\detokenize{devel/documenting_mpl:generating-inheritance-diagrams}]{\sphinxcrossref{Generating inheritance diagrams}}} \item {} \phantomsection\label{\detokenize{devel/documenting_mpl:id38}}{\hyperref[\detokenize{devel/documenting_mpl:emacs-helpers}]{\sphinxcrossref{Emacs helpers}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \section{Getting started} \label{\detokenize{devel/documenting_mpl:getting-started}} \subsection{General file structure} \label{\detokenize{devel/documenting_mpl:general-file-structure}} All documentation is built from the \sphinxcode{\sphinxupquote{doc/}} directory. This directory contains both reStructuredText (\sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST}; \sphinxcode{\sphinxupquote{.rst}}) files that contain pages in the documentation and configuration files for \sphinxhref{http://www.sphinx-doc.org}{Sphinx}. The \sphinxcode{\sphinxupquote{.rst}} files are kept in \sphinxcode{\sphinxupquote{doc/users}}, \sphinxcode{\sphinxupquote{doc/devel}}, \sphinxcode{\sphinxupquote{doc/api}} and \sphinxcode{\sphinxupquote{doc/faq}}. The main entry point is \sphinxcode{\sphinxupquote{doc/index.rst}}, which pulls in the \sphinxcode{\sphinxupquote{index.rst}} file for the users guide, developers guide, api reference, and FAQs. The documentation suite is built as a single document in order to make the most effective use of cross referencing. \sphinxhref{http://www.sphinx-doc.org}{Sphinx} also creates \sphinxcode{\sphinxupquote{.rst}} files that are staged in \sphinxcode{\sphinxupquote{doc/api}} from the docstrings of the classes in the Matplotlib library. Except for \sphinxcode{\sphinxupquote{doc/api/api\_changes/}}, these \sphinxcode{\sphinxupquote{.rst}} files are created when the documentation is built. Similarly, the contents of \sphinxcode{\sphinxupquote{doc/gallery}} and \sphinxcode{\sphinxupquote{doc/tutorials}} are generated by the \sphinxhref{https://sphinx-gallery.readthedocs.io/en/latest/}{Sphinx Gallery} from the sources in \sphinxcode{\sphinxupquote{examples}} and \sphinxcode{\sphinxupquote{tutorials}}. These sources consist of python scripts that have \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} documentation built into their comments. Don't directly edit the \sphinxcode{\sphinxupquote{.rst}} files in \sphinxcode{\sphinxupquote{doc/gallery}} and \sphinxcode{\sphinxupquote{doc/tutorials}} as they are regenerated when the documentation are built. \subsection{Installing dependencies} \label{\detokenize{devel/documenting_mpl:installing-dependencies}} The documentation for Matplotlib is generated from reStructuredText (\sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST}) using the \sphinxhref{http://www.sphinx-doc.org}{Sphinx} documentation generation tool. There are several extra requirements that are needed to build the documentation. They are listed in \sphinxcode{\sphinxupquote{doc-requirements.txt}}, which is shown below: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Requirements for building docs} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} You will first need a matching Matplotlib installation} \PYG{c+c1}{\PYGZsh{} e.g (from the Matplotlib root directory)} \PYG{c+c1}{\PYGZsh{} pip install \PYGZhy{}e .} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} Install the documentation requirements with:} \PYG{c+c1}{\PYGZsh{} pip install \PYGZhy{}r requirements/doc/doc\PYGZhy{}requirements.txt} \PYG{c+c1}{\PYGZsh{}} \PYG{n}{sphinx}\PYG{o}{\PYGZgt{}}\PYG{o}{=}\PYG{l+m+mf}{1.3}\PYG{p}{,}\PYG{o}{!=}\PYG{l+m+mf}{1.5}\PYG{o}{.}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{o}{!=}\PYG{l+m+mf}{1.6}\PYG{o}{.}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{o}{!=}\PYG{l+m+mf}{1.7}\PYG{o}{.}\PYG{l+m+mi}{3}\PYG{p}{,}\PYG{o}{!=}\PYG{l+m+mf}{1.8}\PYG{o}{.}\PYG{l+m+mi}{0}\PYG{p}{,}\PYG{o}{\PYGZlt{}}\PYG{l+m+mf}{2.0}\PYG{o}{.}\PYG{l+m+mi}{0} \PYG{n}{colorspacious} \PYG{n}{ipython} \PYG{n}{ipywidgets} \PYG{n}{numpydoc}\PYG{o}{\PYGZgt{}}\PYG{o}{=}\PYG{l+m+mf}{0.8} \PYG{n}{pillow}\PYG{o}{\PYGZgt{}}\PYG{o}{=}\PYG{l+m+mf}{3.4}\PYG{p}{,}\PYG{o}{!=}\PYG{l+m+mf}{5.4}\PYG{o}{.}\PYG{l+m+mi}{0} \PYG{n}{sphinx}\PYG{o}{\PYGZhy{}}\PYG{n}{gallery}\PYG{o}{\PYGZgt{}}\PYG{o}{=}\PYG{l+m+mf}{0.2} \PYG{n}{sphinx}\PYG{o}{\PYGZhy{}}\PYG{n}{copybutton} \end{sphinxVerbatim} \begin{sphinxadmonition}{note}{Note:}\begin{itemize} \item {} You'll need a minimal working LaTeX distribution for many examples to run. \item {} \sphinxhref{http://www.graphviz.org/Download.php}{Graphviz} is not a Python package, and needs to be installed separately. \end{itemize} \end{sphinxadmonition} \subsection{Building the docs} \label{\detokenize{devel/documenting_mpl:building-the-docs}} The documentation sources are found in the \sphinxcode{\sphinxupquote{doc/}} directory in the trunk. The configuration file for Sphinx is \sphinxcode{\sphinxupquote{doc/conf.py}}. It controls which directories Sphinx parses, how the docs are built, and how the extensions are used. To build the documentation in html format, cd into \sphinxcode{\sphinxupquote{doc/}} and run: \begin{sphinxVerbatim}[commandchars=\\\{\}] make html \end{sphinxVerbatim} Other useful invocations include \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Delete built files. May help if you get errors about missing paths or} \PYG{c+c1}{\PYGZsh{} broken links.} make clean \PYG{c+c1}{\PYGZsh{} Build pdf docs.} make latexpdf \end{sphinxVerbatim} The \sphinxcode{\sphinxupquote{SPHINXOPTS}} variable is set to \sphinxcode{\sphinxupquote{-W}} by default to turn warnings into errors. To unset it, use \begin{sphinxVerbatim}[commandchars=\\\{\}] make \PYG{n+nv}{SPHINXOPTS}\PYG{o}{=} html \end{sphinxVerbatim} You can use the \sphinxcode{\sphinxupquote{O}} variable to set additional options: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{make O=-j4 html}} runs a parallel build with 4 processes. \item {} \sphinxcode{\sphinxupquote{make O=-Dplot\_formats=png:100 html}} saves figures in low resolution. \item {} \sphinxcode{\sphinxupquote{make O=-Dplot\_gallery=0 html}} skips the gallery build. \end{itemize} Multiple options can be combined using e.g. \sphinxcode{\sphinxupquote{make O='-j4 -Dplot\_gallery=0' html}}. On Windows, options needs to be set as environment variables, e.g. \sphinxcode{\sphinxupquote{set O=-W -j4 \& make html}}. \section{Writing ReST pages} \label{\detokenize{devel/documenting_mpl:writing-rest-pages}}\label{\detokenize{devel/documenting_mpl:id1}} Most documentation is either in the docstring of individual classes and methods, in explicit \sphinxcode{\sphinxupquote{.rst}} files, or in examples and tutorials. All of these use the \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} syntax. Users should look at the \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} documentation for a full description. But some specific hints and conventions Matplotlib uses are useful for creating documentation. \subsection{Formatting and style conventions} \label{\detokenize{devel/documenting_mpl:formatting-and-style-conventions}} It is useful to strive for consistency in the Matplotlib documentation. Here are some formatting and style conventions that are used. \subsubsection{Section name formatting} \label{\detokenize{devel/documenting_mpl:section-name-formatting}} For everything but top-level chapters, use \sphinxcode{\sphinxupquote{Upper lower}} for section titles, e.g., \sphinxcode{\sphinxupquote{Possible hangups}} rather than \sphinxcode{\sphinxupquote{Possible Hangups}} \subsubsection{Function arguments} \label{\detokenize{devel/documenting_mpl:function-arguments}} Function arguments and keywords within docstrings should be referred to using the \sphinxcode{\sphinxupquote{*emphasis*}} role. This will keep Matplotlib's documentation consistent with Python's documentation: \begin{sphinxVerbatim}[commandchars=\\\{\}] Here is a description of \PYG{g+ge}{*argument*} \end{sphinxVerbatim} Do not use the \sphinxcode{\sphinxupquote{{}`default role{}`}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] Do not describe \PYG{n+nv}{{}`argument{}`} like this. As per the next section, this syntax will (unsuccessfully) attempt to resolve the argument as a link to a class or method in the library. \end{sphinxVerbatim} nor the \sphinxcode{\sphinxupquote{{}`{}`literal{}`{}`}} role: \begin{sphinxVerbatim}[commandchars=\\\{\}] Do not describe \PYG{l+s}{{}`{}`}\PYG{l+s}{argument}\PYG{l+s}{{}`{}`} like this. \end{sphinxVerbatim} \subsection{Referring to other documents and sections} \label{\detokenize{devel/documenting_mpl:referring-to-other-documents-and-sections}}\label{\detokenize{devel/documenting_mpl:internal-section-refs}} \sphinxhref{http://www.sphinx-doc.org}{Sphinx} allows internal \sphinxhref{http://www.sphinx-doc.org/en/stable/markup/inline.html}{references} between documents. Documents can be linked with the \sphinxcode{\sphinxupquote{:doc:}} directive: \begin{sphinxVerbatim}[commandchars=\\\{\}] See the \PYG{n+na}{:doc:}\PYG{n+nv}{{}`/faq/installing\PYGZus{}faq{}`} See the tutorial \PYG{n+na}{:doc:}\PYG{n+nv}{{}`/tutorials/introductory/sample\PYGZus{}plots{}`} See the example \PYG{n+na}{:doc:}\PYG{n+nv}{{}`/gallery/lines\PYGZus{}bars\PYGZus{}and\PYGZus{}markers/simple\PYGZus{}plot{}`} \end{sphinxVerbatim} will render as: \begin{quote} See the {\hyperref[\detokenize{faq/installing_faq::doc}]{\sphinxcrossref{\DUrole{doc}{Installation}}}} See the tutorial {\hyperref[\detokenize{tutorials/introductory/sample_plots::doc}]{\sphinxcrossref{\DUrole{doc}{Sample plots in Matplotlib}}}} See the example \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/simple\_plot} \end{quote} Sections can also be given reference names. For instance from the {\hyperref[\detokenize{faq/installing_faq::doc}]{\sphinxcrossref{\DUrole{doc}{Installation}}}} link: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{n+nt}{\PYGZus{}clean\PYGZhy{}install:} \PYG{g+gh}{How to completely remove Matplotlib} \PYG{g+gh}{===================================} Occasionally, problems with Matplotlib can be solved with a clean... \end{sphinxVerbatim} and refer to it using the standard reference syntax: \begin{sphinxVerbatim}[commandchars=\\\{\}] See \PYG{n+na}{:ref:}\PYG{n+nv}{{}`clean\PYGZhy{}install{}`} \end{sphinxVerbatim} will give the following link: {\hyperref[\detokenize{faq/installing_faq:clean-install}]{\sphinxcrossref{\DUrole{std,std-ref}{How to completely remove Matplotlib}}}} To maximize internal consistency in section labeling and references, use hyphen separated, descriptive labels for section references. Keep in mind that contents may be reorganized later, so avoid top level names in references like \sphinxcode{\sphinxupquote{user}} or \sphinxcode{\sphinxupquote{devel}} or \sphinxcode{\sphinxupquote{faq}} unless necessary, because for example the FAQ "what is a backend?" could later become part of the users guide, so the label: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{n+nt}{\PYGZus{}what\PYGZhy{}is\PYGZhy{}a\PYGZhy{}backend:} \end{sphinxVerbatim} is better than: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{n+nt}{\PYGZus{}faq\PYGZhy{}backend:} \end{sphinxVerbatim} In addition, since underscores are widely used by Sphinx itself, use hyphens to separate words. \subsection{Referring to other code} \label{\detokenize{devel/documenting_mpl:referring-to-other-code}}\label{\detokenize{devel/documenting_mpl:id2}} To link to other methods, classes, or modules in Matplotlib you can use back ticks, for example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nv}{{}`matplotlib.collections.LineCollection{}`} \end{sphinxVerbatim} generates a link like this: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.collections.LineCollection}}}}}. \sphinxstyleemphasis{Note:} We use the sphinx setting \sphinxcode{\sphinxupquote{default\_role = 'obj'}} so that you don't have to use qualifiers like \sphinxcode{\sphinxupquote{:class:}}, \sphinxcode{\sphinxupquote{:func:}}, \sphinxcode{\sphinxupquote{:meth:}} and the likes. Often, you don't want to show the full package and module name. As long as the target is unanbigous you can simply leave them out: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nv}{{}`.LineCollection{}`} \end{sphinxVerbatim} and the link still works: {\hyperref[\detokenize{api/collections_api:matplotlib.collections.LineCollection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{LineCollection}}}}}. If there are multiple code elements with the same name (e.g. \sphinxcode{\sphinxupquote{plot()}} is a method in multiple classes), you'll have to extend the definition: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nv}{{}`.pyplot.plot{}`} or \PYG{n+nv}{{}`.Axes.plot{}`} \end{sphinxVerbatim} These will show up as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{pyplot.plot}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Axes.plot}}}}}. To still show only the last segment you can add a tilde as prefix: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nv}{{}`\PYGZti{}.pyplot.plot{}`} or \PYG{n+nv}{{}`\PYGZti{}.Axes.plot{}`} \end{sphinxVerbatim} will render as {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}} or {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}. Other packages can also be linked via \sphinxhref{http://www.sphinx-doc.org/en/master/ext/intersphinx.html}{intersphinx}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nv}{{}`numpy.mean{}`} \end{sphinxVerbatim} will return this link: \sphinxhref{https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html\#numpy.mean}{\sphinxcode{\sphinxupquote{numpy.mean}}}. This works for Python, Numpy, Scipy, and Pandas (full list is in \sphinxcode{\sphinxupquote{doc/conf.py}}). Sometimes it is tricky to get external Sphinx linking to work; to check that a something exists to link to the following shell command outputs a list of all objects that can be referenced (in this case for Numpy): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{python} \PYG{o}{\PYGZhy{}}\PYG{n}{m} \PYG{n}{sphinx}\PYG{o}{.}\PYG{n}{ext}\PYG{o}{.}\PYG{n}{intersphinx} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{https://docs.scipy.org/doc/numpy/objects.inv}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \subsection{Including figures and files} \label{\detokenize{devel/documenting_mpl:including-figures-and-files}}\label{\detokenize{devel/documenting_mpl:rst-figures-and-includes}} Image files can directly included in pages with the \sphinxcode{\sphinxupquote{image::}} directive. e.g., \sphinxcode{\sphinxupquote{users/navigation\_toolbar.rst}} displays the toolbar icons with a call to a static image: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{image}\PYG{p}{:}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{/}\PYG{n}{\PYGZus{}static}\PYG{o}{/}\PYG{n}{toolbar}\PYG{o}{.}\PYG{n}{png} \end{sphinxVerbatim} as rendered on the page: {\hyperref[\detokenize{users/navigation_toolbar:navigation-toolbar}]{\sphinxcrossref{\DUrole{std,std-ref}{Interactive navigation}}}}. Files can be included verbatim. For instance the \sphinxcode{\sphinxupquote{matplotlibrc}} file is important for customizing Matplotlib, and is included verbatim in the tutorial in {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{literalinclude}\PYG{p}{:}\PYG{p}{:} \PYG{o}{.}\PYG{o}{.}\PYG{o}{/}\PYG{o}{.}\PYG{o}{.}\PYG{o}{/}\PYG{n}{\PYGZus{}static}\PYG{o}{/}\PYG{n}{matplotlibrc} \end{sphinxVerbatim} This is rendered at the bottom of {\hyperref[\detokenize{tutorials/introductory/customizing::doc}]{\sphinxcrossref{\DUrole{doc}{Customizing Matplotlib with style sheets and rcParams}}}}. Note that this is in a tutorial; see {\hyperref[\detokenize{devel/documenting_mpl:writing-examples-and-tutorials}]{\sphinxcrossref{\DUrole{std,std-ref}{Writing examples and tutorials}}}} below. The examples directory is also copied to \sphinxcode{\sphinxupquote{doc/gallery}} by sphinx-gallery, so plots from the examples directory can be included using \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{o+ow}{plot}\PYG{p}{::} gallery/lines\PYGZus{}bars\PYGZus{}and\PYGZus{}markers/simple\PYGZus{}plot.py \end{sphinxVerbatim} Note that the python script that generates the plot is referred to, rather than any plot that is created. Sphinx-gallery will provide the correct reference when the documentation is built. \section{Writing docstrings} \label{\detokenize{devel/documenting_mpl:writing-docstrings}}\label{\detokenize{devel/documenting_mpl:id3}} Most of the API documentation is written in docstrings. These are comment blocks in source code that explain how the code works. \begin{sphinxadmonition}{note}{Note:} Some parts of the documentation do not yet conform to the current documentation style. If in doubt, follow the rules given here and not what you may see in the source code. Pull requests updating docstrings to the current style are very welcome. \end{sphinxadmonition} All new or edited docstrings should conform to the \sphinxhref{https://numpydoc.readthedocs.io/en/latest/format.html}{numpydoc docstring guide}. Much of the \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} syntax discussed above ({\hyperref[\detokenize{devel/documenting_mpl:writing-rest-pages}]{\sphinxcrossref{\DUrole{std,std-ref}{Writing ReST pages}}}}) can be used for links and references. These docstrings eventually populate the \sphinxcode{\sphinxupquote{doc/api}} directory and form the reference documentation for the library. \subsection{Example docstring} \label{\detokenize{devel/documenting_mpl:example-docstring}} An example docstring looks like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{hlines}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{xmin}\PYG{p}{,} \PYG{n}{xmax}\PYG{p}{,} \PYG{n}{colors}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{k}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{linestyles}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{solid}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{label}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Plot horizontal lines at each *y* from *xmin* to *xmax*.} \PYG{l+s+sd}{ Parameters} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ y : float or array\PYGZhy{}like} \PYG{l+s+sd}{ y\PYGZhy{}indexes where to plot the lines.} \PYG{l+s+sd}{ xmin, xmax : float or array\PYGZhy{}like} \PYG{l+s+sd}{ Respective beginning and end of each line. If scalars are} \PYG{l+s+sd}{ provided, all lines will have the same length.} \PYG{l+s+sd}{ colors : array\PYGZhy{}like of colors, optional, default: \PYGZsq{}k\PYGZsq{}} \PYG{l+s+sd}{ linestyles : \PYGZob{}\PYGZsq{}solid\PYGZsq{}, \PYGZsq{}dashed\PYGZsq{}, \PYGZsq{}dashdot\PYGZsq{}, \PYGZsq{}dotted\PYGZsq{}\PYGZcb{}, optional} \PYG{l+s+sd}{ label : string, optional, default: \PYGZsq{}\PYGZsq{}} \PYG{l+s+sd}{ Returns} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ lines : {}`\PYGZti{}matplotlib.collections.LineCollection{}`} \PYG{l+s+sd}{ Other Parameters} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ **kwargs : {}`\PYGZti{}matplotlib.collections.LineCollection{}` properties.} \PYG{l+s+sd}{ See also} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ vlines : vertical lines} \PYG{l+s+sd}{ axhline: horizontal line across the axes} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} See the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.hlines:matplotlib.axes.Axes.hlines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{hlines}}}}} documentation for how this renders. The \sphinxhref{http://www.sphinx-doc.org}{Sphinx} website also contains plenty of \sphinxhref{https://www.sphinx-doc.org/en/master/contents.html}{documentation} concerning ReST markup and working with Sphinx in general. \subsection{Formatting conventions} \label{\detokenize{devel/documenting_mpl:formatting-conventions}} The basic docstring conventions are covered in the \sphinxhref{https://numpydoc.readthedocs.io/en/latest/format.html}{numpydoc docstring guide} and the \sphinxhref{http://www.sphinx-doc.org}{Sphinx} documentation. Some Matplotlib-specific formatting conventions to keep in mind: \subsubsection{Function arguments} \label{\detokenize{devel/documenting_mpl:id4}} Function arguments and keywords within docstrings should be referred to using the \sphinxcode{\sphinxupquote{*emphasis*}} role. This will keep Matplotlib's documentation consistent with Python's documentation: \begin{sphinxVerbatim}[commandchars=\\\{\}] If \PYG{g+ge}{*linestyles*} is \PYG{g+ge}{*None*}, the \PYGZsq{}solid\PYGZsq{} is used. \end{sphinxVerbatim} Do not use the \sphinxcode{\sphinxupquote{{}`default role{}`}} or the \sphinxcode{\sphinxupquote{{}`{}`literal{}`{}`}} role: \begin{sphinxVerbatim}[commandchars=\\\{\}] Neither \PYG{n+nv}{{}`argument{}`} nor \PYG{l+s}{{}`{}`}\PYG{l+s}{argument}\PYG{l+s}{{}`{}`} should be used. \end{sphinxVerbatim} \subsubsection{Quotes for strings} \label{\detokenize{devel/documenting_mpl:quotes-for-strings}} Matplotlib does not have a convention whether to use single-quotes or double-quotes. There is a mixture of both in the current code. Use simple single or double quotes when giving string values, e.g. \begin{sphinxVerbatim}[commandchars=\\\{\}] If \PYGZsq{}tight\PYGZsq{}, try to figure out the tight bbox of the figure. \end{sphinxVerbatim} \subsubsection{Parameter type descriptions} \label{\detokenize{devel/documenting_mpl:parameter-type-descriptions}} The main goal for parameter type descriptions is to be readable and understandable by humans. If the possible types are too complex use a simplification for the type description and explain the type more precisely in the text. Generally, the \sphinxhref{https://numpydoc.readthedocs.io/en/latest/format.html}{numpydoc docstring guide} conventions apply. The following rules expand on them where the numpydoc conventions are not specific. Use \sphinxcode{\sphinxupquote{float}} for a type that can be any number. Use \sphinxcode{\sphinxupquote{(float, float)}} to describe a 2D position. Use \sphinxcode{\sphinxupquote{array-like}} for homogeneous numeric sequences, which could typically be a numpy.array. Dimensionality may be specified using \sphinxcode{\sphinxupquote{2D}}, \sphinxcode{\sphinxupquote{3D}}, \sphinxcode{\sphinxupquote{n-dimensional}}. If you need to have variables denoting the sizes of the dimensions, use capital letters in brackets (\sphinxcode{\sphinxupquote{array-like (M, N)}}). When refering to them in the text they are easier read and no special formatting is needed. \sphinxcode{\sphinxupquote{float}} is the implicit default dtype for array-likes. For other dtypes use \sphinxcode{\sphinxupquote{array-like of int}}. Some possible uses: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+m+mi}{2}\PYG{n}{D} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{p}{(}\PYG{n}{N}\PYG{p}{)} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{p}{(}\PYG{n}{M}\PYG{p}{,} \PYG{n}{N}\PYG{p}{)} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{p}{(}\PYG{n}{M}\PYG{p}{,} \PYG{n}{N}\PYG{p}{,} \PYG{l+m+mi}{3}\PYG{p}{)} \PYG{n}{array}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{n}{of} \PYG{n+nb}{int} \end{sphinxVerbatim} Non-numeric homogeneous sequences are described as lists, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] list of str list of {}`.Artist{}` \end{sphinxVerbatim} \subsubsection{Referencing types} \label{\detokenize{devel/documenting_mpl:referencing-types}} Generally, the rules from {\hyperref[\detokenize{devel/documenting_mpl:referring-to-other-code}]{\sphinxcrossref{referring-to-other-code}}} apply. More specifically: Use full references \sphinxcode{\sphinxupquote{{}`\textasciitilde{}matplotlib.colors.Normalize{}`}} with an abbreviation tilde in parameter types. While the full name helps the reader of plain text docstrings, the HTML does not need to show the full name as it links to it. Hence, the \sphinxcode{\sphinxupquote{\textasciitilde{}}}-shortening keeps it more readable. Use abbreviated links \sphinxcode{\sphinxupquote{{}`.Normalize{}`}} in the text. \begin{sphinxVerbatim}[commandchars=\\\{\}] norm : \PYG{n+nv}{{}`\PYGZti{}matplotlib.colors.Normalize{}`}, optional A \PYG{n+nv}{{}`.Normalize{}`} instance is used to scale luminance data to 0, 1. \end{sphinxVerbatim} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{See also}} sections} \label{\detokenize{devel/documenting_mpl:see-also-sections}} Sphinx automatically links code elements in the definition blocks of \sphinxcode{\sphinxupquote{See also}} sections. No need to use backticks there: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{See} \PYG{n}{also} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}} \PYG{n}{vlines} \PYG{p}{:} \PYG{n}{vertical} \PYG{n}{lines} \PYG{n}{axhline}\PYG{p}{:} \PYG{n}{horizontal} \PYG{n}{line} \PYG{n}{across} \PYG{n}{the} \PYG{n}{axes} \end{sphinxVerbatim} \subsubsection{Wrapping parameter lists} \label{\detokenize{devel/documenting_mpl:wrapping-parameter-lists}} Long parameter lists should be wrapped using a \sphinxcode{\sphinxupquote{\textbackslash{}}} for continuation and starting on the new line without any indent (no indent because pydoc will parse the docstring and strip the line continuation so that indent would result in a lot of whitespace within the line): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{add\PYGZus{}axes}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ ...} \PYG{l+s+sd}{ Parameters} \PYG{l+s+sd}{ \PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{ projection : \PYGZob{}\PYGZsq{}aitoff\PYGZsq{}, \PYGZsq{}hammer\PYGZsq{}, \PYGZsq{}lambert\PYGZsq{}, \PYGZsq{}mollweide\PYGZsq{}, \PYGZsq{}polar\PYGZsq{}, \PYGZbs{}} \PYG{l+s+sd}{\PYGZsq{}rectilinear\PYGZsq{}\PYGZcb{}, optional} \PYG{l+s+sd}{ The projection type of the axes.} \PYG{l+s+sd}{ ...} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} Alternatively, you can describe the valid parameter values in a dedicated section of the docstring. \subsubsection{rcParams} \label{\detokenize{devel/documenting_mpl:rcparams}} rcParams can be referenced with the custom \sphinxcode{\sphinxupquote{:rc:}} role: \sphinxcode{\sphinxupquote{:rc:{}`foo{}`}} yields \sphinxcode{\sphinxupquote{rcParams{[}"foo"{]}}}. Use \sphinxcode{\sphinxupquote{= {[}default-val{]}}} to indicate the default value of the parameter. The default value should be literal, i.e. enclosed in double backticks. For simplicity these may be omitted for string default values. \begin{sphinxVerbatim}[commandchars=\\\{\}] If not provided, defaults to \PYG{n+na}{:rc:}\PYG{n+nv}{{}`figure.figsize{}`} = \PYG{l+s}{{}`{}`}\PYG{l+s}{[6.4, 4.8]}\PYG{l+s}{{}`{}`}. If not provided, defaults to \PYG{n+na}{:rc:}\PYG{n+nv}{{}`figure.facecolor{}`} = \PYGZsq{}w\PYGZsq{}. \end{sphinxVerbatim} \subsection{Deprecated formatting conventions} \label{\detokenize{devel/documenting_mpl:deprecated-formatting-conventions}} Formerly, we have used square brackets for explicit parameter lists \sphinxcode{\sphinxupquote{{[}'solid' \textbar{} 'dashed' \textbar{} 'dotted'{]}}}. With numpydoc we have switched to their standard using curly braces \sphinxcode{\sphinxupquote{\{'solid', 'dashed', 'dotted'\}}}. \subsection{Setters and getters} \label{\detokenize{devel/documenting_mpl:setters-and-getters}} Artist properties are implemented using setter and getter methods (because Matplotlib predates the introductions of the \sphinxhref{https://docs.python.org/3/library/functions.html\#property}{\sphinxcode{\sphinxupquote{property}}} decorator in Python). By convention, these setters and getters are named \sphinxcode{\sphinxupquote{set\_PROPERTYNAME}} and \sphinxcode{\sphinxupquote{get\_PROPERTYNAME}}; the list of properties thusly defined on an artist and their values can be listed by the {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.setp:matplotlib.pyplot.setp}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{setp}}}}} and \sphinxcode{\sphinxupquote{getp}} functions. \begin{sphinxadmonition}{note}{Note:} \sphinxcode{\sphinxupquote{ACCEPTS}} blocks have recently become optional. You may now use a numpydoc \sphinxcode{\sphinxupquote{Parameters}} block because the accepted values can now be read from the type description of the first parameter. \end{sphinxadmonition} Property setter methods should indicate the values they accept using a (legacy) special block in the docstring, starting with \sphinxcode{\sphinxupquote{ACCEPTS}}, as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in lines.py} \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}linestyle}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{linestyle}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Set the linestyle of the line} \PYG{l+s+sd}{ ACCEPTS: [ \PYGZsq{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}.\PYGZsq{} \textbar{} \PYGZsq{}:\PYGZsq{} \textbar{} \PYGZsq{}steps\PYGZsq{} \textbar{} \PYGZsq{}None\PYGZsq{} \textbar{} \PYGZsq{} \PYGZsq{} \textbar{} \PYGZsq{}\PYGZsq{} ]} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} The ACCEPTS block is used to render a table of all properties and their acceptable values in the docs; it can also be displayed using, e.g., \sphinxcode{\sphinxupquote{plt.setp(Line2D)}} (all properties) or \sphinxcode{\sphinxupquote{plt.setp(Line2D, 'linestyle')}} (just one property). There are cases in which the ACCEPTS string is not useful in the generated Sphinx documentation, e.g. if the valid parameters are already defined in the numpydoc parameter list. You can hide the ACCEPTS string from Sphinx by making it a ReST comment (i.e. use \sphinxcode{\sphinxupquote{.. ACCEPTS:}}): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{set\PYGZus{}linestyle}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{linestyle}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ An ACCEPTS string invisible to Sphinx.} \PYG{l+s+sd}{ .. ACCEPTS: [ \PYGZsq{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}\PYGZhy{}\PYGZsq{} \textbar{} \PYGZsq{}\PYGZhy{}.\PYGZsq{} \textbar{} \PYGZsq{}:\PYGZsq{} \textbar{} \PYGZsq{}steps\PYGZsq{} \textbar{} \PYGZsq{}None\PYGZsq{} \textbar{} \PYGZsq{} \PYGZsq{} \textbar{} \PYGZsq{}\PYGZsq{} ]} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} \subsection{Keyword arguments} \label{\detokenize{devel/documenting_mpl:keyword-arguments}} \begin{sphinxadmonition}{note}{Note:} The information in this section is being actively discussed by the development team, so use the docstring interpolation only if necessary. This section has been left in place for now because this interpolation is part of the existing documentation. \end{sphinxadmonition} Since Matplotlib uses a lot of pass-through \sphinxcode{\sphinxupquote{kwargs}}, e.g., in every function that creates a line ({\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.plot:matplotlib.pyplot.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{plot}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogx:matplotlib.pyplot.semilogx}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogx}}}}}, {\hyperref[\detokenize{api/_as_gen/matplotlib.pyplot.semilogy:matplotlib.pyplot.semilogy}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{semilogy}}}}}, etc...), it can be difficult for the new user to know which \sphinxcode{\sphinxupquote{kwargs}} are supported. Matplotlib uses a docstring interpolation scheme to support documentation of every function that takes a \sphinxcode{\sphinxupquote{**kwargs}}. The requirements are: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} single point of configuration so changes to the properties don't require multiple docstring edits. \item {} as automated as possible so that as properties change, the docs are updated automatically. \end{enumerate} The function {\hyperref[\detokenize{api/_as_gen/matplotlib.artist.kwdoc:matplotlib.artist.kwdoc}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.artist.kwdoc}}}}} and the decorator \sphinxcode{\sphinxupquote{matplotlib.docstring.dedent\_interpd}} facilitate this. They combine Python string interpolation in the docstring with the Matplotlib artist introspection facility that underlies \sphinxcode{\sphinxupquote{setp}} and \sphinxcode{\sphinxupquote{getp}}. The \sphinxcode{\sphinxupquote{kwdoc}} function gives the list of properties as a docstring. In order to use this in another docstring, first update the \sphinxcode{\sphinxupquote{matplotlib.docstring.interpd}} object, as seen in this example from {\hyperref[\detokenize{api/lines_api:module-matplotlib.lines}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.lines}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in lines.py} \PYG{n}{docstring}\PYG{o}{.}\PYG{n}{interpd}\PYG{o}{.}\PYG{n}{update}\PYG{p}{(}\PYG{n}{Line2D}\PYG{o}{=}\PYG{n}{artist}\PYG{o}{.}\PYG{n}{kwdoc}\PYG{p}{(}\PYG{n}{Line2D}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Then in any function accepting {\hyperref[\detokenize{api/_as_gen/matplotlib.lines.Line2D:matplotlib.lines.Line2D}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Line2D}}}}} pass-through \sphinxcode{\sphinxupquote{kwargs}}, e.g., {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.plot:matplotlib.axes.Axes.plot}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes.plot}}}}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} in axes.py} \PYG{n+nd}{@docstring.dedent\PYGZus{}interpd} \PYG{k}{def} \PYG{n+nf}{plot}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Some stuff omitted} \PYG{l+s+sd}{ The kwargs are Line2D properties:} \PYG{l+s+sd}{ \PYGZpc{}(\PYGZus{}Line2D\PYGZus{}docstr)s} \PYG{l+s+sd}{ kwargs scalex and scaley, if defined, are passed on} \PYG{l+s+sd}{ to autoscale\PYGZus{}view to determine whether the x and y axes are} \PYG{l+s+sd}{ autoscaled; default True. See Axes.autoscale\PYGZus{}view for more} \PYG{l+s+sd}{ information} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} Note there is a problem for {\hyperref[\detokenize{api/artist_api:matplotlib.artist.Artist}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{Artist}}}}} \sphinxcode{\sphinxupquote{\_\_init\_\_}} methods, e.g., \sphinxcode{\sphinxupquote{matplotlib.patches.Patch.\_\_init\_\_}}, which supports \sphinxcode{\sphinxupquote{Patch}} \sphinxcode{\sphinxupquote{kwargs}}, since the artist inspector cannot work until the class is fully defined and we can't modify the \sphinxcode{\sphinxupquote{Patch.\_\_init\_\_.\_\_doc\_\_}} docstring outside the class definition. There are some some manual hacks in this case, violating the "single entry point" requirement above -- see the \sphinxcode{\sphinxupquote{docstring.interpd.update}} calls in {\hyperref[\detokenize{api/patches_api:module-matplotlib.patches}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.patches}}}}}. \subsection{Inheriting docstrings} \label{\detokenize{devel/documenting_mpl:inheriting-docstrings}} If a subclass overrides a method but does not change the semantics, we can reuse the parent docstring for the method of the child class. Python does this automatically, if the subclass method does not have a docstring. Use a plain comment \sphinxcode{\sphinxupquote{\# docstring inherited}} to denote the intention to reuse the parent docstring. That way we do not accidentially create a docstring in the future: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{A}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{foo}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}The parent docstring.\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{class} \PYG{n+nc}{B}\PYG{p}{(}\PYG{n}{A}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{foo}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} docstring inherited} \PYG{k}{pass} \end{sphinxVerbatim} \subsection{Adding figures} \label{\detokenize{devel/documenting_mpl:adding-figures}}\label{\detokenize{devel/documenting_mpl:docstring-adding-figures}} As above (see {\hyperref[\detokenize{devel/documenting_mpl:rst-figures-and-includes}]{\sphinxcrossref{\DUrole{std,std-ref}{Including figures and files}}}}), figures in the examples gallery can be referenced with a \sphinxcode{\sphinxupquote{:plot:}} directive pointing to the python script that created the figure. For instance the {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.legend:matplotlib.axes.Axes.legend}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{legend}}}}} docstring references the file \sphinxcode{\sphinxupquote{examples/text\_labels\_and\_annotations/legend.py}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{...} \PYG{l+s+sd}{Examples} \PYG{l+s+sd}{\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{.. plot:: gallery/text\PYGZus{}labels\PYGZus{}and\PYGZus{}annotations/legend.py} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} Note that \sphinxcode{\sphinxupquote{examples/text\_labels\_and\_annotations/legend.py}} has been mapped to \sphinxcode{\sphinxupquote{gallery/text\_labels\_and\_annotations/legend.py}}, a redirection that may be fixed in future re-organization of the docs. Plots can also be directly placed inside docstrings. Details are in {\hyperref[\detokenize{devel/plot_directive::doc}]{\sphinxcrossref{\DUrole{doc}{Plot directive documentation}}}}. A short example is: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{...} \PYG{l+s+sd}{Examples} \PYG{l+s+sd}{\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}\PYGZhy{}} \PYG{l+s+sd}{.. plot::} \PYG{l+s+sd}{ import matplotlib.image as mpimg} \PYG{l+s+sd}{ img = mpimg.imread(\PYGZsq{}\PYGZus{}static/stinkbug.png\PYGZsq{})} \PYG{l+s+sd}{ imgplot = plt.imshow(img)} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} An advantage of this style over referencing an example script is that the code will also appear in interactive docstrings. \section{Writing examples and tutorials} \label{\detokenize{devel/documenting_mpl:writing-examples-and-tutorials}}\label{\detokenize{devel/documenting_mpl:id5}} Examples and tutorials are python scripts that are run by \sphinxhref{https://sphinx-gallery.readthedocs.io/en/latest/}{Sphinx Gallery} to create a gallery of images in the \sphinxcode{\sphinxupquote{/doc/gallery}} and \sphinxcode{\sphinxupquote{/doc/tutorials}} directories respectively. To exclude an example from having an plot generated insert "sgskip" somewhere in the filename. The format of these files is relatively straightforward. Properly formatted comment blocks are treated as \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} text, the code is displayed, and figures are put into the built page. For instance the example \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/simple\_plot} example is generated from \sphinxcode{\sphinxupquote{/examples/lines\_bars\_and\_markers/simple\_plot.py}}, which looks like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{===========} \PYG{l+s+sd}{Simple Plot} \PYG{l+s+sd}{===========} \PYG{l+s+sd}{Create a simple plot.} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k+kn}{as} \PYG{n+nn}{np} \PYG{c+c1}{\PYGZsh{} Data for plotting} \PYG{n}{t} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mf}{0.0}\PYG{p}{,} \PYG{l+m+mf}{2.0}\PYG{p}{,} \PYG{l+m+mf}{0.01}\PYG{p}{)} \PYG{n}{s} \PYG{o}{=} \PYG{l+m+mi}{1} \PYG{o}{+} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{l+m+mi}{2} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi} \PYG{o}{*} \PYG{n}{t}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} Note that using plt.subplots below is equivalent to using} \PYG{c+c1}{\PYGZsh{} fig = plt.figure and then ax = fig.add\PYGZus{}subplot(111)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{t}\PYG{p}{,} \PYG{n}{s}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set}\PYG{p}{(}\PYG{n}{xlabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{time (s)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{ylabel}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{voltage (mV)}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{title}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{About as simple as it gets, folks}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} The first comment block is treated as \sphinxhref{http://docutils.sourceforge.net/rst.html}{ReST} text. The other comment blocks render as comments in \DUrole{xref,std,std-doc}{/gallery/lines\_bars\_and\_markers/simple\_plot}. Tutorials are made with the exact same mechanism, except they are longer, and typically have more than one comment block (i.e. {\hyperref[\detokenize{tutorials/introductory/usage::doc}]{\sphinxcrossref{\DUrole{doc}{Usage Guide}}}}). The first comment block can be the same as the example above. Subsequent blocks of ReST text are delimited by a line of \sphinxcode{\sphinxupquote{\#\#\#}} characters: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{===========} \PYG{l+s+sd}{Simple Plot} \PYG{l+s+sd}{===========} \PYG{l+s+sd}{Create a simple plot.} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{grid}\PYG{p}{(}\PYG{p}{)} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} Second plot} \PYG{c+c1}{\PYGZsh{} ===========} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} This is a second plot that is very nice} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{50}\PYG{p}{)}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} In this way text, code, and figures are output in a "notebook" style. \subsection{Order of examples in the gallery} \label{\detokenize{devel/documenting_mpl:order-of-examples-in-the-gallery}} The order of the sections of the {\hyperref[\detokenize{tutorials/index:tutorials}]{\sphinxcrossref{\DUrole{std,std-ref}{Tutorials}}}} and the \DUrole{xref,std,std-ref}{gallery}, as well as the order of the examples within each section are determined in a two step process from within the \sphinxcode{\sphinxupquote{/doc/sphinxext/gallery\_order.py}}: \begin{itemize} \item {} \sphinxstyleemphasis{Explicit order}: This file contains a list of folders for the section order and a list of examples for the subsection order. The order of the items shown in the doc pages is the order those items appear in those lists. \item {} \sphinxstyleemphasis{Implicit order}: If a folder or example is not in those lists, it will be appended after the explicitely ordered items and all of those additional items will be ordered by pathname (for the sections) or by filename (for the subsections). \end{itemize} As a consequence, if you want to let your example appear in a certain position in the gallery, extend those lists with your example. In case no explicit order is desired or necessary, still make sure to name your example consistently, i.e. use the main function or subject of the example as first word in the filename; e.g. an image example should ideally be named similar to \sphinxcode{\sphinxupquote{imshow\_mynewexample.py}}. \section{Miscellaneous} \label{\detokenize{devel/documenting_mpl:miscellaneous}} \subsection{Adding animations} \label{\detokenize{devel/documenting_mpl:adding-animations}} There is a Matplotlib Google/Gmail account with username \sphinxcode{\sphinxupquote{mplgithub}} which was used to setup the github account but can be used for other purposes, like hosting Google docs or Youtube videos. You can embed a Matplotlib animation in the docs by first saving the animation as a movie using {\hyperref[\detokenize{api/_as_gen/matplotlib.animation.Animation:matplotlib.animation.Animation.save}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.animation.Animation.save()}}}}}, and then uploading to \sphinxhref{https://www.youtube.com/user/matplotlib}{matplotlib's Youtube channel} and inserting the embedding string youtube provides like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{o+ow}{raw}\PYG{p}{::} html \PYGZlt{}iframe width=\PYGZdq{}420\PYGZdq{} height=\PYGZdq{}315\PYGZdq{} src=\PYGZdq{}http://www.youtube.com/embed/32cjc6V0OZY\PYGZdq{} frameborder=\PYGZdq{}0\PYGZdq{} allowfullscreen\PYGZgt{} \PYGZlt{}/iframe\PYGZgt{} \end{sphinxVerbatim} An example save command to generate a movie looks like this \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ani} \PYG{o}{=} \PYG{n}{animation}\PYG{o}{.}\PYG{n}{FuncAnimation}\PYG{p}{(}\PYG{n}{fig}\PYG{p}{,} \PYG{n}{animate}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{n+nb}{len}\PYG{p}{(}\PYG{n}{y}\PYG{p}{)}\PYG{p}{)}\PYG{p}{,} \PYG{n}{interval}\PYG{o}{=}\PYG{l+m+mi}{25}\PYG{p}{,} \PYG{n}{blit}\PYG{o}{=}\PYG{n+nb+bp}{True}\PYG{p}{,} \PYG{n}{init\PYGZus{}func}\PYG{o}{=}\PYG{n}{init}\PYG{p}{)} \PYG{n}{ani}\PYG{o}{.}\PYG{n}{save}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{double\PYGZus{}pendulum.mp4}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{fps}\PYG{o}{=}\PYG{l+m+mi}{15}\PYG{p}{)} \end{sphinxVerbatim} Contact Michael Droettboom for the login password to upload youtube videos of google docs to the mplgithub account. \subsection{Generating inheritance diagrams} \label{\detokenize{devel/documenting_mpl:generating-inheritance-diagrams}}\label{\detokenize{devel/documenting_mpl:inheritance-diagrams}} Class inheritance diagrams can be generated with the \sphinxcode{\sphinxupquote{inheritance-diagram}} directive. To use it, provide the directive with a number of class or module names (separated by whitespace). If a module name is provided, all classes in that module will be used. All of the ancestors of these classes will be included in the inheritance diagram. A single option is available: \sphinxstyleemphasis{parts} controls how many of parts in the path to the class are shown. For example, if \sphinxstyleemphasis{parts} == 1, the class \sphinxcode{\sphinxupquote{matplotlib.patches.Patch}} is shown as \sphinxcode{\sphinxupquote{Patch}}. If \sphinxstyleemphasis{parts} == 2, it is shown as \sphinxcode{\sphinxupquote{patches.Patch}}. If \sphinxstyleemphasis{parts} == 0, the full path is shown. Example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{..} \PYG{o+ow}{inheritance\PYGZhy{}diagram}\PYG{p}{::} matplotlib.patches matplotlib.lines matplotlib.text \PYG{n+nc}{:parts:} \PYG{n+nf}{2} \end{sphinxVerbatim} \sphinxincludegraphics[]{inheritance-fd11677a3c23084b8e3edec5b367536e2dd78256.pdf} \subsection{Emacs helpers} \label{\detokenize{devel/documenting_mpl:emacs-helpers}}\label{\detokenize{devel/documenting_mpl:id6}} There is an emacs mode \sphinxhref{http://docutils.sourceforge.net/tools/editors/emacs/rst.el}{rst.el} which automates many important ReST tasks like building and updating table-of-contents, and promoting or demoting section headings. Here is the basic \sphinxcode{\sphinxupquote{.emacs}} configuration: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{(}\PYG{n+nb}{require} \PYG{l+s+ss}{\PYGZsq{}rst}\PYG{p}{)} \PYG{p}{(}\PYG{k}{setq} \PYG{n+nv}{auto\PYGZhy{}mode\PYGZhy{}alist} \PYG{p}{(}\PYG{n+nb}{append} \PYG{o}{\PYGZsq{}}\PYG{p}{(}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}\PYGZbs{}\PYGZbs{}.txt\PYGZdl{}\PYGZdq{}} \PYG{o}{.} \PYG{n+nv}{rst\PYGZhy{}mode}\PYG{p}{)} \PYG{p}{(}\PYG{l+s}{\PYGZdq{}\PYGZbs{}\PYGZbs{}.rst\PYGZdl{}\PYGZdq{}} \PYG{o}{.} \PYG{n+nv}{rst\PYGZhy{}mode}\PYG{p}{)} \PYG{p}{(}\PYG{l+s}{\PYGZdq{}\PYGZbs{}\PYGZbs{}.rest\PYGZdl{}\PYGZdq{}} \PYG{o}{.} \PYG{n+nv}{rst\PYGZhy{}mode}\PYG{p}{)}\PYG{p}{)} \PYG{n+nv}{auto\PYGZhy{}mode\PYGZhy{}alist}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} Some helpful functions: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{n}{TAB} \PYG{o}{\PYGZhy{}} \PYG{n}{rst}\PYG{o}{\PYGZhy{}}\PYG{n}{toc}\PYG{o}{\PYGZhy{}}\PYG{n}{insert} \PYG{n}{Insert} \PYG{n}{table} \PYG{n}{of} \PYG{n}{contents} \PYG{n}{at} \PYG{n}{point} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{u} \PYG{o}{\PYGZhy{}} \PYG{n}{rst}\PYG{o}{\PYGZhy{}}\PYG{n}{toc}\PYG{o}{\PYGZhy{}}\PYG{n}{update} \PYG{n}{Update} \PYG{n}{the} \PYG{n}{table} \PYG{n}{of} \PYG{n}{contents} \PYG{n}{at} \PYG{n}{point} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{l} \PYG{n}{rst}\PYG{o}{\PYGZhy{}}\PYG{n}{shift}\PYG{o}{\PYGZhy{}}\PYG{n}{region}\PYG{o}{\PYGZhy{}}\PYG{n}{left} \PYG{n}{Shift} \PYG{n}{region} \PYG{n}{to} \PYG{n}{the} \PYG{n}{left} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{c} \PYG{n}{C}\PYG{o}{\PYGZhy{}}\PYG{n}{r} \PYG{n}{rst}\PYG{o}{\PYGZhy{}}\PYG{n}{shift}\PYG{o}{\PYGZhy{}}\PYG{n}{region}\PYG{o}{\PYGZhy{}}\PYG{n}{right} \PYG{n}{Shift} \PYG{n}{region} \PYG{n}{to} \PYG{n}{the} \PYG{n}{right} \end{sphinxVerbatim} \chapter{Plot directive documentation} \label{\detokenize{devel/plot_directive:module-matplotlib.sphinxext.plot_directive}}\label{\detokenize{devel/plot_directive:plot-directive-documentation}}\label{\detokenize{devel/plot_directive::doc}}\index{matplotlib.sphinxext.plot\_directive (module)@\spxentry{matplotlib.sphinxext.plot\_directive}\spxextra{module}} A directive for including a matplotlib plot in a Sphinx document. By default, in HTML output, \sphinxcode{\sphinxupquote{plot}} will include a .png file with a link to a high-res .png and .pdf. In LaTeX output, it will include a .pdf. The source code for the plot may be included in one of three ways: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxstylestrong{A path to a source file} as the argument to the directive: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{plot}\PYG{p}{:}\PYG{p}{:} \PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{plot}\PYG{o}{.}\PYG{n}{py} \end{sphinxVerbatim} When a path to a source file is given, the content of the directive may optionally contain a caption for the plot: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{plot}\PYG{p}{:}\PYG{p}{:} \PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{plot}\PYG{o}{.}\PYG{n}{py} \PYG{n}{This} \PYG{o+ow}{is} \PYG{n}{the} \PYG{n}{caption} \PYG{k}{for} \PYG{n}{the} \PYG{n}{plot} \end{sphinxVerbatim} Additionally, one may specify the name of a function to call (with no arguments) immediately after importing the module: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{plot}\PYG{p}{:}\PYG{p}{:} \PYG{n}{path}\PYG{o}{/}\PYG{n}{to}\PYG{o}{/}\PYG{n}{plot}\PYG{o}{.}\PYG{n}{py} \PYG{n}{plot\PYGZus{}function1} \end{sphinxVerbatim} \item {} Included as \sphinxstylestrong{inline content} to the directive: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{plot}\PYG{p}{:}\PYG{p}{:} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{image} \PYG{k}{as} \PYG{n+nn}{mpimg} \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{n}{img} \PYG{o}{=} \PYG{n}{mpimg}\PYG{o}{.}\PYG{n}{imread}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{\PYGZus{}static/stinkbug.png}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{imgplot} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{imshow}\PYG{p}{(}\PYG{n}{img}\PYG{p}{)} \end{sphinxVerbatim} \item {} Using \sphinxstylestrong{doctest} syntax: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{.}\PYG{o}{.} \PYG{n}{plot}\PYG{p}{:}\PYG{p}{:} \PYG{n}{A} \PYG{n}{plotting} \PYG{n}{example}\PYG{p}{:} \PYG{o}{\PYGZgt{}\PYGZgt{}}\PYG{o}{\PYGZgt{}} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{o}{\PYGZgt{}\PYGZgt{}}\PYG{o}{\PYGZgt{}} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{,}\PYG{l+m+mi}{2}\PYG{p}{,}\PYG{l+m+mi}{3}\PYG{p}{]}\PYG{p}{,} \PYG{p}{[}\PYG{l+m+mi}{4}\PYG{p}{,}\PYG{l+m+mi}{5}\PYG{p}{,}\PYG{l+m+mi}{6}\PYG{p}{]}\PYG{p}{)} \end{sphinxVerbatim} \end{enumerate} \section{Options} \label{\detokenize{devel/plot_directive:options}} The \sphinxcode{\sphinxupquote{plot}} directive supports the following options: \begin{quote} \begin{description} \item[{format}] \leavevmode{[}\{'python', 'doctest'\}{]} Specify the format of the input \item[{include-source}] \leavevmode{[}bool{]} Whether to display the source code. The default can be changed using the \sphinxcode{\sphinxupquote{plot\_include\_source}} variable in conf.py \item[{encoding}] \leavevmode{[}str{]} If this source file is in a non-UTF8 or non-ASCII encoding, the encoding must be specified using the \sphinxcode{\sphinxupquote{:encoding:}} option. The encoding will not be inferred using the \sphinxcode{\sphinxupquote{-*- coding -*-}} metacomment. \item[{context}] \leavevmode{[}bool or str{]} If provided, the code will be run in the context of all previous plot directives for which the \sphinxcode{\sphinxupquote{:context:}} option was specified. This only applies to inline code plot directives, not those run from files. If the \sphinxcode{\sphinxupquote{:context: reset}} option is specified, the context is reset for this and future plots, and previous figures are closed prior to running the code. \sphinxcode{\sphinxupquote{:context:close-figs}} keeps the context but closes previous figures before running the code. \item[{nofigs}] \leavevmode{[}bool{]} If specified, the code block will be run, but no figures will be inserted. This is usually useful with the \sphinxcode{\sphinxupquote{:context:}} option. \end{description} \end{quote} Additionally, this directive supports all of the options of the \sphinxcode{\sphinxupquote{image}} directive, except for \sphinxcode{\sphinxupquote{target}} (since plot will add its own target). These include \sphinxcode{\sphinxupquote{alt}}, \sphinxcode{\sphinxupquote{height}}, \sphinxcode{\sphinxupquote{width}}, \sphinxcode{\sphinxupquote{scale}}, \sphinxcode{\sphinxupquote{align}} and \sphinxcode{\sphinxupquote{class}}. \section{Configuration options} \label{\detokenize{devel/plot_directive:configuration-options}} The plot directive has the following configuration options: \begin{quote} \begin{description} \item[{plot\_include\_source}] \leavevmode Default value for the include-source option \item[{plot\_html\_show\_source\_link}] \leavevmode Whether to show a link to the source in HTML. \item[{plot\_pre\_code}] \leavevmode Code that should be executed before each plot. If not specified or None it will default to a string containing: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k}{import} \PYG{n}{pyplot} \PYG{k}{as} \PYG{n}{plt} \end{sphinxVerbatim} \item[{plot\_basedir}] \leavevmode Base directory, to which \sphinxcode{\sphinxupquote{plot::}} file names are relative to. (If None or empty, file names are relative to the directory where the file containing the directive is.) \item[{plot\_formats}] \leavevmode File formats to generate. List of tuples or strings: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{p}{(}\PYG{n}{suffix}\PYG{p}{,} \PYG{n}{dpi}\PYG{p}{)}\PYG{p}{,} \PYG{n}{suffix}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{]} \end{sphinxVerbatim} that determine the file format and the DPI. For entries whose DPI was omitted, sensible defaults are chosen. When passing from the command line through sphinx\_build the list should be passed as suffix:dpi,suffix:dpi, .... \item[{plot\_html\_show\_formats}] \leavevmode Whether to show links to the files in HTML. \item[{plot\_rcparams}] \leavevmode A dictionary containing any non-standard rcParams that should be applied before each plot. \item[{plot\_apply\_rcparams}] \leavevmode By default, rcParams are applied when \sphinxcode{\sphinxupquote{context}} option is not used in a plot directive. This configuration option overrides this behavior and applies rcParams before each plot. \item[{plot\_working\_directory}] \leavevmode By default, the working directory will be changed to the directory of the example, so the code can get at its data files, if any. Also its path will be added to \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.path}{\sphinxcode{\sphinxupquote{sys.path}}} so it can import any helper modules sitting beside it. This configuration option can be used to specify a central directory (also added to \sphinxhref{https://docs.python.org/3/library/sys.html\#sys.path}{\sphinxcode{\sphinxupquote{sys.path}}}) where data files and helper modules for all code are located. \item[{plot\_template}] \leavevmode Provide a customized template for preparing restructured text. \end{description} \end{quote} \index{PlotDirective (class in matplotlib.sphinxext.plot\_directive)@\spxentry{PlotDirective}\spxextra{class in matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.PlotDirective}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{class }}\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{PlotDirective}}}{\emph{name}, \emph{arguments}, \emph{options}, \emph{content}, \emph{lineno}, \emph{content\_offset}, \emph{block\_text}, \emph{state}, \emph{state\_machine}}{} Implementation of the \sphinxcode{\sphinxupquote{.. plot::}} directive. See the module docstring for details. \index{run() (matplotlib.sphinxext.plot\_directive.PlotDirective method)@\spxentry{run()}\spxextra{matplotlib.sphinxext.plot\_directive.PlotDirective method}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.PlotDirective.run}}\pysiglinewithargsret{\sphinxbfcode{\sphinxupquote{run}}}{\emph{self}}{} Run the plot directive. \end{fulllineitems} \end{fulllineitems} \index{PlotError@\spxentry{PlotError}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.PlotError}}\pysigline{\sphinxbfcode{\sphinxupquote{exception }}\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{PlotError}}}~ \end{fulllineitems} \index{mark\_plot\_labels() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{mark\_plot\_labels()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.mark_plot_labels}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{mark\_plot\_labels}}}{\emph{app}, \emph{document}}{} To make plots referenceable, we need to move the reference from the "htmlonly" (or "latexonly") node to the actual figure node itself. \end{fulllineitems} \index{out\_of\_date() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{out\_of\_date()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.out_of_date}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{out\_of\_date}}}{\emph{original}, \emph{derived}}{} Return whether \sphinxstyleemphasis{derived} is out-of-date relative to \sphinxstyleemphasis{original}, both of which are full file paths. \end{fulllineitems} \index{plot\_directive() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{plot\_directive()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.plot_directive}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{plot\_directive}}}{\emph{name}, \emph{arguments}, \emph{options}, \emph{content}, \emph{lineno}, \emph{content\_offset}, \emph{block\_text}, \emph{state}, \emph{state\_machine}}{} {[}\sphinxstyleemphasis{Deprecated}{]} Implementation of the \sphinxcode{\sphinxupquote{.. plot::}} directive. See the module docstring for details. \subsubsection*{Notes} \DUrole{versionmodified}{Deprecated since version 3.1.} \end{fulllineitems} \index{remove\_coding() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{remove\_coding()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.remove_coding}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{remove\_coding}}}{\emph{text}}{} Remove the coding comment, which six.exec\_ doesn't like. \end{fulllineitems} \index{render\_figures() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{render\_figures()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.render_figures}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{render\_figures}}}{\emph{code}, \emph{code\_path}, \emph{output\_dir}, \emph{output\_base}, \emph{context}, \emph{function\_name}, \emph{config}, \emph{context\_reset=False}, \emph{close\_figs=False}}{} Run a pyplot script and save the images in \sphinxstyleemphasis{output\_dir}. Save the images under \sphinxstyleemphasis{output\_dir} with file names derived from \sphinxstyleemphasis{output\_base} \end{fulllineitems} \index{run\_code() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{run\_code()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.run_code}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{run\_code}}}{\emph{code}, \emph{code\_path}, \emph{ns=None}, \emph{function\_name=None}}{} Import a Python module from a path, and run the function given by name, if function\_name is not None. \end{fulllineitems} \index{split\_code\_at\_show() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{split\_code\_at\_show()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.split_code_at_show}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{split\_code\_at\_show}}}{\emph{text}}{} Split code at plt.show(). \end{fulllineitems} \index{unescape\_doctest() (in module matplotlib.sphinxext.plot\_directive)@\spxentry{unescape\_doctest()}\spxextra{in module matplotlib.sphinxext.plot\_directive}} \begin{fulllineitems} \phantomsection\label{\detokenize{devel/plot_directive:matplotlib.sphinxext.plot_directive.unescape_doctest}}\pysiglinewithargsret{\sphinxcode{\sphinxupquote{matplotlib.sphinxext.plot\_directive.}}\sphinxbfcode{\sphinxupquote{unescape\_doctest}}}{\emph{text}}{} Extract code from a piece of text, which contains either Python code or doctests. \end{fulllineitems} \chapter{Developer's guide for creating scales and transformations} \label{\detokenize{devel/add_new_projection:developer-s-guide-for-creating-scales-and-transformations}}\label{\detokenize{devel/add_new_projection:adding-new-scales}}\label{\detokenize{devel/add_new_projection::doc}} Matplotlib supports the addition of custom procedures that transform the data before it is displayed. There is an important distinction between two kinds of transformations. Separable transformations, working on a single dimension, are called "scales", and non-separable transformations, that handle data in two or more dimensions at a time, are called "projections". From the user's perspective, the scale of a plot can be set with {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_xscale:matplotlib.axes.Axes.set_xscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_xscale()}}}}} and {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.set_yscale:matplotlib.axes.Axes.set_yscale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{set\_yscale()}}}}}. Projections can be chosen using the \sphinxcode{\sphinxupquote{projection}} keyword argument to the \sphinxcode{\sphinxupquote{plot()}} or \sphinxcode{\sphinxupquote{subplot()}} functions, e.g.: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{custom}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{)} \end{sphinxVerbatim} This document is intended for developers and advanced users who need to create new scales and projections for matplotlib. The necessary code for scales and projections can be included anywhere: directly within a plot script, in third-party code, or in the matplotlib source tree itself. \section{Creating a new scale} \label{\detokenize{devel/add_new_projection:creating-a-new-scale}}\label{\detokenize{devel/add_new_projection:creating-new-scale}} Adding a new scale consists of defining a subclass of {\hyperref[\detokenize{api/scale_api:matplotlib.scale.ScaleBase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale.ScaleBase}}}}}, that includes the following elements: \begin{itemize} \item {} A transformation from data coordinates into display coordinates. \item {} An inverse of that transformation. This is used, for example, to convert mouse positions from screen space back into data space. \item {} A function to limit the range of the axis to acceptable values (\sphinxcode{\sphinxupquote{limit\_range\_for\_scale()}}). A log scale, for instance, would prevent the range from including values less than or equal to zero. \item {} Locators (major and minor) that determine where to place ticks in the plot, and optionally, how to adjust the limits of the plot to some "good" values. Unlike \sphinxcode{\sphinxupquote{limit\_range\_for\_scale()}}, which is always enforced, the range setting here is only used when automatically setting the range of the plot. \item {} Formatters (major and minor) that specify how the tick labels should be drawn. \end{itemize} Once the class is defined, it must be registered with matplotlib so that the user can select it. A full-fledged and heavily annotated example is in \DUrole{xref,std,std-doc}{/gallery/scales/custom\_scale}. There are also some classes in {\hyperref[\detokenize{api/scale_api:module-matplotlib.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale}}}}} that may be used as starting points. \section{Creating a new projection} \label{\detokenize{devel/add_new_projection:creating-a-new-projection}}\label{\detokenize{devel/add_new_projection:creating-new-projection}} Adding a new projection consists of defining a projection axes which subclasses {\hyperref[\detokenize{api/axes_api:matplotlib.axes.Axes}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.axes.Axes}}}}} and includes the following elements: \begin{itemize} \item {} A transformation from data coordinates into display coordinates. \item {} An inverse of that transformation. This is used, for example, to convert mouse positions from screen space back into data space. \item {} Transformations for the gridlines, ticks and ticklabels. Custom projections will often need to place these elements in special locations, and matplotlib has a facility to help with doing so. \item {} Setting up default values (overriding {\hyperref[\detokenize{api/_as_gen/matplotlib.axes.Axes.cla:matplotlib.axes.Axes.cla}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{cla()}}}}}), since the defaults for a rectilinear axes may not be appropriate. \item {} Defining the shape of the axes, for example, an elliptical axes, that will be used to draw the background of the plot and for clipping any data elements. \item {} Defining custom locators and formatters for the projection. For example, in a geographic projection, it may be more convenient to display the grid in degrees, even if the data is in radians. \item {} Set up interactive panning and zooming. This is left as an "advanced" feature left to the reader, but there is an example of this for polar plots in {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar}}}}}. \item {} Any additional methods for additional convenience or features. \end{itemize} Once the projection axes is defined, it can be used in one of two ways: \begin{itemize} \item {} By defining the class attribute \sphinxcode{\sphinxupquote{name}}, the projection axes can be registered with {\hyperref[\detokenize{api/projections_api:matplotlib.projections.register_projection}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.register\_projection()}}}}} and subsequently simply invoked by name: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{n}{projection}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my\PYGZus{}proj\PYGZus{}name}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} \item {} For more complex, parameterisable projections, a generic "projection" object may be defined which includes the method \sphinxcode{\sphinxupquote{\_as\_mpl\_axes}}. \sphinxcode{\sphinxupquote{\_as\_mpl\_axes}} should take no arguments and return the projection's axes subclass and a dictionary of additional arguments to pass to the subclass' \sphinxcode{\sphinxupquote{\_\_init\_\_}} method. Subsequently a parameterised projection can be initialised with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{plt}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{(}\PYG{n}{projection}\PYG{o}{=}\PYG{n}{MyProjection}\PYG{p}{(}\PYG{n}{param1}\PYG{o}{=}\PYG{n}{param1\PYGZus{}value}\PYG{p}{)}\PYG{p}{)} \end{sphinxVerbatim} where MyProjection is an object which implements a \sphinxcode{\sphinxupquote{\_as\_mpl\_axes}} method. \end{itemize} A full-fledged and heavily annotated example is in \DUrole{xref,std,std-doc}{/gallery/misc/custom\_projection}. The polar plot functionality in {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar}}}}} may also be of interest. \section{API documentation} \label{\detokenize{devel/add_new_projection:api-documentation}}\begin{itemize} \item {} {\hyperref[\detokenize{api/scale_api:module-matplotlib.scale}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.scale}}}}} \item {} {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections}}}}} \item {} {\hyperref[\detokenize{api/projections_api:module-matplotlib.projections.polar}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{matplotlib.projections.polar}}}}} \end{itemize} \chapter{Working with \sphinxstyleemphasis{Matplotlib} source code} \label{\detokenize{devel/gitwash/index:working-with-matplotlib-source-code}}\label{\detokenize{devel/gitwash/index:using-git}}\label{\detokenize{devel/gitwash/index::doc}} Contents: \section{Introduction} \label{\detokenize{devel/gitwash/git_intro:introduction}}\label{\detokenize{devel/gitwash/git_intro::doc}} These pages describe a \sphinxhref{https://git-scm.com/}{git} and \sphinxhref{https://github.com}{github} workflow for the \sphinxhref{http://matplotlib.org}{Matplotlib} project. There are several different workflows here, for different ways of working with \sphinxstyleemphasis{Matplotlib}. This is not a comprehensive git reference, it's just a workflow for our own project. It's tailored to the github hosting service. You may well find better or quicker ways of getting stuff done with git, but these should get you started. For general resources for learning git, see {\hyperref[\detokenize{devel/gitwash/git_resources:git-resources}]{\sphinxcrossref{\DUrole{std,std-ref}{git resources}}}}. \section{Install git} \label{\detokenize{devel/gitwash/git_install:install-git}}\label{\detokenize{devel/gitwash/git_install:id1}}\label{\detokenize{devel/gitwash/git_install::doc}} \subsection{Overview} \label{\detokenize{devel/gitwash/git_install:overview}} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|} \hline Debian / Ubuntu & \sphinxcode{\sphinxupquote{sudo apt-get install git}} \\ \hline Fedora & \sphinxcode{\sphinxupquote{sudo yum install git}} \\ \hline Windows & Download and install \sphinxhref{https://git-scm.com/download/win}{msysGit} \\ \hline OS X & Use the \sphinxhref{https://git-scm.com/download/mac}{git-osx-installer} \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsection{In detail} \label{\detokenize{devel/gitwash/git_install:in-detail}} See the git page for the most recent information. Have a look at the github install help pages available from \sphinxhref{https://help.github.com}{github help} There are good instructions here: \sphinxurl{https://git-scm.com/book/en/v2/Getting-Started-Installing-Git} \section{Following the latest source} \label{\detokenize{devel/gitwash/following_latest:following-the-latest-source}}\label{\detokenize{devel/gitwash/following_latest:following-latest}}\label{\detokenize{devel/gitwash/following_latest::doc}} These are the instructions if you just want to follow the latest \sphinxstyleemphasis{Matplotlib} source, but you don't need to do any development for now. The steps are: \begin{itemize} \item {} {\hyperref[\detokenize{devel/gitwash/git_install:install-git}]{\sphinxcrossref{\DUrole{std,std-ref}{Install git}}}} \item {} get local copy of the \sphinxhref{https://github.com/matplotlib/matplotlib}{Matplotlib github} git repository \item {} update local copy from time to time \end{itemize} \subsection{Get the local copy of the code} \label{\detokenize{devel/gitwash/following_latest:get-the-local-copy-of-the-code}} From the command line: \begin{sphinxVerbatim}[commandchars=\\\{\}] git clone git://github.com/matplotlib/matplotlib.git \end{sphinxVerbatim} You now have a copy of the code tree in the new \sphinxcode{\sphinxupquote{matplotlib}} directory. \subsection{Updating the code} \label{\detokenize{devel/gitwash/following_latest:updating-the-code}} From time to time you may want to pull down the latest code. Do this with: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{cd} matplotlib git pull \end{sphinxVerbatim} The tree in \sphinxcode{\sphinxupquote{matplotlib}} will now have the latest changes from the initial repository. \section{Making a patch} \label{\detokenize{devel/gitwash/patching:making-a-patch}}\label{\detokenize{devel/gitwash/patching::doc}} You've discovered a bug or something else you want to change in \sphinxhref{http://matplotlib.org}{Matplotlib} .. — excellent! You've worked out a way to fix it — even better! You want to tell us about it — best of all! The easiest way is to make a \sphinxstyleemphasis{patch} or set of patches. Here we explain how. Making a patch is the simplest and quickest, but if you're going to be doing anything more than simple quick things, please consider following the {\hyperref[\detokenize{devel/gitwash/git_development:git-development}]{\sphinxcrossref{\DUrole{std,std-ref}{Git for development}}}} model instead. \subsection{Making patches} \label{\detokenize{devel/gitwash/patching:making-patches}}\label{\detokenize{devel/gitwash/patching:id1}} \subsubsection{Overview} \label{\detokenize{devel/gitwash/patching:overview}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} tell git who you are} git config \PYGZhy{}\PYGZhy{}global user.email you@yourdomain.example.com git config \PYGZhy{}\PYGZhy{}global user.name \PYG{l+s+s2}{\PYGZdq{}Your Name Comes Here\PYGZdq{}} \PYG{c+c1}{\PYGZsh{} get the repository if you don\PYGZsq{}t have it} git clone git://github.com/matplotlib/matplotlib.git \PYG{c+c1}{\PYGZsh{} make a branch for your patching} \PYG{n+nb}{cd} matplotlib git branch the\PYGZhy{}fix\PYGZhy{}im\PYGZhy{}thinking\PYGZhy{}of git checkout the\PYGZhy{}fix\PYGZhy{}im\PYGZhy{}thinking\PYGZhy{}of \PYG{c+c1}{\PYGZsh{} hack, hack, hack} \PYG{c+c1}{\PYGZsh{} Tell git about any new files you\PYGZsq{}ve made} git add somewhere/tests/test\PYGZus{}my\PYGZus{}bug.py \PYG{c+c1}{\PYGZsh{} commit work in progress as you go} git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}BF \PYGZhy{} added tests for Funny bug\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} hack hack, hack} git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}BF \PYGZhy{} added fix for Funny bug\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} make the patch files} git format\PYGZhy{}patch \PYGZhy{}M \PYGZhy{}C master \end{sphinxVerbatim} Then, send the generated patch files to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-devel}{Matplotlib mailing list} — where we will thank you warmly. \subsubsection{In detail} \label{\detokenize{devel/gitwash/patching:in-detail}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Tell git who you are so it can label the commits you've made: \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global user.email you@yourdomain.example.com git config \PYGZhy{}\PYGZhy{}global user.name \PYG{l+s+s2}{\PYGZdq{}Your Name Comes Here\PYGZdq{}} \end{sphinxVerbatim} \item {} If you don't already have one, clone a copy of the \sphinxhref{http://matplotlib.org}{Matplotlib} repository: \begin{sphinxVerbatim}[commandchars=\\\{\}] git clone git://github.com/matplotlib/matplotlib.git \PYG{n+nb}{cd} matplotlib \end{sphinxVerbatim} \item {} Make a 'feature branch'. This will be where you work on your bug fix. It's nice and safe and leaves you with access to an unmodified copy of the code in the main branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] git branch the\PYGZhy{}fix\PYGZhy{}im\PYGZhy{}thinking\PYGZhy{}of git checkout the\PYGZhy{}fix\PYGZhy{}im\PYGZhy{}thinking\PYGZhy{}of \end{sphinxVerbatim} \item {} Do some edits, and commit them as you go: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} hack, hack, hack} \PYG{c+c1}{\PYGZsh{} Tell git about any new files you\PYGZsq{}ve made} git add somewhere/tests/test\PYGZus{}my\PYGZus{}bug.py \PYG{c+c1}{\PYGZsh{} commit work in progress as you go} git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}BF \PYGZhy{} added tests for Funny bug\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} hack hack, hack} git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}BF \PYGZhy{} added fix for Funny bug\PYGZsq{}} \end{sphinxVerbatim} Note the \sphinxcode{\sphinxupquote{-am}} options to \sphinxcode{\sphinxupquote{commit}}. The \sphinxcode{\sphinxupquote{m}} flag just signals that you're going to type a message on the command line. The \sphinxcode{\sphinxupquote{a}} flag — you can just take on faith — or see \sphinxhref{http://gitready.com/beginner/2009/01/18/the-staging-area.html}{why the -a flag?}. \item {} When you have finished, check you have committed all your changes: \begin{sphinxVerbatim}[commandchars=\\\{\}] git status \end{sphinxVerbatim} \item {} Finally, make your commits into patches. You want all the commits since you branched from the \sphinxcode{\sphinxupquote{master}} branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] git format\PYGZhy{}patch \PYGZhy{}M \PYGZhy{}C master \end{sphinxVerbatim} You will now have several files named for the commits: \begin{sphinxVerbatim}[commandchars=\\\{\}] 0001\PYGZhy{}BF\PYGZhy{}added\PYGZhy{}tests\PYGZhy{}for\PYGZhy{}Funny\PYGZhy{}bug.patch 0002\PYGZhy{}BF\PYGZhy{}added\PYGZhy{}fix\PYGZhy{}for\PYGZhy{}Funny\PYGZhy{}bug.patch \end{sphinxVerbatim} Send these files to the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-devel}{Matplotlib mailing list}. \end{enumerate} When you are done, to switch back to the main copy of the code, just return to the \sphinxcode{\sphinxupquote{master}} branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] git checkout master \end{sphinxVerbatim} \subsection{Moving from patching to development} \label{\detokenize{devel/gitwash/patching:moving-from-patching-to-development}} If you find you have done some patches, and you have one or more feature branches, you will probably want to switch to development mode. You can do this with the repository you have. Fork the \sphinxhref{http://matplotlib.org}{Matplotlib} repository on github — {\hyperref[\detokenize{devel/gitwash/forking_hell:forking}]{\sphinxcrossref{\DUrole{std,std-ref}{Making your own copy (fork) of Matplotlib}}}}. Then: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} checkout and refresh master branch from main repo} git checkout master git pull origin master \PYG{c+c1}{\PYGZsh{} rename pointer to main repository to \PYGZsq{}upstream\PYGZsq{}} git remote rename origin upstream \PYG{c+c1}{\PYGZsh{} point your repo to default read / write to your fork on github} git remote add origin git@github.com:your\PYGZhy{}user\PYGZhy{}name/matplotlib.git \PYG{c+c1}{\PYGZsh{} push up any branches you\PYGZsq{}ve made and want to keep} git push origin the\PYGZhy{}fix\PYGZhy{}im\PYGZhy{}thinking\PYGZhy{}of \end{sphinxVerbatim} Then you can, if you want, follow the {\hyperref[\detokenize{devel/gitwash/development_workflow:development-workflow}]{\sphinxcrossref{\DUrole{std,std-ref}{Development workflow}}}}. \section{Git for development} \label{\detokenize{devel/gitwash/git_development:git-for-development}}\label{\detokenize{devel/gitwash/git_development:git-development}}\label{\detokenize{devel/gitwash/git_development::doc}} Contents: \subsection{Making your own copy (fork) of Matplotlib} \label{\detokenize{devel/gitwash/forking_hell:making-your-own-copy-fork-of-matplotlib}}\label{\detokenize{devel/gitwash/forking_hell:forking}}\label{\detokenize{devel/gitwash/forking_hell::doc}} You need to do this only once. The instructions here are very similar to the instructions at \sphinxurl{https://help.github.com/forking/} — please see that page for more detail. We're repeating some of it here just to give the specifics for the \sphinxhref{http://matplotlib.org}{Matplotlib} project, and to suggest some default names. \subsubsection{Set up and configure a github account} \label{\detokenize{devel/gitwash/forking_hell:set-up-and-configure-a-github-account}} If you don't have a github account, go to the github page, and make one. You then need to configure your account to allow write access — see the \sphinxcode{\sphinxupquote{Generating SSH keys}} help on \sphinxhref{https://help.github.com}{github help}. \subsubsection{Create your own forked copy of Matplotlib} \label{\detokenize{devel/gitwash/forking_hell:create-your-own-forked-copy-of-matplotlib}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Log into your github account. \item {} Go to the \sphinxhref{http://matplotlib.org}{Matplotlib} github home at \sphinxhref{https://github.com/matplotlib/matplotlib}{Matplotlib github}. \item {} Click on the \sphinxstyleemphasis{fork} button: \noindent\sphinxincludegraphics{{forking_button}.png} Now, after a short pause, you should find yourself at the home page for your own forked copy of \sphinxhref{http://matplotlib.org}{Matplotlib}. \end{enumerate} \subsection{Set up your fork} \label{\detokenize{devel/gitwash/set_up_fork:set-up-your-fork}}\label{\detokenize{devel/gitwash/set_up_fork:set-up-fork}}\label{\detokenize{devel/gitwash/set_up_fork::doc}} First you follow the instructions for {\hyperref[\detokenize{devel/gitwash/forking_hell:forking}]{\sphinxcrossref{\DUrole{std,std-ref}{Making your own copy (fork) of Matplotlib}}}}. \subsubsection{Overview} \label{\detokenize{devel/gitwash/set_up_fork:overview}} \begin{sphinxVerbatim}[commandchars=\\\{\}] git clone https://github.com/your\PYGZhy{}user\PYGZhy{}name/matplotlib.git \PYG{n+nb}{cd} matplotlib git remote add upstream git://github.com/matplotlib/matplotlib.git \end{sphinxVerbatim} \subsubsection{In detail} \label{\detokenize{devel/gitwash/set_up_fork:in-detail}} \paragraph{Clone your fork} \label{\detokenize{devel/gitwash/set_up_fork:clone-your-fork}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Clone your fork to the local computer with \sphinxcode{\sphinxupquote{git clone https://github.com/your-user-name/matplotlib.git}} \item {} Investigate. Change directory to your new repo: \sphinxcode{\sphinxupquote{cd matplotlib}}. Then \sphinxcode{\sphinxupquote{git branch -a}} to show you all branches. You'll get something like: \begin{sphinxVerbatim}[commandchars=\\\{\}] * master remotes/origin/master \end{sphinxVerbatim} This tells you that you are currently on the \sphinxcode{\sphinxupquote{master}} branch, and that you also have a \sphinxcode{\sphinxupquote{remote}} connection to \sphinxcode{\sphinxupquote{origin/master}}. What remote repository is \sphinxcode{\sphinxupquote{remote/origin}}? Try \sphinxcode{\sphinxupquote{git remote -v}} to see the URLs for the remote. They will point to your github fork. Now you want to connect to the upstream \sphinxhref{https://github.com/matplotlib/matplotlib}{Matplotlib github} repository, so you can merge in changes from trunk. \end{enumerate} \paragraph{Linking your repository to the upstream repo} \label{\detokenize{devel/gitwash/set_up_fork:linking-your-repository-to-the-upstream-repo}}\label{\detokenize{devel/gitwash/set_up_fork:linking-to-upstream}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{cd} matplotlib git remote add upstream git://github.com/matplotlib/matplotlib.git \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{upstream}} here is just the arbitrary name we're using to refer to the main \sphinxhref{http://matplotlib.org}{Matplotlib} repository at \sphinxhref{https://github.com/matplotlib/matplotlib}{Matplotlib github}. Note that we've used \sphinxcode{\sphinxupquote{git://}} for the URL rather than \sphinxcode{\sphinxupquote{https://}} or \sphinxcode{\sphinxupquote{git@}}. The \sphinxcode{\sphinxupquote{git://}} URL is read only. This means that we can't accidentally (or deliberately) write to the upstream repo, and we are only going to use it to merge into our own code. Just for your own satisfaction, show yourself that you now have a new 'remote', with \sphinxcode{\sphinxupquote{git remote -v show}}, giving you something like: \begin{sphinxVerbatim}[commandchars=\\\{\}] upstream git://github.com/matplotlib/matplotlib.git (fetch) upstream git://github.com/matplotlib/matplotlib.git (push) origin https://github.com/your\PYGZhy{}user\PYGZhy{}name/matplotlib.git (fetch) origin https://github.com/your\PYGZhy{}user\PYGZhy{}name/matplotlib.git (push) \end{sphinxVerbatim} \subsection{Configure git} \label{\detokenize{devel/gitwash/configure_git:configure-git}}\label{\detokenize{devel/gitwash/configure_git:id1}}\label{\detokenize{devel/gitwash/configure_git::doc}} \subsubsection{Overview} \label{\detokenize{devel/gitwash/configure_git:overview}}\label{\detokenize{devel/gitwash/configure_git:git-config-basic}} Your personal git configurations are saved in the \sphinxcode{\sphinxupquote{.gitconfig}} file in your home directory. Here is an example \sphinxcode{\sphinxupquote{.gitconfig}} file: \begin{sphinxVerbatim}[commandchars=\\\{\}] [user] name = Your Name email = you@yourdomain.example.com [alias] ci = commit \PYGZhy{}a co = checkout st = status stat = status br = branch wdiff = diff \PYGZhy{}\PYGZhy{}color\PYGZhy{}words [core] editor = vim [merge] summary = true \end{sphinxVerbatim} You can edit this file directly or you can use the \sphinxcode{\sphinxupquote{git config -{-}global}} command: \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global user.name \PYG{l+s+s2}{\PYGZdq{}Your Name\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global user.email you@yourdomain.example.com git config \PYGZhy{}\PYGZhy{}global alias.ci \PYG{l+s+s2}{\PYGZdq{}commit \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.co checkout git config \PYGZhy{}\PYGZhy{}global alias.st \PYG{l+s+s2}{\PYGZdq{}status \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.stat \PYG{l+s+s2}{\PYGZdq{}status \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.br branch git config \PYGZhy{}\PYGZhy{}global alias.wdiff \PYG{l+s+s2}{\PYGZdq{}diff \PYGZhy{}\PYGZhy{}color\PYGZhy{}words\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global core.editor vim git config \PYGZhy{}\PYGZhy{}global merge.summary \PYG{n+nb}{true} \end{sphinxVerbatim} To set up on another computer, you can copy your \sphinxcode{\sphinxupquote{\textasciitilde{}/.gitconfig}} file, or run the commands above. \subsubsection{In detail} \label{\detokenize{devel/gitwash/configure_git:in-detail}} \paragraph{user.name and user.email} \label{\detokenize{devel/gitwash/configure_git:user-name-and-user-email}} It is good practice to tell \sphinxhref{https://git-scm.com/}{git} who you are, for labeling any changes you make to the code. The simplest way to do this is from the command line: \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global user.name \PYG{l+s+s2}{\PYGZdq{}Your Name\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global user.email you@yourdomain.example.com \end{sphinxVerbatim} This will write the settings into your git configuration file, which should now contain a user section with your name and email: \begin{sphinxVerbatim}[commandchars=\\\{\}] [user] name = Your Name email = you@yourdomain.example.com \end{sphinxVerbatim} Of course you'll need to replace \sphinxcode{\sphinxupquote{Your Name}} and \sphinxcode{\sphinxupquote{you@yourdomain.example.com}} with your actual name and email address. \paragraph{Aliases} \label{\detokenize{devel/gitwash/configure_git:aliases}} You might well benefit from some aliases to common commands. For example, you might well want to be able to shorten \sphinxcode{\sphinxupquote{git checkout}} to \sphinxcode{\sphinxupquote{git co}}. Or you may want to alias \sphinxcode{\sphinxupquote{git diff -{-}color-words}} (which gives a nicely formatted output of the diff) to \sphinxcode{\sphinxupquote{git wdiff}} The following \sphinxcode{\sphinxupquote{git config -{-}global}} commands: \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global alias.ci \PYG{l+s+s2}{\PYGZdq{}commit \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.co checkout git config \PYGZhy{}\PYGZhy{}global alias.st \PYG{l+s+s2}{\PYGZdq{}status \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.stat \PYG{l+s+s2}{\PYGZdq{}status \PYGZhy{}a\PYGZdq{}} git config \PYGZhy{}\PYGZhy{}global alias.br branch git config \PYGZhy{}\PYGZhy{}global alias.wdiff \PYG{l+s+s2}{\PYGZdq{}diff \PYGZhy{}\PYGZhy{}color\PYGZhy{}words\PYGZdq{}} \end{sphinxVerbatim} will create an \sphinxcode{\sphinxupquote{alias}} section in your \sphinxcode{\sphinxupquote{.gitconfig}} file with contents like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] [alias] ci = commit \PYGZhy{}a co = checkout st = status \PYGZhy{}a stat = status \PYGZhy{}a br = branch wdiff = diff \PYGZhy{}\PYGZhy{}color\PYGZhy{}words \end{sphinxVerbatim} \paragraph{Editor} \label{\detokenize{devel/gitwash/configure_git:editor}} You may also want to make sure that your editor of choice is used \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global core.editor vim \end{sphinxVerbatim} \paragraph{Merging} \label{\detokenize{devel/gitwash/configure_git:merging}} To enforce summaries when doing merges (\sphinxcode{\sphinxupquote{\textasciitilde{}/.gitconfig}} file again): \begin{sphinxVerbatim}[commandchars=\\\{\}] [merge] log = true \end{sphinxVerbatim} Or from the command line: \begin{sphinxVerbatim}[commandchars=\\\{\}] git config \PYGZhy{}\PYGZhy{}global merge.log \PYG{n+nb}{true} \end{sphinxVerbatim} \paragraph{Fancy log output} \label{\detokenize{devel/gitwash/configure_git:fancy-log-output}}\label{\detokenize{devel/gitwash/configure_git:fancy-log}} This is a very nice alias to get a fancy log output; it should go in the \sphinxcode{\sphinxupquote{alias}} section of your \sphinxcode{\sphinxupquote{.gitconfig}} file: \begin{sphinxVerbatim}[commandchars=\\\{\}] lg = log \PYGZhy{}\PYGZhy{}graph \PYGZhy{}\PYGZhy{}pretty=format:\PYGZsq{}\PYGZpc{}Cred\PYGZpc{}h\PYGZpc{}Creset \PYGZhy{}\PYGZpc{}C(yellow)\PYGZpc{}d\PYGZpc{}Creset \PYGZpc{}s \PYGZpc{}Cgreen(\PYGZpc{}cr) \PYGZpc{}C(bold blue)[\PYGZpc{}an]\PYGZpc{}Creset\PYGZsq{} \PYGZhy{}\PYGZhy{}abbrev\PYGZhy{}commit \PYGZhy{}\PYGZhy{}date=relative \end{sphinxVerbatim} You use the alias with: \begin{sphinxVerbatim}[commandchars=\\\{\}] git lg \end{sphinxVerbatim} and it gives graph / text output something like this (but with color!): \begin{sphinxVerbatim}[commandchars=\\\{\}] * 6d8e1ee \PYGZhy{} (HEAD, origin/my\PYGZhy{}fancy\PYGZhy{}feature, my\PYGZhy{}fancy\PYGZhy{}feature) NF \PYGZhy{} a fancy file (45 minutes ago) [Matthew Brett] * d304a73 \PYGZhy{} (origin/placeholder, placeholder) Merge pull request \PYGZsh{}48 from hhuuggoo/master (2 weeks ago) [Jonathan Terhorst] \textbar{}\PYGZbs{} \textbar{} * 4aff2a8 \PYGZhy{} fixed bug 35, and added a test in test\PYGZus{}bugfixes (2 weeks ago) [Hugo] \textbar{}/ * a7ff2e5 \PYGZhy{} Added notes on discussion/proposal made during Data Array Summit. (2 weeks ago) [Corran Webster] * 68f6752 \PYGZhy{} Initial implimentation of AxisIndexer \PYGZhy{} uses \PYGZsq{}index\PYGZus{}by\PYGZsq{} which needs to be changed to a call on an Axes object \PYGZhy{} this is all very sketchy right now. (2 weeks ago) [Corr * 376adbd \PYGZhy{} Merge pull request \PYGZsh{}46 from terhorst/master (2 weeks ago) [Jonathan Terhorst] \textbar{}\PYGZbs{} \textbar{} * b605216 \PYGZhy{} updated joshu example to current api (3 weeks ago) [Jonathan Terhorst] \textbar{} * 2e991e8 \PYGZhy{} add testing for outer ufunc (3 weeks ago) [Jonathan Terhorst] \textbar{} * 7beda5a \PYGZhy{} prevent axis from throwing an exception if testing equality with non\PYGZhy{}axis object (3 weeks ago) [Jonathan Terhorst] \textbar{} * 65af65e \PYGZhy{} convert unit testing code to assertions (3 weeks ago) [Jonathan Terhorst] \textbar{} * 956fbab \PYGZhy{} Merge remote\PYGZhy{}tracking branch \PYGZsq{}upstream/master\PYGZsq{} (3 weeks ago) [Jonathan Terhorst] \textbar{} \textbar{}\PYGZbs{} \textbar{} \textbar{}/ \end{sphinxVerbatim} Thanks to Yury V. Zaytsev for posting it. \subsection{Development workflow} \label{\detokenize{devel/gitwash/development_workflow:development-workflow}}\label{\detokenize{devel/gitwash/development_workflow:id1}}\label{\detokenize{devel/gitwash/development_workflow::doc}} You already have your own forked copy of the \sphinxhref{http://matplotlib.org}{Matplotlib} repository, by following {\hyperref[\detokenize{devel/gitwash/forking_hell:forking}]{\sphinxcrossref{\DUrole{std,std-ref}{Making your own copy (fork) of Matplotlib}}}}. You have {\hyperref[\detokenize{devel/gitwash/set_up_fork:set-up-fork}]{\sphinxcrossref{\DUrole{std,std-ref}{Set up your fork}}}}. You have configured git by following {\hyperref[\detokenize{devel/gitwash/configure_git:configure-git}]{\sphinxcrossref{\DUrole{std,std-ref}{Configure git}}}}. Now you are ready for some real work. \subsubsection{Workflow summary} \label{\detokenize{devel/gitwash/development_workflow:workflow-summary}} In what follows we'll refer to the upstream Matplotlib \sphinxcode{\sphinxupquote{master}} branch, as "trunk". \begin{itemize} \item {} Don't use your \sphinxcode{\sphinxupquote{master}} branch for anything. Consider deleting it. \item {} When you are starting a new set of changes, fetch any changes from trunk, and start a new \sphinxstyleemphasis{feature branch} from that. \item {} Make a new branch for each separable set of changes — "one task, one branch" (\sphinxhref{https://mail.scipy.org/pipermail/ipython-dev/2010-October/006746.html}{ipython git workflow}). \item {} Name your branch for the purpose of the changes - e.g. \sphinxcode{\sphinxupquote{bugfix-for-issue-14}} or \sphinxcode{\sphinxupquote{refactor-database-code}}. \item {} If you can possibly avoid it, avoid merging trunk or any other branches into your feature branch while you are working. \item {} If you do find yourself merging from trunk, consider {\hyperref[\detokenize{devel/gitwash/development_workflow:rebase-on-trunk}]{\sphinxcrossref{\DUrole{std,std-ref}{Rebasing on trunk}}}} \item {} Ask on the \sphinxhref{https://mail.python.org/mailman/listinfo/matplotlib-devel}{Matplotlib mailing list} if you get stuck. \item {} Ask for code review! \end{itemize} This way of working helps to keep work well organized, with readable history. This in turn makes it easier for project maintainers (that might be you) to see what you've done, and why you did it. See \sphinxhref{https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html}{linux git workflow} and \sphinxhref{https://mail.scipy.org/pipermail/ipython-dev/2010-October/006746.html}{ipython git workflow} for some explanation. \subsubsection{Consider deleting your master branch} \label{\detokenize{devel/gitwash/development_workflow:consider-deleting-your-master-branch}} It may sound strange, but deleting your own \sphinxcode{\sphinxupquote{master}} branch can help reduce confusion about which branch you are on. See \sphinxhref{https://matthew-brett.github.io/pydagogue/gh\_delete\_master.html}{deleting master on github} for details. \subsubsection{Update the mirror of trunk} \label{\detokenize{devel/gitwash/development_workflow:update-the-mirror-of-trunk}}\label{\detokenize{devel/gitwash/development_workflow:update-mirror-trunk}} First make sure you have done {\hyperref[\detokenize{devel/gitwash/set_up_fork:linking-to-upstream}]{\sphinxcrossref{\DUrole{std,std-ref}{Linking your repository to the upstream repo}}}}. From time to time you should fetch the upstream (trunk) changes from github: \begin{sphinxVerbatim}[commandchars=\\\{\}] git fetch upstream \end{sphinxVerbatim} This will pull down any commits you don't have, and set the remote branches to point to the right commit. For example, 'trunk' is the branch referred to by (remote/branchname) \sphinxcode{\sphinxupquote{upstream/master}} - and if there have been commits since you last checked, \sphinxcode{\sphinxupquote{upstream/master}} will change after you do the fetch. \subsubsection{Make a new feature branch} \label{\detokenize{devel/gitwash/development_workflow:make-a-new-feature-branch}}\label{\detokenize{devel/gitwash/development_workflow:make-feature-branch}} When you are ready to make some changes to the code, you should start a new branch. Branches that are for a collection of related edits are often called 'feature branches'. Making an new branch for each set of related changes will make it easier for someone reviewing your branch to see what you are doing. Choose an informative name for the branch to remind yourself and the rest of us what the changes in the branch are for. For example \sphinxcode{\sphinxupquote{add-ability-to-fly}}, or \sphinxcode{\sphinxupquote{buxfix-for-issue-42}}. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Update the mirror of trunk} git fetch upstream \PYG{c+c1}{\PYGZsh{} Make new feature branch starting at current trunk} git branch my\PYGZhy{}new\PYGZhy{}feature upstream/master git checkout my\PYGZhy{}new\PYGZhy{}feature \end{sphinxVerbatim} Generally, you will want to keep your feature branches on your public \sphinxhref{https://github.com}{github} fork of \sphinxhref{http://matplotlib.org}{Matplotlib}. To do this, you \sphinxhref{https://schacon.github.io/git/git-push.html}{git push} this new branch up to your github repo. Generally (if you followed the instructions in these pages, and by default), git will have a link to your github repo, called \sphinxcode{\sphinxupquote{origin}}. You push up to your own repo on github with: \begin{sphinxVerbatim}[commandchars=\\\{\}] git push origin my\PYGZhy{}new\PYGZhy{}feature \end{sphinxVerbatim} In git \textgreater{}= 1.7 you can ensure that the link is correctly set by using the \sphinxcode{\sphinxupquote{-{-}set-upstream}} option: \begin{sphinxVerbatim}[commandchars=\\\{\}] git push \PYGZhy{}\PYGZhy{}set\PYGZhy{}upstream origin my\PYGZhy{}new\PYGZhy{}feature \end{sphinxVerbatim} From now on git will know that \sphinxcode{\sphinxupquote{my-new-feature}} is related to the \sphinxcode{\sphinxupquote{my-new-feature}} branch in the github repo. \subsubsection{The editing workflow} \label{\detokenize{devel/gitwash/development_workflow:the-editing-workflow}}\label{\detokenize{devel/gitwash/development_workflow:edit-flow}} \paragraph{Overview} \label{\detokenize{devel/gitwash/development_workflow:overview}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} hack hack} git add my\PYGZus{}new\PYGZus{}file git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}NF \PYGZhy{} some message\PYGZsq{}} git push \end{sphinxVerbatim} \paragraph{In more detail} \label{\detokenize{devel/gitwash/development_workflow:in-more-detail}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Make some changes \item {} See which files have changed with \sphinxcode{\sphinxupquote{git status}} (see \sphinxhref{https://schacon.github.io/git/git-status.html}{git status}). You'll see a listing like this one: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZsh{} On branch ny\PYGZhy{}new\PYGZhy{}feature \PYGZsh{} Changed but not updated: \PYGZsh{} (use \PYGZdq{}git add \PYGZlt{}file\PYGZgt{}...\PYGZdq{} to update what will be committed) \PYGZsh{} (use \PYGZdq{}git checkout \PYGZhy{}\PYGZhy{} \PYGZlt{}file\PYGZgt{}...\PYGZdq{} to discard changes in working directory) \PYGZsh{} \PYGZsh{} modified: README \PYGZsh{} \PYGZsh{} Untracked files: \PYGZsh{} (use \PYGZdq{}git add \PYGZlt{}file\PYGZgt{}...\PYGZdq{} to include in what will be committed) \PYGZsh{} \PYGZsh{} INSTALL no changes added to commit (use \PYGZdq{}git add\PYGZdq{} and/or \PYGZdq{}git commit \PYGZhy{}a\PYGZdq{}) \end{sphinxVerbatim} \item {} Check what the actual changes are with \sphinxcode{\sphinxupquote{git diff}} (\sphinxhref{https://schacon.github.io/git/git-diff.html}{git diff}). \item {} Add any new files to version control \sphinxcode{\sphinxupquote{git add new\_file\_name}} (see \sphinxhref{https://schacon.github.io/git/git-add.html}{git add}). \item {} To commit all modified files into the local copy of your repo,, do \sphinxcode{\sphinxupquote{git commit -am 'A commit message'}}. Note the \sphinxcode{\sphinxupquote{-am}} options to \sphinxcode{\sphinxupquote{commit}}. The \sphinxcode{\sphinxupquote{m}} flag just signals that you're going to type a message on the command line. The \sphinxcode{\sphinxupquote{a}} flag — you can just take on faith — or see \sphinxhref{http://gitready.com/beginner/2009/01/18/the-staging-area.html}{why the -a flag?} — and the helpful use-case description in the \sphinxhref{http://2ndscale.com/rtomayko/2008/the-thing-about-git}{tangled working copy problem}. The \sphinxhref{https://schacon.github.io/git/git-commit.html}{git commit} manual page might also be useful. \item {} To push the changes up to your forked repo on github, do a \sphinxcode{\sphinxupquote{git push}} (see \sphinxhref{https://schacon.github.io/git/git-push.html}{git push}). \end{enumerate} \subsubsection{Ask for your changes to be reviewed or merged} \label{\detokenize{devel/gitwash/development_workflow:ask-for-your-changes-to-be-reviewed-or-merged}} When you are ready to ask for someone to review your code and consider a merge: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Go to the URL of your forked repo, say \sphinxcode{\sphinxupquote{https://github.com/your-user-name/matplotlib}}. \item {} Use the 'Switch Branches' dropdown menu near the top left of the page to select the branch with your changes: \noindent\sphinxincludegraphics{{branch_dropdown}.png} \item {} Click on the 'Pull request' button: \noindent\sphinxincludegraphics{{pull_button}.png} Enter a title for the set of changes, and some explanation of what you've done. Say if there is anything you'd like particular attention for - like a complicated change or some code you are not happy with. If you don't think your request is ready to be merged, just say so in your pull request message. This is still a good way of getting some preliminary code review. \end{enumerate} \subsubsection{Some other things you might want to do} \label{\detokenize{devel/gitwash/development_workflow:some-other-things-you-might-want-to-do}} \paragraph{Delete a branch on github} \label{\detokenize{devel/gitwash/development_workflow:delete-a-branch-on-github}} \begin{sphinxVerbatim}[commandchars=\\\{\}] git checkout master \PYG{c+c1}{\PYGZsh{} delete branch locally} git branch \PYGZhy{}D my\PYGZhy{}unwanted\PYGZhy{}branch \PYG{c+c1}{\PYGZsh{} delete branch on github} git push origin :my\PYGZhy{}unwanted\PYGZhy{}branch \end{sphinxVerbatim} Note the colon \sphinxcode{\sphinxupquote{:}} before \sphinxcode{\sphinxupquote{my-unwanted-branch}}. See also: \sphinxurl{https://help.github.com/articles/pushing-to-a-remote/\#deleting-a-remote-branch-or-tag} \paragraph{Several people sharing a single repository} \label{\detokenize{devel/gitwash/development_workflow:several-people-sharing-a-single-repository}} If you want to work on some stuff with other people, where you are all committing into the same repository, or even the same branch, then just share it via github. First fork Matplotlib into your account, as from {\hyperref[\detokenize{devel/gitwash/forking_hell:forking}]{\sphinxcrossref{\DUrole{std,std-ref}{Making your own copy (fork) of Matplotlib}}}}. Then, go to your forked repository github page, say \sphinxcode{\sphinxupquote{https://github.com/your-user-name/matplotlib}} Click on the 'Admin' button, and add anyone else to the repo as a collaborator: \begin{quote} \noindent\sphinxincludegraphics{{pull_button}.png} \end{quote} Now all those people can do: \begin{sphinxVerbatim}[commandchars=\\\{\}] git clone https://github.com/your\PYGZhy{}user\PYGZhy{}name/matplotlib.git \end{sphinxVerbatim} Remember that links starting with \sphinxcode{\sphinxupquote{https}} or \sphinxcode{\sphinxupquote{git@}} are read-write, and that \sphinxcode{\sphinxupquote{git@}} uses the ssh protocol; links starting with \sphinxcode{\sphinxupquote{git://}} are read-only. Your collaborators can then commit directly into that repo with the usual: \begin{sphinxVerbatim}[commandchars=\\\{\}] git commit \PYGZhy{}am \PYG{l+s+s1}{\PYGZsq{}ENH \PYGZhy{} much better code\PYGZsq{}} git push origin master \PYG{c+c1}{\PYGZsh{} pushes directly into your repo} \end{sphinxVerbatim} \paragraph{Explore your repository} \label{\detokenize{devel/gitwash/development_workflow:explore-your-repository}} To see a graphical representation of the repository branches and commits: \begin{sphinxVerbatim}[commandchars=\\\{\}] gitk \PYGZhy{}\PYGZhy{}all \end{sphinxVerbatim} To see a linear list of commits for this branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] git log \end{sphinxVerbatim} You can also look at the \sphinxhref{https://github.com/blog/39-say-hello-to-the-network-graph-visualizer}{network graph visualizer} for your github repo. Finally the {\hyperref[\detokenize{devel/gitwash/configure_git:fancy-log}]{\sphinxcrossref{\DUrole{std,std-ref}{Fancy log output}}}} \sphinxcode{\sphinxupquote{lg}} alias will give you a reasonable text-based graph of the repository. \paragraph{Rebasing on trunk} \label{\detokenize{devel/gitwash/development_workflow:rebasing-on-trunk}}\label{\detokenize{devel/gitwash/development_workflow:rebase-on-trunk}} Let's say you thought of some work you'd like to do. You {\hyperref[\detokenize{devel/gitwash/development_workflow:update-mirror-trunk}]{\sphinxcrossref{\DUrole{std,std-ref}{Update the mirror of trunk}}}} and {\hyperref[\detokenize{devel/gitwash/development_workflow:make-feature-branch}]{\sphinxcrossref{\DUrole{std,std-ref}{Make a new feature branch}}}} called \sphinxcode{\sphinxupquote{cool-feature}}. At this stage trunk is at some commit, let's call it E. Now you make some new commits on your \sphinxcode{\sphinxupquote{cool-feature}} branch, let's call them A, B, C. Maybe your changes take a while, or you come back to them after a while. In the meantime, trunk has progressed from commit E to commit (say) G: \begin{sphinxVerbatim}[commandchars=\\\{\}] A\PYGZhy{}\PYGZhy{}\PYGZhy{}B\PYGZhy{}\PYGZhy{}\PYGZhy{}C cool\PYGZhy{}feature / D\PYGZhy{}\PYGZhy{}\PYGZhy{}E\PYGZhy{}\PYGZhy{}\PYGZhy{}F\PYGZhy{}\PYGZhy{}\PYGZhy{}G trunk \end{sphinxVerbatim} At this stage you consider merging trunk into your feature branch, and you remember that this here page sternly advises you not to do that, because the history will get messy. Most of the time you can just ask for a review, and not worry that trunk has got a little ahead. But sometimes, the changes in trunk might affect your changes, and you need to harmonize them. In this situation you may prefer to do a rebase. rebase takes your changes (A, B, C) and replays them as if they had been made to the current state of \sphinxcode{\sphinxupquote{trunk}}. In other words, in this case, it takes the changes represented by A, B, C and replays them on top of G. After the rebase, your history will look like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] A\PYGZsq{}\PYGZhy{}\PYGZhy{}B\PYGZsq{}\PYGZhy{}\PYGZhy{}C\PYGZsq{} cool\PYGZhy{}feature / D\PYGZhy{}\PYGZhy{}\PYGZhy{}E\PYGZhy{}\PYGZhy{}\PYGZhy{}F\PYGZhy{}\PYGZhy{}\PYGZhy{}G trunk \end{sphinxVerbatim} See \sphinxhref{https://matthew-brett.github.io/pydagogue/rebase\_without\_tears.html}{rebase without tears} for more detail. To do a rebase on trunk: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Update the mirror of trunk} git fetch upstream \PYG{c+c1}{\PYGZsh{} go to the feature branch} git checkout cool\PYGZhy{}feature \PYG{c+c1}{\PYGZsh{} make a backup in case you mess up} git branch tmp cool\PYGZhy{}feature \PYG{c+c1}{\PYGZsh{} rebase cool\PYGZhy{}feature onto trunk} git rebase \PYGZhy{}\PYGZhy{}onto upstream/master upstream/master cool\PYGZhy{}feature \end{sphinxVerbatim} In this situation, where you are already on branch \sphinxcode{\sphinxupquote{cool-feature}}, the last command can be written more succinctly as: \begin{sphinxVerbatim}[commandchars=\\\{\}] git rebase upstream/master \end{sphinxVerbatim} When all looks good you can delete your backup branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] git branch \PYGZhy{}D tmp \end{sphinxVerbatim} If it doesn't look good you may need to have a look at {\hyperref[\detokenize{devel/gitwash/development_workflow:recovering-from-mess-up}]{\sphinxcrossref{\DUrole{std,std-ref}{Recovering from mess-ups}}}}. If you have made changes to files that have also changed in trunk, this may generate merge conflicts that you need to resolve - see the \sphinxhref{https://schacon.github.io/git/git-rebase.html}{git rebase} man page for some instructions at the end of the "Description" section. There is some related help on merging in the git user manual - see \sphinxhref{https://schacon.github.io/git/user-manual.html\#resolving-a-merge}{resolving a merge}. \paragraph{Recovering from mess-ups} \label{\detokenize{devel/gitwash/development_workflow:recovering-from-mess-ups}}\label{\detokenize{devel/gitwash/development_workflow:recovering-from-mess-up}} Sometimes, you mess up merges or rebases. Luckily, in git it is relatively straightforward to recover from such mistakes. If you mess up during a rebase: \begin{sphinxVerbatim}[commandchars=\\\{\}] git rebase \PYGZhy{}\PYGZhy{}abort \end{sphinxVerbatim} If you notice you messed up after the rebase: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} reset branch back to the saved point} git reset \PYGZhy{}\PYGZhy{}hard tmp \end{sphinxVerbatim} If you forgot to make a backup branch: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} look at the reflog of the branch} git reflog show cool\PYGZhy{}feature \PYG{l+m}{8630830} cool\PYGZhy{}feature@\PYG{o}{\PYGZob{}}\PYG{l+m}{0}\PYG{o}{\PYGZcb{}}: commit: BUG: io: close file handles immediately 278dd2a cool\PYGZhy{}feature@\PYG{o}{\PYGZob{}}\PYG{l+m}{1}\PYG{o}{\PYGZcb{}}: rebase finished: refs/heads/my\PYGZhy{}feature\PYGZhy{}branch onto 11ee694744f2552d 26aa21a cool\PYGZhy{}feature@\PYG{o}{\PYGZob{}}\PYG{l+m}{2}\PYG{o}{\PYGZcb{}}: commit: BUG: lib: make seek\PYGZus{}gzip\PYGZus{}factory not leak gzip obj ... \PYG{c+c1}{\PYGZsh{} reset the branch to where it was before the botched rebase} git reset \PYGZhy{}\PYGZhy{}hard cool\PYGZhy{}feature@\PYG{o}{\PYGZob{}}\PYG{l+m}{2}\PYG{o}{\PYGZcb{}} \end{sphinxVerbatim} \paragraph{Rewriting commit history} \label{\detokenize{devel/gitwash/development_workflow:rewriting-commit-history}}\label{\detokenize{devel/gitwash/development_workflow:id2}} \begin{sphinxadmonition}{note}{Note:} Do this only for your own feature branches. \end{sphinxadmonition} There's an embarrassing typo in a commit you made? Or perhaps the you made several false starts you would like the posterity not to see. This can be done via \sphinxstyleemphasis{interactive rebasing}. Suppose that the commit history looks like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] git log \PYGZhy{}\PYGZhy{}oneline eadc391 Fix some remaining bugs a815645 Modify it so that it works 2dec1ac Fix a few bugs + disable 13d7934 First implementation 6ad92e5 * masked is now an instance of a new object, MaskedConstant 29001ed Add pre\PYGZhy{}nep \PYG{k}{for} a copule of structured\PYGZus{}array\PYGZus{}extensions. ... \end{sphinxVerbatim} and \sphinxcode{\sphinxupquote{6ad92e5}} is the last commit in the \sphinxcode{\sphinxupquote{cool-feature}} branch. Suppose we want to make the following changes: \begin{itemize} \item {} Rewrite the commit message for \sphinxcode{\sphinxupquote{13d7934}} to something more sensible. \item {} Combine the commits \sphinxcode{\sphinxupquote{2dec1ac}}, \sphinxcode{\sphinxupquote{a815645}}, \sphinxcode{\sphinxupquote{eadc391}} into a single one. \end{itemize} We do as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} make a backup of the current state} git branch tmp HEAD \PYG{c+c1}{\PYGZsh{} interactive rebase} git rebase \PYGZhy{}i 6ad92e5 \end{sphinxVerbatim} This will open an editor with the following text in it: \begin{sphinxVerbatim}[commandchars=\\\{\}] pick 13d7934 First implementation pick 2dec1ac Fix a few bugs + disable pick a815645 Modify it so that it works pick eadc391 Fix some remaining bugs \PYG{c+c1}{\PYGZsh{} Rebase 6ad92e5..eadc391 onto 6ad92e5} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} Commands:} \PYG{c+c1}{\PYGZsh{} p, pick = use commit} \PYG{c+c1}{\PYGZsh{} r, reword = use commit, but edit the commit message} \PYG{c+c1}{\PYGZsh{} e, edit = use commit, but stop for amending} \PYG{c+c1}{\PYGZsh{} s, squash = use commit, but meld into previous commit} \PYG{c+c1}{\PYGZsh{} f, fixup = like \PYGZdq{}squash\PYGZdq{}, but discard this commit\PYGZsq{}s log message} \PYG{c+c1}{\PYGZsh{}} \PYG{c+c1}{\PYGZsh{} If you remove a line here THAT COMMIT WILL BE LOST.} \PYG{c+c1}{\PYGZsh{} However, if you remove everything, the rebase will be aborted.} \PYG{c+c1}{\PYGZsh{}} \end{sphinxVerbatim} To achieve what we want, we will make the following changes to it: \begin{sphinxVerbatim}[commandchars=\\\{\}] r 13d7934 First implementation pick 2dec1ac Fix a few bugs + disable f a815645 Modify it so that it works f eadc391 Fix some remaining bugs \end{sphinxVerbatim} This means that (i) we want to edit the commit message for \sphinxcode{\sphinxupquote{13d7934}}, and (ii) collapse the last three commits into one. Now we save and quit the editor. Git will then immediately bring up an editor for editing the commit message. After revising it, we get the output: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{o}{[}detached HEAD 721fc64\PYG{o}{]} FOO: First implementation \PYG{l+m}{2} files changed, \PYG{l+m}{199} insertions\PYG{o}{(}+\PYG{o}{)}, \PYG{l+m}{66} deletions\PYG{o}{(}\PYGZhy{}\PYG{o}{)} \PYG{o}{[}detached HEAD 0f22701\PYG{o}{]} Fix a few bugs + disable \PYG{l+m}{1} files changed, \PYG{l+m}{79} insertions\PYG{o}{(}+\PYG{o}{)}, \PYG{l+m}{61} deletions\PYG{o}{(}\PYGZhy{}\PYG{o}{)} Successfully rebased and updated refs/heads/my\PYGZhy{}feature\PYGZhy{}branch. \end{sphinxVerbatim} and the history looks now like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] 0f22701 Fix a few bugs + disable 721fc64 ENH: Sophisticated feature 6ad92e5 * masked is now an instance of a new object, MaskedConstant \end{sphinxVerbatim} If it went wrong, recovery is again possible as explained {\hyperref[\detokenize{devel/gitwash/development_workflow:recovering-from-mess-up}]{\sphinxcrossref{\DUrole{std,std-ref}{above}}}}. \subsection{Maintainer workflow} \label{\detokenize{devel/gitwash/maintainer_workflow:maintainer-workflow}}\label{\detokenize{devel/gitwash/maintainer_workflow:id1}}\label{\detokenize{devel/gitwash/maintainer_workflow::doc}} This page is for maintainers — those of us who merge our own or other peoples' changes into the upstream repository. Being as how you're a maintainer, you are completely on top of the basic stuff in {\hyperref[\detokenize{devel/gitwash/development_workflow:development-workflow}]{\sphinxcrossref{\DUrole{std,std-ref}{Development workflow}}}}. The instructions in {\hyperref[\detokenize{devel/gitwash/set_up_fork:linking-to-upstream}]{\sphinxcrossref{\DUrole{std,std-ref}{Linking your repository to the upstream repo}}}} add a remote that has read-only access to the upstream repo. Being a maintainer, you've got read-write access. It's good to have your upstream remote have a scary name, to remind you that it's a read-write remote: \begin{sphinxVerbatim}[commandchars=\\\{\}] git remote add upstream\PYGZhy{}rw git@github.com:matplotlib/matplotlib.git git fetch upstream\PYGZhy{}rw \end{sphinxVerbatim} \subsubsection{Integrating changes} \label{\detokenize{devel/gitwash/maintainer_workflow:integrating-changes}} Let's say you have some changes that need to go into trunk (\sphinxcode{\sphinxupquote{upstream-rw/master}}). The changes are in some branch that you are currently on. For example, you are looking at someone's changes like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] git remote add someone git://github.com/someone/matplotlib.git git fetch someone git branch cool\PYGZhy{}feature \PYGZhy{}\PYGZhy{}track someone/cool\PYGZhy{}feature git checkout cool\PYGZhy{}feature \end{sphinxVerbatim} So now you are on the branch with the changes to be incorporated upstream. The rest of this section assumes you are on this branch. \paragraph{A few commits} \label{\detokenize{devel/gitwash/maintainer_workflow:a-few-commits}} If there are only a few commits, consider rebasing to upstream: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} Fetch upstream changes} git fetch upstream\PYGZhy{}rw \PYG{c+c1}{\PYGZsh{} rebase} git rebase upstream\PYGZhy{}rw/master \end{sphinxVerbatim} Remember that, if you do a rebase, and push that, you'll have to close any github pull requests manually, because github will not be able to detect the changes have already been merged. \paragraph{A long series of commits} \label{\detokenize{devel/gitwash/maintainer_workflow:a-long-series-of-commits}} If there are a longer series of related commits, consider a merge instead: \begin{sphinxVerbatim}[commandchars=\\\{\}] git fetch upstream\PYGZhy{}rw git merge \PYGZhy{}\PYGZhy{}no\PYGZhy{}ff upstream\PYGZhy{}rw/master \end{sphinxVerbatim} The merge will be detected by github, and should close any related pull requests automatically. Note the \sphinxcode{\sphinxupquote{-{-}no-ff}} above. This forces git to make a merge commit, rather than doing a fast-forward, so that these set of commits branch off trunk then rejoin the main history with a merge, rather than appearing to have been made directly on top of trunk. \paragraph{Check the history} \label{\detokenize{devel/gitwash/maintainer_workflow:check-the-history}} Now, in either case, you should check that the history is sensible and you have the right commits: \begin{sphinxVerbatim}[commandchars=\\\{\}] git log \PYGZhy{}\PYGZhy{}oneline \PYGZhy{}\PYGZhy{}graph git log \PYGZhy{}p upstream\PYGZhy{}rw/master.. \end{sphinxVerbatim} The first line above just shows the history in a compact way, with a text representation of the history graph. The second line shows the log of commits excluding those that can be reached from trunk (\sphinxcode{\sphinxupquote{upstream-rw/master}}), and including those that can be reached from current HEAD (implied with the \sphinxcode{\sphinxupquote{..}} at the end). So, it shows the commits unique to this branch compared to trunk. The \sphinxcode{\sphinxupquote{-p}} option shows the diff for these commits in patch form. \paragraph{Push to trunk} \label{\detokenize{devel/gitwash/maintainer_workflow:push-to-trunk}} \begin{sphinxVerbatim}[commandchars=\\\{\}] git push upstream\PYGZhy{}rw my\PYGZhy{}new\PYGZhy{}feature:master \end{sphinxVerbatim} This pushes the \sphinxcode{\sphinxupquote{my-new-feature}} branch in this repository to the \sphinxcode{\sphinxupquote{master}} branch in the \sphinxcode{\sphinxupquote{upstream-rw}} repository. \section{git resources} \label{\detokenize{devel/gitwash/git_resources:git-resources}}\label{\detokenize{devel/gitwash/git_resources:id1}}\label{\detokenize{devel/gitwash/git_resources::doc}} \subsection{Tutorials and summaries} \label{\detokenize{devel/gitwash/git_resources:tutorials-and-summaries}}\begin{itemize} \item {} \sphinxhref{https://help.github.com}{github help} has an excellent series of how-to guides. \item {} The \sphinxhref{https://git-scm.com/book/en/v2}{pro git book} is a good in-depth book on git. \item {} A \sphinxhref{https://help.github.com/git-cheat-sheets/}{git cheat sheet} is a page giving summaries of common commands. \item {} The \sphinxhref{https://schacon.github.io/git/user-manual.html}{git user manual} \item {} The \sphinxhref{https://schacon.github.io/git/gittutorial.html}{git tutorial} \item {} The \sphinxhref{https://git-scm.com/book/en/v2}{git community book} \item {} \sphinxhref{http://gitready.com/}{git ready} — a nice series of tutorials \item {} \sphinxhref{http://www-cs-students.stanford.edu/~blynn/gitmagic/index.html}{git magic} — extended introduction with intermediate detail \item {} The \sphinxhref{http://tom.preston-werner.com/2009/05/19/the-git-parable.html}{git parable} is an easy read explaining the concepts behind git. \item {} \sphinxhref{https://matthew-brett.github.io/pydagogue/foundation.html}{git foundation} expands on the \sphinxhref{http://tom.preston-werner.com/2009/05/19/the-git-parable.html}{git parable}. \item {} Fernando Perez' git page — \sphinxhref{http://www.fperez.org/py4science/git.html}{Fernando's git page} — many links and tips \item {} A good but technical page on \sphinxhref{https://www.sbf5.com/~cduan/technical/git/}{git concepts} \item {} \sphinxhref{https://git-scm.com/course/svn.html}{git svn crash course}: git for those of us used to \sphinxhref{http://subversion.tigris.org/}{subversion} \end{itemize} \subsection{Advanced git workflow} \label{\detokenize{devel/gitwash/git_resources:advanced-git-workflow}} There are many ways of working with git; here are some posts on the rules of thumb that other projects have come up with: \begin{itemize} \item {} Linus Torvalds on \sphinxhref{https://web.archive.org/web/20090224195437/http://kerneltrap.org/Linux/Git\_Management}{git management} \item {} Linus Torvalds on \sphinxhref{https://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html}{linux git workflow} . Summary; use the git tools to make the history of your edits as clean as possible; merge from upstream edits as little as possible in branches where you are doing active development. \end{itemize} \subsection{Manual pages online} \label{\detokenize{devel/gitwash/git_resources:manual-pages-online}} You can get these on your own machine with (e.g) \sphinxcode{\sphinxupquote{git help push}} or (same thing) \sphinxcode{\sphinxupquote{git push -{-}help}}, but, for convenience, here are the online manual pages for some common commands: \begin{itemize} \item {} \sphinxhref{https://schacon.github.io/git/git-add.html}{git add} \item {} \sphinxhref{https://schacon.github.io/git/git-branch.html}{git branch} \item {} \sphinxhref{https://schacon.github.io/git/git-checkout.html}{git checkout} \item {} \sphinxhref{https://schacon.github.io/git/git-clone.html}{git clone} \item {} \sphinxhref{https://schacon.github.io/git/git-commit.html}{git commit} \item {} \sphinxhref{https://schacon.github.io/git/git-config.html}{git config} \item {} \sphinxhref{https://schacon.github.io/git/git-diff.html}{git diff} \item {} \sphinxhref{https://schacon.github.io/git/git-log.html}{git log} \item {} \sphinxhref{https://schacon.github.io/git/git-pull.html}{git pull} \item {} \sphinxhref{https://schacon.github.io/git/git-push.html}{git push} \item {} \sphinxhref{https://schacon.github.io/git/git-remote.html}{git remote} \item {} \sphinxhref{https://schacon.github.io/git/git-status.html}{git status} \end{itemize} \section{Two and three dots in difference specs} \label{\detokenize{devel/gitwash/dot2_dot3:two-and-three-dots-in-difference-specs}}\label{\detokenize{devel/gitwash/dot2_dot3:dot2-dot3}}\label{\detokenize{devel/gitwash/dot2_dot3::doc}} Thanks to Yarik Halchenko for this explanation. Imagine a series of commits A, B, C, D... Imagine that there are two branches, \sphinxstyleemphasis{topic} and \sphinxstyleemphasis{master}. You branched \sphinxstyleemphasis{topic} off \sphinxstyleemphasis{master} when \sphinxstyleemphasis{master} was at commit 'E'. The graph of the commits looks like this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{A}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{B}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{C} \PYG{n}{topic} \PYG{o}{/} \PYG{n}{D}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{E}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{F}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{G} \PYG{n}{master} \end{sphinxVerbatim} Then: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{diff} \PYG{n}{master}\PYG{o}{.}\PYG{o}{.}\PYG{n}{topic} \end{sphinxVerbatim} will output the difference from G to C (i.e. with effects of F and G), while: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{diff} \PYG{n}{master}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{n}{topic} \end{sphinxVerbatim} would output just differences in the topic branch (i.e. only A, B, and C). \chapter{Reviewers guideline} \label{\detokenize{devel/coding_guide:reviewers-guideline}}\label{\detokenize{devel/coding_guide:reviewers-guide}}\label{\detokenize{devel/coding_guide::doc}} \section{Pull request checklist} \label{\detokenize{devel/coding_guide:pull-request-checklist}}\label{\detokenize{devel/coding_guide:id1}} \subsection{Branch selection} \label{\detokenize{devel/coding_guide:branch-selection}} In general target the master branch for all new features and bug-fixes. PRs may target maintenance or doc branches on a case-by-case basis. \subsection{Documentation} \label{\detokenize{devel/coding_guide:documentation}}\begin{itemize} \item {} Every new feature should be documented. If it's a new module, don't forget to add a new rst file to the API docs. \item {} Each high-level plotting function should have a small example in the \sphinxcode{\sphinxupquote{Example}} section of the docstring. This should be as simple as possible to demonstrate the method. More complex examples should go in the \sphinxcode{\sphinxupquote{examples}} section of the documentation. \item {} Build the docs and make sure all formatting warnings are addressed. \item {} See {\hyperref[\detokenize{devel/documenting_mpl:documenting-matplotlib}]{\sphinxcrossref{\DUrole{std,std-ref}{Writing documentation}}}} for our documentation style guide. \item {} If your change is a major new feature, add an entry to \sphinxcode{\sphinxupquote{doc/users/whats\_new.rst}}. \item {} If you change the API in a backward-incompatible way, please document it in \sphinxcode{\sphinxupquote{doc/api/api\_changes.rst}}. \end{itemize} \section{PR Review guidelines} \label{\detokenize{devel/coding_guide:pr-review-guidelines}}\begin{itemize} \item {} Be patient and \sphinxhref{https://youtu.be/tzFWz5fiVKU?t=49m30s}{kind} with contributors. \item {} If you have commit rights, then you are trusted to use them. Please help review and merge PRs! \item {} Documentation and examples may be merged by the first reviewer. Use the threshold "is this better than it was?" as the review criteria. \item {} For code changes (anything in \sphinxcode{\sphinxupquote{src}} or \sphinxcode{\sphinxupquote{lib}}) at least two developers (those with commit rights) should review all pull requests. If you are the first to review a PR and approve of the changes use the github \sphinxhref{https://help.github.com/articles/reviewing-changes-in-pull-requests/}{'approve review'} tool to mark it as such. If you are a subsequent reviewer please approve the review and if you think no more review is needed, merge the PR. Ensure that all API changes are documented in \sphinxcode{\sphinxupquote{doc/api/api\_changes}} and significant new features have and entry in \sphinxcode{\sphinxupquote{doc/user/whats\_new}}. \item {} Make sure the Travis, Appvyor, circle, and codecov tests are passing before merging. \begin{itemize} \item {} Whenever a pull request is created or updated, Travis and Appveyor automatically runs the test suite on all versions of Python supported by Matplotlib. The \sphinxcode{\sphinxupquote{tox}} support in Matplotlib may be useful for testing locally. \end{itemize} \item {} Do not self merge, except for 'small' patches to un-break the CI or when another reviewer explicitly allows it (ex, "Approve modulo CI passing, may self merge when green") \item {} Squashing is case-by-case. The balance is between burden on the contributor, keeping a relatively clean history, and keeping a history usable for bisecting. The only time we are really strict about it is to eliminate binary files (ex multiple test image re-generations) and to remove upstream merges. \item {} Do not let perfect be the enemy of the good, particularly for documentation or example PRs. If you find yourself making many small suggestions, either open a PR against the original branch, push changes to the contributor branch, or merge the PR and then open a new PR against upstream. \item {} If you push to a contributor branch leave a comment explaining what you did, ex "I took the liberty of pushing a small clean-up PR to your branch, thanks for your work.". If you are going to make substantial changes to the code or intent of the PR please check with the contributor first. \end{itemize} \section{Branches and Backports} \label{\detokenize{devel/coding_guide:branches-and-backports}} The current active branches are \begin{description} \item[{\sphinxstyleemphasis{master}}] \leavevmode This will be Matplotlib 3.0. Supports Python 3.5+. \item[{\sphinxstyleemphasis{v2.2.x}}] \leavevmode Maintenance branch for Matplotlib 2.2 LTS. Supports Python 2.7, 3.4+ \item[{\sphinxstyleemphasis{v2.2.N-doc}}] \leavevmode Documentation for the current release. On a patch release, this will be replaced by a properly named branch for the new release. \end{description} We always will backport to 2.2.x \begin{itemize} \item {} critical bug fixes (segfault, failure to import, things that the user can not work around) \item {} fixes for regressions against 2.0 or 2.1 \end{itemize} Everything else (regressions against 1.x versions, bugs/api inconsistencies the user can work around in their code) are on a case-by-case basis, should be low-risk, and need someone to advocate for and shepherd through the backport. The only changes to be backported to 2.2.N-doc are changes to \sphinxcode{\sphinxupquote{doc}}, \sphinxcode{\sphinxupquote{examples}}, or \sphinxcode{\sphinxupquote{tutorials}}. Any changes to \sphinxcode{\sphinxupquote{lib}} or \sphinxcode{\sphinxupquote{src}} should not be backported to this branch. \subsection{Automated backports} \label{\detokenize{devel/coding_guide:automated-backports}} We use meeseeksdev bot to automatically backport merges to the correct maintenance branch base on the milestone. To work properly the milestone must be set before merging. If you have commit rights, the bot can also be manually triggered after a merge by leaving a message \sphinxcode{\sphinxupquote{@meeseeksdev backport to BRANCH}} on the PR. If there are conflicts meeseekdevs will inform you that the backport needs to be done manually. The target branch is configured by putting \sphinxcode{\sphinxupquote{on-merge: backport to TARGETBRANCH}} in the milestone description on it's own line. If the bot is not working as expected, please report issues to \sphinxhref{https://github.com/MeeseeksBox/MeeseeksDev}{Meeseeksdev}. \subsection{Manual backports} \label{\detokenize{devel/coding_guide:manual-backports}} When doing backports please copy the form used by meeseekdev, \sphinxcode{\sphinxupquote{Backport PR \#XXXX: TITLE OF PR}}. If you need to manually resolve conflicts make note of them and how you resolved them in the commit message. We do a backport from master to v2.2.x assuming: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{matplotlib}} is a read-only remote branch of the matplotlib/matplotlib repo \end{itemize} The \sphinxcode{\sphinxupquote{TARGET\_SHA}} is the hash of the merge commit you would like to backport. This can be read off of the github PR page (in the UI with the merge notification) or through the git CLI tools. Assuming that you already have a local branch \sphinxcode{\sphinxupquote{v2.2.x}} (if not, then \sphinxcode{\sphinxupquote{git checkout -b v2.2.x}}), and that your remote pointing to \sphinxcode{\sphinxupquote{https://github.com/matplotlib/matplotlib}} is called \sphinxcode{\sphinxupquote{upstream}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{fetch} \PYG{n}{upstream} \PYG{n}{git} \PYG{n}{checkout} \PYG{n}{v2}\PYG{o}{.}\PYG{l+m+mf}{2.}\PYG{n}{x} \PYG{c+c1}{\PYGZsh{} or include \PYGZhy{}b if you don\PYGZsq{}t already have this.} \PYG{n}{git} \PYG{n}{reset} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{n}{hard} \PYG{n}{upstream}\PYG{o}{/}\PYG{n}{v2}\PYG{o}{.}\PYG{l+m+mf}{2.}\PYG{n}{x} \PYG{n}{git} \PYG{n}{cherry}\PYG{o}{\PYGZhy{}}\PYG{n}{pick} \PYG{o}{\PYGZhy{}}\PYG{n}{m} \PYG{l+m+mi}{1} \PYG{n}{TARGET\PYGZus{}SHA} \PYG{c+c1}{\PYGZsh{} resolve conflicts and commit if required} \end{sphinxVerbatim} Files with conflicts can be listed by \sphinxcode{\sphinxupquote{git status}}, and will have to be fixed by hand (search on \sphinxcode{\sphinxupquote{\textgreater{}\textgreater{}\textgreater{}\textgreater{}\textgreater{}}}). Once the conflict is resolved, you will have to re-add the file(s) to the branch and then continue the cherry pick: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{git} \PYG{n}{add} \PYG{n}{lib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{conflicted\PYGZus{}file}\PYG{o}{.}\PYG{n}{py} \PYG{n}{git} \PYG{n}{add} \PYG{n}{lib}\PYG{o}{/}\PYG{n}{matplotlib}\PYG{o}{/}\PYG{n}{conflicted\PYGZus{}file2}\PYG{o}{.}\PYG{n}{py} \PYG{n}{git} \PYG{n}{cherry}\PYG{o}{\PYGZhy{}}\PYG{n}{pick} \PYG{o}{\PYGZhy{}}\PYG{o}{\PYGZhy{}}\PYG{k}{continue} \end{sphinxVerbatim} Use your discretion to push directly to upstream or to open a PR; be sure to push or PR against the \sphinxcode{\sphinxupquote{v2.2.x}} upstream branch, not \sphinxcode{\sphinxupquote{master}}! \chapter{Release Guide} \label{\detokenize{devel/release_guide:release-guide}}\label{\detokenize{devel/release_guide:id1}}\label{\detokenize{devel/release_guide::doc}} \begin{sphinxadmonition}{note}{This document is only relevant for matplotlib release managers.} A guide for developers who are doing a matplotlib release. \end{sphinxadmonition} \begin{sphinxadmonition}{note}{Note:} This assumes that a read-only remote for the canonical repository is \sphinxcode{\sphinxupquote{remote}} and a read/write remote is \sphinxcode{\sphinxupquote{DANGER}} \end{sphinxadmonition} \section{All Releases} \label{\detokenize{devel/release_guide:all-releases}} \subsection{Testing} \label{\detokenize{devel/release_guide:testing}}\label{\detokenize{devel/release_guide:release-testing}} We use \sphinxhref{https://travis-ci.org/matplotlib/matplotlib}{travis-ci} for continuous integration. When preparing for a release, the final tagged commit should be tested locally before it is uploaded: \begin{sphinxVerbatim}[commandchars=\\\{\}] pytest \PYGZhy{}n \PYG{l+m}{8} . \end{sphinxVerbatim} In addition the following test should be run and manually inspected: \begin{sphinxVerbatim}[commandchars=\\\{\}] python unit/memleak.py agg agg.pdf \end{sphinxVerbatim} In addition the following should be run and manually inspected, but is currently broken: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{pushd} examples/tests/ python backend\PYGZus{}driver\PYGZus{}sgskip.py \PYG{n+nb}{popd} \end{sphinxVerbatim} \subsection{GitHub Stats} \label{\detokenize{devel/release_guide:github-stats}}\label{\detokenize{devel/release_guide:release-ghstats}} We automatically extract GitHub issue, PRs, and authors from GitHub via the API. copy the current \sphinxcode{\sphinxupquote{github\_stats.rst}} to \sphinxcode{\sphinxupquote{github\_stats\_X.Y.Z.rst}}. To re-generate the updated \begin{sphinxVerbatim}[commandchars=\\\{\}] python tools/github\PYGZus{}stats.py \PYGZhy{}\PYGZhy{}since\PYGZhy{}tag v2.2.0 \PYGZhy{}\PYGZhy{}milestone\PYG{o}{=}v3.0 \PYGZhy{}\PYGZhy{}project \PYG{l+s+s1}{\PYGZsq{}matplotlib/matplotlib\PYGZsq{}} \PYGZhy{}\PYGZhy{}links \PYGZgt{} doc/users/github\PYGZus{}stats.rst \end{sphinxVerbatim} Review and commit changes. Some issue/PR titles may not be valid rst (the most common issue is \sphinxcode{\sphinxupquote{*}} which is interpreted as unclosed markup). \subsection{Update and Validate the Docs} \label{\detokenize{devel/release_guide:update-and-validate-the-docs}}\label{\detokenize{devel/release_guide:release-chkdocs}} Merge the most recent 'doc' branch (\sphinxcode{\sphinxupquote{v3.0.2-doc}}) into the branch you are going to tag on and delete the doc branch on GitHub. Before tagging, update the "what's new" and "API changes" listings. for the "what's new" \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} copy the current content to a file in \sphinxcode{\sphinxupquote{doc/users/prev\_whats\_new}} \item {} merge all of the files in \sphinxcode{\sphinxupquote{doc/users/next\_whats\_new/}} into \sphinxcode{\sphinxupquote{doc/users/whats\_new.rst}} and delete the individual files \item {} comment out the next whats new glob at the top \end{enumerate} Similarly for the "API changes" \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} copy the current api changes to a file is \sphinxcode{\sphinxupquote{doc/api/prev\_api\_changes}} \item {} merge all of the files in \sphinxcode{\sphinxupquote{doc/api/next\_api\_changes/}} into \sphinxcode{\sphinxupquote{doc//whats\_new.rst}} \item {} comment out the next API changes at the top. \end{enumerate} In both cases step 3 will have to be un-done right after the release. Finally, make sure that the docs build cleanly \begin{sphinxVerbatim}[commandchars=\\\{\}] make \PYGZhy{}Cdoc \PYG{n+nv}{O}\PYG{o}{=}\PYGZhy{}j\PYG{k}{\PYGZdl{}(}nproc\PYG{k}{)} html latexpdf \end{sphinxVerbatim} After the docs are built, check that all of the links, internal and external, are still valid. We use \sphinxcode{\sphinxupquote{linkchecker}} for this, which has not been ported to python3 yet. You will need to create a python2 environment with \sphinxcode{\sphinxupquote{requests==2.9.0}} and linkchecker \begin{sphinxVerbatim}[commandchars=\\\{\}] conda create \PYGZhy{}p /tmp/lnkchk \PYG{n+nv}{python}\PYG{o}{=}\PYG{l+m}{2} \PYG{n+nv}{requests}\PYG{o}{=}\PYG{o}{=}\PYG{l+m}{2}.9.0 \PYG{n+nb}{source} activate /tmp/lnkchk pip install linkchecker \PYG{n+nb}{pushd} doc/build/html linkchecker index.html \PYGZhy{}\PYGZhy{}check\PYGZhy{}extern \PYG{n+nb}{popd} \end{sphinxVerbatim} Address any issues which may arise. The internal links are checked on travis, this should only flag failed external links. \subsection{Create release commit and tag} \label{\detokenize{devel/release_guide:create-release-commit-and-tag}}\label{\detokenize{devel/release_guide:release-tag}} To create the tag, first create an empty commit with a very terse set of the release notes in the commit message \begin{sphinxVerbatim}[commandchars=\\\{\}] git commit \PYGZhy{}\PYGZhy{}allow\PYGZhy{}empty \end{sphinxVerbatim} and then create a signed, annotated tag with the same text in the body message \begin{sphinxVerbatim}[commandchars=\\\{\}] git tag \PYGZhy{}a \PYGZhy{}s v2.0.0 \end{sphinxVerbatim} which will prompt you for your gpg key password and an annotation. For pre releases it is important to follow \index{Python Enhancement Proposals@\spxentry{Python Enhancement Proposals}!PEP 440@\spxentry{PEP 440}}\sphinxhref{https://www.python.org/dev/peps/pep-0440}{\sphinxstylestrong{PEP 440}} so that the build artifacts will sort correctly in pypi. Finally, push the tag to GitHub \begin{sphinxVerbatim}[commandchars=\\\{\}] git push \PYGZhy{}t DANGER v2.0.0 \end{sphinxVerbatim} Congratulations, the scariest part is done! To prevent issues with any down-stream builders which download the tarball from GitHub it is important to move all branches away from the commit with the tag % \begin{footnote}[1]\sphinxAtStartFootnote The tarball that is provided by GitHub is produced using \sphinxhref{https://git-scm.com/docs/git-archive}{git archive}. We use \sphinxhref{https://github.com/warner/python-versioneer}{versioneer} which uses a format string in \sphinxcode{\sphinxupquote{lib/matplotlib/\_version.py}} to have \sphinxcode{\sphinxupquote{git}} insert a list of references to exported commit (see \sphinxcode{\sphinxupquote{.gitattributes}} for the configuration). This string is then used by \sphinxcode{\sphinxupquote{versioneer}} to produce the correct version, based on the git tag, when users install from the tarball. However, if there is a branch pointed at the tagged commit, then the branch name will also be included in the tarball. When the branch eventually moves, anyone how checked the hash of the tarball before the branch moved will have an incorrect hash. To generate the file that GitHub does use \sphinxSetupCodeBlockInFootnote \begin{sphinxVerbatim}[commandchars=\\\{\}] git archive v2.0.0 \PYGZhy{}o matplotlib\PYGZhy{}2.0.0.tar.gz \PYGZhy{}\PYGZhy{}prefix\PYG{o}{=}matplotlib\PYGZhy{}2.0.0/ \end{sphinxVerbatim} % \end{footnote}: \begin{sphinxVerbatim}[commandchars=\\\{\}] git commit \PYGZhy{}\PYGZhy{}allow\PYGZhy{}empty git push DANGER master \end{sphinxVerbatim} If this is a final release, also create a 'doc' branch (this is not done for pre-releases): \begin{sphinxVerbatim}[commandchars=\\\{\}] git branch v2.0.0\PYGZhy{}doc git push DANGER v2.0.0\PYGZhy{}doc \end{sphinxVerbatim} and if this is a major or minor release, also create a bug-fix branch (a micro release will be cut off of this branch): \begin{sphinxVerbatim}[commandchars=\\\{\}] git branch v2.0.x \end{sphinxVerbatim} On this branch un-comment the globs from {\hyperref[\detokenize{devel/release_guide:release-chkdocs}]{\sphinxcrossref{\DUrole{std,std-ref}{Update and Validate the Docs}}}}. And then \begin{sphinxVerbatim}[commandchars=\\\{\}] git push DANGER v2.0.x \end{sphinxVerbatim} \subsection{Release Management / DOI} \label{\detokenize{devel/release_guide:release-management-doi}}\label{\detokenize{devel/release_guide:release-doi}} Via the \sphinxhref{https://github.com/matplotlib/matplotlib/releases}{GitHub UI}, turn the newly pushed tag into a release. If this is a pre-release remember to mark it as such. For final releases also get a DOI from \sphinxhref{https://zenodo.org/}{zenodo} and edit \sphinxcode{\sphinxupquote{doc/citing.rst}} with DOI link and commit to the VER-doc branch and push to GitHub \begin{sphinxVerbatim}[commandchars=\\\{\}] git checkout v2.0.0\PYGZhy{}doc emacs doc/\PYGZus{}templates/citing.html git push DANGER v2.0.0\PYGZhy{}doc:v2.0.0\PYGZhy{}doc \end{sphinxVerbatim} \subsection{Building binaries} \label{\detokenize{devel/release_guide:building-binaries}}\label{\detokenize{devel/release_guide:release-bld-bin}} We distribute mac, windows, and many linux wheels as well as a source tarball via pypi. Before uploading anything, contact the various builders. Mac and manylinux wheels are built on travis . You need to edit the \sphinxcode{\sphinxupquote{.travis.yml}} file and push to the correct branch of \sphinxhref{https://github.com/MacPython/matplotlib-wheels}{the build project}. For new minor versions create a new branch, for bug-fixes continue to use the current release branch. The auto-tick bot should open a pull request into the \sphinxhref{https://github.com/conda-forge/matplotlib-feedstock}{conda-forge feedstock}. Review and merge (if you have the power to). \begin{sphinxadmonition}{warning}{Warning:} Because this is automated, it is extremely important to bump all branches away from the tag as discussed in {\hyperref[\detokenize{devel/release_guide:release-tag}]{\sphinxcrossref{\DUrole{std,std-ref}{Create release commit and tag}}}}. \end{sphinxadmonition} If this is a final release the following downstream packagers should be contacted: \begin{itemize} \item {} Debian \item {} Fedora \item {} Arch \item {} Gentoo \item {} Macports \item {} Homebrew \item {} Christoph Gohlke \item {} Continuum \item {} Enthought \end{itemize} This can be done ahead of collecting all of the binaries and uploading to pypi. \subsection{make distribution and upload to pypi / SF} \label{\detokenize{devel/release_guide:make-distribution-and-upload-to-pypi-sf}}\label{\detokenize{devel/release_guide:release-upload-bin}} Once you have collected all of the wheels (expect this to take about a day), generate the tarball \begin{sphinxVerbatim}[commandchars=\\\{\}] git checkout v2.0.0 git clean \PYGZhy{}xfd python setup.py sdist \end{sphinxVerbatim} and copy all of the wheels into \sphinxcode{\sphinxupquote{dist}} directory. You should use \sphinxcode{\sphinxupquote{twine}} to upload all of the files to pypi \begin{sphinxVerbatim}[commandchars=\\\{\}] twine upload \PYGZhy{}s dist/matplotlib*tar.gz twine upload dist/*whl \end{sphinxVerbatim} Congratulations, you have now done the second scariest part! Additionally, for a final release, upload all of the files to sourceforge. \subsection{Build and Deploy Documentation} \label{\detokenize{devel/release_guide:build-and-deploy-documentation}}\label{\detokenize{devel/release_guide:release-docs}} To build the documentation you must have the tagged version installed, but build the docs from the \sphinxcode{\sphinxupquote{ver-doc}} branch. An easy way to arrange this is: \begin{sphinxVerbatim}[commandchars=\\\{\}] pip install matplotlib pip install \PYGZhy{}r requirements/doc/doc\PYGZhy{}requirements.txt git checkout v2.0.0\PYGZhy{}doc git clean \PYGZhy{}xfd \PYG{n+nb}{cd} doc make \PYG{n+nv}{O}\PYG{o}{=}\PYGZhy{}n\PYG{k}{\PYGZdl{}(}nproc\PYG{k}{)} html latexpdf \end{sphinxVerbatim} which will build both the html and pdf version of the documentation. The built documentation exists in the \sphinxhref{https://github.com/matplotlib/matplotlib.github.com/}{matplotlib.github.com} repository. Pushing changes to master automatically updates the website. The documentation is organized by version. At the root of the tree is always the documentation for the latest stable release. Under that, there are directories containing the documentation for older versions. The documentation for current master are built on travis and push to the \sphinxhref{https://github.com/matplotlib/devdocs/}{devdocs} repository. These are available at \sphinxhref{https://matplotlib.org/devdocs}{matplotlib.org/devdocs}. Assuming you have this repository checked out in the same directory as matplotlib \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n+nb}{cd} ../matplotlib.github.com mkdir \PYG{l+m}{2}.0.0 rsync \PYGZhy{}a ../matplotlib/doc/build/html/* \PYG{l+m}{2}.0.0 cp ../matplotlib/doc/build/latex/Matplotlib.pdf \PYG{l+m}{2}.0.0 \end{sphinxVerbatim} which will copy the built docs over. If this is a final release, also replace the top-level docs \begin{sphinxVerbatim}[commandchars=\\\{\}] rsync \PYGZhy{}a \PYG{l+m}{2}.0.0/* ./ \end{sphinxVerbatim} You will need to manually edit \sphinxcode{\sphinxupquote{versions.html}} to show the last 3 tagged versions. Now commit and push everything to GitHub \begin{sphinxVerbatim}[commandchars=\\\{\}] git add * git commit \PYGZhy{}a \PYGZhy{}m \PYG{l+s+s1}{\PYGZsq{}Updating docs for v2.0.0\PYGZsq{}} git push DANGER master \end{sphinxVerbatim} Congratulations you have now done the third scariest part! If you have access, clear the cloudflare caches. It typically takes about 5-10 minutes for GitHub to process the push and update the live web page (remember to clear your browser cache). \subsection{Announcing} \label{\detokenize{devel/release_guide:announcing}} The final step is to announce the release to the world. A short version of the release notes along with acknowledgments should be sent to \begin{itemize} \item {} \sphinxhref{mailto:matplotlib-user@python.org}{matplotlib-user@python.org} \item {} \sphinxhref{mailto:matplotlib-devel@python.org}{matplotlib-devel@python.org} \item {} \sphinxhref{mailto:matplotlib-announce@python.org}{matplotlib-announce@python.org} \end{itemize} For final releases announcements should also be sent to the numpy/scipy/scikit-image mailing lists. In addition, announcements should be made on social networks (twitter via the \sphinxcode{\sphinxupquote{@matplotlib}} account, any other via personal accounts). \sphinxhref{https://www.numfocus.org/}{NumFOCUS} should be contacted for inclusion in their newsletter. \chapter{Minimum Version of Dependencies Policy} \label{\detokenize{devel/min_dep_policy:minimum-version-of-dependencies-policy}}\label{\detokenize{devel/min_dep_policy:min-deps-policy}}\label{\detokenize{devel/min_dep_policy::doc}} For the purpose of this document, 'minor version' is in the sense of SemVer (major, minor, patch) and includes both major and minor releases. For projects that use date-based versioning, every release is a 'minor version'. \section{Python and numpy} \label{\detokenize{devel/min_dep_policy:python-and-numpy}}\begin{itemize} \item {} support minor versions of \sphinxcode{\sphinxupquote{Python}} initially released 36 months prior to our planned release date. \item {} support minor versions of \sphinxcode{\sphinxupquote{numpy}} initially released in the 36 months prior to our planned release date or oldest that supports the minimum python version (which ever is higher) \end{itemize} We will bump the minimum python and numpy versions as we can every minor and major release, but never on a patch release. \section{Python Dependencies} \label{\detokenize{devel/min_dep_policy:python-dependencies}} For python dependencies we should support at least: \begin{description} \item[{with compiled extensions}] \leavevmode minor versions initially released in the 36 months prior to our planned release date or the oldest that support our minimum python + numpy \item[{without complied extensions}] \leavevmode minor versions initially released in the 24 months prior to our planed release date or the oldest that supports our minimum python. \end{description} We will only bump these dependencies as we need new features or the old versions no longer support our minimum numpy or python. \section{Test and Documentation Dependencies} \label{\detokenize{devel/min_dep_policy:test-and-documentation-dependencies}} As these packages are only needed for testing or building the docs and not needed by end-users, we can be more aggressive about dropping support for old versions. However, we need to be careful to not over-run what down-stream packagers support (as most of the run the tests and build the documentation as part of the packaging process). We will support at least minor versions of the development dependencies released in the 12 months prior to our planned release. We will only bump these as needed or versions no longer support our minimum Python and numpy. \section{System and C-dependencies} \label{\detokenize{devel/min_dep_policy:system-and-c-dependencies}} For system or c-dependencies (libpng, freetype, GUI frameworks, latex, gs, ffmpeg) support as old as practical. These can be difficult to install for end-users and we want to be usable on as many systems as possible. We will bump these on a case-by-case basis. \chapter{Matplotlib Enhancement Proposals} \label{\detokenize{devel/MEP/index:matplotlib-enhancement-proposals}}\label{\detokenize{devel/MEP/index::doc}} Matplotlib Enhancement Proposals (MEP), inspired by cpython's \sphinxhref{https://www.python.org/dev/peps/}{PEP's} but less formal, are design documents for large or controversial changes to Matplotilb. These documents should provide a discussion of both why and how the changes should be made. To create a new MEP open a pull request (PR) adding a file based on {\hyperref[\detokenize{devel/MEP/template:mep-template}]{\sphinxcrossref{\DUrole{std,std-ref}{the template}}}} to this the MEP directory. For the initial PR only a rough description is required and it should be merged quickly. Further detailed discussion can happen in follow on PRs. \section{MEP Template} \label{\detokenize{devel/MEP/template:mep-template}}\label{\detokenize{devel/MEP/template:id1}}\label{\detokenize{devel/MEP/template::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id2}}{\hyperref[\detokenize{devel/MEP/template:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id3}}{\hyperref[\detokenize{devel/MEP/template:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id4}}{\hyperref[\detokenize{devel/MEP/template:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id5}}{\hyperref[\detokenize{devel/MEP/template:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id6}}{\hyperref[\detokenize{devel/MEP/template:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id7}}{\hyperref[\detokenize{devel/MEP/template:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/template:id8}}{\hyperref[\detokenize{devel/MEP/template:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} This MEP template is a guideline of the sections that a MEP should contain. Extra sections may be added if appropriate, and unnecessary sections may be noted as such. \subsection{Status} \label{\detokenize{devel/MEP/template:status}} MEPs go through a number of phases in their lifetime: \begin{itemize} \item {} \sphinxstylestrong{Discussion}: The MEP is being actively discussed on the mailing list and it is being improved by its author. The mailing list discussion of the MEP should include the MEP number (MEPxxx) in the subject line so they can be easily related to the MEP. \item {} \sphinxstylestrong{Progress}: Consensus was reached and implementation work has begun. \item {} \sphinxstylestrong{Completed}: The implementation has been merged into master. \item {} \sphinxstylestrong{Superseded}: This MEP has been abandoned in favor of another approach. \item {} \sphinxstylestrong{Rejected}: There are currently no plans to implement the proposal. \end{itemize} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/template:branches-and-pull-requests}} All development branches containing work on this MEP should be linked to from here. All pull requests submitted relating to this MEP should be linked to from here. (A MEP does not need to be implemented in a single pull request if it makes sense to implement it in discrete phases). \subsection{Abstract} \label{\detokenize{devel/MEP/template:abstract}} The abstract should be a short description of what the MEP will achieve. \subsection{Detailed description} \label{\detokenize{devel/MEP/template:detailed-description}} This section describes the need for the MEP. It should describe the existing problem that it is trying to solve and why this MEP makes the situation better. It should include examples of how the new functionality would be used and perhaps some use cases. \subsection{Implementation} \label{\detokenize{devel/MEP/template:implementation}} This section lists the major steps required to implement the MEP. Where possible, it should be noted where one step is dependent on another, and which steps may be optionally omitted. Where it makes sense, each step should include a link related pull requests as the implementation progresses. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/template:backward-compatibility}} This section describes the ways in which the MEP breaks backward incompatibility. \subsection{Alternatives} \label{\detokenize{devel/MEP/template:alternatives}} If there were any alternative solutions to solving the same problem, they should be discussed here, along with a justification for the chosen approach. \section{MEP8: PEP8} \label{\detokenize{devel/MEP/MEP08:mep8-pep8}}\label{\detokenize{devel/MEP/MEP08::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id1}}{\hyperref[\detokenize{devel/MEP/MEP08:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id2}}{\hyperref[\detokenize{devel/MEP/MEP08:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id3}}{\hyperref[\detokenize{devel/MEP/MEP08:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id4}}{\hyperref[\detokenize{devel/MEP/MEP08:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id5}}{\hyperref[\detokenize{devel/MEP/MEP08:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id6}}{\hyperref[\detokenize{devel/MEP/MEP08:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP08:id7}}{\hyperref[\detokenize{devel/MEP/MEP08:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP08:status}} \sphinxstylestrong{Completed} We are currently enforcing a sub-set of pep8 on new code contributions. \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP08:branches-and-pull-requests}} None so far. \subsection{Abstract} \label{\detokenize{devel/MEP/MEP08:abstract}} The matplotlib codebase predates PEP8, and therefore is less than consistent style-wise in some areas. Bringing the codebase into compliance with PEP8 would go a long way to improving its legibility. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP08:detailed-description}} Some files use four space indentation, some use three. Some use different levels in the same file. For the most part, class/function/variable naming follows PEP8, but it wouldn't hurt to fix where necessary. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP08:implementation}} The implementation should be fairly mechanical: running the pep8 tool over the code and fixing where appropriate. This should be merged in after the 2.0 release, since the changes will likely make merging any pending pull requests more difficult. Additionally, and optionally, PEP8 compliance could be tracked by an automated build system. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP08:backward-compatibility}} Public names of classes and functions that require change (there shouldn't be many of these) should first be deprecated and then removed in the next release cycle. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP08:alternatives}} PEP8 is a popular standard for Python code style, blessed by the Python core developers, making any alternatives less desirable. \section{MEP9: Global interaction manager} \label{\detokenize{devel/MEP/MEP09:mep9-global-interaction-manager}}\label{\detokenize{devel/MEP/MEP09::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id1}}{\hyperref[\detokenize{devel/MEP/MEP09:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id2}}{\hyperref[\detokenize{devel/MEP/MEP09:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id3}}{\hyperref[\detokenize{devel/MEP/MEP09:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id4}}{\hyperref[\detokenize{devel/MEP/MEP09:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id5}}{\hyperref[\detokenize{devel/MEP/MEP09:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id6}}{\hyperref[\detokenize{devel/MEP/MEP09:current-summary-of-the-mixin}]{\sphinxcrossref{Current summary of the mixin}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id7}}{\hyperref[\detokenize{devel/MEP/MEP09:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP09:id8}}{\hyperref[\detokenize{devel/MEP/MEP09:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} Add a global manager for all user interactivity with artists; make any artist resizeable, moveable, highlightable, and selectable as desired by the user. \subsection{Status} \label{\detokenize{devel/MEP/MEP09:status}} \sphinxstylestrong{Discussion} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP09:branches-and-pull-requests}} \sphinxurl{https://github.com/dhyams/matplotlib/tree/MEP9} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP09:abstract}} The goal is to be able to interact with matplotlib artists in a very similar way as drawing programs do. When appropriate, the user should be able to move, resize, or select an artist that is already on the canvas. Of course, the script writer is ultimately in control of whether an artist is able to be interacted with, or whether it is static. This code to do this has already been privately implemented and tested, and would need to be migrated from its current "mixin" implementation, to a bona-fide part of matplotlib. The end result would be to have four new keywords available to matplotlib.artist.Artist: \_moveable\_, \_resizeable\_, \_selectable\_, and \_highlightable\_. Setting any one of these keywords to True would activate interactivity for that artist. In effect, this MEP is a logical extension of event handling in matplotlib; matplotlib already supports "low level" interactions like left mouse presses, a key press, or similar. The MEP extends the support to the logical level, where callbacks are performed on the artists when certain interactive gestures from the user are detected. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP09:detailed-description}} This new functionality would be used to allow the end-user to better interact with the graph. Many times, a graph is almost what the user wants, but a small repositioning and/or resizing of components is necessary. Rather than force the user to go back to the script to trial-and-error the location, and simple drag and drop would be appropriate. Also, this would better support applications that use matplotlib; here, the end-user has no reasonable access or desire to edit the underlying source in order to fine-tune a plot. Here, if matplotlib offered the capability, one could move or resize artists on the canvas to suit their needs. Also, the user should be able to highlight (with a mouse over) an artist, and select it with a double-click, if the application supports that sort of thing. In this MEP, we also want to support the highlighting and selection natively; it is up to application to handle what happens when the artist is selected. A typical handling would be to display a dialog to edit the properties of the artist. In the future, as well (this is not part of this MEP), matplotlib could offer backend-specific property dialogs for each artist, which are raised on artist selection. This MEP would be a necessary stepping stone for that sort of capability. There are currently a few interactive capabilities in matplotlib (e.g. legend.draggable()), but they tend to be scattered and are not available for all artists. This MEP seeks to unify the interactive interface and make it work for all artists. The current MEP also includes grab handles for resizing artists, and appropriate boxes drawn when artists are moved or resized. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP09:implementation}}\begin{itemize} \item {} Add appropriate methods to the "tree" of artists so that the interactivity manager has a consistent interface for the interactivity manager to deal with. The proposed methods to add to the artists, if they are to support interactivity, are: \begin{itemize} \item {} get\_pixel\_position\_ll(self): get the pixel position of the lower left corner of the artist's bounding box \item {} get\_pixel\_size(self): get the size of the artist's bounding box, in pixels \item {} set\_pixel\_position\_and\_size(self,x,y,dx,dy): set the new size of the artist, such that it fits within the specified bounding box. \end{itemize} \item {} add capability to the backends to 1) provide cursors, since these are needed for visual indication of moving/resizing, and 2) provide a function that gets the current mouse position \item {} Implement the manager. This has already been done privately (by dhyams) as a mixin, and has been tested quite a bit. The goal would be to move the functionality of the manager into the artists so that it is in matplotlib properly, and not as a "monkey patch" as I currently have it coded. \end{itemize} \subsection{Current summary of the mixin} \label{\detokenize{devel/MEP/MEP09:current-summary-of-the-mixin}} (Note that this mixin is for now just private code, but can be added to a branch obviously) InteractiveArtistMixin: Mixin class to make any generic object that is drawn on a matplotlib canvas moveable and possibly resizeable. The Powerpoint model is followed as closely as possible; not because I'm enamoured with Powerpoint, but because that's what most people understand. An artist can also be selectable, which means that the artist will receive the on\_activated() callback when double clicked. Finally, an artist can be highlightable, which means that a highlight is drawn on the artist whenever the mouse passes over. Typically, highlightable artists will also be selectable, but that is left up to the user. So, basically there are four attributes that can be set by the user on a per-artist basis: \begin{itemize} \item {} highlightable \item {} selectable \item {} moveable \item {} resizeable \end{itemize} To be moveable (draggable) or resizeable, the object that is the target of the mixin must support the following protocols: \begin{itemize} \item {} get\_pixel\_position\_ll(self) \item {} get\_pixel\_size(self) \item {} set\_pixel\_position\_and\_size(self,x,y,sx,sy) \end{itemize} Note that nonresizeable objects are free to ignore the sx and sy parameters. To be highlightable, the object that is the target of the mixin must also support the following protocol: \begin{itemize} \item {} get\_highlight(self) \end{itemize} Which returns a list of artists that will be used to draw the highlight. If the object that is the target of the mixin is not an matplotlib artist, the following protocols must also be implemented. Doing so is usually fairly trivial, as there has to be an artist \sphinxstyleemphasis{somewhere} that is being drawn. Typically your object would just route these calls to that artist. \begin{itemize} \item {} get\_figure(self) \item {} get\_axes(self) \item {} contains(self,event) \item {} set\_animated(self,flag) \item {} draw(self,renderer) \item {} get\_visible(self) \end{itemize} The following notifications are called on the artist, and the artist can optionally implement these. \begin{itemize} \item {} on\_select\_begin(self) \item {} on\_select\_end(self) \item {} on\_drag\_begin(self) \item {} on\_drag\_end(self) \item {} on\_activated(self) \item {} on\_highlight(self) \item {} on\_right\_click(self,event) \item {} on\_left\_click(self,event) \item {} on\_middle\_click(self,event) \item {} on\_context\_click(self,event) \item {} on\_key\_up(self,event) \item {} on\_key\_down(self,event) \end{itemize} The following notifications are called on the canvas, if no interactive artist handles the event: \begin{itemize} \item {} on\_press(self,event) \item {} on\_left\_click(self,event) \item {} on\_middle\_click(self,event) \item {} on\_right\_click(self,event) \item {} on\_context\_click(self,event) \item {} on\_key\_up(self,event) \item {} on\_key\_down(self,event) \end{itemize} The following functions, if present, can be used to modify the behavior of the interactive object: \begin{itemize} \item {} press\_filter(self,event) \# determines if the object wants to have the press event routed to it \item {} handle\_unpicked\_cursor() \# can be used by the object to set a cursor as the cursor passes over the object when it is unpicked. \end{itemize} Supports multiple canvases, maintaining a drag lock, motion notifier, and a global "enabled" flag per canvas. Supports fixed aspect ratio resizings by holding the shift key during the resize. Known problems: \begin{itemize} \item {} Zorder is not obeyed during the selection/drag operations. Because of the blit technique used, I do not believe this can be fixed. The only way I can think of is to search for all artists that have a zorder greater then me, set them all to animated, and then redraw them all on top during each drag refresh. This might be very slow; need to try. \item {} the mixin only works for wx backends because of two things: 1) the cursors are hardcoded, and 2) there is a call to wx.GetMousePosition() Both of these shortcomings are reasonably fixed by having each backend supply these things. \end{itemize} \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP09:backward-compatibility}} No problems with backward compatibility, although once this is in place, it would be appropriate to obsolete some of the existing interactive functions (like legend.draggable()) \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP09:alternatives}} None that I know of. \section{MEP10: Docstring consistency} \label{\detokenize{devel/MEP/MEP10:mep10-docstring-consistency}}\label{\detokenize{devel/MEP/MEP10::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id2}}{\hyperref[\detokenize{devel/MEP/MEP10:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id3}}{\hyperref[\detokenize{devel/MEP/MEP10:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id4}}{\hyperref[\detokenize{devel/MEP/MEP10:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id5}}{\hyperref[\detokenize{devel/MEP/MEP10:detailed-description}]{\sphinxcrossref{Detailed description}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id6}}{\hyperref[\detokenize{devel/MEP/MEP10:numpy-docstring-format}]{\sphinxcrossref{Numpy docstring format}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id7}}{\hyperref[\detokenize{devel/MEP/MEP10:cross-references}]{\sphinxcrossref{Cross references}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id8}}{\hyperref[\detokenize{devel/MEP/MEP10:overriding-signatures}]{\sphinxcrossref{Overriding signatures}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id9}}{\hyperref[\detokenize{devel/MEP/MEP10:linking-rather-than-duplicating}]{\sphinxcrossref{Linking rather than duplicating}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id10}}{\hyperref[\detokenize{devel/MEP/MEP10:autosummary-extension}]{\sphinxcrossref{autosummary extension}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id11}}{\hyperref[\detokenize{devel/MEP/MEP10:examples-linking-to-relevant-documentation}]{\sphinxcrossref{Examples linking to relevant documentation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id12}}{\hyperref[\detokenize{devel/MEP/MEP10:documentation-using-help-vs-a-browser}]{\sphinxcrossref{Documentation using help() vs a browser}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id13}}{\hyperref[\detokenize{devel/MEP/MEP10:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id14}}{\hyperref[\detokenize{devel/MEP/MEP10:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP10:id15}}{\hyperref[\detokenize{devel/MEP/MEP10:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP10:status}} \sphinxstylestrong{Progress} This is still an on-going effort \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP10:branches-and-pull-requests}} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP10:abstract}} matplotlib has a great deal of inconsistency between docstrings. This not only makes the docs harder to read, but it is harder on contributors, because they don't know which specifications to follow. There should be a clear docstring convention that is followed consistently. The organization of the API documentation is difficult to follow. Some pages, such as pyplot and axes, are enormous and hard to browse. There should instead be short summary tables that link to detailed documentation. In addition, some of the docstrings themselves are quite long and contain redundant information. Building the documentation takes a long time and uses a \sphinxcode{\sphinxupquote{make.py}} script rather than a Makefile. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP10:detailed-description}} There are number of new tools and conventions available since matplotlib started using Sphinx that make life easier. The following is a list of proposed changes to docstrings, most of which involve these new features. \subsubsection{Numpy docstring format} \label{\detokenize{devel/MEP/MEP10:numpy-docstring-format}} \sphinxhref{https://github.com/numpy/numpy/blob/master/doc/HOWTO\_DOCUMENT.rst.txt}{Numpy docstring format}: This format divides the docstring into clear sections, each having different parsing rules that make the docstring easy to read both as raw text and as HTML. We could consider alternatives, or invent our own, but this is a strong choice, as it's well used and understood in the Numpy/Scipy community. \subsubsection{Cross references} \label{\detokenize{devel/MEP/MEP10:cross-references}} Most of the docstrings in matplotlib use explicit "roles" when linking to other items, for example: \sphinxcode{\sphinxupquote{:func:{}`myfunction{}`}}. As of Sphinx 0.4, there is a "default\_role" that can be set to "obj", which will polymorphically link to a Python object of any type. This allows one to write \sphinxcode{\sphinxupquote{{}`myfunction{}`}} instead. This makes docstrings much easier to read and edit as raw text. Additionally, Sphinx allows for setting a current module, so links like \sphinxcode{\sphinxupquote{{}`\textasciitilde{}matplotlib.axes.Axes.set\_xlim{}`}} could be written as \sphinxcode{\sphinxupquote{{}`\textasciitilde{}axes.Axes.set\_xlim{}`}}. \subsubsection{Overriding signatures} \label{\detokenize{devel/MEP/MEP10:overriding-signatures}} Many methods in matplotlib use the \sphinxcode{\sphinxupquote{*args}} and \sphinxcode{\sphinxupquote{**kwargs}} syntax to dynamically handle the keyword arguments that are accepted by the function, or to delegate on to another function. This, however, is often not useful as a signature in the documentation. For this reason, many matplotlib methods include something like: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{annotate}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Create an annotation: a piece of text referring to a data} \PYG{l+s+sd}{ point.} \PYG{l+s+sd}{ Call signature::} \PYG{l+s+sd}{ annotate(s, xy, xytext=None, xycoords=\PYGZsq{}data\PYGZsq{},} \PYG{l+s+sd}{ textcoords=\PYGZsq{}data\PYGZsq{}, arrowprops=None, **kwargs)} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} This can't be parsed by Sphinx, and is rather verbose in raw text. As of Sphinx 1.1, if the \sphinxcode{\sphinxupquote{autodoc\_docstring\_signature}} config value is set to True, Sphinx will extract a replacement signature from the first line of the docstring, allowing this: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{annotate}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{o}{*}\PYG{n}{args}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ annotate(s, xy, xytext=None, xycoords=\PYGZsq{}data\PYGZsq{},} \PYG{l+s+sd}{ textcoords=\PYGZsq{}data\PYGZsq{}, arrowprops=None, **kwargs)} \PYG{l+s+sd}{ Create an annotation: a piece of text referring to a data} \PYG{l+s+sd}{ point.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} The explicit signature will replace the actual Python one in the generated documentation. \subsubsection{Linking rather than duplicating} \label{\detokenize{devel/MEP/MEP10:linking-rather-than-duplicating}} Many of the docstrings include long lists of accepted keywords by interpolating things into the docstring at load time. This makes the docstrings very long. Also, since these tables are the same across many docstrings, it inserts a lot of redundant information in the docs -- particularly a problem in the printed version. These tables should be moved to docstrings on functions whose only purpose is for help. The docstrings that refer to these tables should link to them, rather than including them verbatim. \subsubsection{autosummary extension} \label{\detokenize{devel/MEP/MEP10:autosummary-extension}} The Sphinx autosummary extension should be used to generate summary tables, that link to separate pages of documentation. Some classes that have many methods (e.g. \sphinxcode{\sphinxupquote{Axes.axes}}) should be documented with one method per page, whereas smaller classes should have all of their methods together. \subsubsection{Examples linking to relevant documentation} \label{\detokenize{devel/MEP/MEP10:examples-linking-to-relevant-documentation}} The examples, while helpful at illustrating how to use a feature, do not link back to the relevant docstrings. This could be addressed by adding module-level docstrings to the examples, and then including that docstring in the parsed content on the example page. These docstrings could easily include references to any other part of the documentation. \subsubsection{Documentation using help() vs a browser} \label{\detokenize{devel/MEP/MEP10:documentation-using-help-vs-a-browser}} Using Sphinx markup in the source allows for good-looking docs in your browser, but the markup also makes the raw text returned using help() look terrible. One of the aims of improving the docstrings should be to make both methods of accessing the docs look good. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP10:implementation}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} The numpydoc extensions should be turned on for matplotlib. There is an important question as to whether these should be included in the matplotlib source tree, or used as a dependency. Installing Numpy is not sufficient to get the numpydoc extensions -- it's a separate install procedure. In any case, to the extent that they require customization for our needs, we should endeavor to submit those changes upstream and not fork them. \item {} Manually go through all of the docstrings and update them to the new format and conventions. Updating the cross references (from \sphinxcode{\sphinxupquote{{}`:func:{}`myfunc{}`}} to \sphinxcode{\sphinxupquote{{}`func{}`}}) may be able to be semi-automated. This is a lot of busy work, and perhaps this labor should be divided on a per-module basis so no single developer is over-burdened by it. \item {} Reorganize the API docs using autosummary and \sphinxcode{\sphinxupquote{sphinx-autogen}}. This should hopefully have minimal impact on the narrative documentation. \item {} Modify the example page generator (\sphinxcode{\sphinxupquote{gen\_rst.py}}) so that it extracts the module docstring from the example and includes it in a non-literal part of the example page. \item {} Use \sphinxcode{\sphinxupquote{sphinx-quickstart}} to generate a new-style Sphinx Makefile. The following features in the current \sphinxcode{\sphinxupquote{make.py}} will have to be addressed in some other way: \begin{itemize} \item {} Copying of some static content \item {} Specifying a "small" build (only low-resolution PNG files for examples) \end{itemize} \end{enumerate} Steps 1, 2, and 3 are interdependent. 4 and 5 may be done independently, though 5 has some dependency on 3. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP10:backward-compatibility}} As this mainly involves docstrings, there should be minimal impact on backward compatibility. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP10:alternatives}} None yet discussed. \section{MEP11: Third-party dependencies} \label{\detokenize{devel/MEP/MEP11:mep11-third-party-dependencies}}\label{\detokenize{devel/MEP/MEP11::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id1}}{\hyperref[\detokenize{devel/MEP/MEP11:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id2}}{\hyperref[\detokenize{devel/MEP/MEP11:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id3}}{\hyperref[\detokenize{devel/MEP/MEP11:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id4}}{\hyperref[\detokenize{devel/MEP/MEP11:detailed-description}]{\sphinxcrossref{Detailed description}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id5}}{\hyperref[\detokenize{devel/MEP/MEP11:current-behavior}]{\sphinxcrossref{Current behavior}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id6}}{\hyperref[\detokenize{devel/MEP/MEP11:desired-behavior}]{\sphinxcrossref{Desired behavior}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id7}}{\hyperref[\detokenize{devel/MEP/MEP11:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id8}}{\hyperref[\detokenize{devel/MEP/MEP11:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP11:id9}}{\hyperref[\detokenize{devel/MEP/MEP11:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} This MEP attempts to improve the way in which third-party dependencies in matplotlib are handled. \subsection{Status} \label{\detokenize{devel/MEP/MEP11:status}} \sphinxstylestrong{Completed} -- needs to be merged \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP11:branches-and-pull-requests}} \#1157: Use automatic dependency resolution \#1290: Debundle pyparsing \#1261: Update six to 1.2 \subsection{Abstract} \label{\detokenize{devel/MEP/MEP11:abstract}} One of the goals of matplotlib has been to keep it as easy to install as possible. To that end, some third-party dependencies are included in the source tree and, under certain circumstances, installed alongside matplotlib. This MEP aims to resolve some problems with that approach, bring some consistency, while continuing to make installation convenient. At the time that was initially done, \sphinxcode{\sphinxupquote{setuptools}}, \sphinxcode{\sphinxupquote{easy\_install}} and \sphinxcode{\sphinxupquote{PyPI}} were not mature enough to be relied on. However, at present, we should be able to safely leverage the "modern" versions of those tools, \sphinxcode{\sphinxupquote{distribute}} and \sphinxcode{\sphinxupquote{pip}}. While matplotlib has dependencies on both Python libraries and C/C++ libraries, this MEP addresses only the Python libraries so as to not confuse the issue. C libraries represent a larger and mostly orthogonal set of problems. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP11:detailed-description}} matplotlib depends on the following third-party Python libraries: \begin{itemize} \item {} Numpy \item {} dateutil (pure Python) \item {} pytz (pure Python) \item {} six -- required by dateutil (pure Python) \item {} pyparsing (pure Python) \item {} PIL (optional) \item {} GUI frameworks: pygtk, gobject, tkinter, PySide, PyQt4, wx (all optional, but one is required for an interactive GUI) \end{itemize} \subsubsection{Current behavior} \label{\detokenize{devel/MEP/MEP11:current-behavior}} When installing from source, a \sphinxcode{\sphinxupquote{git}} checkout or \sphinxcode{\sphinxupquote{pip}}: \begin{itemize} \item {} \sphinxcode{\sphinxupquote{setup.py}} attempts to \sphinxcode{\sphinxupquote{import numpy}}. If this fails, the installation fails. \item {} For each of \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pytz}} and \sphinxcode{\sphinxupquote{six}}, \sphinxcode{\sphinxupquote{setup.py}} attempts to import them (from the top-level namespace). If that fails, matplotlib installs its local copy of the library into the top-level namespace. \item {} \sphinxcode{\sphinxupquote{pyparsing}} is always installed inside of the matplotlib namespace. \end{itemize} This behavior is most surprising when used with \sphinxcode{\sphinxupquote{pip}}, because no \sphinxcode{\sphinxupquote{pip}} dependency resolution is performed, even though it is likely to work for all of these packages. The fact that \sphinxcode{\sphinxupquote{pyparsing}} is installed in the matplotlib namespace has reportedly (\#1290) confused some users into thinking it is a matplotlib-related module and import it from there rather than the top-level. When installing using the Windows installer, \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pytz}} and \sphinxcode{\sphinxupquote{six}} are installed at the top-level \sphinxstyleemphasis{always}, potentially overwriting already installed copies of those libraries. TODO: Describe behavior with the OS-X installer. When installing using a package manager (Debian, RedHat, MacPorts etc.), this behavior actually does the right thing, and there are no special patches in the matplotlib packages to deal with the fact that we handle \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pytz}} and \sphinxcode{\sphinxupquote{six}} in this way. However, care should be taken that whatever approach we move to continues to work in that context. Maintaining these packages in the matplotlib tree and making sure they are up-to-date is a maintenance burden. Advanced new features that may require a third-party pure Python library have a higher barrier to inclusion because of this burden. \subsubsection{Desired behavior} \label{\detokenize{devel/MEP/MEP11:desired-behavior}} Third-party dependencies are downloaded and installed from their canonical locations by leveraging \sphinxcode{\sphinxupquote{pip}}, \sphinxcode{\sphinxupquote{distribute}} and \sphinxcode{\sphinxupquote{PyPI}}. \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pytz}}, and \sphinxcode{\sphinxupquote{pyparsing}} should be made into optional dependencies -- though obviously some features would fail if they aren't installed. This will allow the user to decide whether they want to bother installing a particular feature. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP11:implementation}} For installing from source, and assuming the user has all of the C-level compilers and dependencies, this can be accomplished fairly easily using \sphinxcode{\sphinxupquote{distribute}} and following the instructions \sphinxhref{https://pypi.python.org/pypi/distribute}{here}. The only anticipated change to the matplotlib library code will be to import \sphinxcode{\sphinxupquote{pyparsing}} from the top-level namespace rather than from within matplotlib. Note that \sphinxcode{\sphinxupquote{distribute}} will also allow us to remove the direct dependency on \sphinxcode{\sphinxupquote{six}}, since it is, strictly speaking, only a direct dependency of \sphinxcode{\sphinxupquote{dateutil}}. For binary installations, there are a number of alternatives (here ordered from best/hardest to worst/easiest): \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} The distutils wininst installer allows a post-install script to run. It might be possible to get this script to run \sphinxcode{\sphinxupquote{pip}} to install the other dependencies. (See \sphinxhref{http://grokbase.com/t/python/distutils-sig/109bdnfhp4/distutils-ann-setuptools-post-install-script-for-bdist-wininst}{this thread} for someone who has trod that ground before). \item {} Continue to ship \sphinxcode{\sphinxupquote{dateutil}}, \sphinxcode{\sphinxupquote{pytz}}, \sphinxcode{\sphinxupquote{six}} and \sphinxcode{\sphinxupquote{pyparsing}} in our installer, but use the post-install-script to install them \sphinxstyleemphasis{only} if they can not already be found. \item {} Move all of these packages inside a (new) \sphinxcode{\sphinxupquote{matplotlib.extern}} namespace so it is clear for outside users that these are external packages. Add some conditional imports in the core matplotlib codebase so \sphinxcode{\sphinxupquote{dateutil}} (at the top-level) is tried first, and failing that \sphinxcode{\sphinxupquote{matplotlib.extern.dateutil}} is used. \end{enumerate} 2 and 3 are undesirable as they still require maintaining copies of these packages in our tree -- and this is exacerbated by the fact that they are used less -- only in the binary installers. None of these 3 approaches address Numpy, which will still have to be manually installed using an installer. TODO: How does this relate to the Mac OS-X installer? \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP11:backward-compatibility}} At present, matplotlib can be installed from source on a machine without the third party dependencies and without an internet connection. After this change, an internet connection (and a working PyPI) will be required to install matplotlib for the first time. (Subsequent matplotlib updates or development work will run without accessing the network). \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP11:alternatives}} Distributing binary \sphinxcode{\sphinxupquote{eggs}} doesn't feel like a usable solution. That requires getting \sphinxcode{\sphinxupquote{easy\_install}} installed first, and Windows users generally prefer the well known \sphinxcode{\sphinxupquote{exe}} or \sphinxcode{\sphinxupquote{msi}} installer that works out of the box. \section{MEP12: Improve Gallery and Examples} \label{\detokenize{devel/MEP/MEP12:mep12-improve-gallery-and-examples}}\label{\detokenize{devel/MEP/MEP12::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id5}}{\hyperref[\detokenize{devel/MEP/MEP12:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id6}}{\hyperref[\detokenize{devel/MEP/MEP12:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id7}}{\hyperref[\detokenize{devel/MEP/MEP12:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id8}}{\hyperref[\detokenize{devel/MEP/MEP12:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id9}}{\hyperref[\detokenize{devel/MEP/MEP12:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id10}}{\hyperref[\detokenize{devel/MEP/MEP12:gallery-sections}]{\sphinxcrossref{Gallery sections}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id11}}{\hyperref[\detokenize{devel/MEP/MEP12:clean-up-guidelines}]{\sphinxcrossref{Clean up guidelines}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id12}}{\hyperref[\detokenize{devel/MEP/MEP12:additional-suggestions}]{\sphinxcrossref{Additional suggestions}}} \end{itemize} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id13}}{\hyperref[\detokenize{devel/MEP/MEP12:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id14}}{\hyperref[\detokenize{devel/MEP/MEP12:alternatives}]{\sphinxcrossref{Alternatives}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP12:id15}}{\hyperref[\detokenize{devel/MEP/MEP12:tags}]{\sphinxcrossref{Tags}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP12:status}} \sphinxstylestrong{Progress} Initial changes added in 1.3. Conversion of the gallery is on-going. 29 September 2015 - The last \sphinxcode{\sphinxupquote{pylab\_examples}} where \sphinxcode{\sphinxupquote{pylab}} is imported has been converted over to use \sphinxcode{\sphinxupquote{matplotlib pyplot}} and \sphinxhref{https://docs.scipy.org/doc/numpy/reference/index.html\#module-numpy}{\sphinxcode{\sphinxupquote{numpy}}}. \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP12:branches-and-pull-requests}} \#1623, \#1924, \#2181 PR \sphinxcode{\sphinxupquote{\#2474 \textless{}https://github.com/matplotlib/matplotlib/pull/2474}}\textgreater{}\_ demonstrates a single example being cleaned up and moved to the appropriate section. \subsection{Abstract} \label{\detokenize{devel/MEP/MEP12:abstract}} Reorganizing the matplotlib plot gallery would greatly simplify navigation of the gallery. In addition, examples should be cleaned-up and simplified for clarity. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP12:detailed-description}} The matplotlib gallery was recently set up to split examples up into sections. As discussed in that PR % \begin{footnote}[1]\sphinxAtStartFootnote \sphinxurl{https://github.com/matplotlib/matplotlib/pull/714} % \end{footnote}, the current example sections (\sphinxcode{\sphinxupquote{api}}, \sphinxcode{\sphinxupquote{pylab\_examples}}) aren't terribly useful to users: New sections in the gallery would help users find relevant examples. These sections would also guide a cleanup of the examples: Initially, all the current examples would remain and be listed under their current directories. Over time, these examples could be cleaned up and moved into one of the new sections. This process allows users to easily identify examples that need to be cleaned up; i.e. anything in the \sphinxcode{\sphinxupquote{api}} and \sphinxcode{\sphinxupquote{pylab\_examples}} directories. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP12:implementation}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Create new gallery sections. {[}Done{]} \item {} Clean up examples and move them to the new gallery sections (over the course of many PRs and with the help of many users/developers). {[}In progress{]} \end{enumerate} \subsubsection{Gallery sections} \label{\detokenize{devel/MEP/MEP12:gallery-sections}} The naming of sections is critical and will guide the clean-up effort. The current sections are: \begin{itemize} \item {} Lines, bars, and markers (more-or-less 1D data) \item {} Shapes and collections \item {} Statistical plots \item {} Images, contours, and fields \item {} Pie and polar charts: Round things \item {} Color \item {} Text, labels, and annotations \item {} Ticks and spines \item {} Subplots, axes, and figures \item {} Specialty plots (e.g., sankey, radar, tornado) \item {} Showcase (plots with tweaks to make them publication-quality) \item {} separate sections for toolboxes (already exists: 'mplot3d', 'axes\_grid', 'units', 'widgets') \end{itemize} These names are certainly up for debate. As these sections grow, we should reevaluate them and split them up as necessary. \subsubsection{Clean up guidelines} \label{\detokenize{devel/MEP/MEP12:clean-up-guidelines}} The current examples in the \sphinxcode{\sphinxupquote{api}} and \sphinxcode{\sphinxupquote{pylab\_examples}} sections of the gallery would remain in those directories until they are cleaned up. After clean-up, they would be moved to one of the new gallery sections described above. "Clean-up" should involve: \begin{itemize} \item {} \sphinxhref{https://sphinx-gallery.readthedocs.io/en/latest/}{sphinx-gallery docstrings}: a title and a description of the example formatted as follows, at the top of the example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{===============================} \PYG{l+s+sd}{Colormaps alter your perception} \PYG{l+s+sd}{===============================} \PYG{l+s+sd}{Here I plot the function} \PYG{l+s+sd}{.. math:: f(x, y) = \PYGZbs{}sin(x) + \PYGZbs{}cos(y)} \PYG{l+s+sd}{with different colormaps. Look at how colormaps alter your perception!} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \end{sphinxVerbatim} \item {} \sphinxhref{https://www.python.org/dev/peps/pep-0008/}{PEP8} clean-ups (running \sphinxhref{https://pypi.python.org/pypi/flake8}{flake8}, or a similar checker, is highly recommended) \item {} Commented-out code should be removed. \item {} Replace uses of \sphinxcode{\sphinxupquote{pylab}} interface with \sphinxcode{\sphinxupquote{pyplot}} (+ \sphinxcode{\sphinxupquote{numpy}}, etc.). See \sphinxhref{https://github.com/tonysyu/matplotlib/commit/c25ef1e02b3a0ecb279492409dac0de9b3d2c0e2}{c25ef1e} \item {} Remove shebang line, e.g.: \begin{quote} \#!/usr/bin/env python \end{quote} \item {} Use consistent imports. In particular: \begin{quote} import numpy as np import matplotlib.pyplot as plt \end{quote} Avoid importing specific functions from these modules (e.g. \sphinxcode{\sphinxupquote{from numpy import sin}}) \item {} Each example should focus on a specific feature (excluding \sphinxcode{\sphinxupquote{showcase}} examples, which will show more "polished" plots). Tweaking unrelated to that feature should be removed. See \sphinxhref{https://github.com/tonysyu/matplotlib/commit/f7b2217a1f92343e8aca0684d19c9915cc2e8674}{f7b2217}, \sphinxhref{https://github.com/tonysyu/matplotlib/commit/e57b5fc31fbad83ed9c43c77ef15368efdcb9ec1}{e57b5fc}, and \sphinxhref{https://github.com/tonysyu/matplotlib/commit/1458aa87c5eae9dd99e141956a6adf7a0f3c6707}{1458aa8} \end{itemize} Use of \sphinxcode{\sphinxupquote{pylab}} should be demonstrated/discussed on a dedicated help page instead of the gallery examples. \sphinxstylestrong{Note:} When moving an existing example, you should search for references to that example. For example, the API documentation for \sphinxcode{\sphinxupquote{axes.py}} and \sphinxcode{\sphinxupquote{pyplot.py}} may use these examples to generate plots. Use your favorite search tool (e.g., grep, ack, \sphinxhref{https://pypi.python.org/pypi/grin}{grin}, \sphinxhref{https://pypi.python.org/pypi/pss}{pss}) to search the matplotlib package. See \sphinxhref{https://github.com/tonysyu/matplotlib/commit/2dc9a4651e5e566afc0866c603aa8d06aaf32b71}{2dc9a46} and \sphinxhref{https://github.com/tonysyu/matplotlib/commit/aa6b410f9fa085ccf5f4f962a6f26af5beeae7af}{aa6b410} \paragraph{Additional suggestions} \label{\detokenize{devel/MEP/MEP12:additional-suggestions}}\begin{itemize} \item {} Provide links (both ways) between examples and API docs for the methods/objects used. (issue \sphinxhref{https://github.com/matplotlib/matplotlib/issues/2222}{\#2222}) \item {} Use \sphinxcode{\sphinxupquote{plt.subplots}} (note trailing "s") in preference over \sphinxcode{\sphinxupquote{plt.subplot}}. \item {} Rename the example to clarify it's purpose. For example, the most basic demo of \sphinxcode{\sphinxupquote{imshow}} might be \sphinxcode{\sphinxupquote{imshow\_demo.py}}, and one demonstrating different interpolation settings would be \sphinxcode{\sphinxupquote{imshow\_demo\_interpolation.py}} (\sphinxstyleemphasis{not} \sphinxcode{\sphinxupquote{imshow\_demo2.py}}). \item {} Split up examples that try to do too much. See \sphinxhref{https://github.com/tonysyu/matplotlib/commit/509967518ce5ce5ba31edf12486ffaa344e748f2}{5099675} and \sphinxhref{https://github.com/tonysyu/matplotlib/commit/fc2ab07cc586abba4c024d8c0d841c4357a3936f}{fc2ab07} \item {} Delete examples that don't show anything new. \item {} Some examples exercise esoteric features for unit testing. These tweaks should be moved out of the gallery to an example in the \sphinxcode{\sphinxupquote{unit}} directory located in the root directory of the package. \item {} Add plot titles to clarify intent of the example. See \sphinxhref{https://github.com/tonysyu/matplotlib/commit/bd2b13c54bf4aa2058781b9a805d68f2feab5ba5}{bd2b13c} \end{itemize} \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP12:backward-compatibility}} The website for each Matplotlib version is readily accessible, so users who want to refer to old examples can still do so. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP12:alternatives}} \subsubsection{Tags} \label{\detokenize{devel/MEP/MEP12:tags}} Tagging examples will also help users search the example gallery. Although tags would be a big win for users with specific goals, the plot gallery will remain the entry point to these examples, and sections could really help users navigate the gallery. Thus, tags are complementary to this reorganization. \section{MEP13: Use properties for Artists} \label{\detokenize{devel/MEP/MEP13:mep13-use-properties-for-artists}}\label{\detokenize{devel/MEP/MEP13::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id1}}{\hyperref[\detokenize{devel/MEP/MEP13:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id2}}{\hyperref[\detokenize{devel/MEP/MEP13:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id3}}{\hyperref[\detokenize{devel/MEP/MEP13:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id4}}{\hyperref[\detokenize{devel/MEP/MEP13:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id5}}{\hyperref[\detokenize{devel/MEP/MEP13:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id6}}{\hyperref[\detokenize{devel/MEP/MEP13:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id7}}{\hyperref[\detokenize{devel/MEP/MEP13:examples}]{\sphinxcrossref{Examples}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id8}}{\hyperref[\detokenize{devel/MEP/MEP13:axes-axes-set-axis-off-set-axis-on}]{\sphinxcrossref{axes.Axes.set\_axis\_off/set\_axis\_on}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id9}}{\hyperref[\detokenize{devel/MEP/MEP13:axes-axes-get-xlim-set-xlim-and-get-autoscalex-on-set-autoscalex-on}]{\sphinxcrossref{axes.Axes.get\_xlim/set\_xlim and get\_autoscalex\_on/set\_autoscalex\_on}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id10}}{\hyperref[\detokenize{devel/MEP/MEP13:axes-axes-get-title-set-title}]{\sphinxcrossref{axes.Axes.get\_title/set\_title}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id11}}{\hyperref[\detokenize{devel/MEP/MEP13:axes-axes-get-xticklabels-set-xticklabels}]{\sphinxcrossref{axes.Axes.get\_xticklabels/set\_xticklabels}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP13:id12}}{\hyperref[\detokenize{devel/MEP/MEP13:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP13:status}}\begin{itemize} \item {} \sphinxstylestrong{Discussion} \end{itemize} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP13:branches-and-pull-requests}} None \subsection{Abstract} \label{\detokenize{devel/MEP/MEP13:abstract}} Wrap all of the matplotlib getter and setter methods with python \sphinxhref{https://docs.python.org/3/library/functions.html\#property}{properties}, allowing them to be read and written like class attributes. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP13:detailed-description}} Currently matplotlib uses getter and setter functions (usually prefixed with get\_ and set\_, respectively) for reading and writing data related to classes. However, since 2.6 python supports properties, which allow such setter and getter functions to be accessed as though they were attributes. This proposal would implement all existing setter and getter methods as properties. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP13:implementation}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} All existing getter and setter methods will need to have two aliases, one with the get\_ or set\_ prefix and one without. Getter methods that currently lack prefixes should be recording in a text file. \item {} Classes should be reorganized so setter and getter methods are sequential in the code, with getter methods first. \item {} Getter and setter methods the provide additional optional optional arguments should have those arguments accessible in another manner, either as additional getter or setter methods or attributes of other classes. If those classes are not accessible, getters for them should be added. \item {} Property decorators will be added to the setter and getter methods without the prefix. Those with the prefix will be marked as deprecated. \item {} Docstrings will need to be rewritten so the getter with the prefix has the current docstring and the getter without the prefix has a generic docstring appropriate for an attribute. \item {} Automatic alias generation will need to be modified so it will also create aliases for the properties. \item {} All instances of getter and setter method calls will need to be changed to attribute access. \item {} All setter and getter aliases with prefixes will be removed \end{enumerate} The following steps can be done simultaneously: 1, 2, and 3; 4 and 5; 6 and 7. Only the following steps must be done in the same release: 4, 5, and 6. All other changes can be done in separate releases. 8 should be done several major releases after everything else. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP13:backward-compatibility}} All existing getter methods that do not have a prefix (such as get\_) will need to be changed from function calls to attribute access. In most cases this will only require removing the parenthesis. setter and getter methods that have additional optional arguments will need to have those arguments implemented in another way, either as a separate property in the same class or as attributes or properties of another class. Cases where the setter returns a value will need to be changed to using the setter followed by the getter. Cases where there are set\_ATTR\_on() and set\_ATTR\_off() methods will be changed to ATTR\_on properties. \subsection{Examples} \label{\detokenize{devel/MEP/MEP13:examples}} \subsubsection{axes.Axes.set\_axis\_off/set\_axis\_on} \label{\detokenize{devel/MEP/MEP13:axes-axes-set-axis-off-set-axis-on}} Current implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}off}\PYG{p}{(}\PYG{p}{)} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}axis\PYGZus{}on}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} New implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kc}{True} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axis\PYGZus{}on} \PYG{k+kc}{False} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axis\PYGZus{}on} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axis\PYGZus{}on} \PYG{o}{=} \PYG{k+kc}{True} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axis\PYGZus{}on} \PYG{o}{=} \PYG{k+kc}{False} \end{sphinxVerbatim} \subsubsection{axes.Axes.get\_xlim/set\_xlim and get\_autoscalex\_on/set\_autoscalex\_on} \label{\detokenize{devel/MEP/MEP13:axes-axes-get-xlim-set-xlim-and-get-autoscalex-on-set-autoscalex-on}} Current implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}xlim}\PYG{p}{(}\PYG{p}{)} \PYG{n}{auto} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}autoscalex\PYGZus{}on}\PYG{p}{(}\PYG{p}{)} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{o}{=}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{n}{right}\PYG{p}{,} \PYG{n}{emit}\PYG{o}{=}\PYG{n}{emit}\PYG{p}{,} \PYG{n}{auto}\PYG{o}{=}\PYG{n}{auto}\PYG{p}{)} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{o}{=}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{emit}\PYG{o}{=}\PYG{n}{emit}\PYG{p}{,} \PYG{n}{auto}\PYG{o}{=}\PYG{n}{auto}\PYG{p}{)} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{right}\PYG{o}{=}\PYG{n}{right}\PYG{p}{,} \PYG{n}{emit}\PYG{o}{=}\PYG{n}{emit}\PYG{p}{,} \PYG{n}{auto}\PYG{o}{=}\PYG{n}{auto}\PYG{p}{)} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{left}\PYG{o}{=}\PYG{n}{left}\PYG{p}{,} \PYG{n}{emit}\PYG{o}{=}\PYG{n}{emit}\PYG{p}{,} \PYG{n}{auto}\PYG{o}{=}\PYG{n}{auto}\PYG{p}{)} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{n}{right}\PYG{o}{=}\PYG{n}{right}\PYG{p}{,} \PYG{n}{emit}\PYG{o}{=}\PYG{n}{emit}\PYG{p}{,} \PYG{n}{auto}\PYG{o}{=}\PYG{n}{auto}\PYG{p}{)} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}autoscalex\PYGZus{}on}\PYG{p}{(}\PYG{n}{auto}\PYG{p}{)} \end{sphinxVerbatim} New implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim} \PYG{n}{auto} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{autoscalex\PYGZus{}on} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim} \PYG{o}{=} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim} \PYG{o}{=} \PYG{p}{[}\PYG{n}{left}\PYG{p}{,} \PYG{k+kc}{None}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim} \PYG{o}{=} \PYG{p}{[}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{right}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]} \PYG{o}{=} \PYG{n}{left} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{axes\PYGZus{}xlim}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{]} \PYG{o}{=} \PYG{n}{right} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{autoscalex\PYGZus{}on} \PYG{o}{=} \PYG{n}{auto} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{emit\PYGZus{}xlim} \PYG{o}{=} \PYG{n}{emit} \end{sphinxVerbatim} \subsubsection{axes.Axes.get\_title/set\_title} \label{\detokenize{devel/MEP/MEP13:axes-axes-get-title-set-title}} Current implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{string} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}title}\PYG{p}{(}\PYG{p}{)} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{set\PYGZus{}title}\PYG{p}{(}\PYG{n}{string}\PYG{p}{,} \PYG{n}{fontdict}\PYG{o}{=}\PYG{n}{fontdict}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} New implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{string} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title} \PYG{n}{string} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title\PYGZus{}text}\PYG{o}{.}\PYG{n}{text} \PYG{n}{text}\PYG{o}{.}\PYG{n}{Text} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title\PYGZus{}text} \PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{o}{.}\PYG{o}{\PYGZlt{}}\PYG{n}{attribute}\PYG{o}{\PYGZgt{}} \PYG{o}{=} \PYG{n}{attribute} \PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{o}{.}\PYG{n}{fontdict} \PYG{o}{=} \PYG{n}{fontdict} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title} \PYG{o}{=} \PYG{n}{string} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title} \PYG{o}{=} \PYG{n}{text}\PYG{o}{.}\PYG{n}{Text} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title\PYGZus{}text} \PYG{o}{=} \PYG{n}{string} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{title\PYGZus{}text} \PYG{o}{=} \PYG{n}{text}\PYG{o}{.}\PYG{n}{Text} \end{sphinxVerbatim} \subsubsection{axes.Axes.get\_xticklabels/set\_xticklabels} \label{\detokenize{devel/MEP/MEP13:axes-axes-get-xticklabels-set-xticklabels}} Current implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{p}{)} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{n}{minor}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{)} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{get\PYGZus{}xticklabels}\PYG{p}{(}\PYG{n}{minor}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{)} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{p}{(}\PYG{p}{[}\PYG{n}{string}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontdict}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{p}{(}\PYG{p}{[}\PYG{n}{string}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontdict}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{minor}\PYG{o}{=}\PYG{k+kc}{False}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{p}{(}\PYG{p}{[}\PYG{n}{string}\PYG{p}{]}\PYG{p}{,} \PYG{n}{fontdict}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{minor}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{kwargs}\PYG{p}{)} \end{sphinxVerbatim} New implementation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xticklabels} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{o}{=} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xminorticklabels} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xticklabels} \PYG{o}{=} \PYG{p}{[}\PYG{n}{string}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xminorticklabels} \PYG{o}{=} \PYG{p}{[}\PYG{n}{string}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xticklabels} \PYG{o}{=} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \PYG{n}{axes}\PYG{o}{.}\PYG{n}{Axes}\PYG{o}{.}\PYG{n}{xminorticklabels} \PYG{o}{=} \PYG{p}{[}\PYG{n}{text}\PYG{o}{.}\PYG{n}{Text}\PYG{p}{]} \end{sphinxVerbatim} \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP13:alternatives}} Instead of using decorators, it is also possible to use the property function. This would change the procedure so that all getter methods that lack a prefix will need to be renamed or removed. This makes handling docstrings more difficult and harder to read. It is not necessary to deprecate the setter and getter methods, but leaving them in will complicate the code. This could also serve as an opportunity to rewrite or even remove automatic alias generation. Another alternate proposal: Convert \sphinxcode{\sphinxupquote{set\_xlim}}, \sphinxcode{\sphinxupquote{set\_xlabel}}, \sphinxcode{\sphinxupquote{set\_title}}, etc. to \sphinxcode{\sphinxupquote{xlim}}, \sphinxcode{\sphinxupquote{xlabel}}, \sphinxcode{\sphinxupquote{title}},... to make the transition from \sphinxcode{\sphinxupquote{plt}} functions to \sphinxcode{\sphinxupquote{axes}} methods significantly simpler. These would still be methods, not properties, but it's still a great usability enhancement while retaining the interface. \section{MEP14: Text handling} \label{\detokenize{devel/MEP/MEP14:mep14-text-handling}}\label{\detokenize{devel/MEP/MEP14::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id2}}{\hyperref[\detokenize{devel/MEP/MEP14:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id3}}{\hyperref[\detokenize{devel/MEP/MEP14:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id4}}{\hyperref[\detokenize{devel/MEP/MEP14:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id5}}{\hyperref[\detokenize{devel/MEP/MEP14:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id6}}{\hyperref[\detokenize{devel/MEP/MEP14:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id7}}{\hyperref[\detokenize{devel/MEP/MEP14:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP14:id8}}{\hyperref[\detokenize{devel/MEP/MEP14:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP14:status}}\begin{itemize} \item {} \sphinxstylestrong{Discussion} \end{itemize} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP14:branches-and-pull-requests}} Issue \#253 demonstrates a bug where using the bounding box rather than the advance width of text results in misaligned text. This is a minor point in the grand scheme of things, but it should be addressed as part of this MEP. \subsection{Abstract} \label{\detokenize{devel/MEP/MEP14:abstract}} By reorganizing how text is handled, this MEP aims to: \begin{itemize} \item {} improve support for Unicode and non-ltr languages \item {} improve text layout (especially multi-line text) \item {} allow support for more fonts, especially non-Apple-format TrueType fonts and OpenType fonts. \item {} make the font configuration easier and more transparent \end{itemize} \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP14:detailed-description}} \sphinxstylestrong{Text layout} At present, matplotlib has two different ways to render text: "built-in" (based on FreeType and our own Python code), and "usetex" (based on calling out to a TeX installation). Adjunct to the "built-in" renderer there is also the Python-based "mathtext" system for rendering mathematical equations using a subset of the TeX language without having a TeX installation available. Support for these two engines in strewn about many source files, including every backend, where one finds clauses like \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{if} \PYG{n}{rcParams}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{text.usetex}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{:} \PYG{c+c1}{\PYGZsh{} do one thing else: \PYGZsh{} do another} \end{sphinxVerbatim} Adding a third text rendering approach (more on that later) would require editing all of these places as well, and therefore doesn't scale. Instead, this MEP proposes adding a concept of "text engines", where the user could select one of many different approaches for rendering text. The implementations of each of these would be localized to their own set of modules, and not have little pieces around the whole source tree. Why add more text rendering engines? The "built-in" text rendering has a number of shortcomings. \begin{itemize} \item {} It only handles right-to-left languages, and doesn't handle many special features of Unicode, such as combining diacriticals. \item {} The multiline support is imperfect and only supports manual line-breaking -- it can not break up a paragraph into lines of a certain length. \item {} It also does not handle inline formatting changes in order to support something like Markdown, reStructuredText or HTML. (Though rich-text formatting is contemplated in this MEP, since we want to make sure this design allows it, the specifics of a rich-text formatting implementation is outside of the scope of this MEP.) \end{itemize} Supporting these things is difficult, and is the "full-time job" of a number of other projects: \begin{itemize} \item {} \sphinxhref{https://www.pango.org/}{pango}/\sphinxhref{https://www.freedesktop.org/wiki/Software/HarfBuzz/}{harfbuzz} \item {} \sphinxhref{https://doc.qt.io/archives/qt-4.8/qtextlayout.html}{QtTextLayout} \item {} \sphinxhref{https://msdn.microsoft.com/en-us/library/windows/desktop/dd371554(v=vs.85).aspx}{Microsoft DirectWrite} \item {} \sphinxhref{https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/CoreText\_Programming/Overview/Overview.html}{Apple Core Text} \end{itemize} Of the above options, it should be noted that \sphinxcode{\sphinxupquote{harfbuzz}} is designed from the start as a cross platform option with minimal dependencies, so therefore is a good candidate for a single option to support. Additionally, for supporting rich text, we could consider using \sphinxhref{https://webkit.org/}{WebKit}, and possibly whether than represents a good single cross-platform option. Again, however, rich text formatting is outside of the scope of this project. Rather than trying to reinvent the wheel and add these features to matplotlib's "built-in" text renderer, we should provide a way to leverage these projects to get more powerful text layout. The "built-in" renderer will still need to exist for reasons of ease of installation, but its feature set will be more limited compared to the others. {[}TODO: This MEP should clearly decide what those limited features are, and fix any bugs to bring the implementation into a state of working correctly in all cases that we want it to work. I know @leejjoon has some thoughts on this.{]} \sphinxstylestrong{Font selection} Going from an abstract description of a font to a file on disk is the task of the font selection algorithm -- it turns out to be much more complicated than it seems at first. The "built-in" and "usetex" renderers have very different ways of handling font selection, given their different technologies. TeX requires the installation of TeX-specific font packages, for example, and can not use TrueType fonts directly. Unfortunately, despite the different semantics for font selection, the same set of font properties are used for each. This is true of both the \sphinxcode{\sphinxupquote{FontProperties}} class and the font-related \sphinxcode{\sphinxupquote{rcParams}} (which basically share the same code underneath). Instead, we should define a core set of font selection parameters that will work across all text engines, and have engine-specific configuration to allow the user to do engine-specific things when required. For example, it is possible to directly select a font by name in the "built-in" using \sphinxcode{\sphinxupquote{font.family}}, but the same is not possible with "usetex". It may be possible to make it easier to use TrueType fonts by using XeTeX, but users will still want to use the traditional metafonts through TeX font packages. So the issue still stands that different text engines will need engine-specific configuration, and it should be more obvious to the user which configuration will work across text engines and which are engine-specific. Note that even excluding "usetex", there are different ways to find fonts. The default is to use the font list cache in \sphinxcode{\sphinxupquote{font\_manager.py}} which matches fonts using our own algorithm based on the \sphinxhref{http://www.w3.org/TR/CSS2/fonts.html\#algorithm}{CSS font matching algorithm}. It doesn't always do the same thing as the native font selection algorithms on Linux (\sphinxhref{https://www.freedesktop.org/wiki/Software/fontconfig/}{fontconfig}), Mac and Windows, and it doesn't always find all of the fonts on the system that the OS would normally pick up. However, it is cross-platform, and always finds the fonts that ship with matplotlib. The Cairo and MacOSX backends (and presumably a future HTML5-based backend) currently bypass this mechanism and use the OS-native ones. The same is true when not embedding fonts in SVG, PS or PDF files and opening them in a third-party viewer. A downside there is that (at least with Cairo, need to confirm with MacOSX) they don't always find the fonts we ship with matplotlib. (It may be possible to add the fonts to their search path, though, or we may need to find a way to install our fonts to a location the OS expects to find them). There are also special modes in the PS and PDF to only use the core fonts that are always available to those formats. There, the font lookup mechanism must only match against those fonts. It is unclear whether the OS-native font lookup systems can handle this case. There is also experimental support for using \sphinxhref{https://www.freedesktop.org/wiki/Software/fontconfig/}{fontconfig} for font selection in matplotlib, turned off by default. fontconfig is the native font selection algorithm on Linux, but is also cross platform and works well on the other platforms (though obviously is an additional dependency there). Many of the text layout libraries proposed above (pango, QtTextLayout, DirectWrite and CoreText etc.) insist on using the font selection library from their own ecosystem. All of the above seems to suggest that we should move away from our self-written font selection algorithm and use the native APIs where possible. That's what Cairo and MacOSX backends already want to use, and it will be a requirement of any complex text layout library. On Linux, we already have the bones of a \sphinxcode{\sphinxupquote{fontconfig}} implementation (which could also be accessed through pango). On Windows and Mac we may need to write custom wrappers. The nice thing is that the API for font lookup is relatively small, and essentially consist of "given a dictionary of font properties, give me a matching font file". \sphinxstylestrong{Font subsetting} Font subsetting is currently handled using ttconv. ttconv was a standalone commandline utility for converting TrueType fonts to subsetted Type 3 fonts (among other features) written in 1995, which matplotlib (well, I) forked in order to make it work as a library. It only handles Apple-style TrueType fonts, not ones with the Microsoft (or other vendor) encodings. It doesn't handle OpenType fonts at all. This means that even though the STIX fonts come as .otf files, we have to convert them to .ttf files to ship them with matplotlib. The Linux packagers hate this -- they'd rather just depend on the upstream STIX fonts. ttconv has also been shown to have a few bugs that have been difficult to fix over time. Instead, we should be able to use FreeType to get the font outlines and write our own code (probably in Python) to output subsetted fonts (Type 3 on PS and PDF and paths on SVG). Freetype, as a popular and well-maintained project, handles a wide variety of fonts in the wild. This would remove a lot of custom C code, and remove some code duplication between backends. Note that subsetting fonts this way, while the easiest route, does lose the hinting in the font, so we will need to continue, as we do now, provide a way to embed the entire font in the file where possible. Alternative font subsetting options include using the subsetting built-in to Cairo (not clear if it can be used without the rest of Cairo), or using \sphinxcode{\sphinxupquote{fontforge}} (which is a heavy and not terribly cross-platform dependency). \sphinxstylestrong{Freetype wrappers} Our FreeType wrapper could really use a reworking. It defines its own image buffer class (when a Numpy array would be easier). While FreeType can handle a huge diversity of font files, there are limitations to our wrapper that make it much harder to support non-Apple-vendor TrueType files, and certain features of OpenType files. (See \#2088 for a terrible result of this, just to support the fonts that ship with Windows 7 and 8). I think a fresh rewrite of this wrapper would go a long way. \sphinxstylestrong{Text anchoring and alignment and rotation} The handling of baselines was changed in 1.3.0 such that the backends are now given the location of the baseline of the text, not the bottom of the text. This is probably the correct behavior, and the MEP refactoring should also follow this convention. In order to support alignment on multi-line text, it should be the responsibility of the (proposed) text engine to handle text alignment. For a given chunk of text, each engine calculates a bounding box for that text and the offset of the anchor point within that box. Therefore, if the va of a block was "top", the anchor point would be at the top of the box. Rotating of text should always be around the anchor point. I'm not sure that lines up with current behavior in matplotlib, but it seems like the sanest/least surprising choice. {[}This could be revisited once we have something working{]}. Rotation of text should not be handled by the text engine -- that should be handled by a layer between the text engine and the rendering backend so it can be handled in a uniform way. {[}I don't see any advantage to rotation being handled by the text engines individually...{]} There are other problems with text alignment and anchoring that should be resolved as part of this work. {[}TODO: enumerate these{]}. \sphinxstylestrong{Other minor problems to fix} The mathtext code has backend-specific code -- it should instead provide its output as just another text engine. However, it's still desirable to have mathtext layout inserted as part of a larger layout performed by another text engine, so it should be possible to do this. It's an open question whether embedding the text layout of an arbitrary text engine in another should be possible. The text mode is currently set by a global rcParam ("text.usetex") so it's either all on or all off. We should continue to have a global rcParam to choose the text engine ("text.layout\_engine"), but it should under the hood be an overridable property on the \sphinxcode{\sphinxupquote{Text}} object, so the same figure can combine the results of multiple text layout engines if necessary. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP14:implementation}} A concept of a "text engine" will be introduced. Each text engine will implement a number of abstract classes. The \sphinxcode{\sphinxupquote{TextFont}} interface will represent text for a given set of font properties. It isn't necessarily limited to a single font file -- if the layout engine supports rich text, it may handle a number of font files in a family. Given a \sphinxcode{\sphinxupquote{TextFont}} instance, the user can get a \sphinxcode{\sphinxupquote{TextLayout}} instance, which represents the layout for a given string of text in a given font. From a \sphinxcode{\sphinxupquote{TextLayout}}, an iterator over \sphinxcode{\sphinxupquote{TextSpans}} is returned so the engine can output raw editable text using as few spans as possible. If the engine would rather get individual characters, they can be obtained from the \sphinxcode{\sphinxupquote{TextSpan}} instance: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{TextFont}\PYG{p}{(}\PYG{n}{TextFontBase}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{\PYGZus{}\PYGZus{}init\PYGZus{}\PYGZus{}}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{font\PYGZus{}properties}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Create a new object for rendering text using the given font properties.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}layout}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{s}\PYG{p}{,} \PYG{n}{ha}\PYG{p}{,} \PYG{n}{va}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Get the TextLayout for the given string in the given font and} \PYG{l+s+sd}{ the horizontal (left, center, right) and verticalalignment (top,} \PYG{l+s+sd}{ center, baseline, bottom)} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{class} \PYG{n+nc}{TextLayout}\PYG{p}{(}\PYG{n}{TextLayoutBase}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}metrics}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Return the bounding box of the layout, anchored at (0, 0).} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}spans}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Returns an iterator over the spans of different in the layout.} \PYG{l+s+sd}{ This is useful for backends that want to editable raw text as} \PYG{l+s+sd}{ individual lines. For rich text where the font may change,} \PYG{l+s+sd}{ each span of different font type will have its own span.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}image}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Returns a rasterized image of the text. Useful for raster backends,} \PYG{l+s+sd}{ like Agg.} \PYG{l+s+sd}{ In all likelihood, this will be overridden in the backend, as it can} \PYG{l+s+sd}{ be created from get\PYGZus{}layout(), but certain backends may want to} \PYG{l+s+sd}{ override it if their library provides it (as freetype does).} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}rectangles}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Returns an iterator over the filled black rectangles in the layout.} \PYG{l+s+sd}{ Used by TeX and mathtext for drawing, for example, fraction lines.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}path}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Returns a single Path object of the entire laid out text.} \PYG{l+s+sd}{ [Not strictly necessary, but might be useful for textpath} \PYG{l+s+sd}{ functionality]} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{class} \PYG{n+nc}{TextSpan}\PYG{p}{(}\PYG{n}{TextSpanBase}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{c+c1}{\PYGZsh{} Position of the span \PYGZhy{}\PYGZhy{} relative to the text layout as a whole} \PYG{c+c1}{\PYGZsh{} where (0, 0) is the anchor. y is the baseline of the span.} \PYG{n}{fontfile} \PYG{c+c1}{\PYGZsh{} The font file to use for the span} \PYG{n}{text} \PYG{c+c1}{\PYGZsh{} The text content of the span} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}path}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{k}{pass} \PYG{c+c1}{\PYGZsh{} See TextLayout.get\PYGZus{}path} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}chars}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Returns an iterator over the characters in the span.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \PYG{k}{class} \PYG{n+nc}{TextChar}\PYG{p}{(}\PYG{n}{TextCharBase}\PYG{p}{)}\PYG{p}{:} \PYG{n}{x}\PYG{p}{,} \PYG{n}{y} \PYG{c+c1}{\PYGZsh{} Position of the character \PYGZhy{}\PYGZhy{} relative to the text layout as} \PYG{c+c1}{\PYGZsh{} a whole, where (0, 0) is the anchor. y is in the baseline} \PYG{c+c1}{\PYGZsh{} of the character.} \PYG{n}{codepoint} \PYG{c+c1}{\PYGZsh{} The unicode code point of the character \PYGZhy{}\PYGZhy{} only for informational} \PYG{c+c1}{\PYGZsh{} purposes, since the mapping of codepoint to glyph\PYGZus{}id may have been} \PYG{c+c1}{\PYGZsh{} handled in a complex way by the layout engine. This is an int} \PYG{c+c1}{\PYGZsh{} to avoid problems on narrow Unicode builds.} \PYG{n}{glyph\PYGZus{}id} \PYG{c+c1}{\PYGZsh{} The index of the glyph within the font} \PYG{n}{fontfile} \PYG{c+c1}{\PYGZsh{} The font file to use for the char} \PYG{k}{def} \PYG{n+nf}{get\PYGZus{}path}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{)}\PYG{p}{:} \PYG{l+s+sd}{\PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{l+s+sd}{ Get the path for the character.} \PYG{l+s+sd}{ \PYGZdq{}\PYGZdq{}\PYGZdq{}} \PYG{k}{pass} \end{sphinxVerbatim} Graphic backends that want to output subset of fonts would likely build up a file-global dictionary of characters where the keys are (fontname, glyph\_id) and the values are the paths so that only one copy of the path for each character will be stored in the file. Special casing: The "usetex" functionality currently is able to get Postscript directly from TeX to insert directly in a Postscript file, but for other backends, parses a DVI file and generates something more abstract. For a case like this, \sphinxcode{\sphinxupquote{TextLayout}} would implement \sphinxcode{\sphinxupquote{get\_spans}} for most backends, but add \sphinxcode{\sphinxupquote{get\_ps}} for the Postscript backend, which would look for the presence of this method and use it if available, or fall back to \sphinxcode{\sphinxupquote{get\_spans}}. This kind of special casing may also be necessary, for example, when the graphics backend and text engine belong to the same ecosystem, e.g. Cairo and Pango, or MacOSX and CoreText. There are three main pieces to the implementation: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \item {} Rewriting the freetype wrapper, and removing ttconv. \end{enumerate} \begin{enumerate} \def\theenumi{\alph{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \item {} Once (1) is done, as a proof of concept, we can move to the upstream STIX .otf fonts \item {} Add support for web fonts loaded from a remote URL. (Enabled by using freetype for font subsetting). \end{enumerate} \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi )} \makeatletter\def\p@enumii{\p@enumi \theenumi )}\makeatother \setcounter{enumi}{1} \item {} Refactoring the existing "builtin" and "usetex" code into separate text engines and to follow the API outlined above. \item {} Implementing support for advanced text layout libraries. \end{enumerate} (1) and (2) are fairly independent, though having (1) done first will allow (2) to be simpler. (3) is dependent on (1) and (2), but even if it doesn't get done (or is postponed), completing (1) and (2) will make it easier to move forward with improving the "builtin" text engine. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP14:backward-compatibility}} The layout of text with respect to its anchor and rotation will change in hopefully small, but improved, ways. The layout of multiline text will be much better, as it will respect horizontal alignment. The layout of bidirectional text or other advanced Unicode features will now work inherently, which may break some things if users are currently using their own workarounds. Fonts will be selected differently. Hacks that used to sort of work between the "builtin" and "usetex" text rendering engines may no longer work. Fonts found by the OS that weren't previously found by matplotlib may be selected. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP14:alternatives}} TBD \section{MEP15 - Fix axis autoscaling when limits are specified for one axis only} \label{\detokenize{devel/MEP/MEP15:mep15-fix-axis-autoscaling-when-limits-are-specified-for-one-axis-only}}\label{\detokenize{devel/MEP/MEP15::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id1}}{\hyperref[\detokenize{devel/MEP/MEP15:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id2}}{\hyperref[\detokenize{devel/MEP/MEP15:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id3}}{\hyperref[\detokenize{devel/MEP/MEP15:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id4}}{\hyperref[\detokenize{devel/MEP/MEP15:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id5}}{\hyperref[\detokenize{devel/MEP/MEP15:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id6}}{\hyperref[\detokenize{devel/MEP/MEP15:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP15:id7}}{\hyperref[\detokenize{devel/MEP/MEP15:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP15:status}} \sphinxstylestrong{Discussion} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP15:branches-and-pull-requests}} None so far. \subsection{Abstract} \label{\detokenize{devel/MEP/MEP15:abstract}} When one axis of a 2-dimensional plot if overridden via \sphinxcode{\sphinxupquote{xlim}} or \sphinxcode{\sphinxupquote{ylim}}, automatic scaling of the remaining axis should be based on the data that falls within the specified limits of the first axis. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP15:detailed-description}} When axis limits for a 2-D plot are specified for one axis only (via \sphinxcode{\sphinxupquote{xlim}} or \sphinxcode{\sphinxupquote{ylim}}), matplotlib currently does not currently rescale the other axis. The result is that the displayed curves or symbols may be compressed into a tiny portion of the available area, so that the final plot conveys much less information than it would with appropriate axis scaling. The proposed change of behavior would make matplotlib choose the scale for the remaining axis using only the data that falls within the limits for the axis where limits were specified. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP15:implementation}} I don't know enough about the internals of matplotlib to be able to suggest an implementation. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP15:backward-compatibility}} From the standpoint of software interfaces, there would be no break in backward compatibility. Some outputs would be different, but if the user truly desires the previous behavior, he/she can achieve this by overriding the axis scaling for both axes. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP15:alternatives}} The only alternative that I can see is to maintain the status quo. \section{MEP19: Continuous Integration} \label{\detokenize{devel/MEP/MEP19:mep19-continuous-integration}}\label{\detokenize{devel/MEP/MEP19::doc}} \subsection{Status} \label{\detokenize{devel/MEP/MEP19:status}} \sphinxstylestrong{Completed} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP19:branches-and-pull-requests}} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP19:abstract}} matplotlib could benefit from better and more reliable continuous integration, both for testing and building installers and documentation. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP19:detailed-description}} \subsubsection{Current state-of-the-art} \label{\detokenize{devel/MEP/MEP19:current-state-of-the-art}} \sphinxstylestrong{Testing} matplotlib currently uses Travis-CI for automated tests. While Travis-CI should be praised for how much it does as a free service, it has a number of shortcomings: \begin{itemize} \item {} It often fails due to network timeouts when installing dependencies. \item {} It often fails for inexplicable reasons. \item {} build or test products can only be saved from build off of branches on the main repo, not pull requests, so it is often difficult to "post mortem" analyse what went wrong. This is particularly frustrating when the failure can not be subsequently reproduced locally. \item {} It is not extremely fast. matplotlib's cpu and memory requirements for testing are much higher than the average Python project. \item {} It only tests on Ubuntu Linux, and we have only minimal control over the specifics of the platform. It can be upgraded at any time outside of our control, causing unexpected delays at times that may not be convenient in our release schedule. \end{itemize} On the plus side, Travis-CI's integration with github -- automatically testing all pending pull requests -- is exceptional. \sphinxstylestrong{Builds} There is no centralized effort for automated binary builds for matplotlib. However, the following disparate things are being done {[}If the authors mentioned here could fill in detail, that would be great!{]}: \begin{itemize} \item {} @sandrotosi: builds Debian packages \item {} @takluyver: Has automated Ubuntu builds on Launchpad \item {} @cgohlke: Makes Windows builds (don't know how automated that is) \item {} @r-owen: Makes OS-X builds (don't know how automated that is) \end{itemize} \sphinxstylestrong{Documentation} Documentation of master is now built by travis and uploaded to \sphinxurl{http://matplotlib.org/devdocs/index.html} @NelleV, I believe, generates the docs automatically and posts them on the web to chart MEP10 progress. \subsubsection{Peculiarities of matplotlib} \label{\detokenize{devel/MEP/MEP19:peculiarities-of-matplotlib}} matplotlib has complex requirements that make testing and building more taxing than many other Python projects. \begin{itemize} \item {} The CPU time to run the tests is quite high. It puts us beyond the free accounts of many CI services (e.g. ShiningPanda) \item {} It has a large number of dependencies, and testing the full matrix of all combinations is impractical. We need to be clever about what space we test and guarantee to support. \end{itemize} \subsubsection{Requirements} \label{\detokenize{devel/MEP/MEP19:requirements}} This section outlines the requirements that we would like to have. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Testing all pull requests by hooking into the Github API, as Travis-CI does \item {} Testing on all major platforms: Linux, Mac OS-X, MS Windows (in that order of priority, based on user survey) \item {} Retain the last n days worth of build and test products, to aid in post-mortem debugging. \item {} Automated nightly binary builds, so that users can test the bleeding edge without installing a complete compilation environment. \item {} Automated benchmarking. It would be nice to have a standard benchmark suite (separate from the tests) whose performance could be tracked over time, in different backends and platforms. While this is separate from building and testing, ideally it would run on the same infrastructure. \item {} Automated nightly building and publishing of documentation (or as part of testing, to ensure PRs don't introduce documentation bugs). (This would not replace the static documentation for stable releases as a default). \item {} The test systems should be manageable by multiple developers, so that no single person becomes a bottleneck. (Travis-CI's design does this well -- storing build configuration in the git repository, rather than elsewhere, is a very good design.) \item {} Make it easy to test a large but sparse matrix of different versions of matplotlib's dependencies. The matplotlib user survey provides some good data as to where to focus our efforts: \sphinxurl{https://docs.google.com/spreadsheet/ccc?key=0AjrPjlTMRTwTdHpQS25pcTZIRWdqX0pNckNSU01sMHc\#gid=0} \item {} Nice to have: A decentralized design so that those with more obscure platforms can publish build results to a central dashboard. \end{enumerate} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP19:implementation}} This part is yet-to-be-written. However, ideally, the implementation would be a third-party service, to avoid adding system administration to our already stretched time. As we have some donated funds, this service may be a paid one if it offers significant time-saving advantages over free offerings. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP19:backward-compatibility}} Backward compatibility is not a major concern for this MEP. We will replace current tools and procedures with something better and throw out the old. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP19:alternatives}} \subsection{Hangout Notes} \label{\detokenize{devel/MEP/MEP19:hangout-notes}} \subsubsection{CI Infrastructure} \label{\detokenize{devel/MEP/MEP19:ci-infrastructure}}\begin{itemize} \item {} We like Travis and it will probably remain part of our arsenal in any event. The reliability issues are being looked into. \item {} Enable Amazon S3 uploads of testing products on Travis. This will help with post-mortem of failures (@mdboom is looking into this now). \item {} We want Mac coverage. The best bet is probably to push Travis to enable it for our project by paying them for a Pro account (since they don't otherwise allow testing on both Linux and Mac). \item {} We want Windows coverage. Shining Panda is an option there. \item {} Investigate finding or building a tool that would collect and synthesize test results from a number of sources and post it to Github using the Github API. This may be of general use to the Scipy community. \item {} For both Windows and Mac, we should document (or better yet, script) the process of setting up the machine for a build, and how to build binaries and installers. This may require getting information from Russel Owen and Christoph Gohlke. This is a necessary step for doing automated builds, but would also be valuable for a number of other reasons. \end{itemize} \subsubsection{The test framework itself} \label{\detokenize{devel/MEP/MEP19:the-test-framework-itself}}\begin{itemize} \item {} We should investigate ways to make it take less time \begin{itemize} \item {} Eliminating redundant tests, if possible \item {} General performance improvements to matplotlib will help \end{itemize} \item {} We should be covering more things, particularly more backends \item {} We should have more unit tests, fewer integration tests, if possible \end{itemize} \section{MEP21: color and cm refactor} \label{\detokenize{devel/MEP/MEP21:mep21-color-and-cm-refactor}}\label{\detokenize{devel/MEP/MEP21::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id1}}{\hyperref[\detokenize{devel/MEP/MEP21:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id2}}{\hyperref[\detokenize{devel/MEP/MEP21:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id3}}{\hyperref[\detokenize{devel/MEP/MEP21:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id4}}{\hyperref[\detokenize{devel/MEP/MEP21:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id5}}{\hyperref[\detokenize{devel/MEP/MEP21:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id6}}{\hyperref[\detokenize{devel/MEP/MEP21:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP21:id7}}{\hyperref[\detokenize{devel/MEP/MEP21:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP21:status}}\begin{itemize} \item {} \sphinxstylestrong{Discussion}: This MEP has not commenced yet, but here are some ongoing ideas which may become a part of this MEP: \end{itemize} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP21:branches-and-pull-requests}} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP21:abstract}}\begin{itemize} \item {} color \begin{itemize} \item {} tidy up the namespace \item {} Define a "Color" class \item {} make it easy to convert from one color type to another \sphinxcode{\sphinxupquote{{}`hex -\textgreater{} RGB{}`}}, \sphinxcode{\sphinxupquote{{}`RGB -\textgreater{} hex{}`}}, \sphinxcode{\sphinxupquote{{}`HSV -\textgreater{} RGB{}`}} etc. \item {} improve the construction of a colormap - the dictionary approach is archaic and overly complex (though incredibly powerful) \item {} make it possible to interpolate between two or more color types in different modes, especially useful for construction of colormaps in HSV space for instance \end{itemize} \item {} cm \begin{itemize} \item {} rename the module to something more descriptive - mappables? \end{itemize} \end{itemize} Overall, there are a lot of improvements that can be made with matplotlib color handling - managing backwards compatibility will be difficult as there are some badly named variables/modules which really shouldn't exist - but a clear path and message for migration should be available, with a large amount of focus on this in the API changes documentation. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP21:detailed-description}} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP21:implementation}} \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP21:backward-compatibility}} \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP21:alternatives}} \section{MEP22: Toolbar rewrite} \label{\detokenize{devel/MEP/MEP22:mep22-toolbar-rewrite}}\label{\detokenize{devel/MEP/MEP22::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id1}}{\hyperref[\detokenize{devel/MEP/MEP22:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id2}}{\hyperref[\detokenize{devel/MEP/MEP22:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id3}}{\hyperref[\detokenize{devel/MEP/MEP22:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id4}}{\hyperref[\detokenize{devel/MEP/MEP22:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id5}}{\hyperref[\detokenize{devel/MEP/MEP22:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id6}}{\hyperref[\detokenize{devel/MEP/MEP22:toolbase-object}]{\sphinxcrossref{ToolBase(object)}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id7}}{\hyperref[\detokenize{devel/MEP/MEP22:tooltogglebase-toolbase}]{\sphinxcrossref{ToolToggleBase(ToolBase)}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id8}}{\hyperref[\detokenize{devel/MEP/MEP22:navigationbase}]{\sphinxcrossref{NavigationBase}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id9}}{\hyperref[\detokenize{devel/MEP/MEP22:toolbarbase}]{\sphinxcrossref{ToolbarBase}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP22:id10}}{\hyperref[\detokenize{devel/MEP/MEP22:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP22:status}} \sphinxstylestrong{Progress} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP22:branches-and-pull-requests}}\begin{description} \item[{Previous work}] \leavevmode\begin{itemize} \item {} \sphinxurl{https://github.com/matplotlib/matplotlib/pull/1849} \item {} \sphinxurl{https://github.com/matplotlib/matplotlib/pull/2557} \item {} \sphinxurl{https://github.com/matplotlib/matplotlib/pull/2465} \end{itemize} \item[{Pull Requests:}] \leavevmode\begin{itemize} \item {} Removing the NavigationToolbar classes \sphinxurl{https://github.com/matplotlib/matplotlib/pull/2740} \sphinxstylestrong{CLOSED} \item {} Keeping the NavigationToolbar classes \sphinxurl{https://github.com/matplotlib/matplotlib/pull/2759} \sphinxstylestrong{CLOSED} \item {} Navigation by events: \sphinxurl{https://github.com/matplotlib/matplotlib/pull/3652} \end{itemize} \end{description} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP22:abstract}} The main goal of this MEP is to make it easier to modify (add, change, remove) the way the user interacts with the figures. The user interaction with the figure is deeply integrated within the Canvas and Toolbar. Making extremely difficult to do any modification. This MEP proposes the separation of this interaction into Toolbar, Navigation and Tools to provide independent access and reconfiguration. This approach will make easier to create and share tools among users. In the far future, we can even foresee a kind of Marketplace for \sphinxcode{\sphinxupquote{Tools}} where the most popular can be added into the main distribution. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP22:detailed-description}} The reconfiguration of the Toolbar is complex, most of the time it requires a custom backend. The creation of custom Tools sometimes interferes with the Toolbar, as example see \sphinxurl{https://github.com/matplotlib/matplotlib/issues/2694} also the shortcuts are hardcoded and again not easily modifiable \sphinxurl{https://github.com/matplotlib/matplotlib/issues/2699} The proposed solution is to take the actions out of the \sphinxcode{\sphinxupquote{Toolbar}} and the shortcuts out of the \sphinxcode{\sphinxupquote{Canvas}}. This actions and shortcuts will be in the form of \sphinxcode{\sphinxupquote{Tools}}. A new class \sphinxcode{\sphinxupquote{Navigation}} will be the bridge between the events from the \sphinxcode{\sphinxupquote{Canvas}} and \sphinxcode{\sphinxupquote{Toolbar}} and redirect them to the appropriate \sphinxcode{\sphinxupquote{Tool}}. At the end the user interaction will be divided into three classes: \begin{itemize} \item {} NavigationBase: This class is instantiated for each FigureManager and connect the all user interactions with the Tools \item {} ToolbarBase: This existing class is relegated only as a GUI access to Tools. \item {} ToolBase: Is the basic definition of Tools. \end{itemize} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP22:implementation}} \subsubsection{ToolBase(object)} \label{\detokenize{devel/MEP/MEP22:toolbase-object}} Tools can have a graphical representation as the \sphinxcode{\sphinxupquote{SubplotTool}} or not even be present in the Toolbar as \sphinxcode{\sphinxupquote{Quit}} The \sphinxcode{\sphinxupquote{ToolBase}} has the following class attributes for configuration at definition time \begin{itemize} \item {} keymap = None: Key(s) to be used to trigger the tool \item {} description = '': Small description of the tool \item {} image = None: Image that is used in the toolbar \end{itemize} \begin{description} \item[{The following instance attributes are set at instantiation:}] \leavevmode\begin{itemize} \item {} name \item {} navigation \end{itemize} \item[{\sphinxstylestrong{Methods}}] \leavevmode\begin{itemize} \item {} trigger(self, event): This is the main method of the Tool, it is called when the Tool is triggered by: * Toolbar button click * keypress associated with the Tool Keymap * Call to navigation.trigger\_tool(name) \item {} set\_figure(self, figure): Set the figure and navigation attributes \item {} \sphinxcode{\sphinxupquote{destroy(self, *args)}}: Destroy the \sphinxcode{\sphinxupquote{Tool}} graphical interface (if exists) \end{itemize} \item[{\sphinxstylestrong{Available Tools}}] \leavevmode\begin{itemize} \item {} ToolQuit \item {} ToolEnableAllNavigation \item {} ToolEnableNavigation \item {} ToolToggleGrid \item {} ToolToggleFullScreen \item {} ToolToggleYScale \item {} ToolToggleXScale \item {} ToolHome \item {} ToolBack \item {} ToolForward \item {} SaveFigureBase \item {} ConfigureSubplotsBase \end{itemize} \end{description} \subsubsection{ToolToggleBase(ToolBase)} \label{\detokenize{devel/MEP/MEP22:tooltogglebase-toolbase}} The \sphinxcode{\sphinxupquote{ToolToggleBase}} has the following class attributes for configuration at definition time \begin{itemize} \item {} radio\_group = None: Attribute to group 'radio' like tools (mutually exclusive) \item {} cursor = None: Cursor to use when the tool is active \end{itemize} The \sphinxstylestrong{Toggleable} Tools, can capture keypress, mouse moves, and mouse button press \begin{description} \item[{It defines the following methods}] \leavevmode\begin{itemize} \item {} enable(self, event): Called by \sphinxcode{\sphinxupquote{ToolToggleBase.trigger}} method \item {} disable(self, event): Called when the tool is untoggled \item {} toggled : \sphinxstylestrong{Property} True or False \end{itemize} \item[{\sphinxstylestrong{Available Tools}}] \leavevmode\begin{itemize} \item {} ToolZoom \item {} ToolPan \end{itemize} \end{description} \subsubsection{NavigationBase} \label{\detokenize{devel/MEP/MEP22:navigationbase}}\begin{description} \item[{Defines the following attributes}] \leavevmode\begin{itemize} \item {} canvas: \item {} \begin{description} \item[{keypresslock: Lock to know if the \sphinxcode{\sphinxupquote{canvas}} key\_press\_event{}` is}] \leavevmode available and process it \end{description} \item {} messagelock: Lock to know if the message is available to write \end{itemize} \item[{Public methods for \sphinxstylestrong{User use}:}] \leavevmode\begin{itemize} \item {} nav\_connect(self, s, func): Connect to to navigation for events \item {} nav\_disconnect(self, cid): Disconnect from navigation event \item {} message\_event(self, message, sender=None): Emit a tool\_message\_event event \item {} active\_toggle(self): \sphinxstylestrong{Property} The currently toggled tools or None \item {} get\_tool\_keymap(self, name): Return a list of keys that are associated with the tool \item {} set\_tool\_keymap(self, name, \sphinxcode{\sphinxupquote{*keys}}): Set the keys for the given tool \item {} remove\_tool(self, name): Removes tool from the navigation control. \item {} add\_tools(self, tools): Add multiple tools to \sphinxcode{\sphinxupquote{Navigation}} \item {} add\_tool(self, name, tool, group=None, position=None): Add a tool to the Navigation \item {} tool\_trigger\_event(self, name, sender=None, canvasevent=None, data=None): Trigger a tool and fire the event \item {} tools(self) \sphinxstylestrong{Property}: Return a dict with available tools with corresponding keymaps, descriptions and objects \item {} get\_tool(self, name): Return the tool object \end{itemize} \end{description} \subsubsection{ToolbarBase} \label{\detokenize{devel/MEP/MEP22:toolbarbase}}\begin{description} \item[{Methods for \sphinxstylestrong{Backend implementation}}] \leavevmode\begin{itemize} \item {} add\_toolitem(self, name, group, position, image, description, toggle): Add a toolitem to the toolbar. This method is a callback from \sphinxcode{\sphinxupquote{tool\_added\_event}} (emitted by navigation) \item {} set\_message(self, s): Display a message on toolbar or in status bar \item {} toggle\_toolitem(self, name): Toggle the toolitem without firing event. \item {} remove\_toolitem(self, name): Remove a toolitem from the \sphinxcode{\sphinxupquote{Toolbar}} \end{itemize} \end{description} \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP22:backward-compatibility}} For backward compatibility added a 'navigation' key to \sphinxcode{\sphinxupquote{rcsetup.validate\_toolbar}}, that is used for Navigation classes instantiation instead of the NavigationToolbar classes With this parameter, it makes it transparent to anyone using the existing backends. {[}@pelson comment: This also gives us an opportunity to avoid needing to implement all of this in the same PR - some backends can potentially exist without the new functionality for a short while (but it must be done at some point).{]} \section{MEP23: Multiple Figures per GUI window} \label{\detokenize{devel/MEP/MEP23:mep23-multiple-figures-per-gui-window}}\label{\detokenize{devel/MEP/MEP23::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id1}}{\hyperref[\detokenize{devel/MEP/MEP23:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id2}}{\hyperref[\detokenize{devel/MEP/MEP23:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id3}}{\hyperref[\detokenize{devel/MEP/MEP23:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id4}}{\hyperref[\detokenize{devel/MEP/MEP23:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id5}}{\hyperref[\detokenize{devel/MEP/MEP23:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id6}}{\hyperref[\detokenize{devel/MEP/MEP23:figuremanagerbase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{FigureManagerBase}}}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id7}}{\hyperref[\detokenize{devel/MEP/MEP23:new-figure-manager}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_figure\_manager}}}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id8}}{\hyperref[\detokenize{devel/MEP/MEP23:new-figure-manager-given-figure}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{new\_figure\_manager\_given\_figure}}}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id9}}{\hyperref[\detokenize{devel/MEP/MEP23:navigationbase}]{\sphinxcrossref{\sphinxcode{\sphinxupquote{NavigationBase}}}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id10}}{\hyperref[\detokenize{devel/MEP/MEP23:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP23:id11}}{\hyperref[\detokenize{devel/MEP/MEP23:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP23:status}} \sphinxstylestrong{Discussion} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP23:branches-and-pull-requests}} \sphinxstylestrong{Previous work} - \sphinxurl{https://github.com/matplotlib/matplotlib/pull/2465} \sphinxstylestrong{To-delete} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP23:abstract}} Add the possibility to have multiple figures grouped under the same \sphinxcode{\sphinxupquote{FigureManager}} \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP23:detailed-description}} Under the current structure, every canvas has its own window. This is and may continue to be the desired method of operation for most use cases. Sometimes when there are too many figures open at the same time, it is desirable to be able to group these under the same window {[}see{]}(\sphinxurl{https://github.com/matplotlib/matplotlib/issues/2194}). The proposed solution modifies \sphinxcode{\sphinxupquote{FigureManagerBase}} to contain and manage more than one \sphinxcode{\sphinxupquote{canvas}}. The settings parameter \sphinxcode{\sphinxupquote{\sphinxhref{../../tutorials/introductory/customizing.html\#matplotlib-rcparams}{rcParams{[}"backend.multifigure"{]}}}} control when the \sphinxstylestrong{MultiFigure} behaviour is desired. \sphinxstylestrong{Note} It is important to note, that the proposed solution, assumes that the {[}MEP22{]}(\sphinxurl{https://github.com/matplotlib/matplotlib/wiki/Mep22}) is already in place. This is simply because the actual implementation of the \sphinxcode{\sphinxupquote{Toolbar}} makes it pretty hard to switch between canvases. \subsection{Implementation} \label{\detokenize{devel/MEP/MEP23:implementation}} The first implementation will be done in \sphinxcode{\sphinxupquote{GTK3}} using a Notebook as canvas container. \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{FigureManagerBase}}} \label{\detokenize{devel/MEP/MEP23:figuremanagerbase}} will add the following new methods \begin{itemize} \item {} \sphinxcode{\sphinxupquote{add\_canvas}}: To add a canvas to an existing \sphinxcode{\sphinxupquote{FigureManager}} object \item {} \sphinxcode{\sphinxupquote{remove\_canvas}}: To remove a canvas from a \sphinxcode{\sphinxupquote{FigureManager}} object, if it is the last one, it will be destroyed \item {} \sphinxcode{\sphinxupquote{move\_canvas}}: To move a canvas from one \sphinxcode{\sphinxupquote{FigureManager}} to another. \item {} \sphinxcode{\sphinxupquote{set\_canvas\_title}}: To change the title associated with a specific canvas container \item {} \sphinxcode{\sphinxupquote{get\_canvas\_title}}: To get the title associated with a specific canvas container \item {} \sphinxcode{\sphinxupquote{get\_active\_canvas}}: To get the canvas that is in the foreground and is subject to the gui events. There is no \sphinxcode{\sphinxupquote{set\_active\_canvas}} because the active canvas, is defined when \sphinxcode{\sphinxupquote{show}} is called on a \sphinxcode{\sphinxupquote{Canvas}} object. \end{itemize} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{new\_figure\_manager}}} \label{\detokenize{devel/MEP/MEP23:new-figure-manager}} To control which \sphinxcode{\sphinxupquote{FigureManager}} will contain the new figures, an extra optional parameter \sphinxcode{\sphinxupquote{figuremanager}} will be added, this parameter value will be passed to \sphinxcode{\sphinxupquote{new\_figure\_manager\_given\_figure}} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{new\_figure\_manager\_given\_figure}}} \label{\detokenize{devel/MEP/MEP23:new-figure-manager-given-figure}}\begin{itemize} \item {} If \sphinxcode{\sphinxupquote{figuremanager}} parameter is give, this \sphinxcode{\sphinxupquote{FigureManager}} object will be used instead of creating a new one. \item {} If \sphinxcode{\sphinxupquote{rcParams{[}'backend.multifigure'{]} == True}}: The last \sphinxcode{\sphinxupquote{FigureManager}} object will be used instead of creating a new one. \end{itemize} \subsubsection{\sphinxstyleliteralintitle{\sphinxupquote{NavigationBase}}} \label{\detokenize{devel/MEP/MEP23:navigationbase}} Modifies the \sphinxcode{\sphinxupquote{NavigationBase}} to keep a list of canvases, directing the actions to the active one \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP23:backward-compatibility}} For the \sphinxstylestrong{MultiFigure} properties to be visible, the user has to activate them directly setting \sphinxcode{\sphinxupquote{rcParams{[}'backend.multifigure'{]} = True}} It should be backwards compatible for backends that adhere to the current \sphinxcode{\sphinxupquote{FigureManagerBase}} structure even if they have not implemented the \sphinxstylestrong{MultiFigure} magic yet. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP23:alternatives}} Insted of modifying the \sphinxcode{\sphinxupquote{FigureManagerBase}} it could be possible to add a parallel class, that handles the cases where \sphinxcode{\sphinxupquote{rcParams{[}'backend.multifigure'{]} = True}}. This will warranty that there won't be any problems with custom made backends, but also makes bigger the code, and more things to maintain. \section{MEP24: negative radius in polar plots} \label{\detokenize{devel/MEP/MEP24:mep24-negative-radius-in-polar-plots}}\label{\detokenize{devel/MEP/MEP24::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id1}}{\hyperref[\detokenize{devel/MEP/MEP24:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id2}}{\hyperref[\detokenize{devel/MEP/MEP24:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id3}}{\hyperref[\detokenize{devel/MEP/MEP24:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id4}}{\hyperref[\detokenize{devel/MEP/MEP24:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id5}}{\hyperref[\detokenize{devel/MEP/MEP24:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id6}}{\hyperref[\detokenize{devel/MEP/MEP24:related-issues}]{\sphinxcrossref{Related Issues}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id7}}{\hyperref[\detokenize{devel/MEP/MEP24:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP24:id8}}{\hyperref[\detokenize{devel/MEP/MEP24:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP24:status}} \sphinxstyleemphasis{Discussion} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP24:branches-and-pull-requests}} None \subsection{Abstract} \label{\detokenize{devel/MEP/MEP24:abstract}} It is clear that polar plots need to be able to gracefully handle negative r values (not by clipping or reflection). \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP24:detailed-description}} One obvious application that we should support is bB plots (see \sphinxurl{https://github.com/matplotlib/matplotlib/issues/1730\#issuecomment-40815837}), but this seems more generally useful (for example growth rate as a function of angle). The assumption in the current code (as I understand it) is that the center of the graph is \sphinxcode{\sphinxupquote{r==0}}, however it would be good to be able to set the center to be at any \sphinxcode{\sphinxupquote{r}} (with any value less than the offset clipped). \subsection{Implementation} \label{\detokenize{devel/MEP/MEP24:implementation}} \subsection{Related Issues} \label{\detokenize{devel/MEP/MEP24:related-issues}} \#1730, \#1603, \#2203, \#2133 \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP24:backward-compatibility}} \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP24:alternatives}} \section{MEP25: Serialization} \label{\detokenize{devel/MEP/MEP25:mep25-serialization}}\label{\detokenize{devel/MEP/MEP25::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id1}}{\hyperref[\detokenize{devel/MEP/MEP25:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id2}}{\hyperref[\detokenize{devel/MEP/MEP25:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id3}}{\hyperref[\detokenize{devel/MEP/MEP25:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id4}}{\hyperref[\detokenize{devel/MEP/MEP25:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id5}}{\hyperref[\detokenize{devel/MEP/MEP25:examples}]{\sphinxcrossref{Examples}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id6}}{\hyperref[\detokenize{devel/MEP/MEP25:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id7}}{\hyperref[\detokenize{devel/MEP/MEP25:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP25:id8}}{\hyperref[\detokenize{devel/MEP/MEP25:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP25:status}} \sphinxstylestrong{Rejected} This work is important, but this particular effort has stalled. \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP25:branches-and-pull-requests}}\begin{itemize} \item {} development branches: \item {} related pull requests: \end{itemize} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP25:abstract}} This MEP aims at adding a serializable \sphinxcode{\sphinxupquote{Controller}} objects to act as an \sphinxcode{\sphinxupquote{Artist}} managers. Users would then communicate changes to an \sphinxcode{\sphinxupquote{Artist}} via a \sphinxcode{\sphinxupquote{Controller}}. In this way, functionality of the \sphinxcode{\sphinxupquote{Controller}} objects may be added incrementally since each \sphinxcode{\sphinxupquote{Artist}} is still responsible for drawing everything. The goal is to create an API that is usable both by graphing libraries requiring high-level descriptions of figures and libraries requiring low-level interpretations. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP25:detailed-description}} Matplotlib is a core plotting engine with an API that many users already understand. It's difficult/impossible for other graphing libraries to (1) get a complete figure description, (2) output raw data from the figure object as the user has provided it, (3) understand the semantics of the figure objects without heuristics, and (4) give matplotlib a complete figure description to visualize. In addition, because an \sphinxcode{\sphinxupquote{Artist}} has no conception of its own semantics within the figure, it's difficult to interact with them in a natural way. In this sense, matplotlib will adopt a standard Model-View-Controller (MVC) framework. The \sphinxstyleemphasis{Model} will be the user defined data, style, and semantics. The \sphinxstyleemphasis{Views} are the ensemble of each individual \sphinxcode{\sphinxupquote{Artist}}, which are responsible for producing the final image based on the \sphinxstyleemphasis{model}. The \sphinxstyleemphasis{Controller} will be the \sphinxcode{\sphinxupquote{Controller}} object managing its set of \sphinxcode{\sphinxupquote{Artist}} objects. The \sphinxcode{\sphinxupquote{Controller}} must be able to export the information that it's carrying about the figure on command, perhaps via a \sphinxcode{\sphinxupquote{to\_json}} method or similar. Because it would be extremely extraneous to duplicate all of the information in the model with the controller, only user-specified information (data + style) are explicitly kept. If a user wants more information (defaults) from the view/model, it should be able to query for it. \begin{itemize} \item {} This might be annoying to do, non-specified kwargs are pulled from the rcParams object which is in turn created from reading a user specified file and can be dynamically changed at run time. I suppose we could keep a dict of default defaults and compare against that. Not clear how this will interact with the style sheet {[}{[}MEP26{]}{]} - @tacaswell \end{itemize} Additional Notes: \begin{itemize} \item {} The \sphinxcode{\sphinxupquote{raw data}} does not necessarily need to be a \sphinxcode{\sphinxupquote{list}}, \sphinxcode{\sphinxupquote{ndarray}}, etc. Rather, it can more abstractly just have a method to yield data when needed. \item {} Because the \sphinxcode{\sphinxupquote{Controller}} will contain extra information that users may not want to keep around, it should \sphinxstyleemphasis{not} be created by default. You should be able to both (a) instantiate a \sphinxcode{\sphinxupquote{Controller}} with a figure and (b) build a figure with a \sphinxcode{\sphinxupquote{Controller}}. \end{itemize} Use Cases: \begin{itemize} \item {} Export all necessary informat \item {} Serializing a matplotlib figure, saving it, and being able to rerun later. \item {} Any other source sending an appropriately formatted representation to matplotlib to open \end{itemize} \subsection{Examples} \label{\detokenize{devel/MEP/MEP25:examples}} Here are some examples of what the controllers should be able to do. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Instantiate a matplotlib figure from a serialized representation (e.g., JSON): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{json} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{controllers} \PYG{k}{import} \PYG{n}{Controller} \PYG{k}{with} \PYG{n+nb}{open}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{my\PYGZus{}figure}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{k}{as} \PYG{n}{f}\PYG{p}{:} \PYG{n}{o} \PYG{o}{=} \PYG{n}{json}\PYG{o}{.}\PYG{n}{load}\PYG{p}{(}\PYG{n}{f}\PYG{p}{)} \PYG{n}{c} \PYG{o}{=} \PYG{n}{Controller}\PYG{p}{(}\PYG{n}{o}\PYG{p}{)} \PYG{n}{fig} \PYG{o}{=} \PYG{n}{c}\PYG{o}{.}\PYG{n}{figure} \end{sphinxVerbatim} \item {} Manage artists from the controller (e.g., Line2D): \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{c+c1}{\PYGZsh{} not really sure how this should look} \PYG{n}{c}\PYG{o}{.}\PYG{n}{axes}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{lines}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{]}\PYG{o}{.}\PYG{n}{color} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{b}\PYG{l+s+s1}{\PYGZsq{}} \PYG{c+c1}{\PYGZsh{} ?} \end{sphinxVerbatim} \item {} Export serializable figure representation: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{o} \PYG{o}{=} \PYG{n}{c}\PYG{o}{.}\PYG{n}{to\PYGZus{}json}\PYG{p}{(}\PYG{p}{)} \PYG{c+c1}{\PYGZsh{} or... we should be able to throw a figure object in there too} \PYG{n}{o} \PYG{o}{=} \PYG{n}{Controller}\PYG{o}{.}\PYG{n}{to\PYGZus{}json}\PYG{p}{(}\PYG{n}{mpl\PYGZus{}fig}\PYG{p}{)} \end{sphinxVerbatim} \end{enumerate} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP25:implementation}}\begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Create base \sphinxcode{\sphinxupquote{Controller}} objects that are able to manage \sphinxcode{\sphinxupquote{Artist}} objects (e.g., \sphinxcode{\sphinxupquote{Hist}}) \begin{quote} Comments: \begin{itemize} \item {} initialization should happen via unpacking \sphinxcode{\sphinxupquote{**}}, so we need a copy of call signature parameter for the \sphinxcode{\sphinxupquote{Artist}} we're ultimately trying to control. Unfortunate hard-coded repetition... \item {} should the additional \sphinxcode{\sphinxupquote{**kwargs}} accepted by each \sphinxcode{\sphinxupquote{Artist}} be tracked at the \sphinxcode{\sphinxupquote{Controller}} \item {} how does a \sphinxcode{\sphinxupquote{Controller}} know which artist belongs where? E.g., do we need to pass \sphinxcode{\sphinxupquote{axes}} references? \end{itemize} Progress: \begin{itemize} \item {} A simple NB demonstrating some functionality for \sphinxcode{\sphinxupquote{Line2DController}} objects: \sphinxurl{https://nbviewer.jupyter.org/gist/theengineear/f0aa8d79f64325e767c0} \end{itemize} \end{quote} \item {} Write in protocols for the \sphinxcode{\sphinxupquote{Controller}} to \sphinxstyleemphasis{update} the model. \begin{quote} Comments: \begin{itemize} \item {} how should containers be dealt with? E.g., what happens to old patches when we re-bin a histogram? \item {} in the link from (1), the old line is completely destroyed and redrawn, what if something is referencing it? \end{itemize} \end{quote} \item {} Create method by which a json object can be assembled from the \sphinxcode{\sphinxupquote{Controllers}} \item {} Deal with serializing the unserializable aspects of a figure (e.g., non-affine transforms?) \item {} Be able to instantiate from a serialized representation \item {} Reimplement the existing pyplot and Axes method, e.g. \sphinxcode{\sphinxupquote{pyplot.hist}} and \sphinxcode{\sphinxupquote{Axes.hist}} in terms of the new controller class. \end{enumerate} \textgreater{} @theengineer: in \#2 above, what do you mean by \sphinxstyleemphasis{get updates} from each \sphinxcode{\sphinxupquote{Artist}}? \textasciicircum{} Yup. The \sphinxcode{\sphinxupquote{Controller}} \sphinxstyleemphasis{shouldn't} need to get updated. This just happens in \#3. Delete comments when you see this. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP25:backward-compatibility}}\begin{itemize} \item {} pickling will change \item {} non-affine transformations will require a defined pickling method \end{itemize} \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP25:alternatives}} PR \#3150 suggested adding semantics by parasitically attaching extra containers to axes objects. This is a more complete solution with what should be a more developed/flexible/powerful framework. \section{MEP26: Artist styling} \label{\detokenize{devel/MEP/MEP26:mep26-artist-styling}}\label{\detokenize{devel/MEP/MEP26::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id1}}{\hyperref[\detokenize{devel/MEP/MEP26:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id2}}{\hyperref[\detokenize{devel/MEP/MEP26:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id3}}{\hyperref[\detokenize{devel/MEP/MEP26:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id4}}{\hyperref[\detokenize{devel/MEP/MEP26:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id5}}{\hyperref[\detokenize{devel/MEP/MEP26:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id6}}{\hyperref[\detokenize{devel/MEP/MEP26:bnf-grammar}]{\sphinxcrossref{BNF Grammar}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id7}}{\hyperref[\detokenize{devel/MEP/MEP26:syntax}]{\sphinxcrossref{Syntax}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id8}}{\hyperref[\detokenize{devel/MEP/MEP26:selectors}]{\sphinxcrossref{Selectors}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id9}}{\hyperref[\detokenize{devel/MEP/MEP26:gid-selector}]{\sphinxcrossref{GID selector}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id10}}{\hyperref[\detokenize{devel/MEP/MEP26:attributes-and-values}]{\sphinxcrossref{Attributes and values}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id11}}{\hyperref[\detokenize{devel/MEP/MEP26:parsing}]{\sphinxcrossref{Parsing}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id12}}{\hyperref[\detokenize{devel/MEP/MEP26:visitor-pattern-for-matplotlib-figure}]{\sphinxcrossref{Visitor pattern for matplotlib figure}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id13}}{\hyperref[\detokenize{devel/MEP/MEP26:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id14}}{\hyperref[\detokenize{devel/MEP/MEP26:alternatives}]{\sphinxcrossref{Alternatives}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id15}}{\hyperref[\detokenize{devel/MEP/MEP26:appendix}]{\sphinxcrossref{Appendix}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP26:id16}}{\hyperref[\detokenize{devel/MEP/MEP26:matplotlib-primitives}]{\sphinxcrossref{Matplotlib primitives}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP26:status}} \sphinxstylestrong{Rejected} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP26:branches-and-pull-requests}} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP26:abstract}} This MEP proposes a new stylesheet implementation to allow more comprehensive and dynamic styling of artists. The current version of matplotlib (1.4.0) allows stylesheets based on the rcParams syntax to be applied before creation of a plot. The methodology below proposes a new syntax, based on CSS, which would allow styling of individual artists and properties, which can be applied dynamically to existing objects. This is related to (and makes steps toward) the overall goal of moving to a DOM/tree-like architecture. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP26:detailed-description}} Currently, the look and appearance of existing artist objects (figure, axes, Line2D etc...) can only be updated via \sphinxcode{\sphinxupquote{set\_}} and \sphinxcode{\sphinxupquote{get\_}} methods on the artist object, which is quite laborious, especially if no reference to the artist(s) has been stored. The new style sheets introduced in 1.4 allow styling before a plot is created, but do not offer any means to dynamically update plots or distinguish between artists of the same type (i.e. to specify the \sphinxcode{\sphinxupquote{line color}} and \sphinxcode{\sphinxupquote{line style}} separately for differing \sphinxcode{\sphinxupquote{Line2D}} objects). The initial development should concentrate on allowing styling of artist primitives (those \sphinxcode{\sphinxupquote{artists}} that do not contain other \sphinxcode{\sphinxupquote{artists}}), and further development could expand the CSS syntax rules and parser to allow more complex styling. See the appendix for a list of primitives. The new methodology would require development of a number of steps: \begin{itemize} \item {} A new stylesheet syntax (likely based on CSS) to allow selection of artists by type, class, id etc... \item {} A mechanism by which to parse a stylesheet into a tree \item {} A mechanism by which to translate the parse-tree into something which can be used to update the properties of relevant artists. Ideally this would implement a method by which to traverse the artists in a tree-like structure. \item {} A mechanism by which to generate a stylesheet from existing artist properties. This would be useful to allow a user to export a stylesheet from an existing figure (where the appearance may have been set using the matplotlib API)... \end{itemize} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP26:implementation}} It will be easiest to allow a '3rd party' to modify/set the style of an artist if the 'style' is created as a separate class and store against the artist as a property. The \sphinxcode{\sphinxupquote{GraphicsContext}} class already provides a the basis of a \sphinxcode{\sphinxupquote{Style}} class and an artists \sphinxcode{\sphinxupquote{draw}} method can be refactored to use the \sphinxcode{\sphinxupquote{Style}} class rather than setting up it's own \sphinxcode{\sphinxupquote{GraphicsContext}} and transferring it's style-related properties to it. A minimal example of how this could be implemented is shown here: \sphinxurl{https://github.com/JamesRamm/mpl\_experiment} IMO, this will also make the API and code base much neater as individual get/set methods for artist style properties are now redundant... Indirectly related would be a general drive to replace get/set methods with properties. Implementing the style class with properties would be a big stride toward this... For initial development, I suggest developing a syntax based on a much (much much) simplified version of CSS. I am in favour of dubbing this Artist Style Sheets :+1: : \subsubsection{BNF Grammar} \label{\detokenize{devel/MEP/MEP26:bnf-grammar}} I propose a very simple syntax to implement initially (like a proof of concept), which can be expanded upon in the future. The BNF form of the syntax is given below and then explained \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{RuleSet} \PYG{p}{:}\PYG{p}{:}\PYG{o}{=} \PYG{n}{SelectorSequence} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{n}{Declaration}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZcb{}}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{SelectorSequence} \PYG{p}{:}\PYG{p}{:} \PYG{o}{=} \PYG{n}{Selector} \PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{,}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{Selector}\PYG{p}{\PYGZcb{}} \PYG{n}{Declaration} \PYG{p}{:}\PYG{p}{:}\PYG{o}{=} \PYG{n}{propName}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{:}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{propValue}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{;}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{Selector} \PYG{p}{:}\PYG{p}{:}\PYG{o}{=} \PYG{n}{ArtistIdent}\PYG{p}{\PYGZob{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZsh{}}\PYG{l+s+s2}{\PYGZdq{}}\PYG{n}{Ident}\PYG{p}{\PYGZcb{}} \PYG{n}{propName} \PYG{p}{:}\PYG{p}{:}\PYG{o}{=} \PYG{n}{Ident} \PYG{n}{propValue} \PYG{p}{:}\PYG{p}{:}\PYG{o}{=} \PYG{n}{Ident} \PYG{o}{\textbar{}} \PYG{n}{Number} \PYG{o}{\textbar{}} \PYG{n}{Colour} \PYG{o}{\textbar{}} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{None}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} \sphinxcode{\sphinxupquote{ArtistIdent}}, \sphinxcode{\sphinxupquote{Ident}}, \sphinxcode{\sphinxupquote{Number}} and \sphinxcode{\sphinxupquote{Colour}} are tokens (the basic building blocks of the expression) which are defined by regular expressions. \subsubsection{Syntax} \label{\detokenize{devel/MEP/MEP26:syntax}} A CSS stylesheet consists of a series of \sphinxstylestrong{rule sets} in hierarchical order (rules are applied from top to bottom). Each rule follows the syntax \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{selector} \PYG{p}{\PYGZob{}}\PYG{n}{attribute}\PYG{p}{:} \PYG{n}{value}\PYG{p}{;}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} Each rule can have any number of \sphinxcode{\sphinxupquote{attribute}}: \sphinxcode{\sphinxupquote{value}} pairs, and a stylesheet can have any number of rules. The initial syntax is designed only for \sphinxcode{\sphinxupquote{artist}} primitives. It does not address the question of how to set properties on \sphinxcode{\sphinxupquote{container}} types (whose properties may themselves be \sphinxcode{\sphinxupquote{artists}} with settable properties), however, a future solution to this could simply be nested \sphinxcode{\sphinxupquote{RuleSet}} s \paragraph{Selectors} \label{\detokenize{devel/MEP/MEP26:selectors}} Selectors define the object to which the attribute updates should be applied. As a starting point, I propose just 2 selectors to use in initial development: Artist Type Selector Select an \sphinxcode{\sphinxupquote{artist}} by it's type. E.g \sphinxcode{\sphinxupquote{Line2D}} or \sphinxcode{\sphinxupquote{Text}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Line2D} \PYG{p}{\PYGZob{}}\PYG{n}{attribute}\PYG{p}{:} \PYG{n}{value}\PYG{p}{\PYGZcb{}} \end{sphinxVerbatim} The regex for matching the artist type selector (\sphinxcode{\sphinxupquote{ArtistIdent}} in the BNF grammar) would be: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{ArtistIdent} \PYG{o}{=} \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{(?P\PYGZlt{}ArtistIdent\PYGZgt{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{bLine2D}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{b\textbar{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{bText}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{b\textbar{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{bAxesImage}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{b\textbar{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{bFigureImage}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{b\textbar{}}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{bPatch}\PYG{l+s+s1}{\PYGZbs{}}\PYG{l+s+s1}{b)}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} \paragraph{GID selector} \label{\detokenize{devel/MEP/MEP26:gid-selector}} Select an \sphinxcode{\sphinxupquote{artist}} by its \sphinxcode{\sphinxupquote{gid}}: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Line2D}\PYG{c+c1}{\PYGZsh{}myGID \PYGZob{}attribute: value\PYGZcb{}} \end{sphinxVerbatim} A \sphinxcode{\sphinxupquote{gid}} can be any string, so the regex could be as follows: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{Ident} \PYG{o}{=} \PYG{l+s+sa}{r}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{(?P\PYGZlt{}Ident\PYGZgt{}[a\PYGZhy{}zA\PYGZhy{}Z\PYGZus{}][a\PYGZhy{}zA\PYGZhy{}Z\PYGZus{}0\PYGZhy{}9]*)}\PYG{l+s+s1}{\PYGZsq{}} \end{sphinxVerbatim} The above selectors roughly correspond to their CSS counterparts (\sphinxurl{http://www.w3.org/TR/CSS21/selector.html}) \paragraph{Attributes and values} \label{\detokenize{devel/MEP/MEP26:attributes-and-values}}\begin{itemize} \item {} \sphinxcode{\sphinxupquote{Attributes}} are any valid (settable) property for the \sphinxcode{\sphinxupquote{artist}} in question. \item {} \sphinxcode{\sphinxupquote{Values}} are any valid value for the property (Usually a string, or number). \end{itemize} \subsubsection{Parsing} \label{\detokenize{devel/MEP/MEP26:parsing}} Parsing would consist of breaking the stylesheet into tokens (the python cookbook gives a nice tokenizing recipe on page 66), applying the syntax rules and constructing a \sphinxcode{\sphinxupquote{Tree}}. This requires defining the grammar of the stylesheet (again, we can borrow from CSS) and writing a parser. Happily, there is a recipe for this in the python cookbook aswell. \subsubsection{Visitor pattern for matplotlib figure} \label{\detokenize{devel/MEP/MEP26:visitor-pattern-for-matplotlib-figure}} In order to apply the stylesheet rules to the relevant artists, we need to 'visit' each artist in a figure and apply the relevant rule. Here is a visitor class (again, thanks to python cookbook), where each \sphinxcode{\sphinxupquote{node}} would be an artist in the figure. A \sphinxcode{\sphinxupquote{visit\_}} method would need to be implemented for each mpl artist, to handle the different properties for each \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{class} \PYG{n+nc}{Visitor}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{visit}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{node}\PYG{p}{)}\PYG{p}{:} \PYG{n}{name} \PYG{o}{=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{visit\PYGZus{}}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{+} \PYG{n+nb}{type}\PYG{p}{(}\PYG{n}{node}\PYG{p}{)}\PYG{o}{.}\PYG{n+nv+vm}{\PYGZus{}\PYGZus{}name\PYGZus{}\PYGZus{}} \PYG{n}{meth} \PYG{o}{=} \PYG{n+nb}{getattr}\PYG{p}{(}\PYG{n+nb+bp}{self}\PYG{p}{,} \PYG{n}{name}\PYG{p}{,} \PYG{k+kc}{None}\PYG{p}{)} \PYG{k}{if} \PYG{n}{meth} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{k}{raise} \PYG{n+ne}{NotImplementedError} \PYG{k}{return} \PYG{n}{meth}\PYG{p}{(}\PYG{n}{node}\PYG{p}{)} \end{sphinxVerbatim} An \sphinxcode{\sphinxupquote{evaluator}} class would then take the stylesheet rules and implement the visitor on each one of them. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP26:backward-compatibility}} Implementing a separate \sphinxcode{\sphinxupquote{Style}} class would break backward compatibility as many get/set methods on an artist would become redundant. While it would be possible to alter these methods to hook into the \sphinxcode{\sphinxupquote{Style}} class (stored as a property against the artist), I would be in favor of simply removing them to both neaten/simplify the codebase and to provide a simple, uncluttered API... \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP26:alternatives}} No alternatives, but some of the ground covered here overlaps with MEP25, which may assist in this development \subsection{Appendix} \label{\detokenize{devel/MEP/MEP26:appendix}} \subsubsection{Matplotlib primitives} \label{\detokenize{devel/MEP/MEP26:matplotlib-primitives}} This will form the initial selectors which stylesheets can use. \begin{itemize} \item {} Line2D \item {} Text \item {} AxesImage \item {} FigureImage \item {} Patch \end{itemize} \section{MEP27: decouple pyplot from backends} \label{\detokenize{devel/MEP/MEP27:mep27-decouple-pyplot-from-backends}}\label{\detokenize{devel/MEP/MEP27::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id1}}{\hyperref[\detokenize{devel/MEP/MEP27:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id2}}{\hyperref[\detokenize{devel/MEP/MEP27:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id3}}{\hyperref[\detokenize{devel/MEP/MEP27:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id4}}{\hyperref[\detokenize{devel/MEP/MEP27:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id5}}{\hyperref[\detokenize{devel/MEP/MEP27:implementation}]{\sphinxcrossref{Implementation}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id6}}{\hyperref[\detokenize{devel/MEP/MEP27:future-compatibility}]{\sphinxcrossref{Future compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id7}}{\hyperref[\detokenize{devel/MEP/MEP27:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id8}}{\hyperref[\detokenize{devel/MEP/MEP27:alternatives}]{\sphinxcrossref{Alternatives}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP27:id9}}{\hyperref[\detokenize{devel/MEP/MEP27:questions}]{\sphinxcrossref{Questions}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP27:status}} \sphinxstylestrong{Progress} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP27:branches-and-pull-requests}} Main PR (including GTK3): + \sphinxurl{https://github.com/matplotlib/matplotlib/pull/4143} Backend specific branch diffs: + \sphinxurl{https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-tkagg} + \sphinxurl{https://github.com/OceanWolf/matplotlib/compare/backend-refactor...OceanWolf:backend-refactor-qt} + \sphinxurl{https://github.com/OceanWolf/matplotlib/compare/backend-refactor...backend-refactor-wx} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP27:abstract}} This MEP refactors the backends to give a more structured and consistent API, removing generic code and consolidate existing code. To do this we propose splitting: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxcode{\sphinxupquote{FigureManagerBase}} and its derived classes into the core functionality class \sphinxcode{\sphinxupquote{FigureManager}} and a backend specific class \sphinxcode{\sphinxupquote{WindowBase}} and \item {} \sphinxcode{\sphinxupquote{ShowBase}} and its derived classes into \sphinxcode{\sphinxupquote{Gcf.show\_all}} and \sphinxcode{\sphinxupquote{MainLoopBase}}. \end{enumerate} \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP27:detailed-description}} This MEP aims to consolidate the backends API into one single uniform API, removing generic code out of the backend (which includes \sphinxcode{\sphinxupquote{\_pylab\_helpers}} and \sphinxcode{\sphinxupquote{Gcf}}), and push code to a more appropriate level in matplotlib. With this we automatically remove inconsistencies that appear in the backends, such as \sphinxcode{\sphinxupquote{FigureManagerBase.resize(w, h)}} which sometimes sets the canvas, and other times set the entire window to the dimensions given, depending on the backend. Two main places for generic code appear in the classes derived from \sphinxcode{\sphinxupquote{FigureManagerBase}} and \sphinxcode{\sphinxupquote{ShowBase}}. \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxcode{\sphinxupquote{FigureManagerBase}} has \sphinxstylestrong{three} jobs at the moment: \begin{enumerate} \def\theenumii{\arabic{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} The documentation describes it as a \sphinxstyleemphasis{{}`{}`Helper class for pyplot mode, wraps everything up into a neat bundle''} \item {} But it doesn't just wrap the canvas and toolbar, it also does all of the windowing tasks itself. The conflation of these two tasks gets seen the best in the following line: \sphinxcode{\sphinxupquote{{}`python self.set\_window\_title("Figure \%d" \% num) {}`}} This combines backend specific code \sphinxcode{\sphinxupquote{self.set\_window\_title(title)}} with matplotlib generic code \sphinxcode{\sphinxupquote{title = "Figure \%d" \% num}}. \item {} Currently the backend specific subclass of \sphinxcode{\sphinxupquote{FigureManager}} decides when to end the mainloop. This also seems very wrong as the figure should have no control over the other figures. \end{enumerate} \item {} \sphinxcode{\sphinxupquote{ShowBase}} has two jobs: \begin{enumerate} \def\theenumii{\arabic{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} It has the job of going through all figure managers registered in \sphinxcode{\sphinxupquote{\_pylab\_helpers.Gcf}} and telling them to show themselves. \item {} And secondly it has the job of performing the backend specific \sphinxcode{\sphinxupquote{mainloop}} to block the main programme and thus keep the figures from dying. \end{enumerate} \end{enumerate} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP27:implementation}} The description of this MEP gives us most of the solution: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} To remove the windowing aspect out of \sphinxcode{\sphinxupquote{FigureManagerBase}} letting it simply wrap this new class along with the other backend classes. Create a new \sphinxcode{\sphinxupquote{WindowBase}} class that can handle this functionality, with pass-through methods (:arrow\_right:) to \sphinxcode{\sphinxupquote{WindowBase}}. Classes that subclass \sphinxcode{\sphinxupquote{WindowBase}} should also subclass the GUI specific window class to ensure backward compatibility (\sphinxcode{\sphinxupquote{manager.window == manager.window}}). \item {} Refactor the mainloop of \sphinxcode{\sphinxupquote{ShowBase}} into \sphinxcode{\sphinxupquote{MainLoopBase}}, which encapsulates the end of the loop as well. We give an instance of \sphinxcode{\sphinxupquote{MainLoop}} to \sphinxcode{\sphinxupquote{FigureManager}} as a key unlock the exit method (requiring all keys returned before the loop can die). Note this opens the possibility for multiple backends to run concurrently. \item {} Now that \sphinxcode{\sphinxupquote{FigureManagerBase}} has no backend specifics in it, to rename it to \sphinxcode{\sphinxupquote{FigureManager}}, and move to a new file \sphinxcode{\sphinxupquote{backend\_managers.py}} noting that: \begin{enumerate} \def\theenumii{\arabic{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} This allows us to break up the conversion of backends into separate PRs as we can keep the existing \sphinxcode{\sphinxupquote{FigureManagerBase}} class and its dependencies intact. \item {} and this also anticipates MEP22 where the new \sphinxcode{\sphinxupquote{NavigationBase}} has morphed into a backend independent \sphinxcode{\sphinxupquote{ToolManager}}. \end{enumerate} \end{enumerate} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|T|} \hline \sphinxstyletheadfamily FigureManagerBase(canvas, num) &\sphinxstyletheadfamily FigureManager(figure, num) &\sphinxstyletheadfamily \sphinxcode{\sphinxupquote{WindowBase(title)}} &\sphinxstyletheadfamily Notes \\ \hline show && show &\\ \hline destroy & calls destroy on all components & destroy &\\ \hline full\_screen\_toggle & handles logic & set\_fullscreen &\\ \hline resize && resize &\\ \hline key\_press & key\_press &&\\ \hline get\_window\_title && get\_window\_title &\\ \hline set\_window\_title && set\_window\_title &\\ \hline& \_get\_toolbar && A common method to all subclasses of FigureManagerBase \\ \hline&& set\_default\_size &\\ \hline&& add\_element\_to\_window &\\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily ShowBase &\sphinxstyletheadfamily MainLoopBase &\sphinxstyletheadfamily Notes \\ \hline mainloop & begin &\\ \hline& end & Gets called automagically when no more instances of the subclass exist \\ \hline \_\_call\_\_ && Method moved to Gcf.show\_all \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsection{Future compatibility} \label{\detokenize{devel/MEP/MEP27:future-compatibility}} As eluded to above when discussing MEP 22, this refactor makes it easy to add in new generic features. At the moment, MEP 22 has to make ugly hacks to each class extending from \sphinxcode{\sphinxupquote{FigureManagerBase}}. With this code, this only needs to get made in the single \sphinxcode{\sphinxupquote{FigureManager}} class. This also makes the later deprecation of \sphinxcode{\sphinxupquote{NavigationToolbar2}} very straightforward, only needing to touch the single \sphinxcode{\sphinxupquote{FigureManager}} class MEP 23 makes for another use case where this refactored code will come in very handy. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP27:backward-compatibility}} As we leave all backend code intact, only adding missing methods to existing classes, this should work seamlessly for all use cases. The only difference will lie for backends that used \sphinxcode{\sphinxupquote{FigureManager.resize}} to resize the canvas and not the window, due to the standardisation of the API. I would envision that the classes made obsolete by this refactor get deprecated and removed on the same timetable as \sphinxcode{\sphinxupquote{NavigationToolbar2}}, also note that the change in call signature to the \sphinxcode{\sphinxupquote{FigureCanvasWx}} constructor, while backward compatible, I think the old (imho ugly style) signature should get deprecated and removed in the same manner as everything else. \begin{savenotes}\sphinxattablestart \centering \begin{tabulary}{\linewidth}[t]{|T|T|T|} \hline \sphinxstyletheadfamily backend &\sphinxstyletheadfamily manager.resize(w,h) &\sphinxstyletheadfamily Extra \\ \hline gtk3 & window &\\ \hline Tk & canvas &\\ \hline Qt & window &\\ \hline Wx & canvas & FigureManagerWx had \sphinxcode{\sphinxupquote{frame}} as an alias to window, so this also breaks BC. \\ \hline \end{tabulary} \par \sphinxattableend\end{savenotes} \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP27:alternatives}} If there were any alternative solutions to solving the same problem, they should be discussed here, along with a justification for the chosen approach. \subsection{Questions} \label{\detokenize{devel/MEP/MEP27:questions}} Mdehoon: Can you elaborate on how to run multiple backends concurrently? OceanWolf: @mdehoon, as I say, not for this MEP, but I see this MEP opens it up as a future possibility. Basically the \sphinxcode{\sphinxupquote{MainLoopBase}} class acts a per backend Gcf, in this MEP it tracks the number of figures open per backend, and manages the mainloops for those backends. It closes the backend specific mainloop when it detects that no figures remain open for that backend. Because of this I imagine that with only a small amount of tweaking that we can do full-multi-backend matplotlib. No idea yet why one would want to, but I leave the possibility there in MainLoopBase. With all the backend-code specifics refactored out of \sphinxcode{\sphinxupquote{FigureManager}} also aids in this, one manager to rule them (the backends) all. Mdehoon: @OceanWolf, OK, thanks for the explanation. Having a uniform API for the backends is very important for the maintainability of matplotlib. I think this MEP is a step in the right direction. \section{MEP28: Remove Complexity from Axes.boxplot} \label{\detokenize{devel/MEP/MEP28:mep28-remove-complexity-from-axes-boxplot}}\label{\detokenize{devel/MEP/MEP28::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id1}}{\hyperref[\detokenize{devel/MEP/MEP28:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id2}}{\hyperref[\detokenize{devel/MEP/MEP28:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id3}}{\hyperref[\detokenize{devel/MEP/MEP28:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id4}}{\hyperref[\detokenize{devel/MEP/MEP28:detailed-description}]{\sphinxcrossref{Detailed description}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id5}}{\hyperref[\detokenize{devel/MEP/MEP28:importance}]{\sphinxcrossref{Importance}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id6}}{\hyperref[\detokenize{devel/MEP/MEP28:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id7}}{\hyperref[\detokenize{devel/MEP/MEP28:passing-transform-functions-to-cbook-boxplots-stats}]{\sphinxcrossref{Passing transform functions to \sphinxcode{\sphinxupquote{cbook.boxplots\_stats}}}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id8}}{\hyperref[\detokenize{devel/MEP/MEP28:simplifications-to-the-axes-boxplot-api-and-other-functions}]{\sphinxcrossref{Simplifications to the \sphinxcode{\sphinxupquote{Axes.boxplot}} API and other functions}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id9}}{\hyperref[\detokenize{devel/MEP/MEP28:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id10}}{\hyperref[\detokenize{devel/MEP/MEP28:schedule}]{\sphinxcrossref{Schedule}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id11}}{\hyperref[\detokenize{devel/MEP/MEP28:anticipated-impacts-to-users}]{\sphinxcrossref{Anticipated Impacts to Users}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id12}}{\hyperref[\detokenize{devel/MEP/MEP28:anticipated-impacts-to-downstream-libraries}]{\sphinxcrossref{Anticipated Impacts to Downstream Libraries}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id13}}{\hyperref[\detokenize{devel/MEP/MEP28:alternatives}]{\sphinxcrossref{Alternatives}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id14}}{\hyperref[\detokenize{devel/MEP/MEP28:variations-on-the-theme}]{\sphinxcrossref{Variations on the theme}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id15}}{\hyperref[\detokenize{devel/MEP/MEP28:doing-less}]{\sphinxcrossref{Doing less}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP28:id16}}{\hyperref[\detokenize{devel/MEP/MEP28:doing-nothing}]{\sphinxcrossref{Doing nothing}}} \end{itemize} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP28:status}} \sphinxstylestrong{Discussion} \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP28:branches-and-pull-requests}} The following lists any open PRs or branches related to this MEP: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Deprecate redundant statistical kwargs in \sphinxcode{\sphinxupquote{Axes.boxplot}}: \sphinxurl{https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations} \item {} Deprecate redundant style options in \sphinxcode{\sphinxupquote{Axes.boxplot}}: \sphinxurl{https://github.com/phobson/matplotlib/tree/MEP28-initial-deprecations} \item {} Deprecate passings 2D numpy arrays as input: None \item {} Add pre- \& post-processing options to \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}: \sphinxurl{https://github.com/phobson/matplotlib/tree/boxplot-stat-transforms} \item {} Exposing \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} through \sphinxcode{\sphinxupquote{Axes.boxplot}} kwargs: None \item {} Remove redundant statistical kwargs in \sphinxcode{\sphinxupquote{Axes.boxplot}}: None \item {} Remove redundant style options in \sphinxcode{\sphinxupquote{Axes.boxplot}}: None \item {} Remaining items that arise through discussion: None \end{enumerate} \subsection{Abstract} \label{\detokenize{devel/MEP/MEP28:abstract}} Over the past few releases, the \sphinxcode{\sphinxupquote{Axes.boxplot}} method has grown in complexity to support fully customizable artist styling and statistical computation. This lead to \sphinxcode{\sphinxupquote{Axes.boxplot}} being split off into multiple parts. The statistics needed to draw a boxplot are computed in \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}, while the actual artists are drawn by \sphinxcode{\sphinxupquote{Axes.bxp}}. The original method, \sphinxcode{\sphinxupquote{Axes.boxplot}} remains as the most public API that handles passing the user-supplied data to \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}, feeding the results to \sphinxcode{\sphinxupquote{Axes.bxp}}, and pre-processing style information for each facet of the boxplot plots. This MEP will outline a path forward to rollback the added complexity and simplify the API while maintaining reasonable backwards compatibility. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP28:detailed-description}} Currently, the \sphinxcode{\sphinxupquote{Axes.boxplot}} method accepts parameters that allow the users to specify medians and confidence intervals for each box that will be drawn in the plot. These were provided so that avdanced users could provide statistics computed in a different fashion that the simple method provided by matplotlib. However, handling this input requires complex logic to make sure that the forms of the data structure match what needs to be drawn. At the moment, that logic contains 9 separate if/else statements nested up to 5 levels deep with a for loop, and may raise up to 2 errors. These parameters were added prior to the creation of the \sphinxcode{\sphinxupquote{Axes.bxp}} method, which draws boxplots from a list of dictionaries containing the relevant statistics. Matplotlib also provides a function that computes these statistics via \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}. Note that advanced users can now either a) write their own function to compute the stats required by \sphinxcode{\sphinxupquote{Axes.bxp}}, or b) modify the output returned by \sphinxcode{\sphinxupquote{cbook.boxplots\_stats}} to fully customize the position of the artists of the plots. With this flexibility, the parameters to manually specify only the medians and their confidences intervals remain for backwards compatibility. Around the same time that the two roles of \sphinxcode{\sphinxupquote{Axes.boxplot}} were split into \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} for computation and \sphinxcode{\sphinxupquote{Axes.bxp}} for drawing, both \sphinxcode{\sphinxupquote{Axes.boxplot}} and \sphinxcode{\sphinxupquote{Axes.bxp}} were written to accept parameters that individually toggle the drawing of all components of the boxplots, and parameters that individually configure the style of those artists. However, to maintain backwards compatibility, the \sphinxcode{\sphinxupquote{sym}} parameter (previously used to specify the symbol of the fliers) was retained. This parameter itself requires fairly complex logic to reconcile the \sphinxcode{\sphinxupquote{sym}} parameters with the newer \sphinxcode{\sphinxupquote{flierprops}} parameter at the default style specified by \sphinxcode{\sphinxupquote{matplotlibrc}}. This MEP seeks to dramatically simplify the creation of boxplots for novice and advanced users alike. Importantly, the changes proposed here will also be available to downstream packages like seaborn, as seaborn smartly allows users to pass arbitrary dictionaries of parameters through the seaborn API to the underlying matplotlib functions. This will be achieved in the following way: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} will be modified to allow pre- and post- computation transformation functions to be passed in (e.g., \sphinxcode{\sphinxupquote{np.log}} and \sphinxcode{\sphinxupquote{np.exp}} for lognormally distributed data) \item {} \sphinxcode{\sphinxupquote{Axes.boxplot}} will be modified to also accept and naïvely pass them to \sphinxcode{\sphinxupquote{cbook.boxplots\_stats}} (Alt: pass the stat function and a dict of its optional parameters). \item {} Outdated parameters from \sphinxcode{\sphinxupquote{Axes.boxplot}} will be deprecated and later removed. \end{enumerate} \subsubsection{Importance} \label{\detokenize{devel/MEP/MEP28:importance}} Since the limits of the whiskers are computed arithmetically, there is an implicit assumption of normality in box and whisker plots. This primarily affects which data points are classified as outliers. Allowing transformations to the data and the results used to draw boxplots will allow users to opt-out of that assumption if the data are known to not fit a normal distribution. Below is an example of how \sphinxcode{\sphinxupquote{Axes.boxplot}} classifies outliers of lognormal data differently depending one these types of transforms. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k+kn}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib.pyplot} \PYG{k+kn}{as} \PYG{n+nn}{plt} \PYG{k+kn}{from} \PYG{n+nn}{matplotlib} \PYG{k+kn}{import} \PYG{n}{cbook} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{n}{figsize}\PYG{o}{=}\PYG{p}{(}\PYG{l+m+mi}{4}\PYG{p}{,} \PYG{l+m+mi}{6}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{set\PYGZus{}yscale}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{log}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{data} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{lognormal}\PYG{p}{(}\PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{1.75}\PYG{p}{,} \PYG{l+m+mf}{2.75}\PYG{p}{,} \PYG{n}{size}\PYG{o}{=}\PYG{l+m+mi}{37}\PYG{p}{)} \PYG{n}{stats} \PYG{o}{=} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{boxplot\PYGZus{}stats}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{arithmetic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{n}{logstats} \PYG{o}{=} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{boxplot\PYGZus{}stats}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{log}\PYG{p}{(}\PYG{n}{data}\PYG{p}{)}\PYG{p}{,} \PYG{n}{labels}\PYG{o}{=}\PYG{p}{[}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{log\PYGZhy{}transformed}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{]}\PYG{p}{)} \PYG{k}{for} \PYG{n}{lsdict} \PYG{o+ow}{in} \PYG{n}{logstats}\PYG{p}{:} \PYG{k}{for} \PYG{n}{key}\PYG{p}{,} \PYG{n}{value} \PYG{o+ow}{in} \PYG{n}{lsdict}\PYG{o}{.}\PYG{n}{items}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{key} \PYG{o}{!=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{lsdict}\PYG{p}{[}\PYG{n}{key}\PYG{p}{]} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{(}\PYG{n}{value}\PYG{p}{)} \PYG{n}{stats}\PYG{o}{.}\PYG{n}{extend}\PYG{p}{(}\PYG{n}{logstats}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{bxp}\PYG{p}{(}\PYG{n}{stats}\PYG{p}{)} \PYG{n}{fig}\PYG{o}{.}\PYG{n}{show}\PYG{p}{(}\PYG{p}{)} \end{sphinxVerbatim} \begin{figure}[htbp] \centering \noindent\sphinxincludegraphics{{MEP28-1}.pdf} \end{figure} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP28:implementation}} \subsubsection{Passing transform functions to \sphinxstyleliteralintitle{\sphinxupquote{cbook.boxplots\_stats}}} \label{\detokenize{devel/MEP/MEP28:passing-transform-functions-to-cbook-boxplots-stats}} This MEP proposes that two parameters (e.g., \sphinxcode{\sphinxupquote{transform\_in}} and \sphinxcode{\sphinxupquote{transform\_out}} be added to the cookbook function that computes the statistics for the boxplot function. These will be optional keyword-only arguments and can easily be set to \sphinxcode{\sphinxupquote{lambda x: x}} as a no-op when omitted by the user. The \sphinxcode{\sphinxupquote{transform\_in}} function will be applied to the data as the \sphinxcode{\sphinxupquote{boxplot\_stats}} function loops through each subset of the data passed to it. After the list of statistics dictionaries are computed the \sphinxcode{\sphinxupquote{transform\_out}} function is applied to each value in the dictionaries. These transformations can then be added to the call signature of \sphinxcode{\sphinxupquote{Axes.boxplot}} with little impact to that method's complexity. This is because they can be directly passed to \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}. Alternatively, \sphinxcode{\sphinxupquote{Axes.boxplot}} could be modified to accept an optional statistical function kwarg and a dictionary of parameters to be direcly passed to it. At this point in the implementation users and external libraries like seaborn would have complete control via the \sphinxcode{\sphinxupquote{Axes.boxplot}} method. More importantly, at the very least, seaborn would require no changes to its API to allow users to take advantage of these new options. \subsubsection{Simplifications to the \sphinxstyleliteralintitle{\sphinxupquote{Axes.boxplot}} API and other functions} \label{\detokenize{devel/MEP/MEP28:simplifications-to-the-axes-boxplot-api-and-other-functions}} Simplifying the boxplot method consists primarily of deprecating and then removing the redundant parameters. Optionally, a next step would include rectifying minor terminological inconsistencies between \sphinxcode{\sphinxupquote{Axes.boxplot}} and \sphinxcode{\sphinxupquote{Axes.bxp}}. The parameters to be deprecated and removed include: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} \sphinxcode{\sphinxupquote{usermedians}} - processed by 10 SLOC, 3 \sphinxcode{\sphinxupquote{if}} blocks, a \sphinxcode{\sphinxupquote{for}} loop \item {} \sphinxcode{\sphinxupquote{conf\_intervals}} - handled by 15 SLOC, 6 \sphinxcode{\sphinxupquote{if}} blocks, a \sphinxcode{\sphinxupquote{for}} loop \item {} \sphinxcode{\sphinxupquote{sym}} - processed by 12 SLOC, 4 \sphinxcode{\sphinxupquote{if}} blocks \end{enumerate} Removing the \sphinxcode{\sphinxupquote{sym}} option allows all code in handling the remaining styling parameters to be moved to \sphinxcode{\sphinxupquote{Axes.bxp}}. This doesn't remove any complexity, but does reinforce the single responsibility principle among \sphinxcode{\sphinxupquote{Axes.bxp}}, \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}, and \sphinxcode{\sphinxupquote{Axes.boxplot}}. Additionally, the \sphinxcode{\sphinxupquote{notch}} parameter could be renamed \sphinxcode{\sphinxupquote{shownotches}} to be consistent with \sphinxcode{\sphinxupquote{Axes.bxp}}. This kind of cleanup could be taken a step further and the \sphinxcode{\sphinxupquote{whis}}, \sphinxcode{\sphinxupquote{bootstrap}}, \sphinxcode{\sphinxupquote{autorange}} could be rolled into the kwargs passed to the new \sphinxcode{\sphinxupquote{statfxn}} parameter. \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP28:backward-compatibility}} Implementation of this MEP would eventually result in the backwards incompatible deprecation and then removal of the keyword parameters \sphinxcode{\sphinxupquote{usermedians}}, \sphinxcode{\sphinxupquote{conf\_intervals}}, and \sphinxcode{\sphinxupquote{sym}}. Cursory searches on GitHub indicated that \sphinxcode{\sphinxupquote{usermedians}}, \sphinxcode{\sphinxupquote{conf\_intervals}} are used by few users, who all seem to have a very strong knowledge of matplotlib. A robust deprecation cycle should provide sufficient time for these users to migrate to a new API. Deprecation of \sphinxcode{\sphinxupquote{sym}} however, may have a much broader reach into the matplotlib userbase. \subsubsection{Schedule} \label{\detokenize{devel/MEP/MEP28:schedule}} An accelerated timeline could look like the following: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} v2.0.1 add transforms to \sphinxcode{\sphinxupquote{cbook.boxplots\_stats}}, expose in \sphinxcode{\sphinxupquote{Axes.boxplot}} \item {} v2.1.0 Initial Deprecations , and using 2D numpy arrays as input \begin{enumerate} \def\theenumii{\alph{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} Using 2D numpy arrays as input. The semantics around 2D arrays are generally confusing. \item {} \sphinxcode{\sphinxupquote{usermedians}}, \sphinxcode{\sphinxupquote{conf\_intervals}}, \sphinxcode{\sphinxupquote{sym}} parameters \end{enumerate} \item {} v2.2.0 \begin{enumerate} \def\theenumii{\alph{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} remove \sphinxcode{\sphinxupquote{usermedians}}, \sphinxcode{\sphinxupquote{conf\_intervals}}, \sphinxcode{\sphinxupquote{sym}} parameters \item {} deprecate \sphinxcode{\sphinxupquote{notch}} in favor of \sphinxcode{\sphinxupquote{shownotches}} to be consistent with other parameters and \sphinxcode{\sphinxupquote{Axes.bxp}} \end{enumerate} \item {} \begin{description} \item[{v2.3.0}] \leavevmode\begin{enumerate} \def\theenumii{\alph{enumii}} \def\labelenumii{\theenumii .} \makeatletter\def\p@enumiii{\p@enumii \theenumii .}\makeatother \item {} remove \sphinxcode{\sphinxupquote{notch}} parameter \item {} move all style and artist toggling logic to \sphinxcode{\sphinxupquote{Axes.bxp}} such \sphinxcode{\sphinxupquote{Axes.boxplot}} is little more than a broker between \sphinxcode{\sphinxupquote{Axes.bxp}} and \sphinxcode{\sphinxupquote{cbook.boxplots\_stats}} \end{enumerate} \end{description} \end{enumerate} \subsubsection{Anticipated Impacts to Users} \label{\detokenize{devel/MEP/MEP28:anticipated-impacts-to-users}} As described above deprecating \sphinxcode{\sphinxupquote{usermedians}} and \sphinxcode{\sphinxupquote{conf\_intervals}} will likely impact few users. Those who will be impacted are almost certainly advanced users who will be able to adapt to the change. Deprecating the \sphinxcode{\sphinxupquote{sym}} option may import more users and effort should be taken to collect community feedback on this. \subsubsection{Anticipated Impacts to Downstream Libraries} \label{\detokenize{devel/MEP/MEP28:anticipated-impacts-to-downstream-libraries}} The source code (GitHub master as of 2016-10-17) was inspected for seaborn and python-ggplot to see if these changes would impact their use. None of the parameters nominated for removal in this MEP are used by seaborn. The seaborn APIs that use matplotlib's boxplot function allow user's to pass arbitrary \sphinxcode{\sphinxupquote{**kwargs}} through to matplotlib's API. Thus seaborn users with modern matplotlib installations will be able to take full advantage of any new features added as a result of this MEP. Python-ggplot has implemented its own function to draw boxplots. Therefore, no impact can come to it as a result of implementing this MEP. \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP28:alternatives}} \subsubsection{Variations on the theme} \label{\detokenize{devel/MEP/MEP28:variations-on-the-theme}} This MEP can be divided into a few loosely coupled components: \begin{enumerate} \def\theenumi{\arabic{enumi}} \def\labelenumi{\theenumi .} \makeatletter\def\p@enumii{\p@enumi \theenumi .}\makeatother \item {} Allowing pre- and post-computation transformation function in \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} \item {} Exposing that transformation in the \sphinxcode{\sphinxupquote{Axes.boxplot}} API \item {} Removing redundant statistical options in \sphinxcode{\sphinxupquote{Axes.boxplot}} \item {} Shifting all styling parameter processing from \sphinxcode{\sphinxupquote{Axes.boxplot}} to \sphinxcode{\sphinxupquote{Axes.bxp}}. \end{enumerate} With this approach, \#2 depends and \#1, and \#4 depends on \#3. There are two possible approaches to \#2. The first and most direct would be to mirror the new \sphinxcode{\sphinxupquote{transform\_in}} and \sphinxcode{\sphinxupquote{transform\_out}} parameters of \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} in \sphinxcode{\sphinxupquote{Axes.boxplot}} and pass them directly. The second approach would be to add \sphinxcode{\sphinxupquote{statfxn}} and \sphinxcode{\sphinxupquote{statfxn\_args}} parameters to \sphinxcode{\sphinxupquote{Axes.boxplot}}. Under this implementation, the default value of \sphinxcode{\sphinxupquote{statfxn}} would be \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}}, but users could pass their own function. Then \sphinxcode{\sphinxupquote{transform\_in}} and \sphinxcode{\sphinxupquote{transform\_out}} would then be passed as elements of the \sphinxcode{\sphinxupquote{statfxn\_args}} parameter. \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k}{def} \PYG{n+nf}{boxplot\PYGZus{}stats}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{transform\PYGZus{}in}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{transform\PYGZus{}out}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{transform\PYGZus{}in} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{transform\PYGZus{}in} \PYG{o}{=} \PYG{k}{lambda} \PYG{n}{x}\PYG{p}{:} \PYG{n}{x} \PYG{k}{if} \PYG{n}{transform\PYGZus{}out} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{transform\PYGZus{}out} \PYG{o}{=} \PYG{k}{lambda} \PYG{n}{x}\PYG{p}{:} \PYG{n}{x} \PYG{n}{output} \PYG{o}{=} \PYG{p}{[}\PYG{p}{]} \PYG{k}{for} \PYG{n}{\PYGZus{}d} \PYG{o+ow}{in} \PYG{n}{data}\PYG{p}{:} \PYG{n}{d} \PYG{o}{=} \PYG{n}{transform\PYGZus{}in}\PYG{p}{(}\PYG{n}{\PYGZus{}d}\PYG{p}{)} \PYG{n}{stat\PYGZus{}dict} \PYG{o}{=} \PYG{n}{do\PYGZus{}stats}\PYG{p}{(}\PYG{n}{d}\PYG{p}{)} \PYG{k}{for} \PYG{n}{key}\PYG{p}{,} \PYG{n}{value} \PYG{o+ow}{in} \PYG{n}{stat\PYGZus{}dict}\PYG{o}{.}\PYG{n}{item}\PYG{p}{(}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{key} \PYG{o}{!=} \PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{label}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{:} \PYG{n}{stat\PYGZus{}dict}\PYG{p}{[}\PYG{n}{key}\PYG{p}{]} \PYG{o}{=} \PYG{n}{transform\PYGZus{}out}\PYG{p}{(}\PYG{n}{value}\PYG{p}{)} \PYG{n}{output}\PYG{o}{.}\PYG{n}{append}\PYG{p}{(}\PYG{n}{d}\PYG{p}{)} \PYG{k}{return} \PYG{n}{output} \PYG{k}{class} \PYG{n+nc}{Axes}\PYG{p}{(}\PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)}\PYG{p}{:} \PYG{k}{def} \PYG{n+nf}{boxplot\PYGZus{}option1}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{transform\PYGZus{}in}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{n}{transform\PYGZus{}out}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{)}\PYG{p}{:} \PYG{n}{stats} \PYG{o}{=} \PYG{n}{cbook}\PYG{o}{.}\PYG{n}{boxplot\PYGZus{}stats}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{transform\PYGZus{}in}\PYG{o}{=}\PYG{n}{transform\PYGZus{}in}\PYG{p}{,} \PYG{n}{transform\PYGZus{}out}\PYG{o}{=}\PYG{n}{transform\PYGZus{}out}\PYG{p}{)} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{bxp}\PYG{p}{(}\PYG{n}{stats}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \PYG{k}{def} \PYG{n+nf}{boxplot\PYGZus{}option2}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{n}{statfxn}\PYG{o}{=}\PYG{k+kc}{None}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{statopts}\PYG{p}{)}\PYG{p}{:} \PYG{k}{if} \PYG{n}{statfxn} \PYG{o+ow}{is} \PYG{k+kc}{None}\PYG{p}{:} \PYG{n}{statfxn} \PYG{o}{=} \PYG{n}{boxplot\PYGZus{}stats} \PYG{n}{stats} \PYG{o}{=} \PYG{n}{statfxn}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{statopts}\PYG{p}{)} \PYG{k}{return} \PYG{n+nb+bp}{self}\PYG{o}{.}\PYG{n}{bxp}\PYG{p}{(}\PYG{n}{stats}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{)} \end{sphinxVerbatim} Both cases would allow users to do the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{artists1} \PYG{o}{=} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{boxplot\PYGZus{}optionX}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{transform\PYGZus{}in}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{log}\PYG{p}{,} \PYG{n}{transform\PYGZus{}out}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{)} \end{sphinxVerbatim} But Option Two lets a user write a completely custom stat function (e.g., \sphinxcode{\sphinxupquote{my\_box\_stats}}) with fancy BCA confidence intervals and the whiskers set differently depending on some attribute of the data. This is available under the current API: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{my\PYGZus{}stats} \PYG{o}{=} \PYG{n}{my\PYGZus{}box\PYGZus{}stats}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{bootstrap\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BCA}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{whisker\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dynamic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{bxp}\PYG{p}{(}\PYG{n}{my\PYGZus{}stats}\PYG{p}{)} \end{sphinxVerbatim} And would be more concise with Option Two \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{statopts} \PYG{o}{=} \PYG{n+nb}{dict}\PYG{p}{(}\PYG{n}{transform\PYGZus{}in}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{log}\PYG{p}{,} \PYG{n}{transform\PYGZus{}out}\PYG{o}{=}\PYG{n}{np}\PYG{o}{.}\PYG{n}{exp}\PYG{p}{)} \PYG{n}{ax}\PYG{o}{.}\PYG{n}{boxplot}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}\PYG{p}{,} \PYG{o}{*}\PYG{o}{*}\PYG{n}{statopts}\PYG{p}{)} \end{sphinxVerbatim} Users could also pass their own function to compute the stats: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{fig}\PYG{p}{,} \PYG{n}{ax1} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{p}{)} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{boxplot}\PYG{p}{(}\PYG{n}{data}\PYG{p}{,} \PYG{n}{statfxn}\PYG{o}{=}\PYG{n}{my\PYGZus{}box\PYGZus{}stats}\PYG{p}{,} \PYG{n}{bootstrap\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BCA}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{whisker\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dynamic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} From the examples above, Option Two seems to have only marginal benefit, but in the context of downstream libraries like seaborn, its advantage is more apparent as the following would be possible without any patches to seaborn: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{seaborn} \PYG{n}{tips} \PYG{o}{=} \PYG{n}{seaborn}\PYG{o}{.}\PYG{n}{load\PYGZus{}data}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{tips}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{g} \PYG{o}{=} \PYG{n}{seaborn}\PYG{o}{.}\PYG{n}{factorplot}\PYG{p}{(}\PYG{n}{x}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{day}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{y}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{total\PYGZus{}bill}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{hue}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{sex}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{data}\PYG{o}{=}\PYG{n}{tips}\PYG{p}{,} \PYG{n}{kind}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{box}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{palette}\PYG{o}{=}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{PRGn}\PYG{l+s+s2}{\PYGZdq{}}\PYG{p}{,} \PYG{n}{shownotches}\PYG{o}{=}\PYG{k+kc}{True}\PYG{p}{,} \PYG{n}{statfxn}\PYG{o}{=}\PYG{n}{my\PYGZus{}box\PYGZus{}stats}\PYG{p}{,} \PYG{n}{bootstrap\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{BCA}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{,} \PYG{n}{whisker\PYGZus{}method}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{dynamic}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \end{sphinxVerbatim} This type of flexibility was the intention behind splitting the overall boxplot API in the current three functions. In practice however, downstream libraries like seaborn support versions of matplotlib dating back well before the split. Thus, adding just a bit more flexibility to the \sphinxcode{\sphinxupquote{Axes.boxplot}} could expose all the functionality to users of the downstream libraries with modern matplotlib installation without intervention from the downstream library maintainers. \subsubsection{Doing less} \label{\detokenize{devel/MEP/MEP28:doing-less}} Another obvious alternative would be to omit the added pre- and post- computation transform functionality in \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} and \sphinxcode{\sphinxupquote{Axes.boxplot}}, and simply remove the redundant statistical and style parameters as described above. \subsubsection{Doing nothing} \label{\detokenize{devel/MEP/MEP28:doing-nothing}} As with many things in life, doing nothing is an option here. This means we simply advocate for users and downstream libraries to take advantage of the split between \sphinxcode{\sphinxupquote{cbook.boxplot\_stats}} and \sphinxcode{\sphinxupquote{Axes.bxp}} and let them decide how to provide an interface to that. \section{MEP29: Text light markup} \label{\detokenize{devel/MEP/MEP29:mep29-text-light-markup}}\label{\detokenize{devel/MEP/MEP29::doc}} \begin{sphinxShadowBox} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id1}}{\hyperref[\detokenize{devel/MEP/MEP29:status}]{\sphinxcrossref{Status}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id2}}{\hyperref[\detokenize{devel/MEP/MEP29:branches-and-pull-requests}]{\sphinxcrossref{Branches and Pull requests}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id3}}{\hyperref[\detokenize{devel/MEP/MEP29:abstract}]{\sphinxcrossref{Abstract}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id4}}{\hyperref[\detokenize{devel/MEP/MEP29:detailed-description}]{\sphinxcrossref{Detailed description}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id5}}{\hyperref[\detokenize{devel/MEP/MEP29:implementation}]{\sphinxcrossref{Implementation}}} \begin{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id6}}{\hyperref[\detokenize{devel/MEP/MEP29:improvements}]{\sphinxcrossref{Improvements}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id7}}{\hyperref[\detokenize{devel/MEP/MEP29:problems}]{\sphinxcrossref{Problems}}} \end{itemize} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id8}}{\hyperref[\detokenize{devel/MEP/MEP29:backward-compatibility}]{\sphinxcrossref{Backward compatibility}}} \item {} \phantomsection\label{\detokenize{devel/MEP/MEP29:id9}}{\hyperref[\detokenize{devel/MEP/MEP29:alternatives}]{\sphinxcrossref{Alternatives}}} \end{itemize} \end{sphinxShadowBox} \subsection{Status} \label{\detokenize{devel/MEP/MEP29:status}} Discussion \subsection{Branches and Pull requests} \label{\detokenize{devel/MEP/MEP29:branches-and-pull-requests}} None at the moment, proof of concept only. \subsection{Abstract} \label{\detokenize{devel/MEP/MEP29:abstract}} This MEP proposes to add lightweight markup to the text artist. \subsection{Detailed description} \label{\detokenize{devel/MEP/MEP29:detailed-description}} Using different size/color/family in a text annotation is difficult because the \sphinxcode{\sphinxupquote{text}} method accepts argument for size/color/family/weight/etc. that are used for the whole text. But, if one wants, for example, to have different colors, one has to look at the gallery where one such example is provided: \sphinxurl{http://matplotlib.org/examples/text\_labels\_and\_annotations/rainbow\_text.html} This example takes a list of strings as well as a list of colors which makes it cumbersome to use. An alternative would be to use a restricted set of pango-like markup (see \sphinxurl{https://developer.gnome.org/pango/stable/PangoMarkupFormat.html}) and to interpret this markup. Some markup examples: \begin{sphinxVerbatim}[commandchars=\\\{\}] Hello \PYGZlt{}b\PYGZgt{}world!\PYGZlt{}/b\PYGZgt{}{}` Hello \PYGZlt{}span color=\PYGZdq{}blue\PYGZdq{}\PYGZgt{}world!\PYGZlt{}/span\PYGZgt{} \end{sphinxVerbatim} \subsection{Implementation} \label{\detokenize{devel/MEP/MEP29:implementation}} A proof of concept is provided in \sphinxhref{https://github.com/rougier/matplotlib/blob/markup/examples/text\_labels\_and\_annotations/markup.py}{markup\_example.py} but it currently only handles the horizontal direction. \subsubsection{Improvements} \label{\detokenize{devel/MEP/MEP29:improvements}}\begin{itemize} \item {} This proof of concept uses regex to parse the text but it may be better to use the html.parser from the standard library. \item {} Computation of text fragment positions could benefit from the OffsetFrom class. See for example item 5 in \sphinxhref{http://matplotlib.org/devdocs/tutorials/text/annotations.html\#using-complex-coordinates-with-annotations}{Using Complex Coordinates with Annotations} \end{itemize} \subsubsection{Problems} \label{\detokenize{devel/MEP/MEP29:problems}}\begin{itemize} \item {} One serious problem is how to deal with text having both latex and html-like tags. For example, consider the following: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYGZdl{}\PYGZlt{}b\PYGZgt{}Bold\PYGZdl{}\PYGZlt{}/b\PYGZgt{} \end{sphinxVerbatim} Recommendation would be to have mutual exclusion. \end{itemize} \subsection{Backward compatibility} \label{\detokenize{devel/MEP/MEP29:backward-compatibility}} None at the moment since it is only a proof of concept \subsection{Alternatives} \label{\detokenize{devel/MEP/MEP29:alternatives}} As proposed by @anntzer, this could be also implemented as improvements to mathtext. For example: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{text}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{Hello }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{textbf}\PYG{l+s+si}{\PYGZob{}world\PYGZcb{}}\PYG{l+s+s2}{\PYGZcb{}\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{text}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{Hello }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{textcolor}\PYG{l+s+si}{\PYGZob{}blue\PYGZcb{}}\PYG{l+s+si}{\PYGZob{}world\PYGZcb{}}\PYG{l+s+s2}{\PYGZcb{}\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}} \PYG{l+s+sa}{r}\PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{\PYGZdl{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{text}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{Hello }\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{textsf}\PYG{l+s+s2}{\PYGZob{}}\PYG{l+s+s2}{\PYGZbs{}}\PYG{l+s+s2}{small world\PYGZcb{}\PYGZcb{}\PYGZdl{}}\PYG{l+s+s2}{\PYGZdq{}} \end{sphinxVerbatim} \chapter{Licenses} \label{\detokenize{devel/license:licenses}}\label{\detokenize{devel/license:license-discussion}}\label{\detokenize{devel/license::doc}} Matplotlib only uses BSD compatible code. If you bring in code from another project make sure it has a PSF, BSD, MIT or compatible license (see the Open Source Initiative \sphinxhref{https://opensource.org/licenses}{licenses page} for details on individual licenses). If it doesn't, you may consider contacting the author and asking them to relicense it. GPL and LGPL code are not acceptable in the main code base, though we are considering an alternative way of distributing L/GPL code through an separate channel, possibly a toolkit. If you include code, make sure you include a copy of that code's license in the license directory if the code's license requires you to distribute the license with it. Non-BSD compatible licenses are acceptable in matplotlib toolkits (e.g., basemap), but make sure you clearly state the licenses you are using. \section{Why BSD compatible?} \label{\detokenize{devel/license:why-bsd-compatible}} The two dominant license variants in the wild are GPL-style and BSD-style. There are countless other licenses that place specific restrictions on code reuse, but there is an important difference to be considered in the GPL and BSD variants. The best known and perhaps most widely used license is the GPL, which in addition to granting you full rights to the source code including redistribution, carries with it an extra obligation. If you use GPL code in your own code, or link with it, your product must be released under a GPL compatible license. i.e., you are required to give the source code to other people and give them the right to redistribute it as well. Many of the most famous and widely used open source projects are released under the GPL, including linux, gcc, emacs and sage. The second major class are the BSD-style licenses (which includes MIT and the python PSF license). These basically allow you to do whatever you want with the code: ignore it, include it in your own open source project, include it in your proprietary product, sell it, whatever. python itself is released under a BSD compatible license, in the sense that, quoting from the PSF license page: \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{n}{There} \PYG{o+ow}{is} \PYG{n}{no} \PYG{n}{GPL}\PYG{o}{\PYGZhy{}}\PYG{n}{like} \PYG{l+s+s2}{\PYGZdq{}}\PYG{l+s+s2}{copyleft}\PYG{l+s+s2}{\PYGZdq{}} \PYG{n}{restriction}\PYG{o}{.} \PYG{n}{Distributing} \PYG{n}{binary}\PYG{o}{\PYGZhy{}}\PYG{n}{only} \PYG{n}{versions} \PYG{n}{of} \PYG{n}{Python}\PYG{p}{,} \PYG{n}{modified} \PYG{o+ow}{or} \PYG{o+ow}{not}\PYG{p}{,} \PYG{o+ow}{is} \PYG{n}{allowed}\PYG{o}{.} \PYG{n}{There} \PYG{o+ow}{is} \PYG{n}{no} \PYG{n}{requirement} \PYG{n}{to} \PYG{n}{release} \PYG{n+nb}{any} \PYG{n}{of} \PYG{n}{your} \PYG{n}{source} \PYG{n}{code}\PYG{o}{.} \PYG{n}{You} \PYG{n}{can} \PYG{n}{also} \PYG{n}{write} \PYG{n}{extension} \PYG{n}{modules} \PYG{k}{for} \PYG{n}{Python} \PYG{o+ow}{and} \PYG{n}{provide} \PYG{n}{them} \PYG{n}{only} \PYG{o+ow}{in} \PYG{n}{binary} \PYG{n}{form}\PYG{o}{.} \end{sphinxVerbatim} Famous projects released under a BSD-style license in the permissive sense of the last paragraph are the BSD operating system, python and TeX. There are several reasons why early matplotlib developers selected a BSD compatible license. matplotlib is a python extension, and we choose a license that was based on the python license (BSD compatible). Also, we wanted to attract as many users and developers as possible, and many software companies will not use GPL code in software they plan to distribute, even those that are highly committed to open source development, such as \sphinxhref{https://www.enthought.com}{enthought}, out of legitimate concern that use of the GPL will "infect" their code base by its viral nature. In effect, they want to retain the right to release some proprietary code. Companies and institutions who use matplotlib often make significant contributions, because they have the resources to get a job done, even a boring one. Two of the matplotlib backends (FLTK and WX) were contributed by private companies. The final reason behind the licensing choice is compatibility with the other python extensions for scientific computing: ipython, numpy, scipy, the enthought tool suite and python itself are all distributed under BSD compatible licenses. \chapter{Default Color changes} \label{\detokenize{devel/color_changes:default-color-changes}}\label{\detokenize{devel/color_changes:color-changes}}\label{\detokenize{devel/color_changes::doc}} As discussed at length elsewhere {[}insert links{]}, \sphinxcode{\sphinxupquote{jet}} is an empirically bad color map and should not be the default color map. Due to the position that changing the appearance of the plot breaks backward compatibility, this change has been put off for far longer than it should have been. In addition to changing the default color map we plan to take the chance to change the default color-cycle on plots and to adopt a different color map for filled plots (\sphinxcode{\sphinxupquote{imshow}}, \sphinxcode{\sphinxupquote{pcolor}}, \sphinxcode{\sphinxupquote{contourf}}, etc) and for scatter like plots. \section{Default Heat Map Colormap} \label{\detokenize{devel/color_changes:default-heat-map-colormap}} The choice of a new color map is fertile ground to bike-shedding ("No, it should be \_this\_ color") so we have a proposed set criteria (via Nathaniel Smith) to evaluate proposed color maps. \begin{itemize} \item {} it should be a sequential colormap, because diverging colormaps are really misleading unless you know where the "center" of the data is, and for a default colormap we generally won't. \item {} it should be perceptually uniform, i.e., human subjective judgments of how far apart nearby colors are should correspond as linearly as possible to the difference between the numerical values they represent, at least locally. \item {} it should have a perceptually uniform luminance ramp, i.e. if you convert to greyscale it should still be uniform. This is useful both in practical terms (greyscale printers are still a thing!) and because luminance is a very strong and natural cue to magnitude. \item {} it should also have some kind of variation in hue, because hue variation is a really helpful additional cue to perception, having two cues is better than one, and there's no reason not to do it. \item {} the hue variation should be chosen to produce reasonable results even for viewers with the more common types of colorblindness. (Which rules out things like red-to-green.) \item {} For bonus points, it would be nice to choose a hue ramp that still works if you throw away the luminance variation, because then we could use the version with varying luminance for 2d plots, and the version with just hue variation for 3d plots. (In 3d plots you really want to reserve the luminance channel for lighting/shading, because your brain is \sphinxstyleemphasis{really} good at extracting 3d shape from luminance variation. If the 3d surface itself has massively varying luminance then this screws up the ability to see shape.) \item {} Not infringe any existing IP \end{itemize} \subsection{Example script} \label{\detokenize{devel/color_changes:example-script}} \subsection{Proposed Colormaps} \label{\detokenize{devel/color_changes:proposed-colormaps}} \section{Default Scatter Colormap} \label{\detokenize{devel/color_changes:default-scatter-colormap}} For heat-map like applications it can be desirable to cover as much of the luminence scale as possible, however when color mapping markers, having markers too close to white can be a problem. For that reason we propose using a different (but maybe related) color map to the heat map for marker-based. The design parameters are the same as above, only with a more limited luminence variation. \subsection{Example script} \label{\detokenize{devel/color_changes:id1}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{seed}\PYG{p}{(}\PYG{l+m+mi}{1234}\PYG{p}{)} \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{N} \PYG{o}{=} \PYG{l+m+mi}{50} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)} \PYG{n}{y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)} \PYG{n}{colors} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)} \PYG{n}{area} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi} \PYG{o}{*} \PYG{p}{(}\PYG{l+m+mi}{15} \PYG{o}{*} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{N}\PYG{p}{)}\PYG{p}{)}\PYG{o}{*}\PYG{o}{*}\PYG{l+m+mi}{2} \PYG{c+c1}{\PYGZsh{} 0 to 15 point radiuses} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{scatter}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{y}\PYG{p}{,} \PYG{n}{s}\PYG{o}{=}\PYG{n}{area}\PYG{p}{,} \PYG{n}{c}\PYG{o}{=}\PYG{n}{colors}\PYG{p}{,} \PYG{n}{alpha}\PYG{o}{=}\PYG{l+m+mf}{0.5}\PYG{p}{)} \PYG{n}{X}\PYG{p}{,}\PYG{n}{Y} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{meshgrid}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{arange}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{o}{.}\PYG{l+m+mi}{2}\PYG{p}{)}\PYG{p}{)} \PYG{n}{U} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{cos}\PYG{p}{(}\PYG{n}{X}\PYG{p}{)} \PYG{n}{V} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{Y}\PYG{p}{)} \PYG{n}{Q} \PYG{o}{=} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{quiver}\PYG{p}{(}\PYG{n}{X}\PYG{p}{,} \PYG{n}{Y}\PYG{p}{,} \PYG{n}{U}\PYG{p}{,} \PYG{n}{V}\PYG{p}{,} \PYG{n}{units}\PYG{o}{=}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{width}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)} \PYG{n}{qd} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{random}\PYG{o}{.}\PYG{n}{rand}\PYG{p}{(}\PYG{n}{np}\PYG{o}{.}\PYG{n}{prod}\PYG{p}{(}\PYG{n}{X}\PYG{o}{.}\PYG{n}{shape}\PYG{p}{)}\PYG{p}{)} \PYG{n}{Q}\PYG{o}{.}\PYG{n}{set\PYGZus{}array}\PYG{p}{(}\PYG{n}{qd}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Proposed Colormaps} \label{\detokenize{devel/color_changes:id2}} \section{Color Cycle / Qualitative color map} \label{\detokenize{devel/color_changes:color-cycle-qualitative-color-map}} When plotting lines it is frequently desirable to plot multiple lines or artists which need to be distinguishable, but there is no inherent ordering. \subsection{Example script} \label{\detokenize{devel/color_changes:id3}} \begin{sphinxVerbatim}[commandchars=\\\{\}] \PYG{k+kn}{import} \PYG{n+nn}{numpy} \PYG{k}{as} \PYG{n+nn}{np} \PYG{k+kn}{import} \PYG{n+nn}{matplotlib}\PYG{n+nn}{.}\PYG{n+nn}{pyplot} \PYG{k}{as} \PYG{n+nn}{plt} \PYG{n}{fig}\PYG{p}{,} \PYG{p}{(}\PYG{n}{ax1}\PYG{p}{,} \PYG{n}{ax2}\PYG{p}{)} \PYG{o}{=} \PYG{n}{plt}\PYG{o}{.}\PYG{n}{subplots}\PYG{p}{(}\PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{p}{)} \PYG{n}{x} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{1}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax1}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{x}\PYG{p}{,} \PYG{n}{x} \PYG{o}{*} \PYG{n}{j}\PYG{p}{)} \PYG{n}{th} \PYG{o}{=} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{1024}\PYG{p}{)} \PYG{k}{for} \PYG{n}{j} \PYG{o+ow}{in} \PYG{n}{np}\PYG{o}{.}\PYG{n}{linspace}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{,} \PYG{l+m+mi}{10}\PYG{p}{)}\PYG{p}{:} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{plot}\PYG{p}{(}\PYG{n}{th}\PYG{p}{,} \PYG{n}{np}\PYG{o}{.}\PYG{n}{sin}\PYG{p}{(}\PYG{n}{th} \PYG{o}{+} \PYG{n}{j}\PYG{p}{)}\PYG{p}{)} \PYG{n}{ax2}\PYG{o}{.}\PYG{n}{set\PYGZus{}xlim}\PYG{p}{(}\PYG{l+m+mi}{0}\PYG{p}{,} \PYG{l+m+mi}{2}\PYG{o}{*}\PYG{n}{np}\PYG{o}{.}\PYG{n}{pi}\PYG{p}{)} \end{sphinxVerbatim} \subsection{Proposed Color cycle} \label{\detokenize{devel/color_changes:proposed-color-cycle}} \part{Glossary} \label{\detokenize{glossary/index:glossary}}\label{\detokenize{glossary/index:id1}}\label{\detokenize{glossary/index::doc}}\begin{description} \item[{AGG\index{AGG@\spxentry{AGG}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-agg}}}] \leavevmode The Anti-Grain Geometry (\sphinxhref{http://antigrain.com/}{Agg}) rendering engine, capable of rendering high-quality images \item[{Cairo\index{Cairo@\spxentry{Cairo}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-cairo}}}] \leavevmode The \sphinxhref{https://cairographics.org}{Cairo graphics} engine \item[{dateutil\index{dateutil@\spxentry{dateutil}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-dateutil}}}] \leavevmode The \sphinxhref{https://dateutil.readthedocs.io}{dateutil} library provides extensions to the standard datetime module \item[{EPS\index{EPS@\spxentry{EPS}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-eps}}}] \leavevmode Encapsulated Postscript (\sphinxhref{https://en.wikipedia.org/wiki/Encapsulated\_PostScript}{EPS}) \item[{FreeType\index{FreeType@\spxentry{FreeType}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-freetype}}}] \leavevmode \sphinxhref{https://www.freetype.org/}{FreeType} is a font rasterization library used by matplotlib which supports TrueType, Type 1, and OpenType fonts. \item[{GDK\index{GDK@\spxentry{GDK}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-gdk}}}] \leavevmode The Gimp Drawing Kit for GTK+ \item[{GTK\index{GTK@\spxentry{GTK}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-gtk}}}] \leavevmode The GIMP Toolkit (\sphinxhref{https://www.gtk.org/}{GTK}) graphical user interface library \item[{JPG\index{JPG@\spxentry{JPG}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-jpg}}}] \leavevmode The Joint Photographic Experts Group (\sphinxhref{https://en.wikipedia.org/wiki/Jpeg}{JPEG}) compression method and file format for photographic images \item[{numpy\index{numpy@\spxentry{numpy}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-numpy}}}] \leavevmode \sphinxhref{http://www.numpy.org/}{numpy} is the standard numerical array library for python, the successor to Numeric and numarray. numpy provides fast operations for homogeneous data sets and common mathematical operations like correlations, standard deviation, fourier transforms, and convolutions. \item[{PDF\index{PDF@\spxentry{PDF}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-pdf}}}] \leavevmode Adobe's Portable Document Format (\sphinxhref{https://en.wikipedia.org/wiki/Portable\_Document\_Format}{PDF}) \item[{PNG\index{PNG@\spxentry{PNG}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-png}}}] \leavevmode Portable Network Graphics (\sphinxhref{https://en.wikipedia.org/wiki/Portable\_Network\_Graphics}{PNG}), a raster graphics format that employs lossless data compression which is more suitable for line art than the lossy jpg format. Unlike the gif format, png is not encumbered by requirements for a patent license. \item[{PS\index{PS@\spxentry{PS}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-ps}}}] \leavevmode Postscript (\sphinxhref{https://en.wikipedia.org/wiki/PostScript}{PS}) is a vector graphics ASCII text language widely used in printers and publishing. Postscript was developed by adobe systems and is starting to show its age: for example is does not have an alpha channel. PDF was designed in part as a next-generation document format to replace postscript \item[{PyGObject\index{PyGObject@\spxentry{PyGObject}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-pygobject}}}] \leavevmode \sphinxhref{http://www.pygtk.org/}{PyGObject} provides Python wrappers for the {\hyperref[\detokenize{glossary/index:term-gtk}]{\sphinxtermref{\DUrole{xref,std,std-term}{GTK}}}} widgets library \item[{pyqt\index{pyqt@\spxentry{pyqt}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-pyqt}}}] \leavevmode \sphinxhref{https://wiki.python.org/moin/PyQt}{pyqt} provides python wrappers for the {\hyperref[\detokenize{glossary/index:term-qt}]{\sphinxtermref{\DUrole{xref,std,std-term}{Qt}}}} widgets library and is required by the matplotlib Qt5Agg and Qt4Agg backends. Widely used on linux and windows; many linux distributions package this as 'python-qt5' or 'python-qt4'. \item[{python\index{python@\spxentry{python}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-python}}}] \leavevmode \sphinxhref{https://www.python.org}{python} is an object oriented interpreted language widely used for scripting, application development, web application servers, scientific computing and more. \item[{Qt\index{Qt@\spxentry{Qt}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-qt}}}] \leavevmode \sphinxhref{https://www.qt.io/}{Qt} is a cross-platform application framework for desktop and embedded development. \item[{Qt4\index{Qt4@\spxentry{Qt4}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-qt4}}}] \leavevmode \sphinxhref{https://doc.qt.io/archives/qt-4.8/index.html}{Qt4} is the previous, but most widely used, version of Qt cross-platform application framework for desktop and embedded development. \item[{Qt5\index{Qt5@\spxentry{Qt5}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-qt5}}}] \leavevmode \sphinxhref{http://doc.qt.io/qt-5/index.html}{Qt5} is the current version of Qt cross-platform application framework for desktop and embedded development. \item[{raster graphics\index{raster graphics@\spxentry{raster graphics}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-raster-graphics}}}] \leavevmode \sphinxhref{https://en.wikipedia.org/wiki/Raster\_graphics}{Raster graphics}, or bitmaps, represent an image as an array of pixels which is resolution dependent. Raster graphics are generally most practical for photo-realistic images, but do not scale easily without loss of quality. \item[{SVG\index{SVG@\spxentry{SVG}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-svg}}}] \leavevmode The Scalable Vector Graphics format (\sphinxhref{https://en.wikipedia.org/wiki/Svg}{SVG}). An XML based vector graphics format supported by many web browsers. \item[{TIFF\index{TIFF@\spxentry{TIFF}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-tiff}}}] \leavevmode Tagged Image File Format (\sphinxhref{https://en.wikipedia.org/wiki/Tagged\_Image\_File\_Format}{TIFF}) is a file format for storing images, including photographs and line art. \item[{Tk\index{Tk@\spxentry{Tk}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-tk}}}] \leavevmode \sphinxhref{http://www.tcl.tk/}{Tk} is a graphical user interface for Tcl and many other dynamic languages. It can produce rich, native applications that run unchanged across Windows, Mac OS X, Linux and more. \item[{vector graphics\index{vector graphics@\spxentry{vector graphics}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-vector-graphics}}}] \leavevmode \sphinxhref{https://en.wikipedia.org/wiki/Vector\_graphics}{vector graphics} use geometrical primitives based upon mathematical equations to represent images in computer graphics. Primitives can include points, lines, curves, and shapes or polygons. Vector graphics are scalable, which means that they can be resized without suffering from issues related to inherent resolution like are seen in raster graphics. Vector graphics are generally most practical for typesetting and graphic design applications. \item[{wxpython\index{wxpython@\spxentry{wxpython}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-wxpython}}}] \leavevmode \sphinxhref{https://www.wxpython.org/}{wxpython} provides python wrappers for the {\hyperref[\detokenize{glossary/index:term-wxwidgets}]{\sphinxtermref{\DUrole{xref,std,std-term}{wxWidgets}}}} library for use with the WX and WXAgg backends. Widely used on linux, OS-X and windows, it is often packaged by linux distributions as 'python-wxgtk' \item[{wxWidgets\index{wxWidgets@\spxentry{wxWidgets}|spxpagem}\phantomsection\label{\detokenize{glossary/index:term-wxwidgets}}}] \leavevmode \sphinxhref{http://www.wxwidgets.org/}{WX} is cross-platform GUI and tools library for GTK, MS Windows, and MacOS. It uses native widgets for each operating system, so applications will have the look-and-feel that users on that operating system expect. \end{description} \begin{sphinxthebibliography}{kovesi-c} \bibitem[colorcet]{tutorials/colors/colormaps:colorcet} \sphinxurl{https://colorcet.pyviz.org} \bibitem[Ware]{tutorials/colors/colormaps:ware} \sphinxurl{http://ccom.unh.edu/sites/default/files/publications/Ware\_1988\_CGA\_Color\_sequences\_univariate\_maps.pdf} \bibitem[Moreland]{tutorials/colors/colormaps:moreland} \sphinxurl{http://www.kennethmoreland.com/color-maps/ColorMapsExpanded.pdf} \bibitem[list-colormaps]{tutorials/colors/colormaps:list-colormaps} \sphinxurl{https://gist.github.com/endolith/2719900\#id7} \bibitem[mycarta-banding]{tutorials/colors/colormaps:mycarta-banding} \sphinxurl{https://mycarta.wordpress.com/2012/10/14/the-rainbow-is-deadlong-live-the-rainbow-part-4-cie-lab-heated-body/} \bibitem[mycarta-jet]{tutorials/colors/colormaps:mycarta-jet} \sphinxurl{https://mycarta.wordpress.com/2012/10/06/the-rainbow-is-deadlong-live-the-rainbow-part-3/} \bibitem[kovesi-colormaps]{tutorials/colors/colormaps:kovesi-colormaps} \sphinxurl{https://arxiv.org/abs/1509.03700} \bibitem[bw]{tutorials/colors/colormaps:bw} \sphinxurl{http://www.tannerhelland.com/3643/grayscale-image-algorithm-vb6/} \bibitem[colorblindness]{tutorials/colors/colormaps:colorblindness} \sphinxurl{http://www.color-blindness.com/} \bibitem[IBM]{tutorials/colors/colormaps:ibm} \sphinxurl{https://doi.org/10.1109/VISUAL.1995.480803} \bibitem[palettable]{tutorials/colors/colormaps:palettable} \sphinxurl{https://jiffyclub.github.io/palettable/} \bibitem[1]{api/dviread:ra043a4f19cd5-1} \sphinxhref{http://www.tug.org/kpathsea/}{Kpathsea documentation} The library that \sphinxstyleliteralstrong{\sphinxupquote{kpsewhich}} is part of. \bibitem[R0be0c58fd53f-1]{api/tri_api:r0be0c58fd53f-1} Michel Bernadou, Kamal Hassan, "Basis functions for general Hsieh-Clough-Tocher triangles, complete or reduced.", International Journal for Numerical Methods in Engineering, 17(5):784 - 789. 2.01. \bibitem[R0be0c58fd53f-2]{api/tri_api:r0be0c58fd53f-2} C.T. Kelley, "Iterative Methods for Optimization". \end{sphinxthebibliography} \renewcommand{\indexname}{Python Module Index} \begin{sphinxtheindex} \let\bigletter\sphinxstyleindexlettergroup \bigletter{m} \item\relax\sphinxstyleindexentry{matplotlib.afm}\sphinxstyleindexpageref{api/afm_api:\detokenize{module-matplotlib.afm}} \item\relax\sphinxstyleindexentry{matplotlib.animation}\sphinxstyleindexpageref{api/animation_api:\detokenize{module-matplotlib.animation}} \item\relax\sphinxstyleindexentry{matplotlib.artist}\sphinxstyleindexpageref{api/artist_api:\detokenize{module-matplotlib.artist}} \item\relax\sphinxstyleindexentry{matplotlib.axes}\sphinxstyleindexpageref{api/axes_api:\detokenize{module-matplotlib.axes}} \item\relax\sphinxstyleindexentry{matplotlib.axis}\sphinxstyleindexpageref{api/axis_api:\detokenize{module-matplotlib.axis}} \item\relax\sphinxstyleindexentry{matplotlib.backend\_bases}\sphinxstyleindexpageref{api/backend_bases_api:\detokenize{module-matplotlib.backend_bases}} \item\relax\sphinxstyleindexentry{matplotlib.backend\_managers}\sphinxstyleindexpageref{api/backend_managers_api:\detokenize{module-matplotlib.backend_managers}} \item\relax\sphinxstyleindexentry{matplotlib.backend\_tools}\sphinxstyleindexpageref{api/backend_tools_api:\detokenize{module-matplotlib.backend_tools}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_agg}\sphinxstyleindexpageref{api/backend_agg_api:\detokenize{module-matplotlib.backends.backend_agg}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_cairo}\sphinxstyleindexpageref{api/backend_cairo_api:\detokenize{module-matplotlib.backends.backend_cairo}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_mixed}\sphinxstyleindexpageref{api/backend_mixed_api:\detokenize{module-matplotlib.backends.backend_mixed}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_nbagg}\sphinxstyleindexpageref{api/backend_nbagg_api:\detokenize{module-matplotlib.backends.backend_nbagg}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_pdf}\sphinxstyleindexpageref{api/backend_pdf_api:\detokenize{module-matplotlib.backends.backend_pdf}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_pgf}\sphinxstyleindexpageref{api/backend_pgf_api:\detokenize{module-matplotlib.backends.backend_pgf}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_ps}\sphinxstyleindexpageref{api/backend_ps_api:\detokenize{module-matplotlib.backends.backend_ps}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_svg}\sphinxstyleindexpageref{api/backend_svg_api:\detokenize{module-matplotlib.backends.backend_svg}} \item\relax\sphinxstyleindexentry{matplotlib.backends.backend\_tkagg}\sphinxstyleindexpageref{api/backend_tkagg_api:\detokenize{module-matplotlib.backends.backend_tkagg}} \item\relax\sphinxstyleindexentry{matplotlib.blocking\_input}\sphinxstyleindexpageref{api/blocking_input_api:\detokenize{module-matplotlib.blocking_input}} \item\relax\sphinxstyleindexentry{matplotlib.category}\sphinxstyleindexpageref{api/category_api:\detokenize{module-matplotlib.category}} \item\relax\sphinxstyleindexentry{matplotlib.cbook}\sphinxstyleindexpageref{api/cbook_api:\detokenize{module-matplotlib.cbook}} \item\relax\sphinxstyleindexentry{matplotlib.cm}\sphinxstyleindexpageref{api/cm_api:\detokenize{module-matplotlib.cm}} \item\relax\sphinxstyleindexentry{matplotlib.collections}\sphinxstyleindexpageref{api/collections_api:\detokenize{module-matplotlib.collections}} \item\relax\sphinxstyleindexentry{matplotlib.colorbar}\sphinxstyleindexpageref{api/colorbar_api:\detokenize{module-matplotlib.colorbar}} \item\relax\sphinxstyleindexentry{matplotlib.colors}\sphinxstyleindexpageref{api/colors_api:\detokenize{module-matplotlib.colors}} \item\relax\sphinxstyleindexentry{matplotlib.container}\sphinxstyleindexpageref{api/container_api:\detokenize{module-matplotlib.container}} \item\relax\sphinxstyleindexentry{matplotlib.contour}\sphinxstyleindexpageref{api/contour_api:\detokenize{module-matplotlib.contour}} \item\relax\sphinxstyleindexentry{matplotlib.dates}\sphinxstyleindexpageref{api/dates_api:\detokenize{module-matplotlib.dates}} \item\relax\sphinxstyleindexentry{matplotlib.dviread}\sphinxstyleindexpageref{api/dviread:\detokenize{module-matplotlib.dviread}} \item\relax\sphinxstyleindexentry{matplotlib.figure}\sphinxstyleindexpageref{api/figure_api:\detokenize{module-matplotlib.figure}} \item\relax\sphinxstyleindexentry{matplotlib.font\_manager}\sphinxstyleindexpageref{api/font_manager_api:\detokenize{module-matplotlib.font_manager}} \item\relax\sphinxstyleindexentry{matplotlib.fontconfig\_pattern}\sphinxstyleindexpageref{api/fontconfig_pattern_api:\detokenize{module-matplotlib.fontconfig_pattern}} \item\relax\sphinxstyleindexentry{matplotlib.gridspec}\sphinxstyleindexpageref{api/gridspec_api:\detokenize{module-matplotlib.gridspec}} \item\relax\sphinxstyleindexentry{matplotlib.image}\sphinxstyleindexpageref{api/image_api:\detokenize{module-matplotlib.image}} \item\relax\sphinxstyleindexentry{matplotlib.legend}\sphinxstyleindexpageref{api/legend_api:\detokenize{module-matplotlib.legend}} \item\relax\sphinxstyleindexentry{matplotlib.legend\_handler}\sphinxstyleindexpageref{api/legend_handler_api:\detokenize{module-matplotlib.legend_handler}} \item\relax\sphinxstyleindexentry{matplotlib.lines}\sphinxstyleindexpageref{api/lines_api:\detokenize{module-matplotlib.lines}} \item\relax\sphinxstyleindexentry{matplotlib.markers}\sphinxstyleindexpageref{api/markers_api:\detokenize{module-matplotlib.markers}} \item\relax\sphinxstyleindexentry{matplotlib.mathtext}\sphinxstyleindexpageref{api/mathtext_api:\detokenize{module-matplotlib.mathtext}} \item\relax\sphinxstyleindexentry{matplotlib.mlab}\sphinxstyleindexpageref{api/mlab_api:\detokenize{module-matplotlib.mlab}} \item\relax\sphinxstyleindexentry{matplotlib.offsetbox}\sphinxstyleindexpageref{api/offsetbox_api:\detokenize{module-matplotlib.offsetbox}} \item\relax\sphinxstyleindexentry{matplotlib.patches}\sphinxstyleindexpageref{api/patches_api:\detokenize{module-matplotlib.patches}} \item\relax\sphinxstyleindexentry{matplotlib.path}\sphinxstyleindexpageref{api/path_api:\detokenize{module-matplotlib.path}} \item\relax\sphinxstyleindexentry{matplotlib.patheffects}\sphinxstyleindexpageref{tutorials/advanced/patheffects_guide:\detokenize{module-matplotlib.patheffects}} \item\relax\sphinxstyleindexentry{matplotlib.projections}\sphinxstyleindexpageref{api/projections_api:\detokenize{module-matplotlib.projections}} \item\relax\sphinxstyleindexentry{matplotlib.projections.polar}\sphinxstyleindexpageref{api/projections_api:\detokenize{module-matplotlib.projections.polar}} \item\relax\sphinxstyleindexentry{matplotlib.pyplot}\sphinxstyleindexpageref{api/_as_gen/matplotlib.pyplot:\detokenize{module-matplotlib.pyplot}} \item\relax\sphinxstyleindexentry{matplotlib.rcsetup}\sphinxstyleindexpageref{api/rcsetup_api:\detokenize{module-matplotlib.rcsetup}} \item\relax\sphinxstyleindexentry{matplotlib.sankey}\sphinxstyleindexpageref{api/sankey_api:\detokenize{module-matplotlib.sankey}} \item\relax\sphinxstyleindexentry{matplotlib.scale}\sphinxstyleindexpageref{api/scale_api:\detokenize{module-matplotlib.scale}} \item\relax\sphinxstyleindexentry{matplotlib.sphinxext.plot\_directive}\sphinxstyleindexpageref{devel/plot_directive:\detokenize{module-matplotlib.sphinxext.plot_directive}} \item\relax\sphinxstyleindexentry{matplotlib.spines}\sphinxstyleindexpageref{api/spines_api:\detokenize{module-matplotlib.spines}} \item\relax\sphinxstyleindexentry{matplotlib.style}\sphinxstyleindexpageref{api/style_api:\detokenize{module-matplotlib.style}} \item\relax\sphinxstyleindexentry{matplotlib.table}\sphinxstyleindexpageref{api/table_api:\detokenize{module-matplotlib.table}} \item\relax\sphinxstyleindexentry{matplotlib.testing}\sphinxstyleindexpageref{api/testing_api:\detokenize{module-matplotlib.testing}} \item\relax\sphinxstyleindexentry{matplotlib.testing.compare}\sphinxstyleindexpageref{api/testing_api:\detokenize{module-matplotlib.testing.compare}} \item\relax\sphinxstyleindexentry{matplotlib.testing.decorators}\sphinxstyleindexpageref{api/testing_api:\detokenize{module-matplotlib.testing.decorators}} \item\relax\sphinxstyleindexentry{matplotlib.testing.disable\_internet}\sphinxstyleindexpageref{api/testing_api:\detokenize{module-matplotlib.testing.disable_internet}} \item\relax\sphinxstyleindexentry{matplotlib.testing.exceptions}\sphinxstyleindexpageref{api/testing_api:\detokenize{module-matplotlib.testing.exceptions}} \item\relax\sphinxstyleindexentry{matplotlib.text}\sphinxstyleindexpageref{api/text_api:\detokenize{module-matplotlib.text}} \item\relax\sphinxstyleindexentry{matplotlib.textpath}\sphinxstyleindexpageref{api/textpath_api:\detokenize{module-matplotlib.textpath}} \item\relax\sphinxstyleindexentry{matplotlib.ticker}\sphinxstyleindexpageref{api/ticker_api:\detokenize{module-matplotlib.ticker}} \item\relax\sphinxstyleindexentry{matplotlib.tight\_layout}\sphinxstyleindexpageref{api/tight_layout_api:\detokenize{module-matplotlib.tight_layout}} \item\relax\sphinxstyleindexentry{matplotlib.transforms}\sphinxstyleindexpageref{api/transformations:\detokenize{module-matplotlib.transforms}} \item\relax\sphinxstyleindexentry{matplotlib.tri}\sphinxstyleindexpageref{api/tri_api:\detokenize{module-matplotlib.tri}} \item\relax\sphinxstyleindexentry{matplotlib.type1font}\sphinxstyleindexpageref{api/type1font:\detokenize{module-matplotlib.type1font}} \item\relax\sphinxstyleindexentry{matplotlib.units}\sphinxstyleindexpageref{api/units_api:\detokenize{module-matplotlib.units}} \item\relax\sphinxstyleindexentry{matplotlib.widgets}\sphinxstyleindexpageref{api/widgets_api:\detokenize{module-matplotlib.widgets}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.anchored\_artists}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.anchored_artists:\detokenize{module-mpl_toolkits.axes_grid1.anchored_artists}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.axes\_divider}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.axes_divider:\detokenize{module-mpl_toolkits.axes_grid1.axes_divider}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.axes\_grid}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.axes_grid:\detokenize{module-mpl_toolkits.axes_grid1.axes_grid}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.axes\_rgb}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.axes_rgb:\detokenize{module-mpl_toolkits.axes_grid1.axes_rgb}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.axes\_size}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.axes_size:\detokenize{module-mpl_toolkits.axes_grid1.axes_size}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.colorbar}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.colorbar:\detokenize{module-mpl_toolkits.axes_grid1.colorbar}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.inset\_locator}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.inset_locator:\detokenize{module-mpl_toolkits.axes_grid1.inset_locator}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.mpl\_axes}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.mpl_axes:\detokenize{module-mpl_toolkits.axes_grid1.mpl_axes}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axes\_grid1.parasite\_axes}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes:\detokenize{module-mpl_toolkits.axes_grid1.parasite_axes}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.angle\_helper}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.angle_helper:\detokenize{module-mpl_toolkits.axisartist.angle_helper}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axes\_divider}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axes_divider:\detokenize{module-mpl_toolkits.axisartist.axes_divider}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axes\_grid}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axes_grid:\detokenize{module-mpl_toolkits.axisartist.axes_grid}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axes\_rgb}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axes_rgb:\detokenize{module-mpl_toolkits.axisartist.axes_rgb}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axis\_artist}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axis_artist:\detokenize{module-mpl_toolkits.axisartist.axis_artist}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axisline\_style}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axisline_style:\detokenize{module-mpl_toolkits.axisartist.axisline_style}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.axislines}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.axislines:\detokenize{module-mpl_toolkits.axisartist.axislines}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.clip\_path}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.clip_path:\detokenize{module-mpl_toolkits.axisartist.clip_path}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.floating\_axes}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.floating_axes:\detokenize{module-mpl_toolkits.axisartist.floating_axes}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.grid\_finder}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.grid_finder:\detokenize{module-mpl_toolkits.axisartist.grid_finder}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.grid\_helper\_curvelinear}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.grid_helper_curvelinear:\detokenize{module-mpl_toolkits.axisartist.grid_helper_curvelinear}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.axisartist.parasite\_axes}\sphinxstyleindexpageref{api/_as_gen/mpl_toolkits.axisartist.parasite_axes:\detokenize{module-mpl_toolkits.axisartist.parasite_axes}} \item\relax\sphinxstyleindexentry{mpl\_toolkits.mplot3d}\sphinxstyleindexpageref{api/toolkits/mplot3d:\detokenize{module-mpl_toolkits.mplot3d}} \end{sphinxtheindex} \renewcommand{\indexname}{Index} \printindex \end{document}
X Tutup